diff --git a/research/fstar-gap2-v11-seed42ff0611/CERTIFICATE.json b/research/fstar-gap2-v11-seed42ff0611/CERTIFICATE.json new file mode 100644 index 0000000000..e94a1a8041 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/CERTIFICATE.json @@ -0,0 +1,47 @@ +{ + "base_commit": "991c50d1ea8ddb7cf88c1b4a45c7b409c02d38fb", + "digest": "31ca2a8ca3c6192f", + "files": { + "README.md": "73557da3f4839d19dc898e03fbf28dcb4ff6a4b76a60f9bcae3fa595c6097a20", + "TASK-CARD.md": "ccc9ae4e0e187f59e45fc3a986cabf6070d3ffb921c4c51d21e61d739ba83177", + "TASK.json": "7b29cbab891ac88fcc6f8b5949ad12d7bfbd91705425d56d9eb6a6c8329a63d1", + "box_search.py": "70d06d1accde53969843d75b8a44c2722ee9fbfbe13b1c1415ae384e46006c62", + "data/box-search-receipt.json": "887ab2ff88f1775fba11ae355855e5afe700dd1f18e7752331575a86e72f2ac7", + "data/named-v11-receipt.json": "4e8ad87bc774379c5a36a71a17af33fd088c9a399604edefaee426796539b948", + "make_meta.py": "58e60a256ada9d22439982e513a603a98d8e861a1514f3e81dee8811947fb71e", + "named_exact.py": "7dc159dc0b9088aca24a0fbba97ef59fd23dae4ca4fe7a0ac6f8a047f2054d3f", + "predecessor/PINS.json": "ce4bd15afa8f0e8d970e24be9f41aca6a168ea6d1a04410f68093cff745bbb68", + "run_named_v11.py": "efeb31b83fba40c1f4c489c0095bebfdc08eb96d8a7ab3123956e5a7659f5ba0", + "test_named_exact.py": "3a0fb70fa4ee539b6512fbc2a77bd1a89cc7c892db7766fdb110a4bbf09d61b0", + "verify.py": "f58961f1ddf8901bd6e399adc87400e1e0b771f3e9e56048abd3c23db937a8d1" + }, + "headline": { + "box_exact": 11, + "box_exact_records": 12, + "box_violations": 0, + "bpp_strict_tau0": "PROVEN (v=2: 2 -> 1)", + "bpp_strict_tau1": "no drop in 21 escaping witnesses (CHECKED bounded)", + "cert_exact": 11, + "cert_exact_records": 12, + "gap_named": 2, + "gap_named_records": 12, + "named_exact": 9, + "named_exact_records": 12, + "stored_cert_under_reports": 7, + "tau_ge1_sweep_instances": 60, + "verdict": "gap_named = 2 EXISTS below v = 12 (minimal exact gap-2 instance at v = 11)" + }, + "markers": [ + "PASS_KB5I_PINS files=14", + "PASS_FG_CONTROLS", + "PASS_FG_CALIBRATION", + "PASS_KB5I_NAMED records=12 named-exact=12 named=9x12 gap2-proven=12", + "PASS_KB5I_CROSSCHECK stored-under-reports=7", + "PASS_KB5I_BOXREPLAY in-box=12/12", + "PASS_BOX_SEARCH bpp-strict-tau0=yes bpp-strict-tau1=no tau-ge1=60 hard=0 box-violations=0", + "PASS_FSTAR_GAP2_V11 gap2-below-v12-confirmed" + ], + "package": "fstar-gap2-v11-seed42ff0611", + "predecessor_pins": 14, + "schema_version": 1 +} diff --git a/research/fstar-gap2-v11-seed42ff0611/README.md b/research/fstar-gap2-v11-seed42ff0611/README.md new file mode 100644 index 0000000000..311bbdf466 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/README.md @@ -0,0 +1,334 @@ +# fstar-gap2-v11-seed42ff0611 + +**KB5i: the twelve open `tied_min` v = 11 sub-decoders settled exactly — +`gap_named = 2` EXISTS below v = 12 (no kappa, no frontier change).** Open +problem F-star of `research/root-unit-decoder-lemmas` +([PR 1590](https://github.com/CrocSwap/integer-mult-bounds/pull/1590) by +DreamingOfClouds (Claude Opus 5.5 (Anthropic) via Claude Code assistance), +section 7, OPEN) asks whether `cert(M) >= floor(2v/3)` holds for every exact +3-total rational decoder `M = sum_{j<=3} p_j q_j^T`. The family-gap line +([PR 2901](https://github.com/CrocSwap/integer-mult-bounds/pull/2901), +[PR 2914](https://github.com/CrocSwap/integer-mult-bounds/pull/2914), +[PR 2936](https://github.com/CrocSwap/integer-mult-bounds/pull/2936), all +Aaron Wang) recorded exactly one computation-blocked cell: the TWELVE +`tied_min` v = 11 sub-decoders, where `named` was a seeded scan at Lemma MX +construction product 1,977,326,743 and `gap_named` stayed in `{0,1,2}`. This +package replaces the scan with an exact computation and settles the verdict. +**F-star itself is not proved and not refuted here.** Every claim below is +labelled PROVEN, CHECKED or DEMOTED. + +## Verdict + +1. **PROVEN (exact both sides): `gap_named = 2` EXISTS below v = 12 — on + ALL 12 `tied_min` v = 11 sub-decoders** (the complete v = 11 family of the + v = 12 fixture). `named = 9` exactly (Lemma MX construction space settled + by the DP below, with replayed construction witnesses; `MP = 9` + exhaustive; `CL3 = MP = 9` exactly at even tau) and `cert = 11` exactly + (replayed ceiling witnesses of size v). Hence `gap_named = cert - named = + 2` on 12 of 12 records. **The minimal exact gap-2 instance drops from + `tied_min` v = 12 (the PR 2901/2914 record) to `tied_min` v = 11.** PR + 2936's record excludes gap 2 on every enumerated record below v = 11 (its + exact records at v = 7..10 and its scan lower bounds elsewhere), so v = 11 + is the minimal size; within v = 11 every sub-decoder carries the gap. +2. **CHECKED (cross-check with correction): PR 2936's stored `cert` values + under-report on 7 of the 12 records** (stored 9 or 10; true `cert = 11`, + replayed). The named-scan pitfall PR 2936 quantified has a cert-side + companion: the seeded cert hill-climbs under-report too. Every stored + value in `predecessor/pr2936/receipt-tied_min-s11-deep.json` is + reproduced or corrected with a replayed witness in + `data/named-v11-receipt.json`. +3. **CHECKED (exhaustive both rungs on the weak cell): `box = cert = 11` + exactly on all 12 records.** This closes the four records PR 2936 left at + `box, cert in {10,11}`, and every attaining witness stored here is + box-valued. Box-completeness is **not refuted** anywhere; it is still + **not proved**. +4. **CHECKED (new synthetic family): `box = cert` on 60 fixture-density + `tau >= 1` instances at v = 4..6** (GL_3(Z) column transforms of both + fixtures plus restrictions — the generator PR 2936's random sweep lacked; + both rungs exact; 0 violations, 0 hard instances at these sizes). +5. **PROVEN (Lemma BPP obstruction is real): projection strictness at + `tau = 0`.** On the smallest instance (the v = 2 decoder + `P = [[1,0,1],[2,1,0]]`, `Q = [[1,0,0],[1,0,1]]`) a replayed attaining + witness of value 2 projects to value 1 exactly because Lemma BPP condition + (i) fails — the parity terms cannot be dropped. **CHECKED (bounded): at + `tau >= 1` no strict projection drop was found** among 21 escaping + witnesses at v = 3..5 (consistent with PR 2936's "no realized instance + needs them"; not a proof that the conditions are without loss). +6. **DEMOTED (retained, no resurrection): the matched-pivot floor.** `MP = 9 + < cert = 11` on all 12 records — twelve new exact counterexamples to + `named = MP = cert`. `MP >= floor(2v/3) = 7` holds on every record + (evidence, not a proof). Nothing here changes PR 2914's demotion. + +## The exact named computation (priority 1) + +The rungs per instance (PR 2914's ladder, PR 2936's record): + +| rung | label class | value | status here | +|---|---|---|---| +| `named_lo` | Lemma SG anchor + Lemma MP matched pivots | `max(MP, \lvert S_gamma\rvert)` | exact (MP exhaustive at v = 11) | +| `named` | all four named families (SG, MX repairs, MP, CL3 mixings) | max construction value | **exact here** (was: seeded scan) | +| `box` | sub-anchor pairs `a` subset of `a0(t)`, `b` subset of `b0(t)`, `K_tt = 1` | `ab_value` inside `b0` | exact (replayed ceiling witnesses) | +| `cert` | every L8 labelling | exact-completion DP (PR 2717 engine) | exact (replayed ceiling witnesses) | + +The 12 sub-decoders share one shape (all lines: `pi(t) = 7`, `a0(t) = 7`, +`b0(t) = D(t)` in `{3,5,6}`, `tau(t) = 2`, `gamma = 0`, all 11 lines +cancellation lines, zero digraph 60 of 110 arcs, `MAS(all) = 4`). Per line +the Lemma MX construction options are the anchor `A` (forbidden: `tau = 2` +is even), 4 repairs `U(a*)`, and 2 pivots `T(c)` — product +`7^11 = 1,977,326,743`, PR 2936's obstruction. + +**The DP (this is PR 2936's open question 2).** The construction value +`|A| + |U| + sum_c MAS(class_c)` does not depend on the repair labels `a*`, +and the two Lemma MX hypothesis sets (A-first / T-first) factor per U line +given only the coarse kinds (A / U / T(c)): A-first feasibility is "each +`u` in U keeps an `a*` orthogonal to `b0(s)` at every zero arc `u -> s` +with `s` in `A+U` and to the pivot bit of every T out-neighbour, plus +`a0(t)` orthogonal to every T out-neighbour of each `t` in A"; T-first +feasibility is "each `u` keeps a U-U-orthogonal `a*`, plus every T line's +pivot bit orthogonal to `b0(s)` of its `A+U` in-neighbours". So + +```text +MX = max over coarse assignments (kind per line) of + |A| + |U| + MAS(class_0) + MAS(class_1) + MAS(class_2) + subject to A-first or T-first feasibility, +``` + +which is `3^11 = 177147` coarse assignments per record (A is dead at +`tau = 2`), feasibility checked only when a candidate beats the running +best. The optimum value is 9 on every record, with a replayable witness +(combo + repairs + mode) re-evaluated by a faithful port of the engine's +`mx_eval`. **The port is pinned to the engine's own semantics** by agreement +tests: exact equality with the engine's exhaustive product enumeration on 72 +small fixture sub-decoders (v = 4..6) and 12 random decoders +(`test_named_exact.py`). + +**CL3 = MP exactly at even tau (PROVEN).** In a CL3 form assignment, anchor +pairs have `K_tt = |a0 intersect b0| = tau(t) mod 2 = 0`, so kept lines are +exactly the pivot lines `(e_c, e_c)`; their conflict arcs are the zero arcs +with `c(t) = c(s)`. The value is therefore `sum_c MAS(class_c intersect P)` +for the pivot set `P`, maximized at `P = all lines` by monotonicity of MAS — +which is exactly Lemma MP's objective, and all-pivot forms lie in the CL3 +space. Hence CL3 = MP = 9 needs no separate enumeration; the identity is +machine-checked against brute force on the targets. + +### The twelve records (all values exact) + +| label | named | cert | box | gap_named | PR 2936 stored cert | +|---|---|---|---|---|---| +| tied_min\|0,1,2,3,4,5,6,7,8,9,10 | 9 | 11 | 11 | 2 | 10 | +| tied_min\|0,1,2,3,4,5,6,7,8,9,11 | 9 | 11 | 11 | 2 | 10 | +| tied_min\|0,1,2,3,4,5,6,7,8,10,11 | 9 | 11 | 11 | 2 | 11 | +| tied_min\|0,1,2,3,4,5,6,7,9,10,11 | 9 | 11 | 11 | 2 | 10 | +| tied_min\|0,1,2,3,4,5,6,8,9,10,11 | 9 | 11 | 11 | 2 | 11 | +| tied_min\|0,1,2,3,4,5,7,8,9,10,11 | 9 | 11 | 11 | 2 | 10 | +| tied_min\|0,1,2,3,4,6,7,8,9,10,11 | 9 | 11 | 11 | 2 | 11 | +| tied_min\|0,1,2,3,5,6,7,8,9,10,11 | 9 | 11 | 11 | 2 | 11 | +| tied_min\|0,1,2,4,5,6,7,8,9,10,11 | 9 | 11 | 11 | 2 | 10 | +| tied_min\|0,1,3,4,5,6,7,8,9,10,11 | 9 | 11 | 11 | 2 | 11 | +| tied_min\|0,2,3,4,5,6,7,8,9,10,11 | 9 | 11 | 11 | 2 | 10 | +| tied_min\|1,2,3,4,5,6,7,8,9,10,11 | 9 | 11 | 11 | 2 | 9 | + +(The label pipe character is part of PR 2936's label format `fixture|S`; +`cert = box = 11` follows from replayed witnesses of size `v = 11`, the +ceiling for both rungs. The stored PR 2936 column is its witnessed +lower bound; `gap_named` uses the exact values.) + +Consequences for the family-gap record: the family gap reaches 2 already at +v = 11 on the whole `tied_min` family; the excess of 2 points lives inside +the sub-anchor box (box = cert = 11 while named = 9), i.e. the named forms +miss exactly 2 points that sub-anchor pairs realize. The minimal exact +gap-2 instance is now `tied_min|0,1,2,3,4,5,6,7,8,9,10` (v = 11), and +`tied_min` v = 12 is no longer minimal. + +## Box-completeness under Lemma BPP (priority 2) + +PR 2914 open question 1: `cert(M) = box-max(M)` whenever every line has +`tau(t) >= 1`? Lemma BPP (PR 2936, PROVEN there) gives the exact obstruction +to the naive projection argument: a witness projects to a box witness of the +same value iff (i) each kept line's `a(t) intersect b(t)` has odd tied-bit +overlap and (ii) every forward zero arc has even off-anchor shared parity. + +**What this package establishes (CHECKED, exhaustive where stated):** + +- On the weak cell of PR 2936's sweep — its 12 gap2-open scans — both rungs + are now exact: `box = cert = 11` on 12 of 12, every attaining witness + box-valued. The four previously open records are closed with replayed + ceiling witnesses. +- On 60 new fixture-density `tau >= 1` instances at v = 4..6 (GL_3(Z) + column transforms `P -> P U`, `Q -> Q U^{-T}` of both fixtures, which fix + `M` and its zero digraph while changing the anchor data, then restrictions, + filtered to `tau >= 1` everywhere, seed 20261016): exact cert vs exact box + (the vendored tolerant wrapper of PR 2936) — `box = cert` on all 60, 0 + violations, 0 hard instances (all `cert = v` at these sizes; the hard + `cert < v` instances live at v = 11). +- The BPP obstruction is **PROVEN real** at `tau = 0` (smallest instance + first: the v = 2 decoder, attaining witness 2, projection 1, condition (i) + failing exactly as the lemma predicts) and **CHECKED absent** at + `tau >= 1` in a bounded search (21 escaping witnesses at v = 3..5, no + strict drop). + +**Status: NOT PROVEN, NOT REFUTED.** A counterexample must certify some kept +line purely through non-tied shared bits or land odd off-anchor parity on a +forward zero arc on every attaining witness (Lemma BPP); none is known, and +every realized attaining witness on the enlarged domain (12 + 60 + PR +2936's 113 deep + 126 synthetic + PR 2914's records) is box-valued. The +without-loss question (can every attaining witness be massaged into (i)+(ii) +at no value cost?) is unchanged and remains the exact blocker. + +## The matched-pivot floor (priority 3) — DEMOTED + +Unchanged from PR 2914/2936's record and not resurrected: `MP = 9 < cert = +11` on all 12 records adds twelve exact data points against `named = MP = +cert`; `MP >= floor(2v/3)` holds on every record this lineage has measured +(0 below threshold), which is evidence only. The exact obstruction to a +proof is unchanged (the floor is a statement about realizable rank-3 +patterns; fixture-density zeros resist random construction). + +## What is proved, what is checked, what is demoted + +- **PROVEN (written proofs in this README + replayed witnesses):** + `gap_named = 2` on all 12 `tied_min` v = 11 sub-decoders (exact `named` + by the coarse DP with replayed construction witnesses; exact `cert` by + replayed ceiling witnesses); the DP decomposition of the Lemma MX space + (value independent of repairs; hypothesis sets factor per U line); CL3 = + MP at even tau; BPP projection strictness at `tau = 0` (v = 2: 2 -> 1). +- **CHECKED (machine, deterministic, stdlib):** the port agrees with the + engine's exhaustive `mx_eval` on 72 small sub-decoders + 12 random + decoders; `box = cert = 11` exactly on all 12; `box = cert` on 60 new + fixture-density `tau >= 1` instances at v = 4..6 (exact rungs); PR 2936's + stored values reproduced or corrected (7 of 12 stored cert values + under-report); no strict projection drop at `tau >= 1` among 21 escaping + witnesses. +- **DEMOTED / OPEN:** F-star for general rational decoders is **not** proved + and **not** refuted. Box-completeness for `tau >= 1` is **not** proved + (Lemma BPP is the exact obstruction; no counterexample). The + matched-pivot floor is **not** proved and stays demoted. The fixture + certificate limits 11 and 18 rest on PR 2111's recorded CP-SAT optimality + (CHECKED (recorded), not re-verified here). "No counterexample" remains a + scoped statement about the declared domains. + +## Open next questions + +1. **Box-completeness for `tau >= 1` at general v** (PR 2914 open question + 1). Why it matters: it reduces F-star to the finite sub-anchor label + space and makes the family gap exactly the box interior the named forms + miss. First step: prove Lemma BPP's conditions (i)-(ii) without loss on + attaining witnesses (the bounded tau >= 1 search found no strict + projection drop, so a proof route may exist), or find the smallest + instance where an attaining witness cannot be massaged. Blocker: naive + projection is PROVEN strictly lossy at tau = 0 (v = 2). +2. **Characterize the 2-point excess.** Why it matters: `gap_named = 2` is + now exact on the whole v = 11 `tied_min` family, so the question becomes + constructive: which label kinds carry the excess (diff_labels classes + ANCHOR/REPAIR/PIVOT/BOX-INTERIOR/BOX-ESCAPE on the stored attaining + witnesses), and what is the minimal extension of the named families that + realizes 11? First step: classify `data/named-v11-receipt.json`'s + witnesses against the named forms. Blocker: none, analysis only. +3. **The matched-pivot floor** (PR 2747 open question 1), unchanged and + demoted: a SAT/CP construction of rank-3 patterns minimizing + `max_c sum_i MAS(Z[C_i])`. Blocker: needs a constraint solver; MP is + strictly weaker than cert (9 < 11 on all 12). + +## Reproduce + +Python 3.10+, standard library only, from the repository root (or with the +package path as cwd): + +```sh +python3 -B research/fstar-gap2-v11-seed42ff0611/verify.py +python3 scripts/research_package.py --package research/fstar-gap2-v11-seed42ff0611 --check-only +python3 -B research/fstar-gap2-v11-seed42ff0611/test_named_exact.py +``` + +Expected markers in order from `verify.py`: `PASS_KB5I_PINS files=14`, +`PASS_FG_CONTROLS ...`, `PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 +mp=9/16 chain=22 reach=0/12,8/19`, `PASS_KB5I_NAMED records=12 +named-exact=12 named=9x12 gap2-proven=12`, `PASS_KB5I_CROSSCHECK +stored-under-reports=7`, `PASS_KB5I_BOXREPLAY in-box=12/12`, `PASS_BOX_SEARCH +bpp-strict-tau0=yes bpp-strict-tau1=no tau-ge1=60 hard=0 box-violations=0`, +`PASS_FSTAR_GAP2_V11 gap2-below-v12-confirmed`, and `CERTIFICATE.json` with +digest printed at the end. The registered replay recomputes the exact named +values from scratch on all 12 records (it does not trust the receipts) and +independently replays every stored witness. + +The checkpoint runs that generated the receipts (NOT part of the registered +replay; their evidence is `data/named-v11-receipt.json` and +`data/box-search-receipt.json`, digested in `CERTIFICATE.json`): + +```sh +python3 -B research/fstar-gap2-v11-seed42ff0611/run_named_v11.py +python3 -B research/fstar-gap2-v11-seed42ff0611/box_search.py +``` + +(about 16 minutes and about 3 minutes on the authoring host; +`run_named_v11.py` is the deterministic multi-seed witness regeneration +whose replays every stored witness passes.) `make` is not installed on the +authoring host; the commands above are the underlying ones. + +## Credit and provenance + +F-star, the `cert(M)` definition, L8 labellings and the proven chain +`cost >= sum_j r_j >= cert(M)` are from the merged +`research/root-unit-decoder-lemmas` package +([PR 1590](https://github.com/CrocSwap/integer-mult-bounds/pull/1590) by +DreamingOfClouds (Claude Opus 5.5 (Anthropic) via Claude Code assistance)). +The rank-3 configuration model, the canonical fixtures `tied_min` and +`cex_min_1`, and their recorded one-copy certificate limits 11 and 18 +(CP-SAT, CHECKED (recorded) here, not re-verified) are DreamingOfClouds' +work in [PR 2111](https://github.com/CrocSwap/integer-mult-bounds/pull/2111). +The residue statement, Lemmas SF/MP/RK/AN and the exact-completion engine +design are Aaron Wang's +[PR 2717](https://github.com/CrocSwap/integer-mult-bounds/pull/2717); Lemma +MX and the exhaustive MP/MX fixture values (9 and 16) are Aaron Wang's +[PR 2747](https://github.com/CrocSwap/integer-mult-bounds/pull/2747); the +zero-digraph machinery is Aaron Wang's +[PR 2774](https://github.com/CrocSwap/integer-mult-bounds/pull/2774); +Lemmas SC/SG and the canonical reduced normalization are Aaron Wang's +[PR 2869](https://github.com/CrocSwap/integer-mult-bounds/pull/2869); the +chi(Z) machinery is Aaron Wang's +[PR 2890](https://github.com/CrocSwap/integer-mult-bounds/pull/2890); the +family-gap definition and record are Aaron Wang's +[PR 2901](https://github.com/CrocSwap/integer-mult-bounds/pull/2901); the +sub-anchor box, Lemmas SB/LB and the engine are Aaron Wang's +[PR 2914](https://github.com/CrocSwap/integer-mult-bounds/pull/2914); the +v = 7..11 census, the box-completeness attack, Lemma BPP, the tolerant +`tau = 0` wrapper and the recorded 12-sub-decoder remainder are Aaron Wang's +[PR 2936](https://github.com/CrocSwap/integer-mult-bounds/pull/2936). All +authors above were verified at current ground truth with `gh pr view +--json author,title` on 2026-10-16 (PRs 2717/2747/2774/2869/2890/2901/2914/ +2936: Aaron Wang (navinor); PR 2111: DreamingOfClouds). This package does +not claim their results; the new content is the exact named computation and +its DP, the `gap_named = 2` verdict at v = 11, the cert cross-check with +corrections, the exact box = cert closure of the weak cell, the +fixture-density synthetic family, and the BPP strictness demonstration. + +The engine is PR 2914's package extracted byte-exactly with the shared +toolkit (`pr-tree-extract 2914 research/fstar-family-gap-seed1c25f56f`, PR +head `3f7781efccdf10fa61a1e0a6f11c191579b21280` at extraction) and vendored +at `predecessor/pr2914/`; the PR 2936 remainder (its `tied_min` v = 11 deep +receipt and `box_attack.py` with the tolerant wrapper) is extracted +byte-exactly (`pr-tree-extract 2936 research/fstar-family-gap-v711-seed3e3478d8`, +PR head `f0ef06f13e4de3e50c211c880bdc6891c09620a1` at extraction) and +vendored at `predecessor/pr2936/`. SHA-256 pins for every vendored file are +in `predecessor/PINS.json` and verified at every replay; the nested engine +copy the vendored wrapper loads is byte-identical to +`predecessor/pr2914/verify.py` (asserted at pin generation and at replay). +Both predecessors' own recorded anchors were reproduced first from pristine +copies (PR 2914: `PASS_FG_CENSUS records=1410 exact=21 exact-named=21 gap1=49 +gap2=0 below-threshold=0 falsifiers=0 max-gap-named=0`, certificate digest +`031927ba33ed45a0`; PR 2936: `PASS_FSTAR_FAMILY_GAP_V711 +no-falsifier-in-domain`, certificate digest `a4525ee97862ba34`). + +Freshness: base `991c50d1ea8ddb7cf88c1b4a45c7b409c02d38fb` is current +canonical `origin/main` at entry (2026-10-16 12:40 UTC). Pair-collision +checks (toolkit `disc-comments --grep`, discussions 1317 and 1166, nested +replies, 2026-10-16 12:40-12:45 UTC) found no live claim on this object: the +only family-gap activity in the last hours is KB5h's FINDING/DONE/RELEASED +(PR 2936, 12:34:18 UTC), which this assignment explicitly extends. The +overlap survey (`find_overlap.py` with the object's proper names and +synonyms, complete pagination: 471 open PRs, 1622 discussions, 2026-10-16 +12:41 UTC) found only the known F-star lineage and unrelated board traffic. + +Prepared by **Aaron Wang**, with help from opencode (substantial AI +assistance; no model named; no independent human review claimed). New work +in this package is Apache-2.0. diff --git a/research/fstar-gap2-v11-seed42ff0611/SOURCES.json b/research/fstar-gap2-v11-seed42ff0611/SOURCES.json new file mode 100644 index 0000000000..1d8bdd7db9 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/SOURCES.json @@ -0,0 +1,24 @@ +{ + "schema_version": 1, + "base_commit": "991c50d1ea8ddb7cf88c1b4a45c7b409c02d38fb", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "889b95d936746df124872133ae1e7cc339adcb92", + "sha256": "7d185cd8c2af35988d638d969748ad7b670f902606444dbfc748e4402c340df6" + }, + { + "path": "research/root-unit-decoder-lemmas/README.md", + "usage": "input", + "git_blob": "de305484c78226a3f8da5f3277ced78974116fbb", + "sha256": "e3c856bc361a57cc2424c829001dba94e8f3a1bc8f6616f9c2f740e9665506a9" + } + ] +} diff --git a/research/fstar-gap2-v11-seed42ff0611/TASK-CARD.md b/research/fstar-gap2-v11-seed42ff0611/TASK-CARD.md new file mode 100644 index 0000000000..66ca3fc094 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/TASK-CARD.md @@ -0,0 +1,75 @@ +# TASK-CARD — KB5i (local task card, written before substantial computation) + +Task ID / proposed scope key: kappa-blocker KB5i; scope key for the drawn card + f383d8fc405ee6982cdd (coverage-law-change), overridden to the explicit open + request; chooser draw seed 42ff061169763106b201a358b527fd93, track + recursive-interfaces (draw landed on saturated cards: coverage-law-change, + centre-path-sharing, connector-alphabet-change). +Base commit; exact predecessor and dependency heads: 991c50d1ea8ddb7cf88c1b4a45c7b409c02d38fb + (current origin/main at entry, 2026-10-16). Predecessors: PR 2936 head + f0ef06f13e4de3e50c211c880bdc6891c09620a1 (KB5h, open; the recorded + remainder this task settles), PR 2914 head 3f7781efccdf10fa61a1e0a6f11c191579b21280 + (KB5g, open; engine + sub-anchor box), PR 2901 head c6e0b150081d46abe8bf5d0320de4311cb55fe95, + PR 2869 head 153b93c1c0e9ee1c50677ae04d48f1f7f0b1700e (merged), + PR 2747 head a2bab9978c8149dc5965558ea9277da07bc750e7, PR 2717 head 7aed56bd440a3d8cbca8028cf2cbd0888c07d9b3. +Concrete object and question: (1) the family gap gap_named = cert - named on + the TWELVE open tied_min v = 11 sub-decoders of PR 2936's record, where named + is scan-only at Lemma MX construction product 1,977,326,743: compute named + EXACTLY (DP / symmetry-reduced enumeration over the MX construction space) + and settle the verdict - does gap_named = 2 exist below v = 12 (minimal + gap-2 instance drops to v = 11) or is the minimal exact gap-2 instance + exactly tied_min v = 12? Cross-check: cert reproduces PR 2936's stored + values. (2) Box-completeness under Lemma BPP: the tau >= 1 general case with + the projection-parity obstruction as filter - prove cert = box-max (which + with the box floor closes F-star through the PR 2914 chain) or construct / + search the minimal tau >= 1 decoder with cert > box-max, concentrated where + PR 2936's sweep was weak (its 12 gap2-open scans and synthetic families). + (3) Report the matched-pivot floor status honestly (demoted twice). +Scope status: changed; reason - authorized "explicit open request" scope + change (discussion 1166, the recorded remainder of PR 2936); the drawn + cards are saturated/other objects. +Existing restriction being changed (or exact claim being audited): PR 2936's + recorded obstruction "Lemma MX construction product 1,977,326,743 - named is + a seeded scan (value 9) and gap_named stays in {0,1,2}" and its open + question 2 (a DP over the Lemma MX construction space); PR 2914 open + question 1 (box-completeness at tau >= 1). +Method; explicit parameter ranges/candidate alphabet: exact stdlib integer/F2 + arithmetic on the byte-exact vendored PR 2914 engine. Exact named = max(MP, + |S_gamma|, MX, CL3) computed by (a) a coarse-assignment DP/DFS over the MX + per-line options (A / U(a*) / T(c)) with per-line feasibility sets for the + repair labels, matching mx_eval semantics bit-for-bit (property-tested + against brute-force product enumeration where the product fits), and (b) the + CL3 = MP identity at even tau (machine-checked). Domain: exactly the 12 + tied_min v = 11 sub-decoders (labels recorded in PR 2936's + receipt-tied_min-s11-deep.json); smallest instance first. Box-completeness: + Lemma BPP parity filter on witness space; synthetic tau >= 1 families + biased to fixture-density zeros and hard (cert < v) instances. +Nearest overlapping PRs and why this adds something: PR 2936 (the direct + predecessor; this settles exactly its recorded remainder), PR 2914 (engine, + box), PR 2901/2747/2717/2869/2890/2774 (lineage). No other work on the 12 + sub-decoders exists at entry (pair-collision check 2026-10-16 12:40-12:43 + UTC on discussions 1317 + 1166 with nested replies; overlap survey + 12:41 UTC complete pagination). +Declared milestone: local module / scoped audit (no kappa, no supplier, no + frontier change). +Optimistic full cost budget; required observable improvement: no kappa budget + in play; the price is one bounded deterministic stdlib registered replay + plus a bounded exact-named run over 12 records (coarse space 3^11 per + record) and one bounded box-completeness search. +Unresolved consumer/restoration costs; family expansion decision if + continuing: none (missing-lemma/audit work). +Success evidence; falsification test; time/compute cap: PASS markers from + verify.py (registered replay reproducing PASS_FG_CALIBRATION + tied_min=11/12 cex_min_1=18/19 mp=9/16 chain=22 reach=0/12,8/19 and PR + 2936's census/deep/box-attack lines and PR 2914's 21 exact records gap 0) + plus exact named values with replayed construction witnesses on all 12 + sub-decoders. Falsification: a named construction witness whose replay value + differs from the DP optimum refutes the solver; a certified instance with + cert - named = 2 at v = 11 answers the verdict YES. One bounded pivot + maximum; early kill with the exact obstruction recorded; registered replay + under 600 s; heavy runs sharded with receipts. +Predecessor authors; intended artifact and reproduction command: see + TASK.json predecessor_authors (verified with gh pr view --json author,title + at writing). Artifact research/fstar-gap2-v11-seed42ff0611/; reproduce with + python3 -B research/fstar-gap2-v11-seed42ff0611/verify.py then python3 + scripts/research_package.py --package research/fstar-gap2-v11-seed42ff0611 --check-only. diff --git a/research/fstar-gap2-v11-seed42ff0611/TASK.json b/research/fstar-gap2-v11-seed42ff0611/TASK.json new file mode 100644 index 0000000000..dac9275799 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/TASK.json @@ -0,0 +1,85 @@ +{ + "actual_scope": "Kappa-blocker KB5i (authorized explicit open request): SETTLE THE TWELVE OPEN tied_min v = 11 sub-decoders of open problem F-star's family-gap question - (1) compute named EXACTLY where PR 2936 has a scan only (Lemma MX construction product 1,977,326,743) and answer the verdict: does gap_named = 2 exist below v = 12 (the minimal gap-2 instance drops from v = 12 to v = 11) or is the minimal exact gap-2 instance exactly tied_min v = 12? Cross-check: cert reproduces or corrects PR 2936's stored values. (2) Push box-completeness under Lemma BPP: the tau >= 1 general case with the projection-parity obstruction as filter - prove cert = box-max or search the minimal tau >= 1 decoder with cert > box-max, concentrated where PR 2936's sweep was weak (its 12 gap2-open scans and synthetic families). (3) Report the matched-pivot floor status honestly (demoted twice).", + "ai_assistance": "Substantial AI assistance: this package was produced by Aaron Wang with help from opencode (opencode agent harness). No model named per orchestrator attribution rules. No independent human review claimed.", + "author": "Aaron Wang (with help from opencode)", + "base_commit": "991c50d1ea8ddb7cf88c1b4a45c7b409c02d38fb", + "bottleneck_link": "F-star is the named route to closing every open T = 3 window at once (research/root-unit-decoder-lemmas section 7). PR 2936's record left exactly two computational unknowns in the family gap: the 12 tied_min v = 11 sub-decoders (scan-only named) and box-completeness at tau >= 1. This package settles the first exactly (gap_named = 2 at v = 11) and closes the weak cell of the second (box = cert = 11 exact on the 12 and on 60 new fixture-density instances), sharpening the family-gap record to: the named families miss exactly 2 points at v = 11 on the tied_min family, realized inside the sub-anchor box.", + "evidence": "VERDICT: gap_named = 2 EXISTS below v = 12. On all 12 tied_min v = 11 sub-decoders (complete family): named = 9 EXACT (Lemma MX coarse-DP optimum with replayed construction witnesses; MP = 9 exhaustive; CL3 = MP = 9 at even tau), cert = 11 EXACT (replayed ceiling witnesses, size v). gap_named = 2 PROVEN on 12 of 12. The minimal exact gap-2 instance drops from tied_min v = 12 (PR 2901/2914 record) to tied_min v = 11. CROSS-CHECK: PR 2936's stored cert values under-report the true cert = 11 on 7 of 12 records (stored 9 or 10) - the hill-climb pitfall quantified on cert, companion to the named scan pitfall; every stored value is reproduced or corrected with a replayed witness. BOX: box = cert = 11 EXACT on all 12 (the weak cell of PR 2936's sweep closed; previously 4 records open at box, cert in {10,11}); every attaining witness is box-valued. On 60 new fixture-density tau >= 1 instances (GL_3(Z) column transforms + restrictions, v = 4..6, both rungs exact): box = cert on all 60, 0 violations, 0 hard instances. Lemma BPP: projection strictness PROVEN at tau = 0 (smallest instance: v = 2 decoder, witness 2 -> projection 1, condition (i) fails exactly as Lemma BPP predicts); at tau >= 1, 21 escaping witnesses examined with no strict projection drop (CHECKED bounded). Box-completeness for tau >= 1 remains NOT PROVEN and NOT REFUTED. MP floor DEMOTED: MP = 9 < cert = 11 on all 12 (new counterexamples to named = MP = cert); MP >= floor(2v/3) = 7 holds on every record. F-star itself is NOT proved and NOT refuted.", + "existing_restriction_being_changed": "PR 2936's recorded obstruction 'Lemma MX construction product 1,977,326,743 - named is a seeded scan (value 9) and gap_named stays in {0,1,2}' and its open question 2 (a DP over the Lemma MX construction space instead of the 2e9-product enumeration); PR 2914 open question 1 (box-completeness at tau >= 1) pressed on the weak cell of PR 2936's sweep. Nothing is relaxed; every claim carries its exact status label and no 'exactly when', necessity or exhaustive-without-proof wording is used.", + "falsification_test": "A named construction witness whose replay value differs from the DP optimum refutes the exact solver (the port is pinned to the engine's own mx_eval by agreement tests); a corrupted witness must fail the independent replay checker. A certified instance with cert - named = 2 at v = 11 answers the verdict YES (it fired: 12 of 12). For box-completeness, any tau >= 1 instance with cert > box-max demotes the box route (armed on 12 exact v = 11 records and 60 exact v = 4..6 instances; never fired). An explicit admissible pairing B with chain cost below floor(2v/3) would refute F-star on an instance (not sought here: named_lo = 9 >= 7 on every record).", + "intended_artifact": "research/fstar-gap2-v11-seed42ff0611/ with TASK.json, TASK-CARD.md, SOURCES.json pins, VERIFY.json, verify.py, named_exact.py (the exact solver), test_named_exact.py (agreement + target tests), run_named_v11.py and box_search.py (checkpoint runs), predecessor/pr2914/ and predecessor/pr2936/ (byte-exact vendored predecessors, SHA-256 pins in predecessor/PINS.json), data/named-v11-receipt.json and data/box-search-receipt.json, CERTIFICATE.json (written by verify.py) and README.md; reproduce with python3 -B research/fstar-gap2-v11-seed42ff0611/verify.py then python3 scripts/research_package.py --package research/fstar-gap2-v11-seed42ff0611 --check-only.", + "method": "Exact stdlib integer/F2 arithmetic on the byte-exact vendored PR 2914 engine (predecessor/pr2914/, SHA-256 pins verified at replay). Exact named = max(SG reach, Lemma MP, Lemma MX, Lemma CL3) computed by a coarse-assignment DP over the Lemma MX per-line options (A / U(a*) / T(c)): the construction value |A| + |U| + sum MAS(classes) does not depend on the repair labels a*, and the Lemma MX hypothesis checks factor per U line, so repairs fold into per-line feasibility masks and the search enumerates only kinds (3^11 = 177147 coarse assignments per record; feasibility checked only above the running best). The port is agreement-tested against the engine's own exhaustive mx_eval product enumeration on 72 small instances plus random decoders. CL3 = MP exactly at even tau (proof in README, machine-checked). Cert/box values regenerated with deterministic multi-seed hill-climbs (the deep run's seeds first) and every witness independently replayed; ceiling witnesses (size v) make the rungs exact. Box-completeness: the vendored tolerant tau = 0 wrapper (PR 2936), Lemma BPP projection parity on every witness, and a fixture-density synthetic family (GL_3(Z) column transforms of the fixtures plus restrictions, tau >= 1 filter) at v = 4..6 with both rungs exact.", + "nearest_overlapping_prs": "https://github.com/CrocSwap/integer-mult-bounds/pull/2936 (Aaron Wang: the direct predecessor; this settles exactly its recorded remainder - the 12 scan-only tied_min v = 11 sub-decoders and the weak cell of the box attack). https://github.com/CrocSwap/integer-mult-bounds/pull/2914 (Aaron Wang: sub-anchor box, Lemmas SB/LB, engine vendored byte-exactly). https://github.com/CrocSwap/integer-mult-bounds/pull/2901 (Aaron Wang: family-gap definition and record). https://github.com/CrocSwap/integer-mult-bounds/pull/2747 (Aaron Wang: Lemma MX). https://github.com/CrocSwap/integer-mult-bounds/pull/2717 (Aaron Wang: Lemmas SF/MP/RK/AN, exact-completion engine). https://github.com/CrocSwap/integer-mult-bounds/pull/2869 (Aaron Wang: Lemmas SC/SG). PR 2111 (DreamingOfClouds: fixtures and recorded certificate limits 11/18) and PR 1590 (DreamingOfClouds: F-star, cert(M), the proven chain) are cited, not restated. No other work on the 12 sub-decoders existed at entry or at the pre-submission overlap refresh.", + "open_questions": [ + { + "blocked_by": "No route was found to show the parity terms are without loss; naive projection is PROVEN strictly lossy at tau = 0 (v = 2: 2 -> 1).", + "first_step": "Prove or refute that Lemma BPP's projection conditions (i)-(ii) are without loss: massage any attaining witness into one satisfying them at no value cost. The bounded search found no projection drop at tau >= 1 (21 escaping witnesses), so a proof route may exist; smallest falsifying instance still sought.", + "question": "Is the sub-anchor box complete at general v when every line has tau(t) >= 1: cert(M) = box-max(M)?", + "why_it_matters": "It reduces F-star to the finite sub-anchor label space and makes the family gap exactly the box interior the named forms miss; box = cert now holds exactly on the 12 tied_min v = 11 sub-decoders and 60 fixture-density tau >= 1 instances." + }, + { + "blocked_by": "None - open analysis, not computation.", + "first_step": "Classify every attaining cert witness (diff_labels kinds) against the named forms and read off the minimal label extension; the stored witnesses in data/named-v11-receipt.json are the input.", + "question": "What labels carry the 2-point family-gap excess at v = 11: can a repair/CL3-type extension of the named families close it?", + "why_it_matters": "gap_named = 2 is now exact on the whole v = 11 tied_min family; characterizing the missing labels turns the family gap into a construction question." + }, + { + "blocked_by": "Needs a constraint solver, not random search; MP is strictly weaker than cert (9 < 11 on all 12 v = 11 records), so the route stays DEMOTED without new evidence.", + "first_step": "A SAT/CP construction of rank-3 patterns minimizing the floor.", + "question": "Is max_c sum_i MAS(Z[C_i]) >= floor(2v/3) for every realizable rank-3 pattern (PR 2747 open question 1)?", + "why_it_matters": "Lemma MP alone would prove F-star with no anchor; witnessed on every enumerated record but not proved." + } + ], + "optimistic_full_cost_budget": "No kappa, supplier, word or moment budget is in play (missing-lemma/audit work). The price is one bounded deterministic stdlib registered run plus two bounded checkpoint runs (run_named_v11.py about 16 minutes multi-seed witness regeneration; box_search.py about 3 minutes).", + "original_card": { + "acceptance_gate": "An explicit replacement identity, verified on a small complete instance with dirty inputs, priced with ceiling.ceiling(unpaid=...). A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "allowed_variations": [ + "One template change or one endpoint-contract change.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "bottleneck_link": "The deficit is one coordinate per family minus the centre charge; doubling unpaid coordinates per family scales it directly.", + "first_experiment": "Explain where the single unpaid coordinate per family comes from in the hosted template; propose one change and price it. Ideal budget: two unpaid coordinates per family is 3.77x (levers.py).", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "id": "coverage-law-change", + "methods": [ + "State a replacement for the coverage identity (mass = 72W + 64N) and the contract change that realizes it, with its implementation cost.", + "Find an obstruction: show which data-endpoint obligation forces exactly one unpaid coordinate in the current template." + ], + "overlap_terms": [ + "coverage identity", + "unpaid coordinate", + "deficit law", + "W - 64N" + ], + "question": "Can a template or call contract leave two or more unpaid coordinates per live family?", + "scope_change_triggers": [ + "Counting a coordinate as unpaid while leaving it unadvanced in the data endpoint.", + "Continuing a partial cost improvement while leaving the same unpriced consumer, restoration or central-readout obligation unresolved; refresh the family expansion decision first. Local product-retiming evidence has a narrow scope and is not a ban on changed graphs or contracts." + ], + "starting_points": [ + "docs/research/research-family-status.md", + "research/complex-local-word-ceiling/README.md", + "research/idle-axis-hosting/PROOF.md", + "certificates/selected-result.json" + ] + }, + "outcome": "completed", + "parameter_ranges": "T = 3 totals exactly; integer factorizations; exactly the 12 tied_min v = 11 sub-decoders (the complete v = 11 family of the v = 12 fixture tied_min, sha256 670ed90924b601ade22f0d4adaff46d1667e5449326a0f7ba7b88dd8f5906f93); cross-check domain PR 2936's receipt-tied_min-s11-deep.json (vendored byte-exactly); box search domain 60 GL_3(Z)-transformed fixture sub-decoders at v = 4..6 (seed 20261016) filtered to tau >= 1 everywhere, plus the v = 2 tau = 0 demonstration decoder; deterministic seeds recorded in the receipts.", + "predecessor_authors": "F-star, the cert(M) definition, L8 labellings and the proven chain cost >= sum_j r_j >= cert(M): research/root-unit-decoder-lemmas, PR 1590 by DreamingOfClouds (Claude Opus 5.5 (Anthropic) via Claude Code assistance). The rank-3 configuration model, the canonical fixtures tied_min and cex_min_1 and their recorded one-copy certificate limits 11 and 18 (CP-SAT): DreamingOfClouds, PR 2111. The exact-completion engine design, Lemmas SF/MP/RK/AN and the residue statement: Aaron Wang, PR 2717. Lemma MX and the exhaustive MP/MX fixture values: Aaron Wang, PR 2747. The zero-digraph machinery: Aaron Wang, PR 2774. Lemmas SC/SG and the canonical reduced normalization: Aaron Wang, PR 2869. The chi(Z) machinery: Aaron Wang, PR 2890. The family-gap definition and record: Aaron Wang, PR 2901. The sub-anchor box, Lemmas SB/LB, the tolerant tau = 0 wrapper and the extended census engine: Aaron Wang, PR 2914. The v = 7..11 census, the box-completeness attack and Lemma BPP: Aaron Wang, PR 2936. All authors above were verified at current ground truth with gh pr view --json author,title on 2026-10-16 (PRs 2717/2747/2774/2869/2890/2901/2914/2936: Aaron Wang (navinor); PR 2111: DreamingOfClouds; PR 2206 not used here).", + "schema_version": 1, + "scope_change_reason": "Authorized 'explicit open request' scope change to kappa-blocker KB5i, recorded per the assignment (discussion 1166; PR 2936's recorded remainder of open problem F-star's family-gap question is the named open request). The chooser OS draw (seed 42ff061169763106b201a358b527fd93, track recursive-interfaces) proposed coverage-law-change, centre-path-sharing and connector-alphabet-change; none is this object, and the assignment names the KB5i request as the recorded reason for taking the explicit request instead of the drawn cards. Pair-collision checks before computation (toolkit disc-comments --grep on discussions 1317 and 1166 including nested replies, 2026-10-16 12:40-12:45 UTC) found no live claim on the twelve tied_min v = 11 sub-decoders, the family gap, box-completeness or Lemma BPP: the only family-gap activity in the last hours is KB5h's FINDING/DONE/RELEASED (PR 2936, 2026-10-16 12:34:18 UTC), which this assignment explicitly extends. Entry overlap survey (find_overlap.py with the object's proper names and synonyms, complete pagination: 471 open PRs, 1622 discussions, 2026-10-16 12:41 UTC) found only the known F-star lineage and unrelated board traffic.", + "scope_status": "changed", + "stop_rule": "Stop at the verdict on gap_named = 2 below v = 12 (fired: YES, 12 of 12 at v = 11), or at the first confirmed box-completeness counterexample (cert > box on tau >= 1; never fired on 12 + 60 exact instances), or at the declared domain with the exact residual recorded. One bounded pivot maximum (the fixture-density GL_3(Z) synthetic family); early kill with the exact obstruction recorded.", + "success_evidence": "PASS markers from verify.py: PASS_KB5I_PINS, PASS_FG_CONTROLS, PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 mp=9/16 chain=22 reach=0/12,8/19 (PR 2914 and PR 2936 anchors reproduced), PASS_KB5I_NAMED records=12 named-exact=12 gap2-proven=12, PASS_KB5I_CROSSCHECK (stored PR 2936 values reproduced or corrected with replayed witnesses), PASS_BOX_SEARCH bpp-strict-tau0=yes bpp-strict-tau1=no tau-ge1=60 hard=0 box-violations=0, and README.md analysis labelled PROVEN / CHECKED / DEMOTED: gap_named = 2 EXISTS below v = 12 - PROVEN on all 12 tied_min v = 11 sub-decoders (named = 9 exact, cert = 11 exact), so the minimal exact gap-2 instance drops from v = 12 to v = 11; box = cert = 11 exact on all 12 and on 60 new fixture-density tau >= 1 instances at v = 4..6; Lemma BPP projection strictness PROVEN at tau = 0 (v = 2: 2 -> 1) and CHECKED not to drop at tau >= 1 on 21 escaping witnesses; matched-pivot floor DEMOTED (MP = 9 < cert = 11 on all 12).", + "task_id": "coverage-law-change", + "time_compute_cap": "One session; single-process stdlib Python; no SAT solver, no third-party packages; the registered verify.py below 600 s; checkpoint runs with receipts under data/ (run_named_v11.py about 16 minutes, box_search.py about 3 minutes on the authoring host); package registered with timeout_seconds 600." +} diff --git a/research/fstar-gap2-v11-seed42ff0611/VERIFY.json b/research/fstar-gap2-v11-seed42ff0611/VERIFY.json new file mode 100644 index 0000000000..d88c2410d1 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/VERIFY.json @@ -0,0 +1,24 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/root-unit-decoder-lemmas/README.md", + "research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/verify.py", + "research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/tied_min.json", + "research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/cex_min_1.json", + "research/fstar-gap2-v11-seed42ff0611/predecessor/pr2936/receipt-tied_min-s11-deep.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "KB5i package replay: predecessor pins (14 vendored files byte-exact, fixture lineage hashes); PR 2914 controls and every recorded anchor (PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 mp=9/16 chain=22 reach=0/12,8/19); the exact named value RECOMPUTED from scratch on all 12 tied_min v = 11 sub-decoders (coarse DP over the Lemma MX construction space, port pinned to the engine's mx_eval by agreement tests), MX construction witnesses replayed, named = 9 exact asserted with cert = box = 11 from replayed ceiling witnesses so gap_named = 2 on 12 of 12; PR 2936's vendored stored values cross-checked (MP, products, tau, k_cancel) with the 7 stored cert under-reports counted; every stored cert/box witness of data/named-v11-receipt.json independently replayed (supports, K_tt, order constraints, box membership); the box-search core re-run (v = 2 tau = 0 BPP strictness demonstration cert = 2 > box = 1 with projection drop 2 -> 1, and 30 of the 60 fixture-density tau >= 1 sweep instances re-run value-by-value against the receipt); writes CERTIFICATE.json and prints PASS_KB5I_PINS, PASS_FG_CONTROLS, PASS_FG_CALIBRATION, PASS_KB5I_NAMED, PASS_KB5I_CROSSCHECK, PASS_KB5I_BOXREPLAY, PASS_BOX_SEARCH, PASS_FSTAR_GAP2_V11" + } + ] +} diff --git a/research/fstar-gap2-v11-seed42ff0611/box_search.py b/research/fstar-gap2-v11-seed42ff0611/box_search.py new file mode 100644 index 0000000000..e46918cd90 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/box_search.py @@ -0,0 +1,270 @@ +#!/usr/bin/env python3 +"""KB5i bounded box-completeness attack (job 2), on the weak cells of PR +2936's record: + +(a) BPP STRICTNESS DEMONSTRATION: Lemma BPP (PR 2936) says a witness + projects to a sub-anchor box witness of the same value iff (i) each kept + line has odd tied-bit overlap and (ii) every forward zero arc has even + off-anchor shared parity. We exhibit an explicit exact 3-total decoder + and a replayed witness whose projection STRICTLY drops the value: the + obstruction is real, not formal. +(b) FIXTURE-DENSITY TAU >= 1 SWEEP: PR 2936's synthetic sweep (126 random + decoders) never produced a hard (cert < v) tau >= 1 instance - + fixture-density zeros are needed. This generator makes them: GL_3(Z) + column transforms (P -> P U, Q -> Q U^{-T}, M fixed, anchor structure + changed) of the canonical fixtures, restricted to v = 4..6, filtered to + tau >= 1 everywhere, exact cert vs exact box (the vendored tolerant + wrapper of PR 2936). Smallest instance first; deterministic seeds. + +Writes data/box-search-receipt.json. Stdlib, deterministic. +Run: python3 -B box_search.py +""" +import importlib.util +import itertools +import json +import os +import random +import sys +import time + +T0 = time.time() +HERE = os.path.dirname(os.path.abspath(__file__)) +sys.path.insert(0, HERE) +import named_exact as ne # noqa: E402 + +fg = ne.fg +DATA = os.path.join(HERE, "predecessor", "pr2914", "data") +spec = importlib.util.spec_from_file_location( + "box_attack", os.path.join(HERE, "predecessor", "pr2936", "box_attack.py")) +ba = importlib.util.module_from_spec(spec) +spec.loader.exec_module(ba) + + +def log(msg): + print("[%7.1fs] %s" % (time.time() - T0, msg), flush=True) + + +def mat_det3(M): + return (M[0][0] * (M[1][1] * M[2][2] - M[1][2] * M[2][1]) + - M[0][1] * (M[1][0] * M[2][2] - M[1][2] * M[2][0]) + + M[0][2] * (M[1][0] * M[2][1] - M[1][1] * M[2][0])) + + +def mat_inv3(M): + """Exact integer inverse of a unimodular 3x3 (det in {1, -1}).""" + d = mat_det3(M) + assert d in (1, -1), "not unimodular: det=%d" % d + adj = [ + [M[1][1] * M[2][2] - M[1][2] * M[2][1], + M[0][2] * M[2][1] - M[0][1] * M[2][2], + M[0][1] * M[1][2] - M[0][2] * M[1][1]], + [M[1][2] * M[2][0] - M[1][0] * M[2][2], + M[0][0] * M[2][2] - M[0][2] * M[2][0], + M[0][2] * M[1][0] - M[0][0] * M[1][2]], + [M[1][0] * M[2][1] - M[1][1] * M[2][0], + M[0][1] * M[2][0] - M[0][0] * M[2][1], + M[0][0] * M[1][1] - M[0][1] * M[1][0]], + ] + return [[adj[i][j] * d for j in range(3)] for i in range(3)] + + +def mat_mul(A, B): + return [[sum(A[i][k] * B[k][j] for k in range(3)) for j in range(3)] + for i in range(3)] + + +def rand_gl3z(rng, steps=4): + """Unimodular U as a short product of elementary ops; Uinv exact.""" + U = [[1, 0, 0], [0, 1, 0], [0, 0, 1]] + for _ in range(steps): + i, j = rng.randrange(3), rng.randrange(3) + while j == i: + j = rng.randrange(3) + k = rng.choice([-1, 1, -1]) + E = [[1 if a == b else 0 for b in range(3)] for a in range(3)] + E[i][j] += k + U = mat_mul(E, U) + return U, mat_inv3(U) + + +def transform(mod, U, Uinv): + """P -> P U, Q -> Q U^{-T}: M is unchanged, the anchor data changes.""" + P = [tuple(sum(p[k] * U[k][j] for k in range(3)) for j in range(3)) + for p in mod["P"]] + Q = [tuple(sum(q[k] * Uinv[j][k] for k in range(3)) for j in range(3)) + for q in mod["Q"]] + return fg.model(P, Q) + + +def bpp_projection(mod, ad, wit): + """Sub-anchor projection (Lemma BPP): a' = a & a0, b' = b & b0.""" + a = [x & ad["a0"][t] for t, x in enumerate(wit["a"])] + b = [x & ad["b0"][t] for t, x in enumerate(wit["b"])] + return dict(a=a, b=b, order=list(wit["order"]), kept=list(wit["kept"])) + + +def bpp_conditions(mod, ad, wit): + """Lemma BPP's two sufficient conditions on a witness (README of PR + 2936): (i) odd tied overlap per kept line, (ii) even off-anchor shared + parity on every forward zero arc among kept lines.""" + ok1 = True + for t in wit["kept"]: + tied = wit["a"][t] & wit["b"][t] & ad["a0"][t] & ad["b0"][t] + if bin(tied).count("1") % 2 != 1: + ok1 = False + ok2 = True + kept = set(wit["kept"]) + pos = {t: i for i, t in enumerate(wit["order"])} + for t in kept: + for s in kept: + if t != s and mod["M"][t][s] == 0 and pos.get(t, 10 ** 9) < pos.get(s, -1): + off = (wit["a"][t] & wit["b"][s]) \ + & ~(ad["a0"][t] & ad["b0"][s]) + if bin(off).count("1") % 2 != 0: + ok2 = False + return ok1, ok2 + + +def bpp_strictness(): + """Projection strictness of Lemma BPP. Smallest instance first: the + v = 2 tau = 0 decoder of PR 2936 (PROVEN strictness: cert = 2 > box = 1 + forces every cert-attaining witness to lose value under projection). + Then a bounded tau >= 1 search for a strict drop among replayed valid + witnesses of the fixture sub-decoders (v = 3..5).""" + # (a) smallest instance, PROVEN + P = [(1, 0, 1), (2, 1, 0)] + Q = [(1, 0, 0), (1, 0, 1)] + sub = fg.model(P, Q) + ad = fg.anchor_data(sub) + ce, cew = fg.cert_exact(sub, max_v=2) + assert fg.replay_witness(sub, cew) + val = fg.ab_value(sub, cew["a"], cew["b"]) + proj = bpp_projection(sub, ad, cew) + pval = fg.ab_value(sub, proj["a"], proj["b"]) + ok1, ok2 = bpp_conditions(sub, ad, cew) + assert pval < val, "tau=0 v=2 projection must strictly drop" + log("BPP strictness (v=2 tau=0, PROVEN): witness %d -> projection %d " + "(conditions i=%s ii=%s)" % (val, pval, ok1, ok2)) + proven = dict(v=2, tau=list(ad["tau"]), witness_value=val, + projected_value=pval, condition_i=ok1, condition_ii=ok2, + status="PROVEN strictness at tau = 0 (forced: cert=2 > " + "box=1)") + # (b) bounded tau >= 1 search + cands = [] + for fixture in ("tied_min.json", "cex_min_1.json"): + mod0 = fg.model(*fg.load_decoder(os.path.join(DATA, fixture))) + for size in (3, 4, 5): + subs, _n, _t = fg.subsets_smallest_first(mod0["v"], size, 40, 1) + for S in subs: + cands.append((fixture, list(S), size)) + cands.sort(key=lambda c: (c[2], sum(c[1]))) + seen_esc = 0 + for fixture, S, size in cands: + mod0 = fg.model(*fg.load_decoder(os.path.join(DATA, fixture))) + sub = fg.restrict(mod0, S) + ad = fg.anchor_data(sub) + v = sub["v"] + wits = [] + for seed in (1234, 2025, 77, 4242): + _val, wit = fg.cert_hillclimb(sub, iters=200, seed=seed) + if wit is not None and fg.replay_witness(sub, wit): + wits.append(wit) + rr = random.Random(4242 + 100 * size + sum(S)) + for _ in range(600): + a = [rr.randrange(8) & sub["pi"][t] for t in range(v)] + b = [rr.randrange(8) & sub["sg"][t] for t in range(v)] + wit = dict(a=a, b=b, order=list(range(v)), kept=list(range(v))) + if fg.replay_witness(sub, wit): + wits.append(wit) + for wit in wits: + if fg.in_box(sub, ad, wit)[0]: + continue + seen_esc += 1 + val = fg.ab_value(sub, wit["a"], wit["b"]) + if val < 2: + continue + proj = bpp_projection(sub, ad, wit) + pval = fg.ab_value(sub, proj["a"], proj["b"]) + if pval < val: + ok1, ok2 = bpp_conditions(sub, ad, wit) + return proven, dict(fixture=fixture, S=S, v=v, + tau=list(ad["tau"]), tau_min=min(ad["tau"]), + witness_value=val, + projected_value=pval, + condition_i=ok1, condition_ii=ok2, + status="CHECKED strictness at tau >= 1") + log("BPP strictness (tau >= 1 bounded): %d escaping witnesses examined, " + "no strict projection drop" % seen_esc) + return proven, dict(escape_witnesses_examined=seen_esc, found=False, + status="CHECKED bounded: no drop at tau >= 1 " + "(v = 3..5 fixture sub-decoders)") + + +def sweep(): + """Fixture-density tau >= 1 family: GL_3(Z) transforms + restrictions, + exact cert vs exact box, smallest v first.""" + rng = random.Random(20261016) + out = [] + for v_target, tries in ((4, 24), (5, 20), (6, 16)): + made = 0 + attempts = 0 + while made < tries and attempts < 40 * tries: + attempts += 1 + fixture = ("tied_min.json", "cex_min_1.json")[attempts % 2] + mod0 = fg.model(*fg.load_decoder(os.path.join(DATA, fixture))) + U, Uinv = rand_gl3z(rng, steps=2 + attempts % 5) + mod1 = transform(mod0, U, Uinv) + S = sorted(rng.sample(range(mod1["v"]), v_target)) + sub = fg.restrict(mod1, S) + ad = fg.anchor_data(sub) + if not (fg.tie_parity(sub, ad) and fg.scope_identity(sub, ad)): + continue + if min(ad["tau"]) < 1: + continue + made += 1 + ce, cew = fg.cert_exact(sub, max_v=v_target) + bx, bxw = ba.box_exact_tolerant(sub, ad) + assert fg.replay_witness(sub, cew) + assert bxw is None or fg.replay_witness(sub, bxw) + inb, esc = fg.in_box(sub, ad, cew) + rec = dict(fixture=fixture, S=S, v=v_target, + tau=list(ad["tau"]), cert=ce, box=bx, + cert_witness_in_box=inb, + hard=(ce < v_target), gap_box=ce - bx, + P=[list(p) for p in sub["P"]], + Q=[list(q) for q in sub["Q"]]) + out.append(rec) + log("v=%d %s S=%s tau=%s cert=%d box=%d in_box=%s hard=%s" + % (v_target, fixture, S, ad["tau"], ce, bx, inb, ce < v_target)) + if ce > bx: + log("BOX-COMPLETENESS COUNTEREXAMPLE: cert=%d > box=%d at " + "v=%d" % (ce, bx, v_target)) + return out, rec + log("sweep v=%d: %d instances, %d attempts" % (v_target, made, + attempts)) + return out, None + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + bpp_proven, bpp_tau1 = bpp_strictness() + records, cex = sweep() + hard = [r for r in records if r["hard"]] + tau1 = len(records) + with open(os.path.join(HERE, "data", "box-search-receipt.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump(dict(bpp_proven=bpp_proven, bpp_tau_ge1=bpp_tau1, + sweep=records, counterexample=cex, + generator="box_search.py seed 20261016"), + fh, indent=1, sort_keys=True) + fh.write("\n") + viol = sum(1 for r in records if r["gap_box"] > 0) + print("PASS_BOX_SEARCH bpp-strict-tau0=yes bpp-strict-tau1=%s tau-ge1=%d " + "hard=%d box-violations=%d" + % ("yes" if bpp_tau1.get("found") else "no", tau1, len(hard), viol)) + if cex is not None: + print("PASS_BOX_SEARCH counterexample v=%d" % cex["v"]) + + +if __name__ == "__main__": + main() diff --git a/research/fstar-gap2-v11-seed42ff0611/data/box-search-receipt.json b/research/fstar-gap2-v11-seed42ff0611/data/box-search-receipt.json new file mode 100644 index 0000000000..b452f93fc4 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/data/box-search-receipt.json @@ -0,0 +1,4547 @@ +{ + "bpp_proven": { + "condition_i": false, + "condition_ii": true, + "projected_value": 1, + "status": "PROVEN strictness at tau = 0 (forced: cert=2 > box=1)", + "tau": [ + 1, + 0 + ], + "v": 2, + "witness_value": 2 + }, + "bpp_tau_ge1": { + "escape_witnesses_examined": 21, + "found": false, + "status": "CHECKED bounded: no drop at tau >= 1 (v = 3..5 fixture sub-decoders)" + }, + "counterexample": null, + "generator": "box_search.py seed 20261016", + "sweep": [ + { + "P": [ + [ + -2, + 0, + 1 + ], + [ + -2, + 0, + 1 + ], + [ + -4, + 2, + 3 + ], + [ + 2, + -2, + -1 + ] + ], + "Q": [ + [ + 3, + 0, + 4 + ], + [ + -1, + -1, + 0 + ], + [ + 2, + -1, + 4 + ], + [ + 2, + -1, + 4 + ] + ], + "S": [ + 0, + 1, + 5, + 10 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 1, + -1, + -2 + ], + [ + 1, + -1, + 0 + ], + [ + 1, + 1, + 0 + ], + [ + 1, + 1, + 0 + ] + ], + "Q": [ + [ + 1, + 1, + 1 + ], + [ + -1, + 1, + -1 + ], + [ + 1, + 1, + 1 + ], + [ + 1, + 1, + 0 + ] + ], + "S": [ + 0, + 3, + 9, + 11 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2 + ], + "v": 4 + }, + { + "P": [ + [ + 2, + 0, + -1 + ], + [ + 0, + -2, + 1 + ], + [ + 0, + -2, + 1 + ], + [ + 2, + 2, + -1 + ] + ], + "Q": [ + [ + 1, + -1, + 0 + ], + [ + 0, + 1, + 0 + ], + [ + 1, + 0, + 2 + ], + [ + 1, + 1, + 2 + ] + ], + "S": [ + 1, + 3, + 5, + 8 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 3 + ], + "v": 4 + }, + { + "P": [ + [ + 1, + 0, + 2 + ], + [ + 1, + 2, + -2 + ], + [ + 1, + 2, + -2 + ], + [ + 1, + 2, + 0 + ] + ], + "Q": [ + [ + 2, + -1, + 0 + ], + [ + 2, + -1, + -1 + ], + [ + 0, + 1, + 0 + ], + [ + -2, + 2, + 1 + ] + ], + "S": [ + 4, + 7, + 8, + 9 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 3, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 2, + 1, + 1 + ], + [ + 2, + 1, + 1 + ], + [ + 2, + 1, + 1 + ], + [ + 2, + 1, + 3 + ] + ], + "Q": [ + [ + 1, + 1, + -1 + ], + [ + 0, + -2, + 1 + ], + [ + 2, + -1, + -1 + ], + [ + -1, + 1, + 1 + ] + ], + "S": [ + 10, + 11, + 12, + 16 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": false, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 1, + 2, + 2 + ], + "v": 4 + }, + { + "P": [ + [ + 0, + 0, + -1 + ], + [ + 2, + 0, + 1 + ], + [ + -1, + 1, + -1 + ], + [ + 0, + 1, + 0 + ] + ], + "Q": [ + [ + 0, + 1, + 1 + ], + [ + 1, + 2, + -1 + ], + [ + 1, + 2, + -1 + ], + [ + 1, + 1, + 0 + ] + ], + "S": [ + 5, + 8, + 13, + 15 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": false, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 2, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 2, + -1, + -2 + ], + [ + 0, + 1, + 0 + ], + [ + 0, + -1, + 2 + ], + [ + 0, + -1, + 2 + ] + ], + "Q": [ + [ + 3, + 2, + 1 + ], + [ + 3, + 2, + 2 + ], + [ + 1, + 0, + 1 + ], + [ + 3, + 2, + 2 + ] + ], + "S": [ + 2, + 8, + 10, + 11 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 3, + 1, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 2, + -1, + -2 + ], + [ + 2, + -1, + -2 + ], + [ + 0, + 1, + 0 + ], + [ + 0, + 1, + 2 + ] + ], + "Q": [ + [ + 0, + 0, + 1 + ], + [ + 1, + 2, + -1 + ], + [ + 1, + 2, + 0 + ], + [ + 0, + 0, + 1 + ] + ], + "S": [ + 0, + 2, + 8, + 9 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 3, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 1, + -1, + -1 + ], + [ + 1, + -1, + 1 + ], + [ + 1, + 1, + -1 + ], + [ + 1, + 1, + 1 + ] + ], + "Q": [ + [ + 1, + 0, + -1 + ], + [ + 1, + 0, + 1 + ], + [ + 1, + 1, + 0 + ], + [ + 1, + 0, + 1 + ] + ], + "S": [ + 2, + 5, + 8, + 10 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2 + ], + "v": 4 + }, + { + "P": [ + [ + 5, + -2, + 3 + ], + [ + 3, + -1, + 1 + ], + [ + 3, + -1, + 3 + ], + [ + 1, + 0, + 1 + ] + ], + "Q": [ + [ + 2, + 3, + -1 + ], + [ + 0, + 2, + 1 + ], + [ + 1, + 4, + 1 + ], + [ + 0, + 2, + 1 + ] + ], + "S": [ + 0, + 5, + 9, + 14 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": false, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 2, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 1, + 0, + -1 + ], + [ + 3, + -4, + 3 + ], + [ + 3, + -4, + 3 + ], + [ + 1, + -2, + 3 + ] + ], + "Q": [ + [ + 3, + 3, + 1 + ], + [ + 1, + 2, + 1 + ], + [ + 1, + 1, + 1 + ], + [ + 1, + 1, + 1 + ] + ], + "S": [ + 2, + 3, + 5, + 10 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2 + ], + "v": 4 + }, + { + "P": [ + [ + 1, + -3, + 1 + ], + [ + 1, + -3, + 1 + ], + [ + 1, + 2, + -1 + ], + [ + 1, + -1, + 1 + ] + ], + "Q": [ + [ + 0, + 1, + 1 + ], + [ + 1, + 0, + 1 + ], + [ + 1, + 1, + 1 + ], + [ + 0, + 1, + 3 + ] + ], + "S": [ + 1, + 3, + 7, + 16 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2 + ], + "v": 4 + }, + { + "P": [ + [ + 0, + -2, + -1 + ], + [ + 2, + -2, + 1 + ], + [ + 2, + -2, + 1 + ], + [ + 2, + 0, + 1 + ] + ], + "Q": [ + [ + 0, + -1, + 0 + ], + [ + 1, + 1, + -2 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 0, + 0 + ] + ], + "S": [ + 1, + 3, + 5, + 10 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 3, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + -1, + -2, + 0 + ], + [ + 1, + -2, + 2 + ], + [ + 1, + -2, + 2 + ], + [ + 3, + 0, + 2 + ] + ], + "Q": [ + [ + 0, + -1, + 0 + ], + [ + 0, + -1, + 0 + ], + [ + 0, + 0, + 1 + ], + [ + 2, + -1, + -2 + ] + ], + "S": [ + 1, + 4, + 5, + 11 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + -1, + 0, + 3 + ], + [ + -1, + 1, + 5 + ], + [ + -1, + 1, + 4 + ], + [ + -1, + 1, + 3 + ] + ], + "Q": [ + [ + -1, + 1, + 0 + ], + [ + -1, + 1, + 0 + ], + [ + -4, + 1, + -1 + ], + [ + -1, + 1, + 0 + ] + ], + "S": [ + 8, + 13, + 14, + 18 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": false, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 2, + 1, + 2 + ], + "v": 4 + }, + { + "P": [ + [ + 1, + -2, + 0 + ], + [ + 1, + -2, + 0 + ], + [ + 1, + -2, + 0 + ], + [ + 1, + 2, + -2 + ] + ], + "Q": [ + [ + 0, + 1, + 0 + ], + [ + 0, + -1, + -1 + ], + [ + 2, + 0, + 1 + ], + [ + 0, + 1, + 0 + ] + ], + "S": [ + 3, + 4, + 5, + 6 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + -1, + 0, + -2 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 2, + 2 + ] + ], + "Q": [ + [ + 2, + 1, + -2 + ], + [ + 2, + 1, + -2 + ], + [ + 2, + 1, + -1 + ], + [ + 0, + 1, + 0 + ] + ], + "S": [ + 1, + 4, + 5, + 11 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 0, + 1, + -2 + ], + [ + 0, + 1, + -2 + ], + [ + 2, + -1, + 0 + ], + [ + 2, + -1, + 2 + ] + ], + "Q": [ + [ + 1, + 0, + -1 + ], + [ + 1, + 2, + 0 + ], + [ + 1, + 0, + -1 + ], + [ + 0, + 0, + 1 + ] + ], + "S": [ + 1, + 2, + 4, + 9 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 0, + -1, + -2 + ], + [ + 0, + -1, + 0 + ], + [ + 2, + 1, + 0 + ], + [ + 2, + 1, + 0 + ] + ], + "Q": [ + [ + 1, + 0, + 1 + ], + [ + 1, + -2, + 0 + ], + [ + 1, + 0, + 1 + ], + [ + 2, + -2, + 1 + ] + ], + "S": [ + 0, + 4, + 9, + 10 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 2, + -1, + 0 + ], + [ + 0, + 1, + -2 + ], + [ + 0, + 1, + 0 + ], + [ + 0, + 1, + 0 + ] + ], + "Q": [ + [ + 0, + 2, + 1 + ], + [ + 0, + 0, + -1 + ], + [ + 1, + 2, + 1 + ], + [ + 1, + 2, + 0 + ] + ], + "S": [ + 0, + 6, + 10, + 11 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + -2, + -1, + -3 + ], + [ + -2, + -1, + -3 + ], + [ + 2, + 1, + 5 + ], + [ + 0, + 1, + 1 + ] + ], + "Q": [ + [ + -2, + -1, + 1 + ], + [ + -3, + 1, + 1 + ], + [ + -2, + 1, + 1 + ], + [ + -2, + 1, + 1 + ] + ], + "S": [ + 4, + 5, + 8, + 11 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2 + ], + "v": 4 + }, + { + "P": [ + [ + 3, + -2, + -2 + ], + [ + 3, + -2, + -2 + ], + [ + 3, + -2, + -2 + ], + [ + 1, + 0, + 0 + ] + ], + "Q": [ + [ + 0, + 0, + -1 + ], + [ + 0, + -1, + 0 + ], + [ + 2, + 1, + 1 + ], + [ + 2, + 1, + 1 + ] + ], + "S": [ + 6, + 7, + 8, + 11 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 3, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 1, + -1, + 1 + ], + [ + 1, + -1, + 3 + ], + [ + 1, + 1, + -3 + ], + [ + 1, + 1, + -3 + ] + ], + "Q": [ + [ + 1, + -1, + 0 + ], + [ + -1, + -2, + -1 + ], + [ + 1, + 4, + 1 + ], + [ + 2, + 3, + 1 + ] + ], + "S": [ + 1, + 3, + 9, + 10 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2 + ], + "v": 4 + }, + { + "P": [ + [ + 1, + 4, + -2 + ], + [ + 1, + 4, + -2 + ], + [ + 1, + 6, + -2 + ], + [ + 1, + 2, + 0 + ] + ], + "Q": [ + [ + 2, + -1, + -2 + ], + [ + 0, + 0, + -1 + ], + [ + -2, + 1, + 1 + ], + [ + 0, + 1, + 2 + ] + ], + "S": [ + 1, + 2, + 6, + 11 + ], + "box": 4, + "cert": 4, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 3, + 1 + ], + "v": 4 + }, + { + "P": [ + [ + 3, + -1, + -7 + ], + [ + 1, + -1, + -1 + ], + [ + 1, + 1, + -3 + ], + [ + -1, + 1, + 3 + ], + [ + -1, + 1, + 3 + ] + ], + "Q": [ + [ + 3, + 0, + 1 + ], + [ + 5, + 1, + 2 + ], + [ + -2, + 1, + -1 + ], + [ + 2, + 1, + 1 + ], + [ + 5, + 1, + 2 + ] + ], + "S": [ + 1, + 5, + 6, + 9, + 10 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2, + 2 + ], + "v": 5 + }, + { + "P": [ + [ + 0, + 0, + -1 + ], + [ + -2, + -6, + 1 + ], + [ + 2, + 4, + -1 + ], + [ + 2, + 4, + -1 + ], + [ + 0, + -2, + 1 + ] + ], + "Q": [ + [ + 2, + -1, + -2 + ], + [ + 1, + -1, + -2 + ], + [ + 1, + 0, + 0 + ], + [ + 2, + -1, + -2 + ], + [ + 1, + 0, + 2 + ] + ], + "S": [ + 2, + 4, + 6, + 7, + 9 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 3, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 1, + -2, + -1 + ], + [ + 2, + 0, + -3 + ], + [ + 2, + 0, + -3 + ], + [ + 2, + 1, + -3 + ], + [ + 1, + 0, + -1 + ] + ], + "Q": [ + [ + 1, + 0, + 0 + ], + [ + 2, + 1, + 1 + ], + [ + 4, + 1, + 3 + ], + [ + 5, + 1, + 3 + ], + [ + 4, + 1, + 3 + ] + ], + "S": [ + 0, + 4, + 5, + 13, + 14 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 2, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 1, + 3, + -3 + ], + [ + 1, + 1, + -1 + ], + [ + 1, + 7, + -5 + ], + [ + 1, + 7, + -5 + ], + [ + 1, + 5, + -3 + ] + ], + "Q": [ + [ + -1, + -1, + -2 + ], + [ + 3, + 1, + 2 + ], + [ + -3, + 0, + -1 + ], + [ + 0, + 1, + 1 + ], + [ + 3, + 1, + 2 + ] + ], + "S": [ + 2, + 5, + 6, + 8, + 10 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2, + 2 + ], + "v": 5 + }, + { + "P": [ + [ + 2, + -2, + -1 + ], + [ + 2, + -2, + -1 + ], + [ + 0, + 0, + 1 + ], + [ + 2, + 0, + -1 + ], + [ + 0, + 2, + 1 + ] + ], + "Q": [ + [ + 0, + 1, + 0 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 0, + 2 + ], + [ + 1, + 1, + 0 + ], + [ + 1, + 0, + 2 + ] + ], + "S": [ + 0, + 2, + 5, + 8, + 10 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + -1, + -1, + -1 + ], + [ + -1, + -1, + -1 + ], + [ + 1, + -1, + 1 + ], + [ + 1, + 1, + -1 + ], + [ + 3, + 1, + 1 + ] + ], + "Q": [ + [ + 0, + 1, + 1 + ], + [ + 1, + -1, + -2 + ], + [ + 1, + -2, + -1 + ], + [ + 1, + -1, + -2 + ], + [ + 0, + 1, + 1 + ] + ], + "S": [ + 0, + 2, + 4, + 7, + 9 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2, + 2 + ], + "v": 5 + }, + { + "P": [ + [ + 1, + 0, + -1 + ], + [ + -1, + 1, + -1 + ], + [ + -1, + 1, + -1 + ], + [ + -1, + 1, + 1 + ], + [ + -1, + 1, + 1 + ] + ], + "Q": [ + [ + 1, + 1, + 0 + ], + [ + 0, + 1, + -1 + ], + [ + 1, + 3, + 0 + ], + [ + 1, + 2, + 1 + ], + [ + 1, + 3, + 0 + ] + ], + "S": [ + 6, + 10, + 13, + 17, + 18 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": true, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 2, + 2, + 2, + 2 + ], + "v": 5 + }, + { + "P": [ + [ + 2, + -1, + 0 + ], + [ + 4, + -1, + 2 + ], + [ + 4, + -1, + 2 + ], + [ + -2, + 1, + -2 + ], + [ + 0, + 1, + 0 + ] + ], + "Q": [ + [ + 1, + 0, + -1 + ], + [ + 0, + 0, + -1 + ], + [ + 1, + 2, + 0 + ], + [ + 0, + 0, + -1 + ], + [ + 0, + 2, + 1 + ] + ], + "S": [ + 1, + 3, + 5, + 6, + 9 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 3, + 2, + -2 + ], + [ + 1, + 0, + 0 + ], + [ + 3, + 4, + -2 + ], + [ + 3, + 4, + -2 + ], + [ + 1, + 2, + 0 + ] + ], + "Q": [ + [ + 0, + 0, + -1 + ], + [ + -2, + 1, + -2 + ], + [ + -2, + 1, + -2 + ], + [ + 0, + 1, + 1 + ], + [ + 0, + 1, + 1 + ] + ], + "S": [ + 2, + 3, + 6, + 8, + 11 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 0, + 1, + -1 + ], + [ + 0, + 1, + -1 + ], + [ + 0, + 1, + 1 + ], + [ + -1, + 2, + -1 + ], + [ + -1, + 2, + 0 + ] + ], + "Q": [ + [ + -1, + 0, + 1 + ], + [ + 2, + 1, + 0 + ], + [ + 0, + 1, + 0 + ], + [ + 1, + 1, + -1 + ], + [ + -1, + 0, + 1 + ] + ], + "S": [ + 5, + 6, + 8, + 12, + 14 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": true, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 2, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 3, + -1, + -11 + ], + [ + 1, + -1, + -3 + ], + [ + 1, + -1, + -3 + ], + [ + 1, + 1, + -3 + ], + [ + 1, + 1, + -3 + ] + ], + "Q": [ + [ + 7, + 1, + 2 + ], + [ + 4, + -1, + 1 + ], + [ + 11, + 0, + 3 + ], + [ + 7, + 1, + 2 + ], + [ + 11, + 0, + 3 + ] + ], + "S": [ + 0, + 4, + 5, + 9, + 10 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2, + 2 + ], + "v": 5 + }, + { + "P": [ + [ + 1, + -1, + -1 + ], + [ + 3, + -1, + 1 + ], + [ + 3, + -1, + 1 + ], + [ + 1, + 1, + 1 + ], + [ + 1, + 1, + 1 + ] + ], + "Q": [ + [ + 1, + 0, + -1 + ], + [ + 0, + 1, + -1 + ], + [ + 1, + 0, + -1 + ], + [ + 0, + 1, + 1 + ], + [ + 1, + 2, + -1 + ] + ], + "S": [ + 1, + 3, + 4, + 9, + 11 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2, + 2 + ], + "v": 5 + }, + { + "P": [ + [ + 2, + -5, + 2 + ], + [ + 0, + -3, + 2 + ], + [ + 2, + -1, + 0 + ], + [ + 0, + 1, + 0 + ], + [ + 0, + 1, + 0 + ] + ], + "Q": [ + [ + 1, + 2, + 3 + ], + [ + 1, + 0, + -1 + ], + [ + 2, + 2, + 3 + ], + [ + 1, + 2, + 4 + ], + [ + 2, + 2, + 3 + ] + ], + "S": [ + 0, + 3, + 8, + 10, + 11 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 3, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 2, + -3, + -1 + ], + [ + 1, + -2, + 1 + ], + [ + 2, + -2, + -3 + ], + [ + 1, + 0, + -3 + ], + [ + 0, + 1, + -1 + ] + ], + "Q": [ + [ + 2, + 1, + 0 + ], + [ + 3, + 1, + 1 + ], + [ + -1, + 0, + -1 + ], + [ + 5, + 3, + 1 + ], + [ + 6, + 3, + 2 + ] + ], + "S": [ + 0, + 2, + 4, + 13, + 15 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 2, + 1, + 2, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 7, + -2, + -2 + ], + [ + 7, + -2, + -2 + ], + [ + 5, + 0, + -2 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 0, + 0 + ] + ], + "Q": [ + [ + 2, + 3, + 5 + ], + [ + 0, + 0, + -1 + ], + [ + 2, + 3, + 4 + ], + [ + 2, + 2, + 5 + ], + [ + 2, + 3, + 4 + ] + ], + "S": [ + 0, + 2, + 8, + 10, + 11 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 3, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 0, + 0, + -1 + ], + [ + 0, + -2, + 1 + ], + [ + 0, + -2, + 1 + ], + [ + 0, + -2, + 1 + ], + [ + 2, + 2, + -1 + ] + ], + "Q": [ + [ + 1, + -1, + -2 + ], + [ + 0, + 1, + 0 + ], + [ + 1, + -2, + -2 + ], + [ + 1, + -1, + 0 + ], + [ + 0, + 1, + 0 + ] + ], + "S": [ + 2, + 3, + 4, + 5, + 6 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 1, + -2, + 0 + ], + [ + 1, + -2, + 0 + ], + [ + 1, + -2, + -2 + ], + [ + 1, + -2, + -2 + ], + [ + 1, + 0, + 0 + ] + ], + "Q": [ + [ + 0, + 1, + -2 + ], + [ + 0, + -1, + 1 + ], + [ + 0, + 1, + -2 + ], + [ + 0, + 0, + -1 + ], + [ + 2, + 1, + -1 + ] + ], + "S": [ + 3, + 4, + 6, + 7, + 11 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 4, + -6, + -1 + ], + [ + 4, + -6, + -1 + ], + [ + 2, + 0, + -1 + ], + [ + 2, + 0, + -1 + ], + [ + -2, + 2, + 1 + ] + ], + "Q": [ + [ + 1, + 0, + 2 + ], + [ + 3, + 1, + 4 + ], + [ + 2, + 1, + 2 + ], + [ + 3, + 1, + 4 + ], + [ + 2, + 1, + 4 + ] + ], + "S": [ + 1, + 2, + 6, + 7, + 9 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + 0, + 1, + -1 + ], + [ + 2, + -1, + 1 + ], + [ + 2, + -1, + 1 + ], + [ + 0, + 1, + 1 + ], + [ + 0, + 1, + 1 + ] + ], + "Q": [ + [ + 1, + 1, + -1 + ], + [ + 2, + 1, + -1 + ], + [ + 1, + 1, + 1 + ], + [ + 1, + 1, + 1 + ], + [ + 0, + 1, + 1 + ] + ], + "S": [ + 2, + 4, + 5, + 10, + 11 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2, + 2 + ], + "v": 5 + }, + { + "P": [ + [ + 4, + -1, + 0 + ], + [ + 2, + -1, + 2 + ], + [ + 0, + 1, + -2 + ], + [ + -2, + 1, + 0 + ], + [ + -2, + 1, + 0 + ] + ], + "Q": [ + [ + 1, + 2, + 1 + ], + [ + 1, + 4, + 2 + ], + [ + 1, + 4, + 1 + ], + [ + 1, + 4, + 2 + ], + [ + 1, + 4, + 1 + ] + ], + "S": [ + 1, + 5, + 8, + 10, + 11 + ], + "box": 5, + "cert": 5, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "P": [ + [ + -1, + -2, + 2 + ], + [ + -1, + -2, + 2 + ], + [ + -1, + -2, + 2 + ], + [ + 3, + 4, + -4 + ], + [ + 3, + 4, + -4 + ], + [ + 1, + 2, + 0 + ] + ], + "Q": [ + [ + -2, + 1, + -1 + ], + [ + 4, + -2, + 1 + ], + [ + 4, + -1, + 2 + ], + [ + 2, + -1, + 0 + ], + [ + 2, + 0, + 1 + ], + [ + 2, + 0, + 1 + ] + ], + "S": [ + 1, + 2, + 3, + 12, + 13, + 18 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": false, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 3, + 1, + 1, + 1, + 1, + 1 + ], + "v": 6 + }, + { + "P": [ + [ + 3, + -7, + -5 + ], + [ + 3, + -5, + -5 + ], + [ + 3, + -5, + -5 + ], + [ + 3, + -5, + -5 + ], + [ + 1, + -1, + -1 + ], + [ + 1, + -1, + -1 + ] + ], + "Q": [ + [ + 5, + 1, + 2 + ], + [ + -1, + 1, + -2 + ], + [ + -1, + 0, + -1 + ], + [ + 4, + 1, + 1 + ], + [ + 5, + 1, + 2 + ], + [ + 5, + 0, + 3 + ] + ], + "S": [ + 0, + 6, + 7, + 8, + 9, + 10 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "v": 6 + }, + { + "P": [ + [ + 2, + 1, + 0 + ], + [ + 2, + 1, + 0 + ], + [ + 2, + 1, + 0 + ], + [ + 0, + 1, + -4 + ], + [ + 0, + 1, + -2 + ], + [ + 0, + 1, + -2 + ] + ], + "Q": [ + [ + 0, + -2, + -1 + ], + [ + 1, + 0, + 0 + ], + [ + -1, + 4, + 1 + ], + [ + 1, + -2, + -1 + ], + [ + -1, + 4, + 1 + ], + [ + -1, + 2, + 0 + ] + ], + "S": [ + 3, + 4, + 5, + 7, + 10, + 11 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1, + 1, + 1 + ], + "v": 6 + }, + { + "P": [ + [ + 0, + -2, + -1 + ], + [ + 2, + -2, + 1 + ], + [ + 2, + -2, + 1 + ], + [ + 0, + 0, + -1 + ], + [ + 2, + 0, + 1 + ], + [ + 2, + 0, + 1 + ] + ], + "Q": [ + [ + 0, + -1, + 0 + ], + [ + 1, + 1, + -2 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 1, + -2 + ], + [ + 1, + 1, + 0 + ], + [ + 1, + 0, + 0 + ] + ], + "S": [ + 1, + 3, + 5, + 6, + 9, + 10 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 3, + 1, + 1, + 1, + 1 + ], + "v": 6 + }, + { + "P": [ + [ + 1, + -1, + 0 + ], + [ + 1, + -1, + 0 + ], + [ + 1, + -1, + -2 + ], + [ + 1, + -1, + -2 + ], + [ + -1, + 3, + 4 + ], + [ + -1, + 3, + 4 + ] + ], + "Q": [ + [ + 1, + 3, + -2 + ], + [ + 1, + -1, + 1 + ], + [ + 1, + 3, + -2 + ], + [ + 3, + 3, + -1 + ], + [ + 1, + 1, + 0 + ], + [ + 3, + 3, + -1 + ] + ], + "S": [ + 3, + 4, + 6, + 8, + 9, + 11 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "v": 6 + }, + { + "P": [ + [ + 2, + -1, + 0 + ], + [ + 2, + -1, + 2 + ], + [ + 2, + -1, + 2 + ], + [ + 0, + 1, + -2 + ], + [ + 0, + 1, + -2 + ], + [ + 0, + 1, + 0 + ] + ], + "Q": [ + [ + 0, + 2, + 1 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 2, + 1 + ], + [ + 1, + 0, + -1 + ], + [ + 1, + 2, + 0 + ], + [ + 1, + 2, + 1 + ] + ], + "S": [ + 0, + 4, + 5, + 7, + 8, + 10 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 3, + 1, + 1, + 1 + ], + "v": 6 + }, + { + "P": [ + [ + 2, + -1, + -4 + ], + [ + 2, + -3, + -2 + ], + [ + 2, + -3, + -2 + ], + [ + 0, + 3, + -2 + ], + [ + 0, + 3, + -2 + ], + [ + 0, + 1, + 0 + ] + ], + "Q": [ + [ + 1, + 0, + 0 + ], + [ + 1, + 0, + 0 + ], + [ + 7, + 2, + 3 + ], + [ + -1, + 0, + -1 + ], + [ + 5, + 2, + 2 + ], + [ + 7, + 2, + 3 + ] + ], + "S": [ + 1, + 4, + 5, + 7, + 8, + 10 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 3, + 1, + 1, + 1 + ], + "v": 6 + }, + { + "P": [ + [ + 1, + -6, + -1 + ], + [ + 1, + -1, + 0 + ], + [ + 1, + 2, + 1 + ], + [ + 1, + 2, + 1 + ], + [ + 1, + 0, + 1 + ], + [ + 1, + 0, + 1 + ] + ], + "Q": [ + [ + -1, + -1, + 3 + ], + [ + 3, + 1, + -2 + ], + [ + -1, + -1, + 2 + ], + [ + 1, + 0, + 1 + ], + [ + -1, + -1, + 3 + ], + [ + 1, + 0, + 1 + ] + ], + "S": [ + 3, + 7, + 11, + 13, + 17, + 18 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": false, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 1, + 2, + 2, + 2 + ], + "v": 6 + }, + { + "P": [ + [ + 1, + 0, + -2 + ], + [ + 1, + -2, + 0 + ], + [ + 1, + 2, + -2 + ], + [ + 1, + 2, + -2 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 0, + 0 + ] + ], + "Q": [ + [ + 0, + -1, + -1 + ], + [ + 0, + -1, + -1 + ], + [ + 0, + 1, + 0 + ], + [ + 2, + 1, + 1 + ], + [ + 2, + 0, + 1 + ], + [ + 2, + 1, + 1 + ] + ], + "S": [ + 1, + 4, + 6, + 8, + 10, + 11 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 3, + 1, + 1 + ], + "v": 6 + }, + { + "P": [ + [ + 2, + 1, + -2 + ], + [ + 2, + 1, + -2 + ], + [ + 2, + 1, + 0 + ], + [ + 0, + 1, + 0 + ], + [ + 0, + 1, + 0 + ], + [ + 0, + 1, + 0 + ] + ], + "Q": [ + [ + 1, + 0, + 0 + ], + [ + -1, + 2, + -1 + ], + [ + 1, + 0, + 0 + ], + [ + -2, + 2, + -1 + ], + [ + -1, + 2, + -1 + ], + [ + -1, + 2, + 0 + ] + ], + "S": [ + 1, + 2, + 4, + 6, + 7, + 8 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 3, + 1, + 1, + 1, + 1 + ], + "v": 6 + }, + { + "P": [ + [ + 1, + -1, + 0 + ], + [ + 1, + -1, + 1 + ], + [ + 1, + -1, + 1 + ], + [ + 1, + 1, + -1 + ], + [ + 1, + 1, + 0 + ], + [ + 1, + 1, + 1 + ] + ], + "Q": [ + [ + 1, + 0, + -1 + ], + [ + 0, + 1, + -1 + ], + [ + 1, + 0, + 1 + ], + [ + 1, + 0, + -1 + ], + [ + 0, + 1, + 1 + ], + [ + 1, + 0, + 1 + ] + ], + "S": [ + 0, + 1, + 3, + 12, + 14, + 17 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "cex_min_1.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 2, + 2, + 2, + 1, + 2 + ], + "v": 6 + }, + { + "P": [ + [ + 1, + 0, + 0 + ], + [ + 3, + 0, + 2 + ], + [ + 1, + 2, + 0 + ], + [ + 1, + 2, + 0 + ], + [ + 3, + 2, + 2 + ], + [ + 3, + 2, + 2 + ] + ], + "Q": [ + [ + 2, + 0, + -3 + ], + [ + 0, + 0, + 1 + ], + [ + 0, + 1, + -1 + ], + [ + 0, + 1, + 0 + ], + [ + -2, + 1, + 3 + ], + [ + 0, + 0, + 1 + ] + ], + "S": [ + 2, + 5, + 6, + 8, + 9, + 10 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 1, + 1, + 1, + 3, + 1 + ], + "v": 6 + }, + { + "P": [ + [ + 1, + 2, + -2 + ], + [ + 1, + 2, + -2 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 0, + 0 + ], + [ + -1, + 4, + -2 + ] + ], + "Q": [ + [ + 0, + 1, + 2 + ], + [ + 2, + 1, + 1 + ], + [ + -2, + -1, + -2 + ], + [ + 2, + 1, + 1 + ], + [ + 2, + 2, + 3 + ], + [ + 0, + 0, + -1 + ] + ], + "S": [ + 0, + 1, + 3, + 4, + 5, + 7 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 3, + 1, + 1, + 1, + 1 + ], + "v": 6 + }, + { + "P": [ + [ + 1, + -1, + 3 + ], + [ + 1, + -1, + 3 + ], + [ + 1, + -1, + 3 + ], + [ + 1, + 1, + -1 + ], + [ + 1, + 1, + 1 + ], + [ + 1, + 1, + 1 + ] + ], + "Q": [ + [ + 1, + 0, + -1 + ], + [ + 1, + -1, + 0 + ], + [ + 0, + 1, + 1 + ], + [ + 2, + -1, + -1 + ], + [ + -1, + 2, + 1 + ], + [ + 1, + 1, + 0 + ] + ], + "S": [ + 3, + 4, + 5, + 7, + 9, + 11 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "v": 6 + }, + { + "P": [ + [ + 1, + -1, + -1 + ], + [ + 1, + -1, + -1 + ], + [ + 5, + -1, + 1 + ], + [ + -3, + 1, + -1 + ], + [ + 1, + 1, + 1 + ], + [ + 1, + 1, + 1 + ] + ], + "Q": [ + [ + 0, + 1, + 1 + ], + [ + 1, + 2, + -3 + ], + [ + 1, + 2, + -1 + ], + [ + 0, + 1, + -1 + ], + [ + 0, + 1, + 1 + ], + [ + 1, + 3, + -2 + ] + ], + "S": [ + 0, + 2, + 5, + 6, + 9, + 11 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": false, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "v": 6 + }, + { + "P": [ + [ + 2, + -2, + 1 + ], + [ + 2, + -2, + 1 + ], + [ + 0, + 2, + -1 + ], + [ + 2, + 0, + 1 + ], + [ + 2, + 0, + 1 + ], + [ + 2, + 0, + 1 + ] + ], + "Q": [ + [ + 0, + 1, + 0 + ], + [ + 1, + -1, + -2 + ], + [ + 1, + 0, + -2 + ], + [ + 0, + 1, + 2 + ], + [ + 1, + 0, + 0 + ], + [ + 1, + 1, + 0 + ] + ], + "S": [ + 3, + 4, + 7, + 9, + 10, + 11 + ], + "box": 6, + "cert": 6, + "cert_witness_in_box": true, + "fixture": "tied_min.json", + "gap_box": 0, + "hard": false, + "tau": [ + 1, + 3, + 1, + 1, + 1, + 1 + ], + "v": 6 + } + ] +} diff --git a/research/fstar-gap2-v11-seed42ff0611/data/named-v11-receipt.json b/research/fstar-gap2-v11-seed42ff0611/data/named-v11-receipt.json new file mode 100644 index 0000000000..af398c16ab --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/data/named-v11-receipt.json @@ -0,0 +1,3729 @@ +{ + "box_seeds": [ + [ + 910, + 400 + ], + [ + 2024, + 400 + ], + [ + 2026, + 2000 + ], + [ + 42, + 2000 + ], + [ + 7, + 2000 + ], + [ + 13, + 2000 + ], + [ + 99, + 2000 + ], + [ + 31, + 2000 + ] + ], + "cert_seeds": [ + [ + 911, + 400 + ], + [ + 2025, + 400 + ], + [ + 1234, + 400 + ], + [ + 2026, + 2000 + ], + [ + 42, + 2000 + ], + [ + 7, + 2000 + ], + [ + 13, + 2000 + ], + [ + 99, + 2000 + ], + [ + 31, + 2000 + ] + ], + "generator": "run_named_v11.py", + "records": { + "tied_min|0,1,2,3,4,5,6,7,8,10,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 6, + 3, + 4, + 3, + 2, + 1, + 4, + 6, + 5, + 1, + 1 + ], + "b": [ + 2, + 2, + 4, + 6, + 2, + 5, + 4, + 4, + 1, + 1, + 1 + ], + "kept": [ + 10, + 9, + 8, + 5, + 6, + 0, + 4, + 3, + 1, + 7, + 2 + ], + "order": [ + 10, + 9, + 8, + 5, + 6, + 0, + 4, + 3, + 1, + 7, + 2 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 7, + 3, + 7, + 4, + 7, + 3, + 4, + 4, + 1, + 1, + 2 + ], + "b": [ + 4, + 2, + 4, + 6, + 2, + 1, + 6, + 4, + 3, + 1, + 3 + ], + "kept": [ + 9, + 5, + 0, + 7, + 6, + 2, + 4, + 3, + 1, + 10, + 8 + ], + "order": [ + 9, + 5, + 0, + 7, + 6, + 2, + 4, + 3, + 1, + 10, + 8 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,1,2,3,4,5,6,7,8,10,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ] + ], + "mode": "a", + "repairs": { + "0": 2, + "1": 2, + "4": 6, + "5": 6 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 10, + "stored_box_exact": false, + "stored_cert": 11, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|0,1,2,3,4,5,6,7,8,9,10": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 10 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 2, + 5, + 5, + 6, + 6, + 1, + 7, + 7, + 7, + 2, + 1 + ], + "b": [ + 6, + 3, + 1, + 2, + 3, + 5, + 2, + 1, + 1, + 6, + 5 + ], + "kept": [ + 8, + 7, + 4, + 2, + 1, + 10, + 6, + 3, + 9, + 5, + 0 + ], + "order": [ + 8, + 7, + 4, + 2, + 1, + 10, + 6, + 3, + 9, + 5, + 0 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 10 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 2, + 5, + 5, + 6, + 6, + 1, + 7, + 7, + 7, + 2, + 1 + ], + "b": [ + 6, + 3, + 1, + 2, + 3, + 5, + 2, + 1, + 1, + 6, + 5 + ], + "kept": [ + 8, + 7, + 4, + 2, + 1, + 10, + 6, + 3, + 9, + 5, + 0 + ], + "order": [ + 8, + 7, + 4, + 2, + 1, + 10, + 6, + 3, + 9, + 5, + 0 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,1,2,3,4,5,6,7,8,9,10", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ] + ], + "mode": "a", + "repairs": { + "0": 2, + "1": 2 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 10, + "stored_box_exact": false, + "stored_cert": 10, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|0,1,2,3,4,5,6,7,8,9,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 4, + 3, + 3, + 7, + 3, + 7, + 6, + 6, + 5, + 2, + 6 + ], + "b": [ + 6, + 1, + 5, + 2, + 1, + 1, + 2, + 4, + 3, + 6, + 3 + ], + "kept": [ + 7, + 6, + 5, + 3, + 2, + 10, + 9, + 0, + 4, + 1, + 8 + ], + "order": [ + 7, + 6, + 5, + 3, + 2, + 10, + 9, + 0, + 4, + 1, + 8 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 2, + 1, + 3, + 7, + 5, + 7, + 4, + 3, + 6, + 2, + 2 + ], + "b": [ + 6, + 1, + 5, + 4, + 1, + 1, + 4, + 5, + 2, + 2, + 2 + ], + "kept": [ + 10, + 9, + 8, + 5, + 0, + 4, + 1, + 7, + 6, + 3, + 2 + ], + "order": [ + 10, + 9, + 8, + 5, + 0, + 4, + 1, + 7, + 6, + 3, + 2 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,1,2,3,4,5,6,7,8,9,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ] + ], + "mode": "a", + "repairs": { + "0": 2, + "1": 2 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 11, + "stored_box_exact": true, + "stored_cert": 10, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|0,1,2,3,4,5,6,7,9,10,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 3, + 5, + 6, + 4, + 1, + 5, + 4, + 4, + 2, + 3, + 7 + ], + "b": [ + 2, + 3, + 5, + 6, + 3, + 1, + 6, + 5, + 2, + 1, + 1 + ], + "kept": [ + 10, + 7, + 6, + 2, + 3, + 9, + 5, + 4, + 1, + 8, + 0 + ], + "order": [ + 10, + 7, + 6, + 2, + 3, + 9, + 5, + 4, + 1, + 8, + 0 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 6, + 6, + 6, + 4, + 2, + 1, + 4, + 4, + 7, + 5, + 7 + ], + "b": [ + 2, + 3, + 5, + 6, + 3, + 1, + 6, + 5, + 2, + 1, + 1 + ], + "kept": [ + 10, + 8, + 7, + 6, + 0, + 4, + 2, + 3, + 1, + 9, + 5 + ], + "order": [ + 10, + 8, + 7, + 6, + 0, + 4, + 2, + 3, + 1, + 9, + 5 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,1,2,3,4,5,6,7,9,10,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 4 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ] + ], + "mode": "a", + "repairs": { + "0": 2, + "1": 2 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 11, + "stored_box_exact": false, + "stored_cert": 10, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|0,1,2,3,4,5,6,8,9,10,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 5, + 1, + 3, + 2, + 5, + 4, + 2, + 2, + 6, + 6, + 6 + ], + "b": [ + 4, + 1, + 1, + 6, + 1, + 5, + 6, + 2, + 2, + 4, + 2 + ], + "kept": [ + 10, + 9, + 8, + 7, + 6, + 3, + 0, + 5, + 2, + 4, + 1 + ], + "order": [ + 10, + 9, + 8, + 7, + 6, + 3, + 0, + 5, + 2, + 4, + 1 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 4, + 7, + 5, + 2, + 3, + 3, + 3, + 2, + 7, + 1, + 1 + ], + "b": [ + 4, + 2, + 4, + 6, + 2, + 5, + 6, + 3, + 4, + 1, + 1 + ], + "kept": [ + 10, + 9, + 4, + 1, + 7, + 5, + 6, + 3, + 2, + 8, + 0 + ], + "order": [ + 10, + 9, + 4, + 1, + 7, + 5, + 6, + 3, + 2, + 8, + 0 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,1,2,3,4,5,6,8,9,10,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ] + ], + "mode": "a", + "repairs": { + "0": 2, + "1": 2 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 10, + "stored_box_exact": false, + "stored_cert": 11, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|0,1,2,3,4,5,7,8,9,10,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 2, + 3, + 3, + 7, + 2, + 7, + 4, + 1, + 5, + 5, + 5 + ], + "b": [ + 6, + 2, + 5, + 2, + 2, + 4, + 5, + 1, + 4, + 1, + 1 + ], + "kept": [ + 10, + 9, + 8, + 7, + 5, + 3, + 0, + 6, + 4, + 2, + 1 + ], + "order": [ + 10, + 9, + 8, + 7, + 5, + 3, + 0, + 6, + 4, + 2, + 1 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 2, + 3, + 3, + 7, + 2, + 7, + 4, + 1, + 5, + 5, + 5 + ], + "b": [ + 6, + 2, + 5, + 2, + 2, + 4, + 5, + 1, + 4, + 1, + 1 + ], + "kept": [ + 10, + 9, + 8, + 7, + 5, + 3, + 0, + 6, + 4, + 2, + 1 + ], + "order": [ + 10, + 9, + 8, + 7, + 5, + 3, + 0, + 6, + 4, + 2, + 1 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,1,2,3,4,5,7,8,9,10,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ] + ], + "mode": "a", + "repairs": { + "0": 2, + "1": 2 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 10, + "stored_box_exact": false, + "stored_cert": 10, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|0,1,2,3,4,6,7,8,9,10,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 6, + 1, + 3, + 2, + 2, + 3, + 1, + 3, + 6, + 5, + 7 + ], + "b": [ + 4, + 3, + 5, + 6, + 3, + 6, + 5, + 1, + 4, + 4, + 1 + ], + "kept": [ + 10, + 7, + 5, + 4, + 3, + 1, + 9, + 6, + 2, + 8, + 0 + ], + "order": [ + 10, + 7, + 5, + 4, + 3, + 1, + 9, + 6, + 2, + 8, + 0 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 4, + 5, + 6, + 2, + 1, + 3, + 3, + 3, + 7, + 7, + 7 + ], + "b": [ + 4, + 3, + 5, + 6, + 3, + 6, + 5, + 1, + 2, + 1, + 1 + ], + "kept": [ + 10, + 9, + 8, + 7, + 6, + 5, + 2, + 4, + 3, + 1, + 0 + ], + "order": [ + 10, + 9, + 8, + 7, + 6, + 5, + 2, + 4, + 3, + 1, + 0 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,1,2,3,4,6,7,8,9,10,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 2 + ] + ], + "mode": "a", + "repairs": { + "0": 5, + "1": 5, + "8": 4, + "9": 4 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 10, + "stored_box_exact": false, + "stored_cert": 11, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|0,1,2,3,5,6,7,8,9,10,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 7, + 7, + 5, + 4, + 3, + 5, + 7, + 2, + 2, + 6, + 6 + ], + "b": [ + 2, + 1, + 1, + 6, + 5, + 6, + 1, + 3, + 2, + 4, + 2 + ], + "kept": [ + 10, + 9, + 1, + 5, + 3, + 8, + 0, + 7, + 6, + 2, + 4 + ], + "order": [ + 10, + 9, + 1, + 5, + 3, + 8, + 0, + 7, + 6, + 2, + 4 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 7, + 7, + 5, + 4, + 6, + 5, + 1, + 2, + 6, + 4, + 2 + ], + "b": [ + 2, + 2, + 1, + 4, + 5, + 4, + 1, + 3, + 2, + 5, + 3 + ], + "kept": [ + 5, + 3, + 1, + 10, + 9, + 8, + 0, + 7, + 4, + 6, + 2 + ], + "order": [ + 5, + 3, + 1, + 10, + 9, + 8, + 0, + 7, + 4, + 6, + 2 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,1,2,3,5,6,7,8,9,10,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ] + ], + "mode": "a", + "repairs": { + "0": 2, + "1": 2 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 11, + "stored_box_exact": false, + "stored_cert": 11, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|0,1,2,4,5,6,7,8,9,10,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 3, + 5, + 5, + 1, + 1, + 6, + 7, + 6, + 2, + 1, + 7 + ], + "b": [ + 6, + 1, + 4, + 1, + 5, + 2, + 4, + 2, + 6, + 5, + 2 + ], + "kept": [ + 3, + 1, + 9, + 6, + 4, + 5, + 2, + 10, + 8, + 7, + 0 + ], + "order": [ + 3, + 1, + 9, + 6, + 4, + 5, + 2, + 10, + 8, + 7, + 0 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 5, + 5, + 5, + 1, + 4, + 6, + 7, + 2, + 5, + 4, + 6 + ], + "b": [ + 6, + 3, + 1, + 3, + 5, + 2, + 1, + 2, + 6, + 4, + 2 + ], + "kept": [ + 9, + 6, + 2, + 3, + 1, + 8, + 0, + 4, + 5, + 10, + 7 + ], + "order": [ + 9, + 6, + 2, + 3, + 1, + 8, + 0, + 4, + 5, + 10, + 7 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,1,2,4,5,6,7,8,9,10,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 4 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ] + ], + "mode": "a", + "repairs": { + "0": 2, + "1": 2 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 11, + "stored_box_exact": false, + "stored_cert": 10, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|0,1,3,4,5,6,7,8,9,10,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 10 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 4, + 5, + 6, + 6, + 6, + 3, + 7, + 3, + 4, + 4, + 7 + ], + "b": [ + 6, + 3, + 2, + 3, + 5, + 2, + 1, + 1, + 4, + 4, + 1 + ], + "kept": [ + 9, + 8, + 6, + 4, + 0, + 5, + 2, + 10, + 7, + 3, + 1 + ], + "order": [ + 9, + 8, + 6, + 4, + 0, + 5, + 2, + 10, + 7, + 3, + 1 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 11 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 10 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 4, + 2, + 6, + 6, + 6, + 7, + 7, + 3, + 5, + 1, + 7 + ], + "b": [ + 6, + 3, + 2, + 3, + 5, + 2, + 1, + 1, + 6, + 5, + 1 + ], + "kept": [ + 6, + 5, + 2, + 10, + 3, + 1, + 9, + 8, + 4, + 0, + 7 + ], + "order": [ + 6, + 5, + 2, + 10, + 3, + 1, + 9, + 8, + 4, + 0, + 7 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,1,3,4,5,6,7,8,9,10,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ] + ], + "mode": "a", + "repairs": { + "0": 2, + "1": 2 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 11, + "stored_box_exact": true, + "stored_cert": 11, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|0,2,3,4,5,6,7,8,9,10,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 10 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 4, + 3, + 7, + 7, + 7, + 7, + 4, + 6, + 5, + 5, + 1 + ], + "b": [ + 4, + 5, + 2, + 2, + 1, + 2, + 5, + 3, + 4, + 1, + 3 + ], + "kept": [ + 9, + 8, + 0, + 6, + 4, + 3, + 5, + 2, + 1, + 10, + 7 + ], + "order": [ + 9, + 8, + 0, + 6, + 4, + 3, + 5, + 2, + 1, + 10, + 7 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 10 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 4, + 3, + 7, + 7, + 7, + 7, + 4, + 6, + 5, + 5, + 1 + ], + "b": [ + 4, + 5, + 2, + 2, + 1, + 2, + 5, + 3, + 4, + 1, + 3 + ], + "kept": [ + 9, + 8, + 0, + 6, + 4, + 3, + 5, + 2, + 1, + 10, + 7 + ], + "order": [ + 9, + 8, + 0, + 6, + 4, + 3, + 5, + 2, + 1, + 10, + 7 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|0,2,3,4,5,6,7,8,9,10,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 4 + ], + [ + "T", + 1 + ], + [ + "T", + 1 + ] + ], + "mode": "a", + "repairs": { + "0": 4, + "1": 4 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 10, + "stored_box_exact": false, + "stored_cert": 10, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + }, + "tied_min|1,2,3,4,5,6,7,8,9,10,11": { + "box": 11, + "box_exact": true, + "box_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 910, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 2024, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "box_status": "exact", + "box_witness": { + "a": [ + 1, + 1, + 2, + 2, + 5, + 3, + 1, + 3, + 4, + 5, + 7 + ], + "b": [ + 3, + 5, + 6, + 3, + 4, + 6, + 5, + 1, + 4, + 4, + 1 + ], + "kept": [ + 10, + 7, + 5, + 3, + 2, + 0, + 9, + 6, + 1, + 8, + 4 + ], + "order": [ + 10, + 7, + 5, + 3, + 2, + 0, + 9, + 6, + 1, + 8, + 4 + ] + }, + "box_witness_in_box": true, + "box_witness_replayed": true, + "box_witness_value": 11, + "cert": 11, + "cert_exact": true, + "cert_runs": [ + { + "iters": 400, + "replayed": true, + "seed": 911, + "value": 9 + }, + { + "iters": 400, + "replayed": true, + "seed": 2025, + "value": 10 + }, + { + "iters": 400, + "replayed": true, + "seed": 1234, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 2026, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 42, + "value": 10 + }, + { + "iters": 2000, + "replayed": true, + "seed": 7, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 13, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 99, + "value": 11 + }, + { + "iters": 2000, + "replayed": true, + "seed": 31, + "value": 11 + } + ], + "cert_status": "exact", + "cert_witness": { + "a": [ + 1, + 1, + 2, + 5, + 6, + 2, + 1, + 2, + 6, + 5, + 6 + ], + "b": [ + 1, + 5, + 6, + 1, + 4, + 6, + 5, + 2, + 2, + 4, + 2 + ], + "kept": [ + 3, + 0, + 6, + 1, + 10, + 8, + 7, + 5, + 2, + 9, + 4 + ], + "order": [ + 3, + 0, + 6, + 1, + 10, + 8, + 7, + 5, + 2, + 9, + 4 + ] + }, + "cert_witness_escapes_box": [], + "cert_witness_in_box": true, + "cert_witness_replayed": true, + "cert_witness_value": 11, + "gap_named": 2, + "gap_named_lo": 2, + "label": "tied_min|1,2,3,4,5,6,7,8,9,10,11", + "mx_product": 1977326743, + "mx_witness": { + "combo": [ + [ + "U", + 0 + ], + [ + "U", + 0 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ], + [ + "T", + 4 + ], + [ + "T", + 2 + ], + [ + "T", + 1 + ], + [ + "T", + 2 + ], + [ + "T", + 4 + ], + [ + "T", + 4 + ], + [ + "T", + 2 + ] + ], + "mode": "a", + "repairs": { + "0": 1, + "1": 1 + } + }, + "mx_witness_replayed": true, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "cl3_how": "equals-MP-at-even-tau", + "mx": 9, + "mx_coarse_product": 177147, + "reach": 0 + }, + "named_exact": true, + "stored_box": 10, + "stored_box_exact": false, + "stored_cert": 9, + "stored_cert_exact": false, + "stored_named": 9, + "threshold": 7, + "v": 11 + } + } +} diff --git a/research/fstar-gap2-v11-seed42ff0611/make_meta.py b/research/fstar-gap2-v11-seed42ff0611/make_meta.py new file mode 100644 index 0000000000..69e771dffd --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/make_meta.py @@ -0,0 +1,373 @@ +#!/usr/bin/env python3 +"""Generate predecessor/PINS.json (SHA-256 pins of every vendored +predecessor file) and TASK.json (original_card extracted byte-equal from the +pinned catalogue). Deterministic. Run: python3 -B make_meta.py +""" +import hashlib +import json +import os +import sys + +HERE = os.path.dirname(os.path.abspath(__file__)) +REPO = os.path.abspath(os.path.join(HERE, "..", "..")) +sys.stdout.reconfigure(encoding="utf-8") + + +def sha256_file(path): + h = hashlib.sha256() + with open(path, "rb") as fh: + for chunk in iter(lambda: fh.read(65536), b""): + h.update(chunk) + return h.hexdigest() + + +def write_json(path, obj): + with open(path, "w", encoding="utf-8", newline="\n") as fh: + json.dump(obj, fh, indent=1, sort_keys=True) + fh.write("\n") + + +def make_pins(): + pins = {} + for rel in sorted(os.listdir(os.path.join(HERE, "predecessor", "pr2914"))): + p = os.path.join(HERE, "predecessor", "pr2914", rel) + if os.path.isfile(p): + pins["pr2914/" + rel] = sha256_file(p) + for rel in sorted(os.listdir(os.path.join(HERE, "predecessor", "pr2914", + "data"))): + p = os.path.join(HERE, "predecessor", "pr2914", "data", rel) + if os.path.isfile(p): + pins["pr2914/data/" + rel] = sha256_file(p) + for rel in sorted(os.listdir(os.path.join(HERE, "predecessor", "pr2936"))): + p = os.path.join(HERE, "predecessor", "pr2936", rel) + if os.path.isfile(p): + pins["pr2936/" + rel] = sha256_file(p) + nested = os.path.join(HERE, "predecessor", "pr2936", "predecessor", + "pr2914", "verify.py") + pins["pr2936/predecessor/pr2914/verify.py"] = sha256_file(nested) + assert pins["pr2936/predecessor/pr2914/verify.py"] == \ + pins["pr2914/verify.py"], "nested engine copy must be byte-identical" + out = dict(schema_version=1, + provenance=dict( + pr2914="https://github.com/CrocSwap/integer-mult-bounds" + "/pull/2914 head 3f7781efccdf10fa61a1e0a6f11c191579b21280 " + "extracted with pr-tree-extract 2914 " + "research/fstar-family-gap-seed1c25f56f", + pr2936="https://github.com/CrocSwap/integer-mult-bounds" + "/pull/2936 head f0ef06f13e4de3e50c211c880bdc6891c09620a1 " + "extracted with pr-tree-extract 2936 " + "research/fstar-family-gap-v711-seed3e3478d8"), + files=pins) + write_json(os.path.join(HERE, "predecessor", "PINS.json"), out) + print("PINS files=%d" % len(pins)) + + +def original_card(): + with open(os.path.join(REPO, "docs", "research", + "agent-task-catalog.json"), encoding="utf-8") as fh: + cat = json.load(fh) + for track in cat["tracks"]: + for card in track["tasks"]: + if card.get("id") == "coverage-law-change": + return card + raise SystemExit("drawn card not found in catalogue") + + +def make_task(): + card = original_card() + task = { + "schema_version": 1, + "task_id": "coverage-law-change", + "original_card": card, + "scope_status": "changed", + "scope_change_reason": ( + "Authorized 'explicit open request' scope change to kappa-blocker " + "KB5i, recorded per the assignment (discussion 1166; PR 2936's " + "recorded remainder of open problem F-star's family-gap question " + "is the named open request). The chooser OS draw (seed " + "42ff061169763106b201a358b527fd93, track recursive-interfaces) " + "proposed coverage-law-change, centre-path-sharing and " + "connector-alphabet-change; none is this object, and the " + "assignment names the KB5i request as the recorded reason for " + "taking the explicit request instead of the drawn cards. " + "Pair-collision checks before computation (toolkit " + "disc-comments --grep on discussions 1317 and 1166 including " + "nested replies, 2026-10-16 12:40-12:45 UTC) found no live claim " + "on the twelve tied_min v = 11 sub-decoders, the family gap, " + "box-completeness or Lemma BPP: the only family-gap activity in " + "the last hours is KB5h's FINDING/DONE/RELEASED (PR 2936, " + "2026-10-16 12:34:18 UTC), which this assignment explicitly " + "extends. Entry overlap survey (find_overlap.py with the object's " + "proper names and synonyms, complete pagination: 471 open PRs, " + "1622 discussions, 2026-10-16 12:41 UTC) found only the known " + "F-star lineage and unrelated board traffic."), + "author": "Aaron Wang (with help from opencode)", + "ai_assistance": ("Substantial AI assistance: this package was " + "produced by Aaron Wang with help from opencode " + "(opencode agent harness). No model named per " + "orchestrator attribution rules. No independent " + "human review claimed."), + "base_commit": "991c50d1ea8ddb7cf88c1b4a45c7b409c02d38fb", + "actual_scope": ( + "Kappa-blocker KB5i (authorized explicit open request): SETTLE " + "THE TWELVE OPEN tied_min v = 11 sub-decoders of open problem " + "F-star's family-gap question - (1) compute named EXACTLY where " + "PR 2936 has a scan only (Lemma MX construction product " + "1,977,326,743) and answer the verdict: does gap_named = 2 exist " + "below v = 12 (the minimal gap-2 instance drops from v = 12 to " + "v = 11) or is the minimal exact gap-2 instance exactly tied_min " + "v = 12? Cross-check: cert reproduces or corrects PR 2936's " + "stored values. (2) Push box-completeness under Lemma BPP: the " + "tau >= 1 general case with the projection-parity obstruction as " + "filter - prove cert = box-max or search the minimal tau >= 1 " + "decoder with cert > box-max, concentrated where PR 2936's sweep " + "was weak (its 12 gap2-open scans and synthetic families). " + "(3) Report the matched-pivot floor status honestly (demoted " + "twice)."), + "existing_restriction_being_changed": ( + "PR 2936's recorded obstruction 'Lemma MX construction product " + "1,977,326,743 - named is a seeded scan (value 9) and gap_named " + "stays in {0,1,2}' and its open question 2 (a DP over the Lemma " + "MX construction space instead of the 2e9-product enumeration); " + "PR 2914 open question 1 (box-completeness at tau >= 1) pressed " + "on the weak cell of PR 2936's sweep. Nothing is relaxed; every " + "claim carries its exact status label and no 'exactly when', " + "necessity or exhaustive-without-proof wording is used."), + "method": ( + "Exact stdlib integer/F2 arithmetic on the byte-exact vendored " + "PR 2914 engine (predecessor/pr2914/, SHA-256 pins verified at " + "replay). Exact named = max(SG reach, Lemma MP, Lemma MX, Lemma " + "CL3) computed by a coarse-assignment DP over the Lemma MX " + "per-line options (A / U(a*) / T(c)): the construction value " + "|A| + |U| + sum MAS(classes) does not depend on the repair " + "labels a*, and the Lemma MX hypothesis checks factor per U " + "line, so repairs fold into per-line feasibility masks and the " + "search enumerates only kinds (3^11 = 177147 coarse assignments " + "per record; feasibility checked only above the running best). " + "The port is agreement-tested against the engine's own " + "exhaustive mx_eval product enumeration on 72 small instances " + "plus random decoders. CL3 = MP exactly at even tau (proof in " + "README, machine-checked). Cert/box values regenerated with " + "deterministic multi-seed hill-climbs (the deep run's seeds " + "first) and every witness independently replayed; ceiling " + "witnesses (size v) make the rungs exact. Box-completeness: the " + "vendored tolerant tau = 0 wrapper (PR 2936), Lemma BPP " + "projection parity on every witness, and a fixture-density " + "synthetic family (GL_3(Z) column transforms of the fixtures " + "plus restrictions, tau >= 1 filter) at v = 4..6 with both rungs " + "exact."), + "parameter_ranges": ( + "T = 3 totals exactly; integer factorizations; exactly the 12 " + "tied_min v = 11 sub-decoders (the complete v = 11 family of the " + "v = 12 fixture tied_min, sha256 670ed90924b601ade22f0d4adaff46d16" + "67e5449326a0f7ba7b88dd8f5906f93); cross-check domain PR 2936's " + "receipt-tied_min-s11-deep.json (vendored byte-exactly); box " + "search domain 60 GL_3(Z)-transformed fixture sub-decoders at " + "v = 4..6 (seed 20261016) filtered to tau >= 1 everywhere, plus " + "the v = 2 tau = 0 demonstration decoder; deterministic seeds " + "recorded in the receipts."), + "falsification_test": ( + "A named construction witness whose replay value differs from " + "the DP optimum refutes the exact solver (the port is pinned to " + "the engine's own mx_eval by agreement tests); a corrupted " + "witness must fail the independent replay checker. A certified " + "instance with cert - named = 2 at v = 11 answers the verdict " + "YES (it fired: 12 of 12). For box-completeness, any tau >= 1 " + "instance with cert > box-max demotes the box route (armed on 12 " + "exact v = 11 records and 60 exact v = 4..6 instances; never " + "fired). An explicit admissible pairing B with chain cost below " + "floor(2v/3) would refute F-star on an instance (not sought " + "here: named_lo = 9 >= 7 on every record)."), + "success_evidence": ( + "PASS markers from verify.py: PASS_KB5I_PINS, PASS_FG_CONTROLS, " + "PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 mp=9/16 " + "chain=22 reach=0/12,8/19 (PR 2914 and PR 2936 anchors " + "reproduced), PASS_KB5I_NAMED records=12 named-exact=12 " + "gap2-proven=12, PASS_KB5I_CROSSCHECK (stored PR 2936 values " + "reproduced or corrected with replayed witnesses), " + "PASS_BOX_SEARCH bpp-strict-tau0=yes bpp-strict-tau1=no " + "tau-ge1=60 hard=0 box-violations=0, and README.md analysis " + "labelled PROVEN / CHECKED / DEMOTED: gap_named = 2 EXISTS below " + "v = 12 - PROVEN on all 12 tied_min v = 11 sub-decoders (named = " + "9 exact, cert = 11 exact), so the minimal exact gap-2 instance " + "drops from v = 12 to v = 11; box = cert = 11 exact on all 12 " + "and on 60 new fixture-density tau >= 1 instances at v = 4..6; " + "Lemma BPP projection strictness PROVEN at tau = 0 (v = 2: 2 -> " + "1) and CHECKED not to drop at tau >= 1 on 21 escaping " + "witnesses; matched-pivot floor DEMOTED (MP = 9 < cert = 11 on " + "all 12)."), + "evidence": ( + "VERDICT: gap_named = 2 EXISTS below v = 12. On all 12 tied_min " + "v = 11 sub-decoders (complete family): named = 9 EXACT " + "(Lemma MX coarse-DP optimum with replayed construction " + "witnesses; MP = 9 exhaustive; CL3 = MP = 9 at even tau), cert = " + "11 EXACT (replayed ceiling witnesses, size v). gap_named = 2 " + "PROVEN on 12 of 12. The minimal exact gap-2 instance drops from " + "tied_min v = 12 (PR 2901/2914 record) to tied_min v = 11. " + "CROSS-CHECK: PR 2936's stored cert values under-report the true " + "cert = 11 on 7 of 12 records (stored 9 or 10) - the hill-climb " + "pitfall quantified on cert, companion to the named scan " + "pitfall; every stored value is reproduced or corrected with a " + "replayed witness. BOX: box = cert = 11 EXACT on all 12 (the " + "weak cell of PR 2936's sweep closed; previously 4 records open " + "at box, cert in {10,11}); every attaining witness is " + "box-valued. On 60 new fixture-density tau >= 1 instances " + "(GL_3(Z) column transforms + restrictions, v = 4..6, both rungs " + "exact): box = cert on all 60, 0 violations, 0 hard instances. " + "Lemma BPP: projection strictness PROVEN at tau = 0 (smallest " + "instance: v = 2 decoder, witness 2 -> projection 1, condition " + "(i) fails exactly as Lemma BPP predicts); at tau >= 1, 21 " + "escaping witnesses examined with no strict projection drop " + "(CHECKED bounded). Box-completeness for tau >= 1 remains NOT " + "PROVEN and NOT REFUTED. MP floor DEMOTED: MP = 9 < cert = 11 on " + "all 12 (new counterexamples to named = MP = cert); MP >= " + "floor(2v/3) = 7 holds on every record. F-star itself is NOT " + "proved and NOT refuted."), + "bottleneck_link": ( + "F-star is the named route to closing every open T = 3 window at " + "once (research/root-unit-decoder-lemmas section 7). PR 2936's " + "record left exactly two computational unknowns in the family " + "gap: the 12 tied_min v = 11 sub-decoders (scan-only named) and " + "box-completeness at tau >= 1. This package settles the first " + "exactly (gap_named = 2 at v = 11) and closes the weak cell of " + "the second (box = cert = 11 exact on the 12 and on 60 new " + "fixture-density instances), sharpening the family-gap record " + "to: the named families miss exactly 2 points at v = 11 on the " + "tied_min family, realized inside the sub-anchor box."), + "nearest_overlapping_prs": ( + "https://github.com/CrocSwap/integer-mult-bounds/pull/2936 " + "(Aaron Wang: the direct predecessor; this settles exactly its " + "recorded remainder - the 12 scan-only tied_min v = 11 " + "sub-decoders and the weak cell of the box attack). " + "https://github.com/CrocSwap/integer-mult-bounds/pull/2914 " + "(Aaron Wang: sub-anchor box, Lemmas SB/LB, engine vendored " + "byte-exactly). " + "https://github.com/CrocSwap/integer-mult-bounds/pull/2901 " + "(Aaron Wang: family-gap definition and record). " + "https://github.com/CrocSwap/integer-mult-bounds/pull/2747 " + "(Aaron Wang: Lemma MX). " + "https://github.com/CrocSwap/integer-mult-bounds/pull/2717 " + "(Aaron Wang: Lemmas SF/MP/RK/AN, exact-completion engine). " + "https://github.com/CrocSwap/integer-mult-bounds/pull/2869 " + "(Aaron Wang: Lemmas SC/SG). PR 2111 (DreamingOfClouds: " + "fixtures and recorded certificate limits 11/18) and PR 1590 " + "(DreamingOfClouds: F-star, cert(M), the proven chain) are " + "cited, not restated. No other work on the 12 sub-decoders " + "existed at entry or at the pre-submission overlap refresh."), + "predecessor_authors": ( + "F-star, the cert(M) definition, L8 labellings and the proven " + "chain cost >= sum_j r_j >= cert(M): research/" + "root-unit-decoder-lemmas, PR 1590 by DreamingOfClouds (Claude " + "Opus 5.5 (Anthropic) via Claude Code assistance). The rank-3 " + "configuration model, the canonical fixtures tied_min and " + "cex_min_1 and their recorded one-copy certificate limits 11 and " + "18 (CP-SAT): DreamingOfClouds, PR 2111. The exact-completion " + "engine design, Lemmas SF/MP/RK/AN and the residue statement: " + "Aaron Wang, PR 2717. Lemma MX and the exhaustive MP/MX fixture " + "values: Aaron Wang, PR 2747. The zero-digraph machinery: Aaron " + "Wang, PR 2774. Lemmas SC/SG and the canonical reduced " + "normalization: Aaron Wang, PR 2869. The chi(Z) machinery: " + "Aaron Wang, PR 2890. The family-gap definition and record: " + "Aaron Wang, PR 2901. The sub-anchor box, Lemmas SB/LB, the " + "tolerant tau = 0 wrapper and the extended census engine: Aaron " + "Wang, PR 2914. The v = 7..11 census, the box-completeness " + "attack and Lemma BPP: Aaron Wang, PR 2936. All authors above " + "were verified at current ground truth with gh pr view --json " + "author,title on 2026-10-16 (PRs 2717/2747/2774/2869/2890/2901/" + "2914/2936: Aaron Wang (navinor); PR 2111: DreamingOfClouds; " + "PR 2206 not used here)."), + "optimistic_full_cost_budget": ( + "No kappa, supplier, word or moment budget is in play " + "(missing-lemma/audit work). The price is one bounded " + "deterministic stdlib registered run plus two bounded " + "checkpoint runs (run_named_v11.py about 16 minutes multi-seed " + "witness regeneration; box_search.py about 3 minutes)."), + "stop_rule": ( + "Stop at the verdict on gap_named = 2 below v = 12 (fired: YES, " + "12 of 12 at v = 11), or at the first confirmed box-completeness " + "counterexample (cert > box on tau >= 1; never fired on 12 + 60 " + "exact instances), or at the declared domain with the exact " + "residual recorded. One bounded pivot maximum (the " + "fixture-density GL_3(Z) synthetic family); early kill with the " + "exact obstruction recorded."), + "time_compute_cap": ( + "One session; single-process stdlib Python; no SAT solver, no " + "third-party packages; the registered verify.py below 600 s; " + "checkpoint runs with receipts under data/ (run_named_v11.py " + "about 16 minutes, box_search.py about 3 minutes on the " + "authoring host); package registered with timeout_seconds 600."), + "intended_artifact": ( + "research/fstar-gap2-v11-seed42ff0611/ with TASK.json, " + "TASK-CARD.md, SOURCES.json pins, VERIFY.json, verify.py, " + "named_exact.py (the exact solver), test_named_exact.py " + "(agreement + target tests), run_named_v11.py and box_search.py " + "(checkpoint runs), predecessor/pr2914/ and predecessor/pr2936/ " + "(byte-exact vendored predecessors, SHA-256 pins in " + "predecessor/PINS.json), data/named-v11-receipt.json and " + "data/box-search-receipt.json, CERTIFICATE.json (written by " + "verify.py) and README.md; reproduce with python3 -B " + "research/fstar-gap2-v11-seed42ff0611/verify.py then python3 " + "scripts/research_package.py --package " + "research/fstar-gap2-v11-seed42ff0611 --check-only."), + "open_questions": [ + { + "question": ("Is the sub-anchor box complete at general v " + "when every line has tau(t) >= 1: cert(M) = " + "box-max(M)?"), + "why_it_matters": ("It reduces F-star to the finite " + "sub-anchor label space and makes the " + "family gap exactly the box interior the " + "named forms miss; box = cert now holds " + "exactly on the 12 tied_min v = 11 " + "sub-decoders and 60 fixture-density " + "tau >= 1 instances."), + "first_step": ("Prove or refute that Lemma BPP's projection " + "conditions (i)-(ii) are without loss: " + "massage any attaining witness into one " + "satisfying them at no value cost. The " + "bounded search found no projection drop at " + "tau >= 1 (21 escaping witnesses), so a proof " + "route may exist; smallest falsifying " + "instance still sought."), + "blocked_by": ("No route was found to show the parity terms " + "are without loss; naive projection is " + "PROVEN strictly lossy at tau = 0 (v = 2: 2 " + "-> 1).")}, + { + "question": ("What labels carry the 2-point family-gap " + "excess at v = 11: can a repair/CL3-type " + "extension of the named families close it?"), + "why_it_matters": ("gap_named = 2 is now exact on the whole " + "v = 11 tied_min family; characterizing " + "the missing labels turns the family gap " + "into a construction question."), + "first_step": ("Classify every attaining cert witness " + "(diff_labels kinds) against the named forms " + "and read off the minimal label extension; " + "the stored witnesses in " + "data/named-v11-receipt.json are the input."), + "blocked_by": ("None - open analysis, not computation.")}, + { + "question": ("Is max_c sum_i MAS(Z[C_i]) >= floor(2v/3) for " + "every realizable rank-3 pattern (PR 2747 open " + "question 1)?"), + "why_it_matters": ("Lemma MP alone would prove F-star with " + "no anchor; witnessed on every enumerated " + "record but not proved."), + "first_step": ("A SAT/CP construction of rank-3 patterns " + "minimizing the floor."), + "blocked_by": ("Needs a constraint solver, not random " + "search; MP is strictly weaker than cert " + "(9 < 11 on all 12 v = 11 records), so the " + "route stays DEMOTED without new evidence.")}, + ], + "outcome": "completed", + } + write_json(os.path.join(HERE, "TASK.json"), task) + print("TASK.json written; original_card id=%s keys=%d" + % (card["id"], len(card))) + + +if __name__ == "__main__": + make_pins() + make_task() diff --git a/research/fstar-gap2-v11-seed42ff0611/named_exact.py b/research/fstar-gap2-v11-seed42ff0611/named_exact.py new file mode 100644 index 0000000000..da83c9216f --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/named_exact.py @@ -0,0 +1,278 @@ +#!/usr/bin/env python3 +"""KB5i: EXACT named value for F-star family-gap sub-decoders. + +Replaces the seeded Lemma MX scan of the vendored PR 2914 engine +(`named_exact_small`, predecessor/pr2914/verify.py) with an exact +computation over the SAME construction space and the SAME per-combo +semantics (a faithful port of `mx_eval`, agreement-tested against the +engine's own exhaustive enumeration on small instances). + +The construction space of Lemma MX assigns each line t one of + ('A', 0) the anchor pair (a0(t), b0(t)) - requires tau(t) odd + ('U', a*) a one-sided repair (a*, b0(t)) - a* subset of pi(t), + dot1(a*, b0(t)) = 1, a* != a0(t) + ('T', c) a matched pivot (e_c, e_c) - c a single bit of D(t) +with value |A| + |U| + sum_c MAS(class_c) and the two exact hypothesis +sets (A-first / T-first) of Lemma MX. + +Exactness device (the DP the PR 2936 record asked for): the VALUE of a +combo does not depend on the repair labels a*, only the hypothesis checks +do, and those factor per U line. So the search enumerates only the COARSE +assignment (kind per line: A / U / T(c)), value = |A| + |U| + +sum MAS(class_c), and repairs feasibility as per-line option masks: + A-mode: each u in U keeps an a* with U-U and U-T orthogonality, and + every A line has a0(t) orthogonal to the pivot bits of its T + out-neighbours; + T-mode: each u in U keeps an a* with U-U orthogonality only, and every + T line's pivot bit is orthogonal to b0(s) of its A/U + in-neighbours s. +A coarse assignment is valid iff one mode is feasible. The optimum is the +max value over valid coarse assignments, found by full enumeration of the +coarse product (feasibility only checked when a candidate beats the best +feasible value so far), with a replayable witness (combo + repairs + mode). + +CL3 mixings: at even tau everywhere (anchor pairs never certify, K_tt = 0) +the CL3 family value equals Lemma MP exactly (proof in README.md: +kept lines are pivot lines, arcs are same-pivot zero arcs, and MAS is +monotone), so CL3 needs no separate enumeration on those instances; the +identity is machine-checked in the tests and asserted at run time. + +Stdlib only. Run tests: python3 -B test_named_exact.py +""" +import importlib.util +import itertools +import os +import sys + +HERE = os.path.dirname(os.path.abspath(__file__)) +ENG = os.path.join(HERE, "predecessor", "pr2914", "verify.py") +spec = importlib.util.spec_from_file_location("pr2914_engine", ENG) +fg = importlib.util.module_from_spec(spec) +spec.loader.exec_module(fg) + + +def u_options(mod, ad, t): + """The repair labels a* of line t (same filter as the engine).""" + return [a for a in range(8) if (a & ~mod["pi"][t]) == 0 + and fg.dot1(a, ad["b0"][t]) == 1 and a != ad["a0"][t]] + + +def coarse_options(mod, ad, t): + """Coarse kinds for line t: A (anchor), U (repair), T(c) (pivot).""" + o = [] + if ad["tau"][t] % 2 == 1 and mod["M"][t][t] != 0: + o.append(("A", 0)) + o.append(("U", 0)) + for j in range(3): + if mod["D"][t] & (1 << j): + o.append(("T", 1 << j)) + return o + + +def mx_eval_direct(mod, ad, mas, combo): + """Faithful port of the engine's mx_eval: value of one FULL combo + (kind + repair choice per line), or None when a hypothesis set fails.""" + v = mod["v"] + A = [t for t in range(v) if combo[t][0] == "A"] + U = [t for t in range(v) if combo[t][0] == "U"] + T = [t for t in range(v) if combo[t][0] == "T"] + for t in A: + if not (mod["M"][t][t] != 0 and ad["tau"][t] % 2 == 1): + return None + classes = [0, 0, 0] + cval = [0] * v + for t in T: + c = combo[t][1] + cval[t] = c + classes[c.bit_length() - 1] |= 1 << t + val = len(A) + len(U) + mas[classes[0]] + mas[classes[1]] \ + + mas[classes[2]] + ok_a = True + for t in U: + a_star = combo[t][1] + for s in A + U: + if mod["M"][t][s] == 0 and fg.dot1(a_star, ad["b0"][s]) != 0: + ok_a = False + for s in T: + if mod["M"][t][s] == 0 and (a_star & cval[s]) != 0: + ok_a = False + for t in A: + for s in T: + if mod["M"][t][s] == 0 and (ad["a0"][t] & cval[s]) != 0: + ok_a = False + ok_t = True + for t in U: + a_star = combo[t][1] + for s in A + U: + if mod["M"][t][s] == 0 and fg.dot1(a_star, ad["b0"][s]) != 0: + ok_t = False + for t in T: + for s in A + U: + if mod["M"][s][t] == 0 and (cval[t] & ad["b0"][s]) != 0: + ok_t = False + return val if (ok_a or ok_t) else None + + +def _coarse_masks(mod, ad, combo): + """Masks for a coarse combo: U set, A set, T pivot bits, class masks.""" + v = mod["v"] + amask = umask = 0 + classes = [0, 0, 0] + cval = [0] * v + for t in range(v): + kind, arg = combo[t] + if kind == "A": + amask |= 1 << t + elif kind == "U": + umask |= 1 << t + else: + cval[t] = arg + classes[arg.bit_length() - 1] |= 1 << t + return amask, umask, classes, cval + + +def coarse_value(mas, amask, umask, classes): + return amask.bit_count() + umask.bit_count() + mas[classes[0]] \ + + mas[classes[1]] + mas[classes[2]] + + +def _feasible(mod, ad, opts, amask, umask, cval, want): + """Per-mode feasibility of a coarse combo, repairs folded into masks. + want = 'a' or 't'. Returns (ok, repairs) with repairs[t] = a* choice.""" + v = mod["v"] + M = mod["M"] + repairs = {} + full = {u: (1 << len(opts[u])) - 1 for u in range(v) if opts[u]} + for u in range(v): + if not (umask >> u) & 1: + continue + if not opts[u]: + return False, None + m = full[u] + if want == "t": + for s in range(v): + if s != u and M[u][s] == 0 and ((amask | umask) >> s) & 1: + for i, a in enumerate(opts[u]): + if (m >> i) & 1 and fg.dot1(a, ad["b0"][s]) != 0: + m &= ~(1 << i) + if m == 0: + return False, None + repairs[u] = opts[u][(m & -m).bit_length() - 1] + else: + for s in range(v): + if s != u and M[u][s] == 0 and ((amask | umask) >> s) & 1: + for i, a in enumerate(opts[u]): + if (m >> i) & 1 and fg.dot1(a, ad["b0"][s]) != 0: + m &= ~(1 << i) + for s in range(v): + if M[u][s] == 0 and cval[s]: + for i, a in enumerate(opts[u]): + if (m >> i) & 1 and (a & cval[s]) != 0: + m &= ~(1 << i) + if m == 0: + return False, None + repairs[u] = opts[u][(m & -m).bit_length() - 1] + if want == "a": + for t in range(v): + if (amask >> t) & 1: + for s in range(v): + if M[t][s] == 0 and cval[s] and (ad["a0"][t] & cval[s]): + return False, None + else: + for t in range(v): + if cval[t]: + for s in range(v): + if M[s][t] == 0 and ((amask | umask) >> s) & 1 \ + and (cval[t] & ad["b0"][s]): + return False, None + return True, repairs + + +def mx_exact(mod, ad, mas, cap=6000000): + """Exact Lemma MX family value. Returns (value, detail) with a + replayable witness in detail['witness'] = dict(combo, repairs, mode).""" + v = mod["v"] + opts = [u_options(mod, ad, t) for t in range(v)] + copts = [coarse_options(mod, ad, t) for t in range(v)] + prod = 1 + for o in copts: + prod *= len(o) + if prod > cap: + raise ValueError("coarse product %d exceeds cap %d" % (prod, cap)) + best = -1 + best_wit = None + for combo in itertools.product(*copts): + amask, umask, classes, cval = _coarse_masks(mod, ad, combo) + val = coarse_value(mas, amask, umask, classes) + if val <= best: + continue + ok, mode, repairs = False, None, None + fa, ra = _feasible(mod, ad, opts, amask, umask, cval, "a") + if fa: + ok, mode, repairs = True, "a", ra + else: + ft, rt = _feasible(mod, ad, opts, amask, umask, cval, "t") + if ft: + ok, mode, repairs = True, "t", rt + if ok: + best = val + best_wit = dict(combo=[tuple(c) for c in combo], + repairs={str(k): v_ for k, v_ in repairs.items()}, + mode=mode) + return best, dict(coarse_product=prod, exhaustive=True, witness=best_wit) + + +def replay_mx_witness(mod, ad, mas, wit): + """Independent replay of an mx_exact witness through the direct port.""" + v = mod["v"] + combo = [tuple(c) for c in wit["combo"]] + full = [] + for t in range(v): + kind, arg = combo[t] + if kind == "U": + full.append(("U", wit["repairs"][str(t)])) + else: + full.append((kind, arg)) + return mx_eval_direct(mod, ad, mas, full) + + +def named_exact(mod, ad, mas, acyc, cap=6000000): + """Exact PR 2901 named value = max(SG anchor reach, Lemma MP, Lemma MX, + Lemma CL3) with every rung exact. Returns (named, detail).""" + v = mod["v"] + mp, _m, mp_exh, mp_prod = fg.matched_pivot(mod, mas) + assert mp_exh, "matched-pivot space must fit the exhaustive cap" + reach = len(ad["reach"]) + mx_val, mx_detail = mx_exact(mod, ad, mas, cap=cap) + cl3_prod = 1 + for t in range(v): + cl3_prod *= 1 + mod["D"][t].bit_count() + even_tau = all(x % 2 == 0 for x in ad["tau"]) + if even_tau: + # CL3 = MP at even tau (README proof; machine-checked in tests) + cl3_val, cl3_how = mp, "equals-MP-at-even-tau" + elif cl3_prod <= cap: + cl3_val, cl3_how = _cl3_brute(mod, ad), "exhaustive" + else: + raise ValueError("CL3 space %d exceeds cap and tau is odd" % cl3_prod) + named = max(mp, reach, mx_val, cl3_val) + detail = dict(MP=mp, reach=reach, mx=mx_val, cl3=cl3_val, + cl3_how=cl3_how, mx_detail=mx_detail, exhaustive=True) + return named, detail + + +def _cl3_brute(mod, ad): + """Exhaustive CL3 value (anchor/pivot per line, ab_value of the forms).""" + v = mod["v"] + cl3_opts = [[(ad["a0"][t], ad["b0"][t], "A")] + + [((1 << j), (1 << j), "T") for j in range(3) + if mod["D"][t] & (1 << j)] + for t in range(v)] + best = 0 + for combo in itertools.product(*cl3_opts): + a = [c[0] for c in combo] + b = [c[1] for c in combo] + val = fg.ab_value(mod, a, b) + if val > best: + best = val + return best diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/PINS.json b/research/fstar-gap2-v11-seed42ff0611/predecessor/PINS.json new file mode 100644 index 0000000000..e364da0d75 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/PINS.json @@ -0,0 +1,23 @@ +{ + "files": { + "pr2914/CERTIFICATE.json": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "pr2914/README.md": "ade14e30ea999d471f8aeb7b8d2cd58bd0ed98d0bdd28a6eb5d921dbfd531cb9", + "pr2914/SOURCES.json": "aeb7a387d44d34950ad0855ae459d25fd19a4ac2c5b3bd28a72cb4705fbe8344", + "pr2914/TASK-CARD.md": "3ee9241d7a526dc0d22762534af2d9dc28275bbfa39fafa09cddaedc33d5b24f", + "pr2914/TASK.json": "7e82f165444af352497b1f63f441ef289209247954fa038757da3934175211d5", + "pr2914/VERIFY.json": "03670b8b028e5aad7f14dc0e6b97e1254e879b848846f02845981498abaa0384", + "pr2914/data/cex_min_1.B22.json": "15f5039069a175831f92c4ffe023a23a6f6e6bd6665f0ca2c2734bbe672b51ef", + "pr2914/data/cex_min_1.json": "86064701dde94b4f35427bc3e19275eaf1e40e9e90d4fea28e7857f3564d4dd7", + "pr2914/data/cex_min_1.witness.json": "153f4d2e8dc262f547a91f2daff9724cab88beb4d45c399497efc68a8ed2c933", + "pr2914/data/tied_min.json": "670ed90924b601ade22f0d4adaff46d1667e5449326a0f7ba7b88dd8f5906f93", + "pr2914/verify.py": "4e5a25152de0d4462fe1c987d4f6ea70f9e267ce7307a71f1586c45b518268ea", + "pr2936/box_attack.py": "fe463e00f905fcd3b6368c6b60b8b33a57120b3431573a6eb05446e963eeb9f0", + "pr2936/predecessor/pr2914/verify.py": "4e5a25152de0d4462fe1c987d4f6ea70f9e267ce7307a71f1586c45b518268ea", + "pr2936/receipt-tied_min-s11-deep.json": "78376e6c86d9571bd834173561e5e8f7e8163572d8fe578e852bed12cec51ddf" + }, + "provenance": { + "pr2914": "https://github.com/CrocSwap/integer-mult-bounds/pull/2914 head 3f7781efccdf10fa61a1e0a6f11c191579b21280 extracted with pr-tree-extract 2914 research/fstar-family-gap-seed1c25f56f", + "pr2936": "https://github.com/CrocSwap/integer-mult-bounds/pull/2936 head f0ef06f13e4de3e50c211c880bdc6891c09620a1 extracted with pr-tree-extract 2936 research/fstar-family-gap-v711-seed3e3478d8" + }, + "schema_version": 1 +} diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/CERTIFICATE.json b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/CERTIFICATE.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/README.md b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/README.md new file mode 100644 index 0000000000..cb9dcfa38d --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/README.md @@ -0,0 +1,389 @@ +# fstar-family-gap-seed1c25f56f + +**Closing the family gap of open problem F-star: the sub-anchor-box +decomposition of the attaining certificates, and a smallest-first +sub-decoder census at fixture density (no kappa, no frontier change).** +Open problem F-star of `research/root-unit-decoder-lemmas` +([PR 1590](https://github.com/CrocSwap/integer-mult-bounds/pull/1590), +section 7, OPEN) asks whether `cert(M) >= floor(2v/3)` holds for every exact +3-total rational decoder `M = sum_{j<=3} p_j q_j^T`. [PR 2901](https://github.com/CrocSwap/integer-mult-bounds/pull/2901) +settled the cancellation-line residue on both canonical fixtures and +isolated the residual obstruction as the **family gap** `named(M) < +cert(M)`: the matched-pivot family certificate reaches 9 and 16 on the +fixtures while `cert` is 11 and 18 (recorded), a gap of exactly 2 on each. +This package (kappa-blocker **KB5g**) attacks that gap: it either lifts the +named families to `cert`, proves the gap harmless at the threshold, or +characterizes exactly what the named families miss and how small the gap +gets before it appears. **F-star itself is not proved and not refuted +here.** Every claim below is labelled PROVEN, CHECKED or DEMOTED. + +## Verdict + +**The family gap is harmless on the entire realized domain, and its exact +content is characterized: it is the interior of the sub-anchor box.** + +1. **CHECKED (exhaustive both sides):** on all 21 exact sub-decoder records + (`v = 3..6`, smallest-first, deep rungs) `cert = box = form_r = named` + **exactly** (gap 0), and `cert = max(MP, |S_gamma|) + 1` exactly. Every + attaining label pair lies in the sub-anchor box. +2. **CHECKED (given PR 2111's recorded certificate limits):** on both full + fixtures the sub-anchor box attains `cert` exactly (`box = 11 = cert` on + `tied_min`, `box = 18 = cert` on `cex_min_1`), and every attaining label + pair lies in the box. The recorded family gap 2 is reproduced against the + named families (`named = 9` and `16`), and its per-line content is + classified: the witnesses use REPAIR-form pairs plus strictly interior + box pairs `a` proper subset of `a0(t)`, `b` proper subset of `b0(t)`, + `K_tt = 1`, that belong to no named form. +3. **CHECKED (scoped negative):** no threshold counterexample and no + sub-threshold record exists in the searched domain: `named_lo = + max(MP, |S_gamma|) >= floor(2v/3)` on all 1410 census records and on both + fixtures (9 >= 8, 16 >= 12), so by the proven chain `cost >= cert` no + falsifier can exist there at all. The falsifier criterion was evaluated + on every record and its decisive branch was never reached. +4. **DEMOTED:** the matched-pivot floor alone (assignment route (a)) is + strictly weaker than `cert` on the fixtures (9 < 11, 16 < 18), so + `named = MP = cert` fails; `MP >= floor(2v/3)` itself is witnessed + everywhere but not proved. A general additive lifting bound (route (b)) + of the form `cert >= named + f(k, v)` is contradicted by the data's + shape: the gap is 0 on records with up to 3 cancellation lines and 2 on + `tied_min` with 12 of 12, so it is not a function of the cancellation + count or of `v`. A realized threshold counterexample (route (c)) was not + found; the minimal realized gap-2 instance in the searched domain remains + `tied_min` at `v = 12` (no gap >= 2 at any `v <= 6` record). + +The exact remaining gap to a proof of F-star: **prove the sub-anchor box +complete** (`cert = box-max`, at least when every line has `tau(t) >= 1`) +and then prove the box floor `box-max >= floor(2v/3)`, or prove the +matched-pivot floor `max_c sum_i MAS(Z[C_i]) >= floor(2v/3)` (which would +close F-star despite being weaker than `cert`). Both remain OPEN here. + +## The object and the ladder + +An exact 3-total rational decoder on `v` lines is `M = sum_{j=1..3} p_j +q_j^T` over Q with `M_tt != 0` on every line. Row support `pi(t) = {j : +p_j(t) != 0}`, column support `sigma(t) = {j : q_j(t) != 0}`, `D(t) = +pi(t) intersect sigma(t)` (nonempty). An L8 labelling is F2 vectors `a(t)` +supported in `pi(t)` and `b(t)` supported in `sigma(t)`, `K_ts = a(t) . b(s) +mod 2`; `cert(M)` is the largest `|S|` admitting an order with `K_tt = 1` on +`S` and `K_ts = 0` at every incidence `M_ts = 0` with `t` before `s`. The +proven chain `cost >= sum_j r_j >= cert(M)` is from +`research/root-unit-decoder-lemmas`; this package does not restate it. + +In the canonical reduced normalization (Lemma SC/SG of +[PR 2869](https://github.com/CrocSwap/integer-mult-bounds/pull/2869), Aaron +Wang; `alpha_j = -m_j`): `a0_j(t) = [v_2(p_j(t)) = m_j]`, `b0_j(t) = +[v_2(q_j(t)) = gamma - m_j]`, with the scope identity `K0_ts = 2^{-gamma} +M_ts mod 2`; `S_gamma = {t : v_2(M_tt) = gamma}` is the anchor reach, the +cancellation lines are `C = {t : v_2(M_tt) > gamma}`, and `tau(t)` is the +tie number of Lemma CT (PR 2901). + +This package measures five rungs per instance, each an exact or bounded +maximum of the best certificate value a label class can build: + +| rung | label class | value function | status | +|---|---|---|---| +| `named_lo` | Lemma SG anchor plus Lemma MP matched pivots | `max(MP, \lvert S_gamma\rvert)` | exact (MP exhaustive) | +| `named` | all four named families (SG, MX repairs, MP, CL3 mixings) | max construction value | exact on deep records; seeded bounded scan on fixtures | +| `form_r` | every named-form pair: `(a0,b0)`, `(a*, b0)` repairs, `(e_c,e_c)` pivots | `ab_value` (exact for fixed labels) | exact on deep records; bounded on fixtures | +| `box` | every sub-anchor pair `a` subset of `a0(t)`, `b` subset of `b0(t)`, `K_tt = 1` | `ab_value` inside `b0` | exact on deep records; witnessed on fixtures | +| `cert` | every L8 labelling | exact-completion DP (PR 2717 engine) | exact on deep records; witnessed/recorded on fixtures | + +Here `ab_value(a, b)` is the exact certificate value of one fixed label +assignment: the largest kept set with `K_tt = 1` whose conflict digraph is +acyclic (subset DP). The ladder facts below hold in general. + +## Lemma SB (the sub-anchor box) - PROVEN + +Write `a0(t)`, `b0(t)` for the anchor labels of the canonical reduced +normalization. + +> **Lemma SB.** (i) `a0(t) intersect b0(t)` is exactly the set of totals +> attaining the tie number `tau(t)`, so `|a0(t) intersect b0(t)| = tau(t)`. +> (ii) A sub-anchor pair (`a` subset of `a0(t)`, `b` subset of `b0(t)`) +> certifies line `t` (`K_tt = 1`) if and only if `|a intersect b|` is odd, +> which requires `tau(t) >= 1`; for `tau(t) = 1` the unique tied bit lies in +> both `a` and `b`; for `tau(t) = 2` exactly one of the two tied bits lies +> in `a intersect b`. (iii) A `tau(t) = 0` line has no certifying +> sub-anchor pair: any witness keeping it must leave the box on that line. + +*Proof.* (i) `j` lies in `a0(t) intersect b0(t)` exactly when `j` is in +`D(t)`, `v_2(p_j(t)) = m_j` and `v_2(q_j(t)) = gamma - m_j`, that is when +`v_2(p_j(t) q_j(t)) = gamma`, which is the definition of being counted by +`tau(t)`. (ii) For sub-anchor labels `a intersect b` is a subset of +`a0(t) intersect b0(t)`, and `K_tt = |a intersect b| mod 2`; odd +intersection needs a tied bit, and the two case statements read off (i). +(iii) is (ii) with `tau(t) = 0`. `QED` + +On `tied_min` every line has `tau = 2` and on `cex_min_1` the tie numbers +are 1, 2 and 3; Lemma SB explains the shape of every witness pair found +below (each certifying box pair picks an odd number of tied bits). + +## Ladder bounds - PROVEN + +> **Lemma LB.** (a) `named(M) <= form_r(M)`: every certificate the named +> families carry uses Form-R label pairs per line, and `ab_value` is the +> exact maximum for fixed labels. (b) `box(M) <= cert(M)` by definition of +> the label classes. (c) On any instance where `S_gamma` is empty the Lemma +> CL3 mixing equals the matched-pivot value (the anchor label pair has +> `K0_tt = 0` on every line and certifies nothing), so `named = max(MP, +> MX)` there. + +*Proof.* (a) Each named family (Lemma SG anchor, Lemma MX repairs, Lemma MP +pivots, Lemma CL3 mixings) assigns each line one of the three Form-R pairs; +its carried certificate is a certificate of that assignment, whose exact +value is `ab_value`. (b) is the identity of label spaces. (c) with +`S_gamma` empty, `A` is empty in every named construction and the remaining +constructions are matched pivots (Lemma MP) and their Lemma MX variants. +`QED` + +Part (c) makes `tied_min`'s named value exact: `named = max(9, 9) = 9` (MP +exhaustive over 4096 pivot maps; MX exhaustive 9 per +[PR 2747](https://github.com/CrocSwap/integer-mult-bounds/pull/2747), Aaron +Wang, reproduced by the seeded scan here). `cex_min_1`'s named value 16 is +PR 2747's exhaustive MP/MX record (reproduced by seeded scans here; the +CL3 rung is a bounded scan, PR 2901's caveat retained). + +## Fixture settlement: the box attains cert exactly - CHECKED + +Both canonical fixtures of [PR 2111](https://github.com/CrocSwap/integer-mult-bounds/pull/2111) +(DreamingOfClouds) settle inside the sub-anchor box. Every number is +recomputed by `verify.py` in one run except the certificate limits 11 and +18, which are PR 2111's recorded CP-SAT values (CHECKED (recorded), not +re-verified here). + +| quantity | `tied_min` (12 lines) | `cex_min_1` (19 lines) | +|---|---|---| +| threshold `floor(2v/3)` | 8 | 12 | +| cancellation lines | 12 of 12 | 11 of 19 | +| anchor reach `S_gamma` | 0 | 8 (lines 0, 4, 5, 6, 8, 11, 14, 15) | +| `named_lo` = max(MP, reach) | 9 (4096 maps, exhaustive) | 16 (6144 maps, exhaustive) | +| `named` (PR 2901 record, reproduced) | 9 | 16 | +| `form_r` (bounded) | 10 (hill-climb) | 15 (hill-climb; not a bound) | +| `box` | 11 (witnessed) | 18 (stored witness) | +| `cert` | 11 (recorded, witnessed) | 18 (recorded, witnessed) | +| family gap `cert - named` | 2 | 2 | +| box gap `cert - box` | 0 | 0 | +| chain engine (stored pairing) | cited 12 (PR 2379) | 22 (reproduced, 10+6+6) | + +So the recorded family gap 2 is exactly the distance from the named +families to the sub-anchor box, and the box closes it on both fixtures +(box >= 11 and 18 by the replayed witnesses; box <= cert = 11 and 18 by +PR 2111's recorded limits). The Form-R rung shows one further split: on +`tied_min` Form-R labels reach 10 of the 11 (bounded hill-climb over a +space of 13,841,287,201 assignments; whether Form-R alone reaches 11 is +OPEN), so at least one of the two missing lines needs strictly interior box +pairs there. + +**What the families miss, per line (PR 2901 open question 2 / PR 2747 open +question 3, first step).** The attaining witnesses classify as follows +(`verify.py` diff tables; ANCHOR = `(a0,b0)`, REPAIR = `(a*, b0)`, PIVOT = +`(e_c,e_c)`, BOX-INTERIOR = strictly interior box pair): + +| witness | ANCHOR | REPAIR | PIVOT | BOX-INTERIOR | outside box | +|---|---|---|---|---|---| +| `tied_min` 11-witness (engine re-found) | 0 | 5 | 1 | 5 | 0 | +| `tied_min` 11-witness (calibration run) | 0 | 5 | 0 | 6 | 0 | +| `cex_min_1` 18-witness (stored, replayed) | 2 | 10 | 1 | 5 | 0 | + +Every attaining label pair lies in the sub-anchor box on both fixtures and +on all 21 exact records (CHECKED). The strictly interior pairs are exactly +the pairs Lemma SB (ii) describes: on a `tau = 2` line they pick one of the +two tied bits in `a intersect b`, dropping the non-tied bits of `a0`/`b0`; +this is the label space no named family enumerates (the named forms fix +`b = b0(t)` on A/U lines or force `a = b` unit vectors on pivots). + +## Smallest-first sub-decoder census - CHECKED (scoped negative) + +Every sub-decoder `M[S,S]` of a fixture is an exact 3-total decoder +(restriction preserves rank <= 3 and the nonzero diagonal; CHECKED control) +and inherits the fixture-density zero digraphs by construction - the exact +recorded generator obstruction of PR 2901 (its k-axis generators cannot +realize them; Lemma RK (c) forces `|pi(t) intersect sigma(s)| >= 2` at +every arc). The census enumerates subsets smallest-first (sizes 3 to 6, +deterministic strides recorded per size in `CERTIFICATE.json`), computes +the cheap rungs on every record, and the exact rungs (`named`, `form_r`, +`box`, `cert`, all exhaustive) on every flagged record until the deep +budget (21 records) is spent. + +| family | domain | records | deep exact | falsifiers | below threshold | +|---|---|---|---|---|---| +| sub-decoders of `tied_min` | `v = 3..6`, sizes 3 complete, 4-6 strided | 760 | 0 flagged | 0 | 0 | +| sub-decoders of `cex_min_1` | `v = 3..6`, strided | 650 | 21 | 0 | 0 | + +Totals: 1410 records, 0 falsifiers, 0 below-threshold records, minimum +`named_lo/v = 2/3` (exactly at the threshold ratio). On all 21 exact deep +records (all of them `cex_min_1` sub-decoders, each with 1 to 3 +cancellation lines): `cert = box = form_r = named` **exactly**, `cert = +named_lo + 1` exactly, every witness in the box. In particular the family +gap is **0** on every exact record and never reaches 2 below `v = 12` in +the searched domain; the gap is not a function of the cancellation count +(gap 0 with `k_cancel` up to 3; gap 2 at `k_cancel = 12`). + +**Falsifier criterion, armed on every record:** exact `cert < floor(2v/3)` +where exhaustive a-enumeration terminates, or an explicit admissible `B` +with chain cost below threshold (the proven chain of +`research/root-unit-decoder-lemmas`). It never fired; in fact its decisive +branch was never reached, because `named_lo >= floor(2v/3)` on every record +and the named witnesses are replayed certificates: by `cost >= cert` no +admissible `B` below threshold can exist on any searched record. This is a +scoped statement about the searched domain, not a non-existence theorem. + +**Exact obstruction of the remaining search space (recorded).** Sizes +`v = 7..11` of both fixtures and all but the recorded strides at sizes 4-6 +were not enumerated (compute cap). The gap-2 phenomenon needs either those +sizes or the full fixtures; no generator is claimed to realize it at +smaller `v` (an unrealizability claim would need a proof this package does +not have). + +## Assignment routes (a), (b), (c) - disposition + +- **(a) the family certificate meets the threshold (`named = MP >= + floor(2v/3)` for every exact 3-total decoder): DEMOTED.** `MP >= + floor(2v/3)` is witnessed on all 1410 census records and both fixtures + (9/12, 16/19) but not proved; and the identity `named = cert` fails on + the fixtures (9 < 11, 16 < 18). A proof of the MP floor would still close + F-star (cert >= MP); the exact obstruction to proving it here: the floor + is a statement about realizable rank-3 patterns (Lemma RK (c) constrains + every arc), the fixture-density zeros resist random construction (PR + 2901's recorded generator obstruction), and no analytic route was found; + the observed feedback-vertex sums `v - MP` are 3 and 3 against ceilings + `ceil(v/3) = 4` and 7, with no monotone argument in sight. +- **(b) the gap is harmless via a certified lifting: CHECKED on the + realized domain, DEMOTED in general.** On all 21 exact records the + lifting is exact (`named = cert`, gap 0); on both fixtures `box = cert` + exactly (given the recorded limits) with the missing labels classified + per line. A proved additive bound of the form `cert >= named + f` is + DEMOTED: the realized gaps (0 at `v <= 6` with cancellation lines, 2 at + `v = 12` with 12 of 12) fit no additive function of `k_cancel` or `v` + the analysis produced, and Lemma SB shows the box can certify nothing on + a `tau = 0` line, so no uniform per-cancellation-line surplus can hold. +- **(c) the first realized threshold counterexample: NOT FOUND.** The + strict form (`cert < floor(2v/3)`) and the threshold form (`named < + floor(2v/3) <= cert`) are both unrealized in the searched domain; the + minimal realized gap-2 instance remains `tied_min` at `v = 12`, and its + gap content is exactly the interior-box labels above. + +## What is proved, what is checked, what is demoted + +- **PROVEN (README, written proofs):** Lemma SB (the sub-anchor box + structure: `a0 intersect b0` = tied totals; certifying box pairs pick an + odd number of tied bits; `tau = 0` lines have no certifying box pair); + Lemma LB (the ladder bounds `named <= form_r`, `box <= cert`, and `named + = max(MP, MX)` when `S_gamma` is empty, making `tied_min`'s named value + exactly 9). +- **CHECKED (machine, `verify.py`, stdlib, deterministic, about 230 s, + certificate digest `031927ba33ed45a0`):** controls 5 groups (brute-force- + from-definition agreement 3/3 at `v = 3`, corrupted-witness rejection + 2/2, `ab_value` soundness against completion 10/10, restriction exactness + with the Lemma CT and scope identities, diagonal-style decoder sanity); + the recorded-anchor calibration (MP 9/16 exhaustive over 4096/6144 pivot + maps; `tied_min` hill-climb witness 11; `cex_min_1` stored witness 18 + replayed; chain 22 on the stored pairing; reach 0/12 and 8/19); the + fixture ladder with the per-line label diffs and `box = cert` at 11/11 + and 18/18; the 1410-record census with 21 exact deep records at + `named = cert` exactly; 0 falsifiers, 0 below-threshold. +- **DEMOTED / OPEN:** F-star for general rational decoders is **not** + proved here and **not** refuted. The matched-pivot floor (PR 2747 open + question 1) is not proved. The sub-anchor-box completeness (`cert = + box-max`) is CHECKED on the realized domain only; `tau = 0` lines are the + only structurally excluded case (Lemma SB (iii)) and no `tau = 0` line + occurs in the fixtures. Form-R completeness on `tied_min` (does Form-R + reach 11?) is OPEN (space of 13,841,287,201 assignments, hill-climb + 10). The fixture certificate limits 11 and 18 rest on PR 2111's recorded + CP-SAT optimality, not re-verified here. The CL3 rung on `cex_min_1` is a + bounded scan (PR 2901's caveat retained). The census thinning is recorded + per size; "no falsifier" is a scoped statement about the declared domain. + +## Open next questions + +1. **Sub-anchor-box completeness.** Is `cert(M) = box-max(M)` whenever + every line has `tau(t) >= 1`? Why it matters: it reduces F-star to a + finite per-line label space (at most 24 certifying pairs per line) and + makes the family gap exactly the interior of that box. First step: search + for the smallest instance where an attaining certificate must leave the + box (all 21 exact records and both fixtures are box-valued; `tau = 0` + lines are the only excluded case by Lemma SB). Blocker: none; analysis + plus a bounded exact search. +2. **The matched-pivot floor (PR 2747 open question 1).** Is `max_c sum_i + MAS(Z[C_i]) >= floor(2v/3)` for every realizable rank-3 pattern? Why it + matters: Lemma MP alone would prove F-star with no anchor. First step: a + SAT/CP construction of rank-3 patterns minimizing the floor (the + fixture-density zeros resist random construction; Lemma RK (c) forces + `|pi(t) intersect sigma(s)| >= 2` at every arc). Blocker: needs a + constraint solver, not random search. + +## Reproduce + +Python 3.10+, standard library only, from the repository root: + +```sh +python3 -B research/fstar-family-gap-seed1c25f56f/verify.py +python3 scripts/research_package.py --package research/fstar-family-gap-seed1c25f56f --check-only +python3.12 scripts/research_package.py --package research/fstar-family-gap-seed1c25f56f +``` + +Expected markers: `PASS_FG_CONTROLS`, `PASS_FG_CALIBRATION +tied_min=11/12 cex_min_1=18/19 mp=9/16 chain=22 reach=0/12,8/19`, +`PASS_FG_CENSUS records=1410 exact=21 exact-named=21 gap1=49 gap2=0 +below-threshold=0 falsifiers=0 max-gap-named=0`, +`PASS_FSTAR_FAMILY_GAP no-falsifier-in-domain`, and `CERTIFICATE.json` with +digest `031927ba33ed45a0` (observed 217-229 s on the authoring host). +`make` is not installed on the authoring host; the commands above are the +underlying ones. + +## Credit and provenance + +F-star, the `cert(M)` definition, L8 labellings and the proven chain +`cost >= sum_j r_j >= cert(M)` are from the merged +`research/root-unit-decoder-lemmas` package +([PR 1590](https://github.com/CrocSwap/integer-mult-bounds/pull/1590) by +DreamingOfClouds (Claude Opus 5.5 (Anthropic) via Claude Code assistance)). +The rank-3 configuration model, the named instances `tied_min` and +`cex_min_1`, their recorded one-copy certificate limits (11 and 18, CP-SAT, +CHECKED (recorded)) and the tied-minima obstruction are DreamingOfClouds' +work in [PR 2111](https://github.com/CrocSwap/integer-mult-bounds/pull/2111) +and [PR 2162](https://github.com/CrocSwap/integer-mult-bounds/pull/2162); +`data/tied_min.json` and `data/cex_min_1.json` are byte-identical copies of +their data files (sha256 +`670ed90924b601ade22f0d4adaff46d1667e5449326a0f7ba7b88dd8f5906f93` and +`86064701dde94b4f35427bc3e19275eaf1e40e9e90d4fea28e7857f3564d4dd7`); the +stored cost-22 pairing is `data/cex_min_1.B22.json` (sha256 +`15f5039069a175831f92c4ffe023a23a6f6e6bd6665f0ca2c2734bbe672b51ef`) and the +stored 18-witness `data/cex_min_1.witness.json` (sha256 +`153f4d2e8dc262f547a91f2daff9724cab88beb4d45c399497efc68a8ed2c933`) is from +[PR 2717](https://github.com/CrocSwap/integer-mult-bounds/pull/2717)'s +package. The residue statement, Lemmas SF/MP/RK/AN and the exact-completion +engine design this package adapts are Aaron Wang's work in PR 2717; Lemma +MX and the exhaustive MP/MX fixture values (9 and 16) are Aaron Wang's +[PR 2747](https://github.com/CrocSwap/integer-mult-bounds/pull/2747); the +zero-digraph machinery is Aaron Wang's +[PR 2774](https://github.com/CrocSwap/integer-mult-bounds/pull/2774); +Lemmas SC/SG and the canonical reduced normalization are Aaron Wang's +[PR 2869](https://github.com/CrocSwap/integer-mult-bounds/pull/2869); the +chi(Z) machinery is Aaron Wang's +[PR 2890](https://github.com/CrocSwap/integer-mult-bounds/pull/2890); the +family-gap definition and record are Aaron Wang's +[PR 2901](https://github.com/CrocSwap/integer-mult-bounds/pull/2901). The +exact cost 12 of `tied_min` is Aaron Wang's +[PR 2379](https://github.com/CrocSwap/integer-mult-bounds/pull/2379); the +exact cost 21 of `cex_min_1` is Nick Petalas' +[PR 2206](https://github.com/CrocSwap/integer-mult-bounds/pull/2206). All +authors above were verified at current ground truth with `gh pr view +--json author,title` on 2026-10-16. This package does not claim their +results; the new content is Lemma SB, Lemma LB, the sub-anchor-box +machinery and decomposition, the exact named/Form-R/box/cert ladder on +small instances, the per-line classification of the attaining witnesses, +and the sub-decoder census at fixture density. + +Freshness: base `ba3de47290c3882cbbe406db1f657578f7ecda69` is the frozen +assignment pin (kept intentionally). Pair-collision checks +(discussions 1317 + 1166, nested replies, 2026-10-16 08:58-09:00 UTC and +the pre-submission re-run) found no live claim on this object; the last +F-star activity on the board is KB5f's FINDING/DONE/RELEASED at 2026-10-16 +08:53:52 UTC. Entry overlap survey 2026-10-16 09:01 UTC and the refined +pre-submission re-run (complete pagination) found only the known F-star +lineage and unrelated traffic. + +Prepared by **Aaron Wang** with help from opencode (substantial AI +assistance; no model named; no independent human review claimed). New work +in this package is Apache-2.0. diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/SOURCES.json b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/SOURCES.json new file mode 100644 index 0000000000..bd49294825 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/SOURCES.json @@ -0,0 +1,24 @@ +{ + "schema_version": 1, + "base_commit": "ba3de47290c3882cbbe406db1f657578f7ecda69", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "889b95d936746df124872133ae1e7cc339adcb92", + "sha256": "7d185cd8c2af35988d638d969748ad7b670f902606444dbfc748e4402c340df6" + }, + { + "path": "research/root-unit-decoder-lemmas/README.md", + "usage": "input", + "git_blob": "de305484c78226a3f8da5f3277ced78974116fbb", + "sha256": "e3c856bc361a57cc2424c829001dba94e8f3a1bc8f6616f9c2f740e9665506a9" + } + ] +} diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/TASK-CARD.md b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/TASK-CARD.md new file mode 100644 index 0000000000..bcb736f7f2 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/TASK-CARD.md @@ -0,0 +1,98 @@ +# Task card - KB5g: close the family gap of the F-star residue + +```text +Task ID / proposed scope key: kappa-blocker KB5g (explicit open request from + discussion 1166); drawn card was joint-query-controller (chooser seed + 1c25f56fbce0ef3c112ff85924bfb25a, track recursive-interfaces) - scope + changed, reason recorded in TASK.json. +Base commit; exact predecessor and dependency heads: + base ba3de47290c3882cbbe406db1f657578f7ecda69 (current origin/main at entry, + 2026-10-16); predecessor packages extracted at the PR heads recorded in + SOURCES.json: PR 2901 head c6e0b150081d46abe8bf5d0320de4311cb55fe95, + PR 2890 head 08a44355403604c346f8d907811edce992382cc4, + PR 2869 (merged), PR 2774 head ceaf5acf976cee2f70a680f2d513f12baa634870, + PR 2747 head a2bab9978c8149dc5965558ea9277da07bc750e7, + PR 2717 head 7aed56bd440a3d8cbca8028cf2cbd0888c07d9b3. +Concrete object and question: the family gap of the F-star residue, isolated + as the residual obstruction by PR 2901 (agent-71): named(M) < cert(M) on the + canonical fixtures (9 < 11 on tied_min, 16 < 18 on cex_min_1, +1 on a + hardest GL_3(Z) re-split). named(M) = largest certificate value of the + union of named families (Lemma SG anchor, Lemma MX repairs, Lemma MP + matched pivots, Lemma CL3 insertion mixings). Either (a) prove the family + certificate meets the threshold (named(M) = MP(M) >= floor(2v/3)), (b) + prove the gap harmless (cert >= named + proved additive term with exact + hypotheses), or (c) find the first realized threshold counterexample + (named < floor(2v/3) <= cert, or the strict form cert < floor(2v/3)) or at + minimum the minimal instance where the gap reaches 2+, characterizing + exactly what the family misses. +Scope status: changed (authorized explicit open request; the chooser draw + landed on the recursive-interfaces cards joint-query-controller / + coverage-law-change / connector-alphabet-change, none of which is this + object). +Existing restriction being changed (or exact claim being audited): PR 2901's + residual definition (its README section 3) and its open questions 1-2; the + searched domain extends where PR 2901 recorded the exact generator + obstruction (its k-axis generators cannot realize fixture-density zero + digraphs). +Method; explicit parameter ranges/candidate alphabet: exact stdlib + integer/F2 arithmetic on the PR 2717/2901 engine lineage. Smallest instance + first: every sub-decoder M[S,S] of the two canonical fixtures (restriction + is exact: rank <= 3, nonzero diagonal preserved) carries fixture-density + zeros by construction, at every v from 3 up; exact cert by exhaustive + a-enumeration for v <= 6 (PR 2901's exact-completion DP over b-labels), + exact named via exhaustive pivot maps where the product is small, replayed + witnesses everywhere; one bounded GL_3(Z) re-split axis on the fixtures' + sub-instances; falsifier criterion armed on every record (exact cert < + floor(2v/3), or admissible B with chain cost < threshold). +Nearest overlapping PRs and why this adds something: PR 2901 (Aaron Wang - + defined named(M) and the family gap, witnessed it at 2 on the fixtures and + +1 on re-splits; its open question 2 is this task's analysis core and its + generator route could not realize fixture-density zeros); PR 2747 (Aaron + Wang - Lemma MX, open questions 1 and 3); PR 2717 (Aaron Wang - Lemmas + SF/MP/RK/AN and the exact-completion engine); PR 2869 (Aaron Wang - + SC/SG); PR 2774 / PR 2890 (Aaron Wang - zero digraphs / chi(Z) >= 4, other + residue classes); PR 2111 / PR 2162 (DreamingOfClouds - fixtures and the + recorded certificate limits 11/18). No other work on the family gap exists + at entry (overlap survey 2026-10-16 09:01 UTC, complete pagination). +Declared milestone: local module / scoped obstruction (a labelled lemma or a + precisely scoped counterexample record; no kappa, no supplier). +Optimistic full cost budget; required observable improvement: no kappa or + supplier budget in play; one bounded deterministic stdlib run below 600 s + registered plus written analysis; required observable: either a proved + threshold/lifting statement with exact hypotheses, or the minimal + gap-2-plus instance with an exact characterization of the missing labels. +Unresolved consumer/restoration costs; family expansion decision if + continuing: none (missing-lemma/audit work, no construction round). +Success evidence; falsification test; time/compute cap: PASS markers from + verify.py plus README analysis labelled PROVEN / CHECKED / DEMOTED; + falsification test = exact cert < floor(2v/3) where exhaustive + a-enumeration terminates, or an explicit admissible B with chain cost + below threshold (the proven chain of research/root-unit-decoder-lemmas); + corrupted witnesses must fail the independent replay checker. Stop at the + first realized falsifier with the exact obstruction recorded, else at the + declared domain with the exact residual recorded. One bounded pivot + maximum. Compute cap: one session, single-process stdlib Python, registered + verify below 600 s (shard longer exploration into resumable checkpoint + jobs with periodic receipts). +Predecessor authors; intended artifact and reproduction command: see + SOURCES.json / TASK.json predecessor_authors; artifact + research/fstar-family-gap-seed1c25f56f/; reproduce with + python3 -B research/fstar-family-gap-seed1c25f56f/verify.py then + python3 scripts/research_package.py --package + research/fstar-family-gap-seed1c25f56f --check-only. +``` + +Pair-collision check at entry (before computation): toolkit +`disc-comments --grep` on discussions 1317 and 1166 including nested replies, +2026-10-16 08:58-09:00 UTC. No live claim on the family gap, named(M), +matched-pivot floor or cert threshold. Last F-star activity on the board: +KB5f FINDING/DONE/RELEASED (cancellation lines, PR 2901), 2026-10-16 +08:53:52 UTC. Discussion 1317 had no matching comment since 2026-10-15. + +Entry overlap survey: `scripts/find_overlap.py` with explicit object terms +("family gap", "named certificate", "matched pivot", "chain cost", "F-star", +"3-total decoder", "threshold counterexample"), `--refresh`, complete +pagination (491 open PRs, 1570 discussions), 2026-10-16 09:01 UTC: only the +known F-star lineage (PRs 2717/2747/2774/2890/2901, the entry-class package +`research/fstar-entry-class-scope-seed63d5f999`, the 196-instance census +`research/fstar-cert-census-seed298df375`) and unrelated board traffic. diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/TASK.json b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/TASK.json new file mode 100644 index 0000000000..54a1196a21 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/TASK.json @@ -0,0 +1,88 @@ +{ + "actual_scope": "Kappa-blocker KB5g (authorized explicit open request): CLOSE THE FAMILY GAP of open problem F-star of research/root-unit-decoder-lemmas section 7 (cert(M) >= floor(2v/3) for exact 3-total rational decoders), the precise residual obstruction isolated as named(M) < cert(M) by PR 2901 (README section 3). Either (a) prove the family certificate meets the threshold (named(M) = MP(M) >= floor(2v/3) for every exact 3-total rational decoder), (b) prove the gap harmless with a certified lifting bound cert >= named + at exact hypotheses, or (c) find the first realized threshold counterexample (named < floor(2v/3) <= cert, or the strict form cert < floor(2v/3)) or at minimum the minimal instance where the gap reaches 2+, characterizing exactly what the named families miss. The search extends where PR 2901 recorded its exact generator obstruction: its k-axis generators could not realize fixture-density zero digraphs; every sub-decoder M[S,S] of the canonical fixtures is an exact 3-total decoder with fixture-density zeros by construction, so the sub-instance axis attacks the weak spot directly, smallest instance first.", + "ai_assistance": "Substantial AI assistance: this package was produced by Aaron Wang with help from opencode (opencode agent harness). No independent human review claimed. No model is cited per orchestrator attribution rules.", + "author": "Aaron Wang (with help from opencode)", + "base_commit": "ba3de47290c3882cbbe406db1f657578f7ecda69", + "bottleneck_link": "F-star is the named route to closing every open T = 3 window at once (research/root-unit-decoder-lemmas section 7, consequence PROVEN given F-star). After PR 2869 (entry classes collapsed) and PR 2901 (cancellation lines settled on both fixtures) the family gap named(M) < cert(M) is the precise residual obstruction of the residue: a proof that the named families reach floor(2v/3), or a certified lifting from named to cert, closes F-star; a realized threshold counterexample refutes it.", + "evidence": "FAMILY GAP CHARACTERIZED ON THE FIXTURES AND ON A SMALLEST-FIRST SUB-DECODER CENSUS; NO THRESHOLD COUNTEREXAMPLE; F-STAR NOT PROVED AND NOT REFUTED. PROVEN (README.md): Lemma SB (the sub-anchor box structure: a0(t) intersect b0(t) is exactly the set of tied totals, so a box pair certifies t iff |a intersect b| = 1; tau = 1 lines force the unique tied bit on both labels; tau = 2 lines force exactly one of the two tied bits; tau = 0 lines have no certifying box pair) and the ladder bounds named <= form_r (every named-family certificate uses Form-R labels and ab_value is exact for fixed labels) and box <= cert. CHECKED (verify.py, stdlib, deterministic, about 230 s, certificate digest 031927ba33ed45a0): controls 5/5 groups; calibration reproducing every recorded anchor (tied_min MP 9/4096 maps and hill-climb witness 11; cex_min_1 MP 16/6144 maps, stored witness 18 replayed, chain 22 on the stored pairing, reach 0/12 and 8/19); the fixture ladder with per-line label diffs (every attaining label pair lies in the sub-anchor box: tied_min 11-witness mixes 5 REPAIR-form, 5 BOX-INTERIOR and 1 PIVOT pair; cex_min_1 18-witness mixes 10 REPAIR, 5 BOX-INTERIOR, 2 ANCHOR, 1 PIVOT; box reaches cert exactly on both fixtures: 11 = 11 and 18 = 18 against PR 2111's recorded certificate limits); the smallest-first sub-decoder census of both fixtures (1410 records at v = 3..6; 21 deep records with exact Form-R/box/cert/named rungs on which cert = box = form_r = named EXACTLY (gap_named = 0) and cert = max(MP, reach) + 1; all witnesses in the box); falsifier criterion armed on every record (exact cert below threshold where exhaustive, or an explicit admissible B with chain cost below threshold): never fired, 0 falsifiers, 0 below-threshold, min named ratio 2/3 (at threshold). The family gap equals exactly 0 on all 21 exact sub-instance records and exactly 2 on the full fixtures (named 9 < 11 and 16 < 18, reproducing PR 2901's record); its minimal realized instance in the searched domain is tied_min at v = 12.", + "existing_restriction_being_changed": "Nothing is relaxed. Audited and extended: PR 2901's family-gap record and its open questions 1-2. The searched domain extends where PR 2901 recorded its exact generator obstruction (its k-axis generators cannot realize fixture-density zero digraphs): every sub-decoder of the canonical fixtures inherits fixture-density zeros by construction. PR 2901's named(M) is computed here with exact Lemma MX constructions and exact Lemma CL3-form optima on the deep records (their CL3 fixture evaluation was a bounded scan, a caveat retained and stated). Every claim carries its exact status label; no 'exactly when', necessity or exhaustive-without-proof wording is used.", + "falsification_test": "An explicit admissible pairing B with cost(B) = sum_j rank_F2 B[R_j,A_j] < floor(2v/3) refutes F-star on that instance (the chain cost >= cert(M) is proven in research/root-unit-decoder-lemmas), as does exact cert < floor(2v/3) where exhaustive a-enumeration terminates; corrupted witnesses must fail the independent replay checker. Armed on every census and fixture record; never fired.", + "intended_artifact": "research/fstar-family-gap-seed1c25f56f/ with TASK.json, TASK-CARD.md, SOURCES.json pins, VERIFY.json, verify.py, data/ (byte-identical fixture copies, the stored cost-22 pairing and the stored 18-witness, sha256 recorded), CERTIFICATE.json (written by verify.py) and README.md; reproduction: python3 -B research/fstar-family-gap-seed1c25f56f/verify.py then python3 scripts/research_package.py --package research/fstar-family-gap-seed1c25f56f --check-only.", + "method": "Exact stdlib integer/F2 arithmetic on the PR 2717/2747/2869/2901 engine lineage (model, subset-DP acyclic/MAS tables, Lemma SC/SG anchor data, matched pivots, exact-completion DP over b-labels, witness replay, admissible-B chain scan). NEW here: the sub-anchor-box machinery (box_exact: a(t) subset of a0(t), b(t) subset of b0(t); exact by exhaustive a-enumeration with an exact b-completion inside b0), the Form-R label-space maximum (ab_value: the exact certificate value of any fixed label assignment, so Form-R is a rigorous upper bound on the PR 2901 named value), the exact named-family value on small instances (Lemma MX constructions over both hypothesis sets, Lemma CL3-form optima, exhaustive where the construction product allows and a seeded bounded scan otherwise), the per-line label diff of attaining witnesses against the named forms and the box, and the smallest-first sub-decoder census M[S,S] of both canonical fixtures (restriction of an exact decoder is exact).", + "nearest_overlapping_prs": "https://github.com/CrocSwap/integer-mult-bounds/pull/2901 (Aaron Wang: isolated the family gap named(M) < cert(M), recorded 9 < 11 and 16 < 18 and +1 on a re-split, and its open question 2 - what labels the attaining certificates use - is this package's analysis core; its CL3 fixture evaluation is a bounded scan, retained as a caveat). https://github.com/CrocSwap/integer-mult-bounds/pull/2747 (Aaron Wang: Lemma MX, exhaustive MP/MX values 9 and 16 on the fixtures, open questions 1 and 3). https://github.com/CrocSwap/integer-mult-bounds/pull/2717 (Aaron Wang: Lemmas SF/MP/RK/AN and the exact-completion engine design). https://github.com/CrocSwap/integer-mult-bounds/pull/2869 (Aaron Wang: Lemmas SC/SG, the canonical reduced normalization this package's box uses). https://github.com/CrocSwap/integer-mult-bounds/pull/2774 and https://github.com/CrocSwap/integer-mult-bounds/pull/2890 (Aaron Wang: other residue classes, not repeated here). PRs 2111/2162 (DreamingOfClouds: the fixtures and the recorded certificate limits 11/18) and PR 1590 (DreamingOfClouds: F-star, cert(M), the proven chain) are cited, not restated. No other work on the family gap existed at entry (overlap survey 2026-10-16 09:01 UTC and the refined pre-submission re-run, complete pagination).", + "open_questions": [ + { + "blocked_by": "Needs a constraint solver for the construction side and is strictly stronger than needed: the matched-pivot floor alone is weaker than cert on the fixtures (9 < 11, 16 < 18).", + "first_step": "A SAT/CP construction of rank-3 patterns minimizing max_c sum_i MAS(Z[C_i]) (fixture-density zeros resist random construction; Lemma RK (c) forces |pi(t) intersect sigma(s)| >= 2 at every arc).", + "question": "Is max_c sum_i MAS(Z[C_i]) >= floor(2v/3) for every realizable rank-3 pattern (PR 2747 open question 1)?", + "why_it_matters": "Lemma MP alone would prove F-star with no anchor at all; witnessed here on all 1410 census records plus both fixtures (9/12, 16/19) but not proved." + }, + { + "blocked_by": "None for the statement; the proof would need the box-completeness argument.", + "first_step": "Either prove cert(M) = box-max(M) for tau >= 1 decoders (all realized witnesses are box-valued: 21 exact records and both fixtures), or exhibit the smallest instance where an attaining certificate must leave the box (tau = 0 lines are the only structurally excluded case, by Lemma SB).", + "question": "Is the sub-anchor box complete: cert(M) = max over box labels, at least when every line has tau(t) >= 1?", + "why_it_matters": "It reduces F-star to a finite per-line label space (at most 24 pairs per line) whose floor could be attacked combinatorially; the family gap is exactly the interior-box labels the named forms miss." + } + ], + "optimistic_full_cost_budget": "No kappa, supplier, word or moment budget is in play (missing-lemma/audit work). The price is one bounded deterministic stdlib run (registered verify below 600 s; observed 217-229 s) plus written analysis.", + "original_card": { + "acceptance_gate": "Name the changed premise of the fixed F0/B1 observation obstruction. Show exactly which query is recovered, legal native reads and restoration, and a full favorable budget including cover maps, helpers and endpoints. Local inverse identities alone do not close the global controller. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "allowed_variations": [ + "One paid query, one changed first pair, or one precisely specified affine helper state.", + "A counterexample or lower bound for that exact proposed repair.", + "One unresolved obligation of a newer local decoder, with exact source heads and a distinct claim/domain." + ], + "bottleneck_link": "The native local words exist; retained query information and its physical access are the missing link to a composed recursive interface.", + "first_experiment": "Check live claims and pin the newest relevant completed local word (starting lead #2540). Choose one unresolved consumer, retention, whole-cover movement, hosting or precision obligation. Price the complete proposal and test that obligation; do not repeat its claimed local inverse or native reconstruction unless providing distinct independent verification.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the QQ16 row in research-family-status.md. The fixed-first-pair witness remains scoped; pending #2540 adds early records and claims a complete local native decoder, but not a favorable global controller. Read its output-frame and ownership contract before designing another inverse.", + "scope": "Source-bound orientation only. Read the named package and review before relying on its local evidence; this command is not its replay or supplier admission." + }, + "id": "joint-query-controller", + "methods": [ + "Design and price one consumer or retained-state boundary for a pinned local decoder, including final restoration.", + "Audit one claimed physical invoice or prove a target-specific obstruction for its explicit retention/hosting contract." + ], + "overlap_terms": [ + "QQ16", + "joint-query", + "changing-chart controller", + "selected observation", + "1969", + "2540", + "early record", + "output-bank retention", + "complete native decoder" + ], + "question": "Can one unresolved retention, output-consumer, hosting or physical-cost obligation complete a pinned QQ16 controller proposal within budget?", + "scope_change_triggers": [ + "Retaining the fixed first pair and ordinary schedule while allowing only homogeneous selected-only control, already excluded by the witness.", + "Treating cover-map counts as zero-cost physical address operations.", + "Recreating the pending complete local decoder or early-record/output-bank coalescing already under investigation without a distinct audit or changed premise." + ], + "starting_points": [ + "docs/research/research-family-status.md", + "research/joint-query/README.md", + "research/joint-query/evidence/QQ16-SELECTED-WITNESS.md", + "research/joint-query/evidence/JOINT-QUERY-TRANSFER.md", + "docs/research/community-efficient1000-review.md" + ] + }, + "outcome": "completed", + "parameter_ranges": "T = 3 totals exactly; rational decoders with nonzero diagonal; integer factorizations (entry-class-independent by PR 2869). Fixtures: PR 2111's tied_min (v = 12) and cex_min_1 (v = 19), byte-identical data copies (sha256 670ed90924b601ade22f0d4adaff46d1667e5449326a0f7ba7b88dd8f5906f93 and 86064701dde94b4f35427bc3e19275eaf1e40e9e90d4fea28e7857f3564d4dd7), the stored cost-22 pairing (sha256 15f5039069a175831f92c4ffe023a23a6f6e6bd6665f0ca2c2734bbe672b51ef) and the stored 18-witness (sha256 153f4d2e8dc262f547a91f2daff9724cab88beb4d45c399497efc68a8ed2c933). Census: every sub-decoder M[S,S] of the fixtures at v = 3..6, enumerated smallest-first with the declared thinning recorded in CERTIFICATE.json (tied_min: all 220 size-3 subsets plus deterministic strides at sizes 4-6; cex_min_1: deterministic strides at sizes 3-6); deep exact rungs (Form-R, box, cert, named exhaustive) on 21 flagged records at v = 3..6; deterministic seeds in CERTIFICATE.json.", + "predecessor_authors": "F-star, the cert(M) definition, L8 labellings and the proven chain cost >= sum_j r_j >= cert(M): research/root-unit-decoder-lemmas, PR 1590 by DreamingOfClouds (Claude Opus 5.5 (Anthropic) via Claude Code assistance). The rank-3 configuration model, the named instances tied_min and cex_min_1, their recorded one-copy certificate limits (11 and 18, CP-SAT) and the stored cost-22 pairing: DreamingOfClouds, PR 2111 and PR 2162. Lemmas SF/MP/RK/AN, the residue statement and the exact-completion engine design this package adapts: Aaron Wang, PR 2717. Lemma MX and the tied-residue closure: Aaron Wang, PR 2747. The zero-digraph machinery: Aaron Wang, PR 2774. Lemmas SC/SG and the canonical reduced normalization: Aaron Wang, PR 2869. The chi(Z) machinery: Aaron Wang, PR 2890. The family-gap record and definition: Aaron Wang, PR 2901. The falsifier census frontier: Aaron Wang, PR 2335. Exact cost 12 of tied_min: Aaron Wang, PR 2379. Exact cost 21 of cex_min_1: Nick Petalas, PR 2206. All authors above were verified at current ground truth with gh pr view --json author,title on 2026-10-16.", + "priority_revision": 5, + "schema_version": 1, + "scope_change_reason": "Authorized 'explicit open request' scope change to kappa-blocker KB5g, recorded per the assignment (discussion 1166; PR 2901's residual is the named open request). The chooser OS draw (seed 1c25f56fbce0ef3c112ff85924bfb25a, track recursive-interfaces) proposed joint-query-controller, coverage-law-change and connector-alphabet-change; none is this object, and the assignment names the KB5g request as the recorded reason for taking the explicit request instead of the drawn cards. Pair-collision check before computation (toolkit disc-comments --grep on discussions 1317 and 1166 including nested replies, 2026-10-16 08:58-09:00 UTC) found no live claim on the family gap, named(M), the matched-pivot floor or the cert threshold: the last F-star activity is KB5f's FINDING/DONE/RELEASED (PR 2901's cancellation lines, 2026-10-16 08:53:52 UTC). Entry overlap survey (find_overlap.py with explicit object terms, complete pagination: 491 open PRs, 1570 discussions, 2026-10-16 09:01 UTC) found only the known F-star lineage (PRs 2717/2747/2774/2890/2901, research/fstar-entry-class-scope-seed63d5f999, research/fstar-cert-census-seed298df375) and unrelated board traffic.", + "scope_status": "changed", + "stop_rule": "Stop at the first exact falsifier (explicit admissible B with chain cost below floor(2v/3), or exact cert below threshold where exhaustive a-enumeration terminates), or, absent one, at the declared census domain with the exact residual recorded (the family-gap decomposition of the README). One bounded pivot maximum; early kill with the exact obstruction recorded. Compute cap: one session, single-process stdlib Python, the registered verify command below 600 s (observed 217-229 s).", + "success_evidence": "PASS markers from verify.py (PASS_FG_CONTROLS, PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 mp=9/16 chain=22 reach=0/12,8/19, PASS_FG_CENSUS, PASS_FSTAR_FAMILY_GAP) plus README.md analysis: Lemma SB with a written proof; the ladder bounds named <= form_r <= cert and box <= cert with proofs; the fixture settlement (box = cert exactly at 11/11 and 18/18; every attaining label pair in the sub-anchor box with the exact per-line classification); the sub-decoder census (1410 records, 21 exact deep records with gap_named = 0, 0 falsifiers, 0 below-threshold); every accepted value carrying a replayed L8 witness.", + "task_id": "joint-query-controller", + "time_compute_cap": "One session; single-process stdlib Python; no SAT solver, no third-party packages; the registered verify command below 600 s (observed 217-229 s on the authoring host); package registered with timeout_seconds 600." +} diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/VERIFY.json b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/VERIFY.json new file mode 100644 index 0000000000..fb1e4f5005 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/VERIFY.json @@ -0,0 +1,20 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/root-unit-decoder-lemmas/README.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "KB5g family-gap package: controls 5 groups (brute-force-from-definition agreement at v = 3 on 3 sparse decoders, corrupted-witness rejection 2/2, ab_value soundness against completion on 10 random label pairs, restriction exactness with the Lemma CT/scope identities on a sub-decoder, diagonal-style decoder sanity); fixture calibration reproducing every recorded anchor (tied_min MP 9 over 4096 pivot maps, hill-climb witness 11; cex_min_1 MP 16 over 6144 maps, stored witness 18 replayed, chain 22 on the stored pairing, anchor reach 0/12 and 8/19); the fixture ladder with the sub-anchor-box decomposition and per-line label diffs; the smallest-first sub-decoder census of both fixtures (1410 records at v = 3..6, exact Form-R/box/cert/named rungs on 21 flagged deep records, falsifier criterion armed everywhere); prints PASS_FG_CONTROLS, PASS_FG_CALIBRATION, PASS_FG_CENSUS, PASS_FSTAR_FAMILY_GAP and writes CERTIFICATE.json (digest 031927ba33ed45a0)" + } + ] +} diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/cex_min_1.B22.json b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/cex_min_1.B22.json new file mode 100644 index 0000000000..0161536922 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/cex_min_1.B22.json @@ -0,0 +1 @@ +[[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]] \ No newline at end of file diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/cex_min_1.json b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/cex_min_1.json new file mode 100644 index 0000000000..4629aa02b1 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/cex_min_1.json @@ -0,0 +1 @@ +[[[1, -1, 0], [1, 0, -1]], [[1, -1, 1], [0, 1, -1]], [[1, -1, 1], [1, -1, 0]], [[1, -1, 1], [1, 0, 1]], [[1, 0, -1], [0, 1, -1]], [[1, 0, -1], [0, 1, 1]], [[1, 0, -1], [1, -1, 0]], [[1, 0, -1], [1, 1, -1]], [[1, 0, 1], [1, 1, 0]], [[1, 0, 1], [1, 1, 1]], [[1, 1, -1], [0, 1, -1]], [[1, 1, -1], [1, -1, 1]], [[1, 1, -1], [1, 0, -1]], [[1, 1, -1], [1, 1, 0]], [[1, 1, 0], [0, 1, 1]], [[1, 1, 0], [1, 0, 1]], [[1, 1, 1], [0, 1, 1]], [[1, 1, 1], [1, 0, 1]], [[1, 1, 1], [1, 1, 0]]] \ No newline at end of file diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/cex_min_1.witness.json b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/cex_min_1.witness.json new file mode 100644 index 0000000000..602d784e98 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/cex_min_1.witness.json @@ -0,0 +1 @@ +{"a": [3, 2, 2, 4, 4, 5, 5, 4, 1, 1, 2, 7, 5, 1, 2, 3, 6, 1, 1], "b": [1, 6, 0, 5, 6, 6, 1, 4, 3, 7, 6, 2, 1, 3, 6, 5, 2, 5, 3], "order": [16, 6, 11, 14, 5, 12, 0, 18, 17, 15, 3, 13, 10, 9, 8, 7, 4, 1], "kept": [16, 6, 11, 14, 5, 12, 0, 18, 17, 15, 3, 13, 10, 9, 8, 7, 4, 1]} \ No newline at end of file diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/tied_min.json b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/tied_min.json new file mode 100644 index 0000000000..ae11f01fab --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/data/tied_min.json @@ -0,0 +1 @@ +[[[1, -1, -1], [0, 1, 1]], [[1, -1, -1], [1, -1, 0]], [[1, -1, -1], [1, 0, -1]], [[1, -1, 1], [0, 1, -1]], [[1, -1, 1], [1, -1, 0]], [[1, -1, 1], [1, 0, 1]], [[1, 1, -1], [0, 1, -1]], [[1, 1, -1], [1, 0, -1]], [[1, 1, -1], [1, 1, 0]], [[1, 1, 1], [0, 1, 1]], [[1, 1, 1], [1, 0, 1]], [[1, 1, 1], [1, 1, 0]]] \ No newline at end of file diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/verify.py b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/verify.py new file mode 100644 index 0000000000..9d8285e4e3 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2914/verify.py @@ -0,0 +1,1364 @@ +#!/usr/bin/env python3 +"""KB5g: the family gap of the F-star residue - sub-instance census of the +canonical fixtures, the sub-anchor-box decomposition of the attaining +certificates, and the smallest-first falsifier criterion (no kappa). + +Object: exact 3-total rational decoders M = sum_j p_j q_j^T (v lines, nonzero +diagonal). Quantities per instance: zero digraph Z, Lemma SG anchor reach +|S_gamma|, tie numbers tau(t), matched-pivot value MP (Lemma MP), the named +family value (PR 2901's convention: max(MP, |S_gamma|, CL3 mixing)), the +sub-anchor-box value (NEW: a(t) subset of a0(t), b(t) subset of b0(t), +K_tt = 1), exact cert(M) by exhaustive a-enumeration with exact b-completion +(small v), engine witnesses with independent replay, and the bounded +admissible-B chain scan as falsifier criterion. + +Engine lineage: model, subset-DP acyclic/MAS tables, anchor/tie data, +matched pivots, exact-completion DP, witness replay and the chain machinery +are adapted from Aaron Wang's PR 2717 / PR 2747 / PR 2869 / PR 2901 engine +(see README credit); the sub-anchor-box machinery, the sub-instance census +and the decomposition are new here. F-star and the chain cost >= cert(M) are +from research/root-unit-decoder-lemmas (PR 1590, DreamingOfClouds), cited, +not restated. + +Deterministic, stdlib only, exact integer/F2 arithmetic. Run: +python3 -B verify.py +""" +import hashlib +import itertools +import json +import os +import random +import sys +import time + +T0 = time.time() +HERE = os.path.dirname(os.path.abspath(__file__)) +DATA = os.path.join(HERE, "data") + + +def log(msg): + print("[%6.1fs] %s" % (time.time() - T0, msg), flush=True) + + +# ---------------------------------------------------------------- model +# (adapted from the PR 2717/2901 engine lineage, Aaron Wang) + +def load_decoder(path): + with open(path, "r", encoding="utf-8") as fh: + raw = json.load(fh) + P = [tuple(int(x) for x in line[0]) for line in raw] + Q = [tuple(int(x) for x in line[1]) for line in raw] + return P, Q + + +def model(P, Q): + v = len(P) + for t in range(v): + for x in list(P[t]) + list(Q[t]): + assert isinstance(x, int), "entries must be exact integers" + M = [[sum(P[t][j] * Q[s][j] for j in range(3)) for s in range(v)] for t in range(v)] + pi = [sum((1 << j) for j in range(3) if P[t][j] != 0) for t in range(v)] + sg = [sum((1 << j) for j in range(3) if Q[t][j] != 0) for t in range(v)] + D = [pi[t] & sg[t] for t in range(v)] + assert all(M[t][t] != 0 for t in range(v)), "diagonal must be nonzero" + assert all(D[t] != 0 for t in range(v)), "D(t) must be nonempty" + arcs = [(t, s) for t in range(v) for s in range(v) if t != s and M[t][s] == 0] + return dict(v=v, P=P, Q=Q, M=M, pi=pi, sg=sg, D=D, arcs=arcs) + + +def load_model(name): + return model(*load_decoder(os.path.join(DATA, name))) + + +def restrict(mod, S): + """Sub-decoder M[S,S]: restriction of an exact decoder is exact (rank <= 3 + and nonzero diagonal are preserved). S is a sorted list of line indices.""" + P = [mod["P"][t] for t in S] + Q = [mod["Q"][t] for t in S] + return model(P, Q) + + +def digraph_tables(v, arcs): + inm = [0] * v + outm = [0] * v + for (t, s) in arcs: + inm[s] |= 1 << t + outm[t] |= 1 << s + return inm, outm + + +def acyclic_table(v, inm): + acyc = [False] * (1 << v) + acyc[0] = True + for S in range(1, 1 << v): + ok = False + T = S + while T: + b = T & -T + t = b.bit_length() - 1 + if (inm[t] & S) == 0 and acyc[S ^ b]: + ok = True + break + T ^= b + acyc[S] = ok + return acyc + + +def mas_table(v, acyc): + n = 1 << v + mas = [0] * n + for S in range(1, n): + if acyc[S]: + mas[S] = S.bit_count() + else: + T = S + best = 0 + while T: + b = T & -T + val = mas[S ^ b] + if val > best: + best = val + T ^= b + mas[S] = best + return mas + + +def mas_argmax(mas, acyc, S, memo): + if S == 0: + return 0 + if S in memo: + return memo[S] + if acyc[S]: + memo[S] = S + return S + T = S + while T: + b = T & -T + if mas[S ^ b] == mas[S]: + val = mas_argmax(mas, acyc, S ^ b, memo) + memo[S] = val + return val + T ^= b + raise AssertionError("mas_argmax: no witness") + + +# -------------------------------------------- Lemma SG anchor + Lemma CT data + +def v2_int(n): + if n == 0: + raise ValueError("v2(0)") + k = 0 + while n % 2 == 0: + n //= 2 + k += 1 + return k + + +def anchor_data(mod): + """Canonical reduced normalization (alpha_j = -m_j): a0_j(t) = + [v2(p_j(t)) = m_j], b0_j(t) = [v2(q_j(t)) = gamma - m_j], with the scope + identity K0_ts = 2^{-gamma} M_ts mod 2 (Lemma SG of PR 2869).""" + P, Q, M = mod["P"], mod["Q"], mod["M"] + v = mod["v"] + SENTINEL = 10 ** 9 + m, n, c = [], [], [] + for j in range(3): + mp = [v2_int(P[t][j]) for t in range(v) if P[t][j] != 0] + mq = [v2_int(Q[t][j]) for t in range(v) if Q[t][j] != 0] + if mp and mq: + m.append(min(mp)) + n.append(min(mq)) + else: + m.append(SENTINEL) + n.append(SENTINEL) + c.append(m[-1] + n[-1]) + assert min(c) < SENTINEL, "at least one total must be nondegenerate" + gamma = min(c) + diag = [v2_int(M[t][t]) for t in range(v)] + reach = [t for t in range(v) if diag[t] == gamma] + cancel = [t for t in range(v) if diag[t] > gamma] + tau = [] + for t in range(v): + cnt = 0 + for j in range(3): + if (P[t][j] != 0 and Q[t][j] != 0 + and v2_int(P[t][j]) + v2_int(Q[t][j]) == gamma): + cnt += 1 + tau.append(cnt) + a0 = [sum((1 << j) for j in range(3) + if P[t][j] != 0 and v2_int(P[t][j]) == m[j]) + for t in range(v)] + b0 = [sum((1 << j) for j in range(3) + if Q[t][j] != 0 and v2_int(Q[t][j]) == gamma - m[j]) + for t in range(v)] + return dict(gamma=gamma, m=m, n=n, c=c, diag=diag, reach=reach, + cancel=cancel, tau=tau, a0=a0, b0=b0) + + +def dot1(x, y): + return bin(x & y).count("1") & 1 + + +def scope_identity(mod, ad): + v, M = mod["v"], mod["M"] + for t in range(v): + for s in range(v): + want = 1 if (M[t][s] != 0 and v2_int(M[t][s]) == ad["gamma"]) else 0 + if dot1(ad["a0"][t], ad["b0"][s]) != want: + return False + return True + + +def tie_parity(mod, ad): + v = mod["v"] + for t in range(v): + if (ad["tau"][t] % 2 == 1) != (ad["diag"][t] == ad["gamma"]): + return False + if (ad["tau"][t] % 2 == 0) != (ad["diag"][t] > ad["gamma"]): + return False + if ad["tau"][t] > mod["D"][t].bit_count(): + return False + return True + + +# --------------------------------------------------------- Lemma MP pivots + +def matched_pivot(mod, mas, exhaustive_cap=200000, seed=20261016): + v = mod["v"] + allowed = [[1 << j for j in range(3) if mod["D"][t] & (1 << j)] + for t in range(v)] + prod = 1 + for a in allowed: + prod *= len(a) + best, best_map = -1, None + exhaustive = prod <= exhaustive_cap + if exhaustive: + for combo in itertools.product(*allowed): + classes = [0, 0, 0] + for t in range(v): + i = combo[t].bit_length() - 1 + classes[i] |= 1 << t + val = mas[classes[0]] + mas[classes[1]] + mas[classes[2]] + if val > best: + best, best_map = val, combo + else: + rng = random.Random(seed) + for _ in range(exhaustive_cap): + combo = tuple(a[rng.randrange(len(a))] for a in allowed) + classes = [0, 0, 0] + for t in range(v): + i = combo[t].bit_length() - 1 + classes[i] |= 1 << t + val = mas[classes[0]] + mas[classes[1]] + mas[classes[2]] + if val > best: + best, best_map = val, combo + return best, best_map, exhaustive, prod + + +# --------------------------------------------------------- cert engine +# (PR 2717's exact-completion engine design (Aaron Wang), adapted: for fixed +# a-labels the completion over b-labels, order and kept set is exact by +# subset DP.) + +def span_add(basis, x): + pivots = {} + for r in list(basis) + [x]: + while r: + p = r.bit_length() - 1 + if p in pivots: + r ^= pivots[p] + else: + pivots[p] = r + break + return tuple(sorted(pivots.values(), reverse=True)) + + +def completion(mod, a): + """Exact completion over b-labels/order/kept set for fixed a-labels. + Returns (best size, witness dict or None).""" + v = mod["v"] + sg = mod["sg"] + inm, _ = digraph_tables(v, mod["arcs"]) + blockers = [inm[t] for t in range(v)] + bex = {} + basis_tab = [dict() for _ in range(v)] + b_all = [[b for b in range(8) if (b & ~sg[t]) == 0] for t in range(v)] + + def b_exists(t, basis): + key = (t, basis) + if key in bex: + return bex[key] + for b in b_all[t]: + if dot1(a[t], b) != 1: + continue + if all(dot1(x, b) == 0 for x in basis): + bex[key] = (True, b) + return bex[key] + bex[key] = (False, 0) + return bex[key] + + def basis_of(t, T): + d = basis_tab[t] + if T in d: + return d[T] + if T == 0: + d[0] = () + return () + b = T & -T + s = b.bit_length() - 1 + prev = basis_of(t, T ^ b) + val = span_add(prev, a[s]) if (blockers[t] & b) else prev + d[T] = val + return val + + n = 1 << v + feas = [False] * n + feas[0] = True + choice = [-1] * n + for T in range(1, n): + U = T + while U: + b = U & -U + t = b.bit_length() - 1 + rest = T ^ b + if feas[rest]: + ok, _bv = b_exists(t, basis_of(t, rest)) + if ok: + feas[T] = True + choice[T] = t + break + U ^= b + best = max(T for T in range(n) if feas[T]) + if best == 0: + return 0, None + kept = [] + bvec = [0] * v + T = best + while T: + t = choice[T] + _ok, bv = b_exists(t, basis_of(t, T ^ (1 << t))) + bvec[t] = bv + kept.append(t) + T ^= 1 << t + kept.reverse() + return best.bit_count(), dict(a=list(a), b=bvec, order=list(kept), + kept=list(kept)) + + +def completion_box(mod, ad, a): + """Completion with every b-label restricted to b(t) subset of b0(t). + Used for the sub-anchor-box value (new here).""" + v = mod["v"] + b0 = ad["b0"] + inm, _ = digraph_tables(v, mod["arcs"]) + blockers = [inm[t] for t in range(v)] + bex = {} + basis_tab = [dict() for _ in range(v)] + b_all = [[b for b in range(8) if (b & ~b0[t]) == 0] for t in range(v)] + + def b_exists(t, basis): + key = (t, basis) + if key in bex: + return bex[key] + for b in b_all[t]: + if dot1(a[t], b) != 1: + continue + if all(dot1(x, b) == 0 for x in basis): + bex[key] = (True, b) + return bex[key] + bex[key] = (False, 0) + return bex[key] + + def basis_of(t, T): + d = basis_tab[t] + if T in d: + return d[T] + if T == 0: + d[0] = () + return () + b = T & -T + s = b.bit_length() - 1 + prev = basis_of(t, T ^ b) + val = span_add(prev, a[s]) if (blockers[t] & b) else prev + d[T] = val + return val + + n = 1 << v + feas = [False] * n + feas[0] = True + choice = [-1] * n + for T in range(1, n): + U = T + while U: + b = U & -U + t = b.bit_length() - 1 + rest = T ^ b + if feas[rest]: + ok, _bv = b_exists(t, basis_of(t, rest)) + if ok: + feas[T] = True + choice[T] = t + break + U ^= b + best = max(T for T in range(n) if feas[T]) + if best == 0: + return 0, None + kept = [] + bvec = [0] * v + T = best + while T: + t = choice[T] + _ok, bv = b_exists(t, basis_of(t, T ^ (1 << t))) + bvec[t] = bv + kept.append(t) + T ^= 1 << t + kept.reverse() + return best.bit_count(), dict(a=list(a), b=bvec, order=list(kept), + kept=list(kept)) + + +def replay_witness(mod, wit): + """Independent replay: supports, K_tt = 1 on kept, order constraints.""" + v, M = mod["v"], mod["M"] + a, b = wit["a"], wit["b"] + kept = list(wit["kept"]) + order = list(wit["order"]) + if sorted(order) != sorted(kept): + return False + for t in kept: + if (a[t] & ~mod["pi"][t]) or (b[t] & ~mod["sg"][t]): + return False + if dot1(a[t], b[t]) != 1: + return False + pos = {t: i for i, t in enumerate(order)} + for t in kept: + for s in kept: + if t == s: + continue + if M[t][s] == 0 and pos[t] < pos[s]: + if dot1(a[t], b[s]) != 0: + return False + return True + + +def in_box(mod, ad, wit): + """Every kept label pair is a sub-anchor pair: a(t) subset of a0(t) and + b(t) subset of b0(t). Returns (all_in_box, escape_lines).""" + esc = [] + for t in wit["kept"]: + if (wit["a"][t] & ~ad["a0"][t]) or (wit["b"][t] & ~ad["b0"][t]): + esc.append(t) + return (not esc), esc + + +def cert_exact(mod, max_v=6): + """Exact cert by exhaustive a-enumeration (small v only).""" + v = mod["v"] + if v > max_v: + return None, None + choices = [[m for m in range(8) if (m & ~mod["pi"][t]) == 0] + for t in range(v)] + best, best_wit = -1, None + for combo in itertools.product(*choices): + val, wit = completion(mod, list(combo)) + if val > best: + best, best_wit = val, wit + return best, best_wit + + +def box_exact(mod, ad, max_v=6): + """Exact sub-anchor-box value: exhaustive a-subsets of a0 with the + b-side completed inside b0 (small v only).""" + v = mod["v"] + if v > max_v: + return None, None + choices = [] + for t in range(v): + subs = [m for m in range(8) if (m & ~ad["a0"][t]) == 0] + subs = [m for m in subs + if any(dot1(m, b) == 1 and (b & ~ad["b0"][t]) == 0 + for b in range(8))] + choices.append(subs) + best, best_wit = -1, None + for combo in itertools.product(*choices): + val, wit = completion_box(mod, ad, list(combo)) + if val > best: + best, best_wit = val, wit + return best, best_wit + + +def cert_hillclimb(mod, iters=400, seed=1234, box=False, ad=None): + """Bounded deterministic hill-climb over a-labels with exact completion. + box=True restricts both sides to the sub-anchor box.""" + v = mod["v"] + rng = random.Random(seed) + if box: + choices = [[m for m in range(8) if (m & ~ad["a0"][t]) == 0] + for t in range(v)] + comp = lambda a: completion_box(mod, ad, a) # noqa: E731 + else: + choices = [[m for m in range(8) if (m & ~mod["pi"][t]) == 0] + for t in range(v)] + comp = lambda a: completion(mod, a) # noqa: E731 + a = [c[rng.randrange(len(c))] for c in choices] + best, best_wit = comp(a) + cur = list(a) + for _ in range(iters): + t = rng.randrange(v) + old = cur[t] + new = choices[t][rng.randrange(len(choices[t]))] + if new == old: + continue + cur[t] = new + val, wit = comp(cur) + if val >= best: + best, best_wit = val, wit + else: + cur[t] = old + return best, best_wit + + +# ----------------------------------------------- chain machinery (falsifier) +# (PR 2717/2901 lineage) + +def gf2_rank(rows): + pivots = {} + for x in rows: + while x: + p = x.bit_length() - 1 + if p in pivots: + x ^= pivots[p] + else: + pivots[p] = x + break + return len(pivots) + + +def chain_cost(mod, B): + P, Q, v = mod["P"], mod["Q"], mod["v"] + total = 0 + for j in range(3): + R = [t for t in range(v) if P[t][j] != 0] + A = [s for s in range(v) if Q[s][j] != 0] + rows = [] + for t in R: + mask = 0 + for s in A: + if B[t][s]: + mask |= 1 << A.index(s) + rows.append(mask) + total += gf2_rank(rows) + return total + + +def admissible(mod, B): + v, M = mod["v"], mod["M"] + for t in range(v): + if B[t][t] != 1: + return False + for s in range(v): + if t != s and B[t][s] == 1 and M[t][s] != 0: + return False + return True + + +def chain_scan(mod, threshold, seed=99, tries=3000): + """Bounded deterministic scan for an admissible B with chain cost below + the threshold (the falsifier criterion of PR 2901).""" + v = mod["v"] + rng = random.Random(seed) + best, best_cost, hit = None, None, False + for _ in range(tries): + B = [[0] * v for _ in range(v)] + for t in range(v): + B[t][t] = 1 + for s in range(v): + if t != s and mod["M"][t][s] == 0 and rng.randrange(2): + B[t][s] = 1 + if not admissible(mod, B): + continue + cc = chain_cost(mod, B) + if best_cost is None or cc < best_cost: + best, best_cost = B, cc + if cc < threshold: + hit = True + break + return best_cost, best, hit + + +# ------------------------------- named label forms and the ladder (NEW here) +# +# The named families of PR 2901 (Lemma SG anchor, Lemma MX one-sided +# repairs, Lemma MP matched pivots, Lemma CL3 insertion mixings) all build +# their certificates from per-line labels of three forms: (a0(t), b0(t)), +# (a*(t), b0(t)) with a* . b0(t) = 1, or (e_c, e_c) with c in D(t). Call +# their union the Form-R space. For ANY fixed label assignment (a, b) its +# exact certificate value is MAS(D_K[good]) where D_K is the conflict +# digraph and good = {t : K_tt = 1}; so the Form-R maximum is a rigorous +# upper bound on the PR 2901 named value and a lower bound on cert(M). +# +# Ladder per instance: MP <= named_lo <= named <= form_r <= box <= cert +# named_lo = max(MP, |S_gamma|) (PR 2901's cheap rung) +# named = PR 2901's family value (<= form_r, proved above) +# form_r = max over Form-R labels (NEW upper bound on named) +# box = max over a(t) subset of a0(t), b(t) subset of b0(t) (NEW) +# cert = max over all labels. + +def ab_value(mod, a, b): + """Exact certificate value of a fixed label assignment: the largest kept + set with K_tt = 1 and every conflict pointing backward in some order.""" + v, M = mod["v"], mod["M"] + good = 0 + inm = [0] * v + for t in range(v): + if dot1(a[t], b[t]) == 1: + good |= 1 << t + for t in range(v): + for s in range(v): + if t != s and M[t][s] == 0 and dot1(a[t], b[s]) == 1: + inm[s] |= 1 << t + n = 1 << v + acyc = [False] * n + acyc[0] = True + best = 0 + for S in range(1, n): + if S & ~good: + continue + ok = False + T = S + while T: + x = T & -T + t = x.bit_length() - 1 + if (inm[t] & S) == 0 and acyc[S ^ x]: + ok = True + break + T ^= x + acyc[S] = ok + if ok and S.bit_count() > best: + best = S.bit_count() + return best + + +def form_r_options(mod, ad, t): + """The named-form label pairs on line t (deduplicated): anchor (a0, b0), + one-sided repairs (a*, b0) with a* . b0(t) = 1, matched pivots (e_c, e_c).""" + opts = {(ad["a0"][t], ad["b0"][t])} + for a in range(8): + if (a & ~mod["pi"][t]) == 0 and dot1(a, ad["b0"][t]) == 1: + opts.add((a, ad["b0"][t])) + for j in range(3): + if mod["D"][t] & (1 << j): + opts.add((1 << j, 1 << j)) + return sorted(opts) + + +def form_r_max(mod, ad, exhaustive_cap=300000, iters=250, seed=4242): + """Max of ab_value over the Form-R label space. Exact when the product of + per-line option counts is within the cap; deterministic hill-climb + otherwise (lower bound, flagged).""" + v = mod["v"] + opts = [form_r_options(mod, ad, t) for t in range(v)] + prod = 1 + for o in opts: + prod *= len(o) + best, best_wit = -1, None + + def take(combo): + nonlocal best, best_wit + a = [c[0] for c in combo] + b = [c[1] for c in combo] + val = ab_value(mod, a, b) + if val > best: + best = val + best_wit = dict(a=list(a), b=b, order=list(range(v)), kept=[]) + return val + + exhaustive = prod <= exhaustive_cap + if exhaustive: + for combo in itertools.product(*opts): + take(combo) + else: + rng = random.Random(seed) + cur = [o[rng.randrange(len(o))] for o in opts] + take(cur) + for _ in range(iters): + t = rng.randrange(v) + old = cur[t] + new = opts[t][rng.randrange(len(opts[t]))] + if new == old: + continue + cur[t] = new + val = take(cur) + if val < best: + cur[t] = old + # materialize a replayable witness for the best assignment: kept set is + # the largest acyclic conflict subset; order is a backward topological + # order of the conflicts (sink-first). + a = best_wit["a"] + b = best_wit["b"] + v_, M = mod["v"], mod["M"] + good = [t for t in range(v_) if dot1(a[t], b[t]) == 1] + inm = [0] * v_ + for t in good: + for s in good: + if t != s and M[t][s] == 0 and dot1(a[t], b[s]) == 1: + inm[s] |= 1 << t + S = 0 + for t in good: + S |= 1 << t + acyc = [False] * (1 << v_) + acyc[0] = True + for X in range(1, 1 << v_): + if X & ~S: + continue + ok = False + Tm = X + while Tm: + x = Tm & -Tm + t = x.bit_length() - 1 + if (inm[t] & X) == 0 and acyc[X ^ x]: + ok = True + break + Tm ^= x + acyc[X] = ok + bestS, bestN = 0, -1 + for X in range(1, 1 << v_): + if (X & ~S) == 0 and acyc[X] and X.bit_count() > bestN: + bestS, bestN = X, X.bit_count() + order = [] + rem = bestS + while rem: + sinks = [t for t in range(v_) if (rem >> t) & 1 and (inm[t] & rem) == 0] + t = min(sinks) + order.append(t) + rem ^= 1 << t + order.reverse() + best_wit = dict(a=a, b=b, order=order, kept=list(order)) + return best, best_wit, exhaustive, prod + + +def box_witness_from(mod, ad, a, b, order): + return dict(a=list(a), b=list(b), order=list(order), kept=list(order)) + + +def diff_labels(mod, ad, wit): + """Classify each kept line's label pair against the named forms and the + sub-anchor box (PR 2901 open question 2, first step).""" + rows = [] + for t in wit["kept"]: + a, b = wit["a"][t], wit["b"][t] + anchor = (a, b) == (ad["a0"][t], ad["b0"][t]) + repair = (b == ad["b0"][t] and dot1(a, b) == 1 + and (a & ~mod["pi"][t]) == 0) + pivot = a == b and a in (1, 2, 4) and (mod["D"][t] & a) != 0 + inbox = (a & ~ad["a0"][t]) == 0 and (b & ~ad["b0"][t]) == 0 + if anchor: + kind = "ANCHOR" + elif repair: + kind = "REPAIR" + elif pivot: + kind = "PIVOT" + elif inbox: + kind = "BOX-INTERIOR" + else: + kind = "BOX-ESCAPE" + rows.append(dict(t=t, a=a, b=b, a0=ad["a0"][t], b0=ad["b0"][t], + tau=ad["tau"][t], D=mod["D"][t], kind=kind)) + return rows + + +def named_exact_small(mod, ad, mas, acyc, cap=400000, scan_iters=None): + """Exact PR 2901 named value on small instances: max over the union of + the named families' constructions (Lemma SG anchor |S_gamma|, Lemma MP + matched pivots, Lemma MX one-sided-repair constructions with their two + exact hypothesis sets, Lemma CL3 insertion mixings - whose value for its + label forms is exactly ab_value). Returns (named, detail). Large + construction spaces fall back to a deterministic bounded scan (the + detail flags exactness).""" + v = mod["v"] + if scan_iters is None: + scan_iters = 20000 if v <= 13 else 300 + mp, _m, _e, _p = matched_pivot(mod, mas) + best = max(mp, len(ad["reach"])) + detail = dict(MP=mp, reach=len(ad["reach"]), mx=None, cl3=None, + exhaustive=True, product=0) + # per-line options for the MX construction space: ('A'), ('U', a*), + # ('T', c-bit) + opts = [] + for t in range(v): + o = [("A", 0)] + for a in range(8): + if (a & ~mod["pi"][t]) == 0 and dot1(a, ad["b0"][t]) == 1 \ + and a != ad["a0"][t]: + o.append(("U", a)) + for j in range(3): + if mod["D"][t] & (1 << j): + o.append(("T", 1 << j)) + opts.append(o) + prod = 1 + for o in opts: + prod *= len(o) + detail["product"] = prod + M = mod["M"] + + def mx_eval(combo): + A = [t for t in range(v) if combo[t][0] == "A"] + U = [t for t in range(v) if combo[t][0] == "U"] + T = [t for t in range(v) if combo[t][0] == "T"] + for t in A: + if not (mod["M"][t][t] != 0 and ad["tau"][t] % 2 == 1): + return None # Lemma MX: every t in A has K0_tt = 1 + classes = [0, 0, 0] + cval = [0] * v + for t in T: + c = combo[t][1] + cval[t] = c + classes[c.bit_length() - 1] |= 1 << t + val = len(A) + len(U) + mas[classes[0]] + mas[classes[1]] \ + + mas[classes[2]] + # (A-first) (i): for t in U: a* . b0(s) = 0 for s in A+U with + # M_ts = 0, and no pivot bit c(s) set in a* for s in T with M_ts = 0; + # (ii): no c(s) set in a0(t) for t in A, s in T with M_ts = 0. + ok_a = True + for t in U: + a_star = combo[t][1] + for s in A + U: + if M[t][s] == 0 and dot1(a_star, ad["b0"][s]) != 0: + ok_a = False + for s in T: + if M[t][s] == 0 and (a_star & cval[s]) != 0: + ok_a = False + for t in A: + for s in T: + if M[t][s] == 0 and (ad["a0"][t] & cval[s]) != 0: + ok_a = False + # (T-first) (i')/(ii') + ok_t = True + for t in U: + a_star = combo[t][1] + for s in A + U: + if M[t][s] == 0 and dot1(a_star, ad["b0"][s]) != 0: + ok_t = False + for t in T: + for s in A + U: + if M[s][t] == 0 and (cval[t] & ad["b0"][s]) != 0: + ok_t = False + return val if (ok_a or ok_t) else None + + if prod <= cap: + mx_best = 0 + for combo in itertools.product(*opts): + val = mx_eval(combo) + if val is not None and val > mx_best: + mx_best = val + detail["mx"] = mx_best + best = max(best, mx_best) + else: + detail["exhaustive"] = False + rng = random.Random(31337) + mx_best = 0 + best_cur = None + # structured seeds (pure matched-pivot maps always satisfy both MX + # forms; the greedy walk below gets stuck in hypothesis-failing + # mixed assignments without them) + seeds = [[("A", 0)] * v] + for j in range(3): + seeds.append([("T", (1 << j)) if (mod["D"][t] & (1 << j)) + else ("T", 1 << (mod["D"][t].bit_length() - 1)) + for t in range(v)]) + mp0, mpmap0, _e0, _p0 = matched_pivot(mod, mas) + if mpmap0 is not None: + seeds.append([("T", mpmap0[t]) for t in range(v)]) + for s0 in seeds: + val = mx_eval(s0) + if val is not None and val > mx_best: + mx_best, best_cur = val, list(s0) + cur = list(best_cur) if best_cur is not None \ + else [o[rng.randrange(len(o))] for o in opts] + since_restart = 0 + for _ in range(scan_iters): + if since_restart >= 4 * v: + since_restart = 0 + if best_cur is not None and rng.randrange(2): + cur = list(best_cur) + else: + cur = [o[rng.randrange(len(o))] for o in opts] + since_restart += 1 + t = rng.randrange(v) + old = cur[t] + cur[t] = opts[t][rng.randrange(len(opts[t]))] + val = mx_eval(cur) + if val is None or val < mx_best: + cur[t] = old + elif val > mx_best: + mx_best = val + best_cur = list(cur) + detail["mx"] = mx_best + best = max(best, mx_best) + # CL3 value for its label forms (anchor (a0,b0) on A, matched pivots): + # exact ab_value over the combined forms, small product only. + cl3_opts = [[(ad["a0"][t], ad["b0"][t], "A")] + + [((1 << j), (1 << j), "T") for j in range(3) + if mod["D"][t] & (1 << j)] + for t in range(v)] + cl3_prod = 1 + for o in cl3_opts: + cl3_prod *= len(o) + cl3_best = 0 + if cl3_prod <= cap: + for combo in itertools.product(*cl3_opts): + a = [c[0] for c in combo] + b = [c[1] for c in combo] + val = ab_value(mod, a, b) + if val > cl3_best: + cl3_best = val + else: + rng = random.Random(4242) + cur = [o[rng.randrange(len(o))] for o in cl3_opts] + for _ in range(scan_iters): + t = rng.randrange(v) + old = cur[t] + cur[t] = cl3_opts[t][rng.randrange(len(cl3_opts[t]))] + a = [c[0] for c in cur] + b = [c[1] for c in cur] + val = ab_value(mod, a, b) + if val < cl3_best: + cur[t] = old + elif val > cl3_best: + cl3_best = val + detail["exhaustive"] = False + detail["cl3"] = cl3_best + best = max(best, cl3_best) + return best, detail + + +def settle_ladder(mod, ad, mas, acyc, exact=False, engine_iters=150, + provided_cert_wit=None, label=""): + """One ladder record: all rungs, the gap decomposition, and the armed + falsifier criterion (exact cert below threshold where exhaustive, or an + explicit admissible B with chain cost below threshold). exact=True runs + the exhaustive Form-R / box / cert rungs (small v); otherwise the engine + rungs are deterministic hill-climbs (lower bounds) and provided_cert_wit + (e.g. a stored witness) is used as the cert rung on large instances.""" + v = mod["v"] + thr = (2 * v) // 3 + mp, mpmap, mp_exh, mp_prod = matched_pivot(mod, mas) + named_lo = max(mp, len(ad["reach"])) + fr_val, fr_wit, fr_exh, fr_prod = form_r_max( + mod, ad, exhaustive_cap=(300000 if exact else 0)) + assert fr_wit is not None and replay_witness(mod, fr_wit), "form-R witness" + if exact: + bx_val, bx_wit = box_exact(mod, ad, max_v=6) + ce_val, ce_wit = cert_exact(mod, max_v=6) + bx_exact, ce_exact = True, True + else: + if v > 13: + bx_val, bx_wit = None, None + else: + bx_val, bx_wit = cert_hillclimb(mod, iters=engine_iters, seed=2024, + box=True, ad=ad) + if provided_cert_wit is not None: + ce_wit = provided_cert_wit + ce_val = len(ce_wit["kept"]) + elif v > 13: + ce_val, ce_wit = 0, None + else: + ce_val, ce_wit = cert_hillclimb(mod, iters=engine_iters, seed=2025) + bx_exact, ce_exact = False, False + if bx_wit is not None: + assert replay_witness(mod, bx_wit), "box witness" + if ce_wit is not None: + assert replay_witness(mod, ce_wit), "engine witness" + named_val, named_detail = None, None + if exact: + named_val, named_detail = named_exact_small(mod, ad, mas, acyc) + rec = dict(label=label, v=v, threshold=thr, k_cancel=len(ad["cancel"]), + reach=len(ad["reach"]), MP=mp, MP_exhaustive=mp_exh, + MP_product=mp_prod, named_lo=named_lo, + named=named_val, named_detail=named_detail, + form_r=fr_val, form_r_exhaustive=fr_exh, form_r_product=fr_prod, + box=bx_val, box_exact=bx_exact, + cert=ce_val, cert_exact=ce_exact, + gap_forms=(ce_val - fr_val), gap_pr=(ce_val - named_lo), + gap_named=((ce_val - named_val) if named_val is not None + else None), + named_ge_threshold=(named_lo >= thr), + forms_ge_threshold=(fr_val >= thr), + cert_ge_threshold=(ce_val >= thr)) + if ce_wit is not None: + inb, esc = in_box(mod, ad, ce_wit) + rec["cert_witness_in_box"] = inb + rec["cert_witness_box_escape"] = esc + rec["cert_witness_diff"] = diff_labels(mod, ad, ce_wit) + rec["falsifier"] = None + if rec["cert_exact"]: + if ce_val < thr: + rec["falsifier"] = "exact cert %d < threshold %d" % (ce_val, thr) + elif named_lo < thr or ce_val < thr: + cc, _B, hit = chain_scan(mod, thr) + rec["chain_scan_best"] = cc + if hit: + rec["falsifier"] = ("admissible B with chain cost %d < " + "threshold %d" % (cc, thr)) + return rec + + +# --------------------------------------------------------------- controls + +def brute_force_cert(mod): + """Cert from the definition: all labellings, all orders (tiny v only).""" + v, M = mod["v"], mod["M"] + choices = [[m for m in range(8) if (m & ~mod["pi"][t]) == 0] + for t in range(v)] + bchoices = [[m for m in range(8) if (m & ~mod["sg"][t]) == 0] + for t in range(v)] + best = 0 + for a in itertools.product(*choices): + for b in itertools.product(*bchoices): + for k in range(1, v + 1): + for sub in itertools.permutations(range(v), k): + ok = True + for i, t in enumerate(sub): + if dot1(a[t], b[t]) != 1: + ok = False + break + for s in sub[i + 1:]: + if M[t][s] == 0 and dot1(a[t], b[s]) != 0: + ok = False + break + if not ok: + break + if ok and k > best: + best = k + return best + + +def sparse_v3(seed): + """A tiny v = 3 decoder with sparse supports (for the brute-force + control). Deterministic small-integer factorization.""" + rng = random.Random(seed) + while True: + P = [tuple(rng.choice([0, 0, 0, 1, -1, 2]) for _ in range(3)) + for _ in range(3)] + Q = [tuple(rng.choice([0, 0, 0, 1, -1, 2]) for _ in range(3)) + for _ in range(3)] + try: + mod = model(P, Q) + except AssertionError: + continue + if max(mod["pi"][t].bit_count() for t in range(3)) <= 2: + return mod + + +def run_controls(): + # 1. exact cert vs brute force from the definition (3 sparse v = 3 cases) + agree = 0 + for seed in (11, 22, 33): + mod = sparse_v3(seed) + bf = brute_force_cert(mod) + ex, wit = cert_exact(mod, max_v=6) + assert ex == bf and wit is not None and replay_witness(mod, wit), \ + "cert_exact must agree with brute force at v = 3" + agree += 1 + # 2. corrupted witnesses must fail the independent replay + mod = sparse_v3(44) + ex, wit = cert_exact(mod, max_v=6) + bad = dict(a=list(wit["a"]), b=list(wit["b"]), order=list(wit["order"]), + kept=list(wit["kept"])) + bad["a"][bad["kept"][0]] = 0 # kills K_tt on a kept line + assert not replay_witness(mod, bad), "corrupted label must be rejected" + bad2 = dict(a=list(wit["a"]), b=list(wit["b"]), order=list(wit["order"]), + kept=list(wit["kept"])) + bad2["kept"] = bad2["kept"][1:] # kept/order mismatch + assert not replay_witness(mod, bad2), "corrupted kept set must be rejected" + # 3. ab_value is a sound rung: for random fixed labels it never exceeds + # the exact completion value for the same a-side + rng = random.Random(7) + sound = 0 + for seed in (55, 66): + m2 = sparse_v3(seed) + ad2 = anchor_data(m2) + tries = 0 + while sound < 10 and tries < 500: + tries += 1 + a = [rng.randrange(8) & m2["pi"][t] for t in range(m2["v"])] + b = [rng.randrange(8) & m2["sg"][t] for t in range(m2["v"])] + if any(dot1(a[t], b[t]) != 1 for t in range(m2["v"])): + continue + f_ab = ab_value(m2, a, b) + f_a, _w = completion(m2, a) + assert f_ab <= f_a, "ab_value must not exceed completion" + sound += 1 + # 4. restriction exactness: M[S,S] rows, nonzero diagonal, and the + # per-instance Lemma CT / scope identities on a sub-decoder + mod = load_model("tied_min.json") + S = [0, 2, 5, 7] + sub = restrict(mod, S) + for i, t in enumerate(S): + for j, s in enumerate(S): + assert sub["M"][i][j] == mod["M"][t][s], "restriction must be exact" + ads = anchor_data(sub) + assert tie_parity(sub, ads) and scope_identity(sub, ads), \ + "sub-decoder must satisfy the CT/scope identities" + # 5. diagonal decoder sanity: cert = v and MP = v + md = model([(1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0)], + [(1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 0, 1)]) + inm, _ = digraph_tables(md["v"], md["arcs"]) + mas = mas_table(md["v"], acyclic_table(md["v"], inm)) + mp, _mpmap, _e, _p = matched_pivot(md, mas) + ex, _w = cert_exact(md, max_v=6) + assert mp == 4 and ex == 4, "diagonal-style decoder must give 4" + print("PASS_FG_CONTROLS brute-force=%d/3 corrupted=2/2 ab-sound=%d " + "restriction=1/1 diagonal=1/1" % (agree, sound)) + + +# ------------------------------------------------------------- calibration + +def run_calibration(): + recs = {} + for name, want in (("tied_min.json", dict(mp=9, prod=4096, reach=[], + wit=11, chain=None)), + ("cex_min_1.json", dict(mp=16, prod=6144, + reach=[0, 4, 5, 6, 8, 11, 14, 15], + wit=18, chain=22))): + mod = load_model(name) + ad = anchor_data(mod) + assert tie_parity(mod, ad) and scope_identity(mod, ad), name + inm, _ = digraph_tables(mod["v"], mod["arcs"]) + acyc = acyclic_table(mod["v"], inm) + mas = mas_table(mod["v"], acyc) + mp, mpmap, exh, prod = matched_pivot(mod, mas) + assert exh and prod == want["prod"] and mp == want["mp"], \ + "%s MP must match the recorded anchors" % name + assert sorted(ad["reach"]) == want["reach"], "%s reach" % name + if name == "cex_min_1.json": + with open(os.path.join(DATA, "cex_min_1.witness.json"), "r", + encoding="utf-8") as fh: + sw = json.load(fh) + wit = dict(a=sw["a"], b=sw["b"], order=sw["order"], kept=sw["kept"]) + assert replay_witness(mod, wit) and len(wit["kept"]) == 18, \ + "cex_min_1 stored witness must replay at 18" + got = 18 + with open(os.path.join(DATA, "cex_min_1.B22.json"), "r", + encoding="utf-8") as fh: + B = json.load(fh) + if isinstance(B, dict): + B = B.get("B", B.get("pairing")) + assert admissible(mod, B), "stored pairing admissible" + cc = chain_cost(mod, B) + assert cc == want["chain"], "chain engine must reproduce 22" + else: + val, wit = cert_hillclimb(mod, iters=400, seed=1234) + assert wit is not None and replay_witness(mod, wit), name + got = val + assert got == want["wit"], \ + "tied_min hill-climb must re-find 11 (got %d)" % got + rows = diff_labels(mod, ad, wit) + inb, esc = in_box(mod, ad, wit) + kinds = {} + for r in rows: + kinds[r["kind"]] = kinds.get(r["kind"], 0) + 1 + recs[name] = dict(v=mod["v"], threshold=(2 * mod["v"]) // 3, + MP=mp, reach=len(ad["reach"]), + cancel=len(ad["cancel"]), witness=got, + in_box=inb, box_escape=esc, kinds=kinds, + diff=rows) + log("%s: MP=%d reach=%d witness=%d in_box=%s kinds=%s" + % (name, mp, len(ad["reach"]), got, inb, kinds)) + print("PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 mp=9/16 " + "chain=22 reach=0/12,8/19") + return recs + + +# -------------------------------------------- fixture ladder + form-R probes + +def run_fixture_ladder(): + """The ladder on both fixtures, plus the Form-R / box probes that answer + PR 2901 open question 2 (what do the attaining certificates use?).""" + out = {} + for name in ("tied_min.json", "cex_min_1.json"): + mod = load_model(name) + ad = anchor_data(mod) + inm, _ = digraph_tables(mod["v"], mod["arcs"]) + acyc = acyclic_table(mod["v"], inm) + mas = mas_table(mod["v"], acyc) + provided = None + if name == "cex_min_1.json": + with open(os.path.join(DATA, "cex_min_1.witness.json"), "r", + encoding="utf-8") as fh: + sw = json.load(fh) + provided = dict(a=sw["a"], b=sw["b"], order=sw["order"], + kept=sw["kept"]) + rec = settle_ladder(mod, ad, mas, acyc, exact=False, + engine_iters=(400 if name == "tied_min.json" + else 0), + provided_cert_wit=provided, label=name) + named_v, named_det = named_exact_small( + mod, ad, mas, acyc, + scan_iters=(20000 if name == "tied_min.json" else 300)) + rec["named_scan"] = named_v + rec["named_scan_detail"] = named_det + # probe: can the Form-R space alone reach the recorded witness value? + fr_deep, fr_wit, fr_exh, fr_prod = form_r_max( + mod, ad, exhaustive_cap=0, + iters=(800 if name == "tied_min.json" else 300), seed=909) + if fr_wit is not None and replay_witness(mod, fr_wit): + rec["form_r_deep"] = fr_deep + rec["form_r_deep_witness_in_box"] = in_box(mod, ad, fr_wit)[0] + rec["form_r_deep_witness_diff"] = diff_labels(mod, ad, fr_wit) + if name == "tied_min.json": + bx_deep, bx_wit = cert_hillclimb(mod, iters=400, seed=910, + box=True, ad=ad) + if bx_wit is not None and replay_witness(mod, bx_wit): + rec["box_deep"] = bx_deep + rec["box_deep_witness_in_box"] = in_box(mod, ad, bx_wit)[0] + ce_deep, ce_wit = cert_hillclimb(mod, iters=400, seed=911) + if ce_wit is not None and replay_witness(mod, ce_wit): + rec["cert_deep"] = ce_deep + rec["cert_deep_witness_in_box"] = in_box(mod, ad, ce_wit)[0] + rec["cert_deep_witness_diff"] = diff_labels(mod, ad, ce_wit) + out[name] = rec + log("fixture ladder %s: named_lo=%d form_r=%d box=%s cert=%d" % + (name, rec["named_lo"], rec["form_r"], rec["box"], rec["cert"])) + return out + + +# ------------------------------------------------------- sub-instance census + +def subsets_smallest_first(v, size, cap, stride=1): + """Deterministic enumeration of `size`-subsets of range(v), lexicographic, + thinned by a fixed stride when the count exceeds cap (the thinning and + the exact domain are recorded in CERTIFICATE.json).""" + all_subs = list(itertools.combinations(range(v), size)) + if len(all_subs) <= cap: + return all_subs, len(all_subs), False + step = max(1, len(all_subs) // cap) + picked = all_subs[::step][:cap] + return picked, len(all_subs), True + + +def run_census(): + """Smallest-first sub-decoder census of both fixtures. Sub-decoders are + exact 3-total decoders and inherit fixture-density zero digraphs (the + exact recorded generator obstruction of PR 2901). Cheap rungs on every + enumerated subset; the exact ladder (Form-R / box / cert exhaustive) on + every flagged subset (gap risk or falsifier risk), smallest first.""" + plan = [ + ("tied_min.json", 3, 240), ("tied_min.json", 4, 240), + ("tied_min.json", 5, 240), ("tied_min.json", 6, 60), + ("cex_min_1.json", 3, 240), ("cex_min_1.json", 4, 240), + ("cex_min_1.json", 5, 120), ("cex_min_1.json", 6, 50), + ] + deep_budget = {"n": 20, "v6": 1} + records = [] + domain = [] + falsifier = None + deep_done = 0 + for name, size, cap in plan: + mod = load_model(name) + subs, total, thinned = subsets_smallest_first(mod["v"], size, cap) + domain.append(dict(fixture=name, size=size, enumerated=len(subs), + total=total, thinned=thinned)) + flagged_here = 0 + for S in subs: + sub = restrict(mod, list(S)) + ad = anchor_data(sub) + assert tie_parity(sub, ad) and scope_identity(sub, ad) + inm, _ = digraph_tables(sub["v"], sub["arcs"]) + acyc = acyclic_table(sub["v"], inm) + mas = mas_table(sub["v"], acyc) + iters = 40 if size <= 4 else 120 + rec = settle_ladder(sub, ad, mas, acyc, exact=False, + engine_iters=iters, + label="%s|%s" % (name.split(".")[0], + ",".join(map(str, S)))) + risk = (not rec["cert_ge_threshold"]) or rec["gap_pr"] >= 1 \ + or rec["gap_forms"] >= 1 + if risk and rec["falsifier"] is None and size <= 5 \ + and deep_done < deep_budget["n"]: + deep = settle_ladder(sub, ad, mas, acyc, exact=True, + engine_iters=iters, + label=rec["label"] + "|deep") + rec = deep + deep_done += 1 + flagged_here += 1 + elif risk and size == 6 and deep_budget["v6"] > 0 \ + and rec["falsifier"] is None: + deep = settle_ladder(sub, ad, mas, acyc, exact=True, + engine_iters=300, + label=rec["label"] + "|deep6") + rec = deep + deep_budget["v6"] -= 1 + flagged_here += 1 + records.append(rec) + if rec["falsifier"] is not None: + falsifier = rec + log("FALSIFIER: %s" % rec["falsifier"]) + return records, domain, falsifier + log("census %s size=%d: %d enumerated (of %d%s), flagged/deep %d" + % (name, size, len(subs), total, + ", thinned" if thinned else "", flagged_here)) + return records, domain, falsifier + + +def summarize(records): + n = len(records) + gap2 = [r for r in records if r["gap_pr"] >= 2 or r["gap_forms"] >= 2 + or (r.get("gap_named") or 0) >= 2] + gap1 = [r for r in records if r["gap_pr"] >= 1 or r["gap_forms"] >= 1 + or (r.get("gap_named") or 0) >= 1] + named_gap = [r for r in records if r.get("gap_named") is not None] + below = [r for r in records if not r["cert_ge_threshold"]] + min_named_ratio = min( + (r["named_lo"] / r["v"]) for r in records) if records else 1.0 + exact_n = sum(1 for r in records if r["cert_exact"]) + max_gap_named = max((r["gap_named"] for r in named_gap), default=None) + return dict(records=n, exact_records=exact_n, gap2=len(gap2), + gap1=len(gap1), below_threshold=len(below), + min_named_ratio=round(min_named_ratio, 4), + falsifiers=sum(1 for r in records if r["falsifier"]), + exact_named_records=len(named_gap), + max_gap_named=max_gap_named, + gap2_records=gap2[:6], gap1_records=gap1[:10]) + + +def main(): + run_controls() + cal = run_calibration() + ladder = run_fixture_ladder() + records, domain, falsifier = run_census() + stats = summarize(records) + cert = dict( + package="research/fstar-family-gap-seed1c25f56f", + controls="PASS_FG_CONTROLS", + calibration="PASS_FG_CALIBRATION", + fixtures=cal, + fixture_ladder=ladder, + census_domain=domain, + census_stats=stats, + census_records=records, + falsifier=falsifier, + ) + blob = json.dumps(cert, sort_keys=True).encode("utf-8") + digest = hashlib.sha256(blob).hexdigest()[:16] + cert["digest"] = digest + with open(os.path.join(HERE, "CERTIFICATE.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump(cert, fh, indent=1, sort_keys=True) + fh.write("\n") + log("certificate digest %s" % digest) + print("PASS_FG_CENSUS records=%d exact=%d exact-named=%d gap1=%d gap2=%d " + "below-threshold=%d falsifiers=%d max-gap-named=%s" + % (stats["records"], stats["exact_records"], + stats["exact_named_records"], stats["gap1"], stats["gap2"], + stats["below_threshold"], stats["falsifiers"], + stats["max_gap_named"])) + if falsifier is not None: + print("PASS_FSTAR_FAMILY_GAP falsifier-realized") + else: + print("PASS_FSTAR_FAMILY_GAP no-falsifier-in-domain") + + +if __name__ == "__main__": + sys.stdout.reconfigure(encoding="utf-8") + main() diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2936/box_attack.py b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2936/box_attack.py new file mode 100644 index 0000000000..5235b1eca9 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2936/box_attack.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python3 +"""KB5h box-completeness attack (priority 2), part 1: exact small instances. + +(a) tau = 0 DEMONSTRATION (smallest instance first): an explicit exact + 3-total rational decoder on v = 2 lines with a tau = 0 line, where + cert = 2 > box = 1. This PROVES the hypothesis "every line has + tau(t) >= 1" is needed for box-completeness (Lemma SB (iii) predicts the + mechanism; this realizes it end to end). +(b) SYNTHETIC SWEEP at tau >= 1: deterministic random exact 3-total decoders + at v = 4..6 (smallest first), exact cert vs exact box, looking for the + minimal instance with cert > box (a box-completeness counterexample). + +Exact rungs are the vendored PR 2914 engine (cert_exact / box_exact: +exhaustive a-enumeration with exact completion). Stdlib, deterministic. +Writes data/box-attack-receipt.json. Run: python3 -B box_attack.py +""" +import importlib.util +import itertools +import json +import os +import random +import sys +import time + +T0 = time.time() +HERE = os.path.dirname(os.path.abspath(__file__)) +ENG = os.path.join(HERE, "predecessor", "pr2914", "verify.py") +spec = importlib.util.spec_from_file_location("pr2914_engine", ENG) +fg = importlib.util.module_from_spec(spec) +spec.loader.exec_module(fg) + + +def log(msg): + print("[%7.1fs] %s" % (time.time() - T0, msg), flush=True) + + +def box_exact_tolerant(mod, ad): + """box_exact with one edge-case fix: when a line has NO certifying + sub-anchor pair (tau = 0, Lemma SB (iii)), the vendored filter empties + that line's option list and itertools.product yields nothing at all + (returns (-1, None)). Here such a line is pinned to a = 0 (it can never + be kept inside the box) and the enumeration proceeds. Identical to + fg.box_exact on tau >= 1 instances (checked in verify.py).""" + v = mod["v"] + choices = [] + for t in range(v): + subs = [m for m in range(8) if (m & ~ad["a0"][t]) == 0] + subs = [m for m in subs + if any(fg.dot1(m, b) == 1 and (b & ~ad["b0"][t]) == 0 + for b in range(8))] + choices.append(subs if subs else [0]) + best, best_wit = -1, None + for combo in itertools.product(*choices): + val, wit = fg.completion_box(mod, ad, list(combo)) + if val > best: + best, best_wit = val, wit + return best, best_wit + + +def tau0_demo(): + """Explicit v = 2 decoder: P = [[1,0,1],[2,1,0]], Q = [[1,0,0],[1,0,1]]. + M = [[1,2],[2,2]], gamma = 0, tau = (1, 0): line 1 has tau = 0.""" + P = [(1, 0, 1), (2, 1, 0)] + Q = [(1, 0, 0), (1, 0, 1)] + mod = fg.model(P, Q) + ad = fg.anchor_data(mod) + assert fg.tie_parity(mod, ad) and fg.scope_identity(mod, ad), \ + "the demo decoder must satisfy the CT/scope identities" + assert ad["tau"] == [1, 0], "tau must be (1, 0), got %s" % ad["tau"] + ce, cew = fg.cert_exact(mod, max_v=2) + bx, bxw = box_exact_tolerant(mod, ad) + assert fg.replay_witness(mod, cew) and fg.in_box(mod, ad, cew)[0] is False + assert fg.replay_witness(mod, bxw) and fg.in_box(mod, ad, bxw)[0] is True + assert ce == 2 and bx == 1, "expected cert=2 box=1, got %s %s" % (ce, bx) + log("tau0 demo: cert=2 box=1 (cert witness escapes the box on the " + "tau=0 line) - unrestricted box-completeness FAILS at v=2") + return dict(v=2, tau=list(ad["tau"]), cert=ce, box=bx, + cert_witness_escapes_box=True, + status="PROVEN: tau >= 1 hypothesis needed") + + +def random_decoder(rng, v, sparse=True): + # biased entry pool: mostly odd (v2 = 0 -> ties at gamma = 0) with a + # minority of singly-even entries to create high/cancellation structure + pool = [0, 0, 1, -1, 1, -1, 3, -3, 2, -2, 6, -6] + while True: + P = [tuple(rng.choice(pool) for _ in range(3)) for _ in range(v)] + Q = [tuple(rng.choice(pool) for _ in range(3)) for _ in range(v)] + try: + mod = fg.model(P, Q) + except (AssertionError, ValueError): + continue + ad = fg.anchor_data(mod) + if not (fg.tie_parity(mod, ad) and fg.scope_identity(mod, ad)): + continue + return mod, ad + + +def sweep(): + rng = random.Random(20261016) + out = [] + for v, tries in ((4, 60), (5, 40), (6, 20), (7, 6)): + tested = tau1 = 0 + for k in range(tries): + mod, ad = random_decoder(rng, v) + tested += 1 + ce, cew = fg.cert_exact(mod, max_v=v) + bx, bxw = box_exact_tolerant(mod, ad) + assert fg.replay_witness(mod, cew) + assert (bxw is None and bx == 0) or ( + bxw is not None and fg.replay_witness(mod, bxw)) + inb, esc = fg.in_box(mod, ad, cew) + has0 = min(ad["tau"]) < 1 + rec = dict(v=v, k=k, tau=list(ad["tau"]), tau_min=min(ad["tau"]), + cert=ce, box=bx, cert_witness_in_box=inb, + gap_box=ce - bx, tau0_line=has0) + out.append(rec) + if not has0: + tau1 += 1 + log(" v=%d k=%2d tau=%s cert=%d box=%d in_box=%s" + % (v, k, ad["tau"], ce, bx, inb)) + if ce > bx: + log("BOX-COMPLETENESS COUNTEREXAMPLE at v=%d (tau>=1): " + "cert=%d > box=%d" % (v, ce, bx)) + return out, rec + else: + log(" v=%d k=%2d tau=%s cert=%d box=%d [tau0-line, " + "out-of-claim]" % (v, k, ad["tau"], ce, bx)) + log("sweep v=%d: %d tested, %d with tau>=1, no counterexample" + % (v, tested, tau1)) + return out, None + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + demo = tau0_demo() + records, cex = sweep() + rec = dict(demo=demo, sweep=records, counterexample=cex) + with open(os.path.join(HERE, "data", "box-attack-receipt.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump(rec, fh, indent=1, sort_keys=True) + fh.write("\n") + if cex is not None: + print("PASS_BOX_ATTACK counterexample-found v=%d" % cex["v"]) + else: + print("PASS_BOX_ATTACK tau0-demo-cert2-box1 " + "sweep=%d-no-counterexample" % len(records)) + + +if __name__ == "__main__": + main() diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2936/predecessor/pr2914/verify.py b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2936/predecessor/pr2914/verify.py new file mode 100644 index 0000000000..9d8285e4e3 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2936/predecessor/pr2914/verify.py @@ -0,0 +1,1364 @@ +#!/usr/bin/env python3 +"""KB5g: the family gap of the F-star residue - sub-instance census of the +canonical fixtures, the sub-anchor-box decomposition of the attaining +certificates, and the smallest-first falsifier criterion (no kappa). + +Object: exact 3-total rational decoders M = sum_j p_j q_j^T (v lines, nonzero +diagonal). Quantities per instance: zero digraph Z, Lemma SG anchor reach +|S_gamma|, tie numbers tau(t), matched-pivot value MP (Lemma MP), the named +family value (PR 2901's convention: max(MP, |S_gamma|, CL3 mixing)), the +sub-anchor-box value (NEW: a(t) subset of a0(t), b(t) subset of b0(t), +K_tt = 1), exact cert(M) by exhaustive a-enumeration with exact b-completion +(small v), engine witnesses with independent replay, and the bounded +admissible-B chain scan as falsifier criterion. + +Engine lineage: model, subset-DP acyclic/MAS tables, anchor/tie data, +matched pivots, exact-completion DP, witness replay and the chain machinery +are adapted from Aaron Wang's PR 2717 / PR 2747 / PR 2869 / PR 2901 engine +(see README credit); the sub-anchor-box machinery, the sub-instance census +and the decomposition are new here. F-star and the chain cost >= cert(M) are +from research/root-unit-decoder-lemmas (PR 1590, DreamingOfClouds), cited, +not restated. + +Deterministic, stdlib only, exact integer/F2 arithmetic. Run: +python3 -B verify.py +""" +import hashlib +import itertools +import json +import os +import random +import sys +import time + +T0 = time.time() +HERE = os.path.dirname(os.path.abspath(__file__)) +DATA = os.path.join(HERE, "data") + + +def log(msg): + print("[%6.1fs] %s" % (time.time() - T0, msg), flush=True) + + +# ---------------------------------------------------------------- model +# (adapted from the PR 2717/2901 engine lineage, Aaron Wang) + +def load_decoder(path): + with open(path, "r", encoding="utf-8") as fh: + raw = json.load(fh) + P = [tuple(int(x) for x in line[0]) for line in raw] + Q = [tuple(int(x) for x in line[1]) for line in raw] + return P, Q + + +def model(P, Q): + v = len(P) + for t in range(v): + for x in list(P[t]) + list(Q[t]): + assert isinstance(x, int), "entries must be exact integers" + M = [[sum(P[t][j] * Q[s][j] for j in range(3)) for s in range(v)] for t in range(v)] + pi = [sum((1 << j) for j in range(3) if P[t][j] != 0) for t in range(v)] + sg = [sum((1 << j) for j in range(3) if Q[t][j] != 0) for t in range(v)] + D = [pi[t] & sg[t] for t in range(v)] + assert all(M[t][t] != 0 for t in range(v)), "diagonal must be nonzero" + assert all(D[t] != 0 for t in range(v)), "D(t) must be nonempty" + arcs = [(t, s) for t in range(v) for s in range(v) if t != s and M[t][s] == 0] + return dict(v=v, P=P, Q=Q, M=M, pi=pi, sg=sg, D=D, arcs=arcs) + + +def load_model(name): + return model(*load_decoder(os.path.join(DATA, name))) + + +def restrict(mod, S): + """Sub-decoder M[S,S]: restriction of an exact decoder is exact (rank <= 3 + and nonzero diagonal are preserved). S is a sorted list of line indices.""" + P = [mod["P"][t] for t in S] + Q = [mod["Q"][t] for t in S] + return model(P, Q) + + +def digraph_tables(v, arcs): + inm = [0] * v + outm = [0] * v + for (t, s) in arcs: + inm[s] |= 1 << t + outm[t] |= 1 << s + return inm, outm + + +def acyclic_table(v, inm): + acyc = [False] * (1 << v) + acyc[0] = True + for S in range(1, 1 << v): + ok = False + T = S + while T: + b = T & -T + t = b.bit_length() - 1 + if (inm[t] & S) == 0 and acyc[S ^ b]: + ok = True + break + T ^= b + acyc[S] = ok + return acyc + + +def mas_table(v, acyc): + n = 1 << v + mas = [0] * n + for S in range(1, n): + if acyc[S]: + mas[S] = S.bit_count() + else: + T = S + best = 0 + while T: + b = T & -T + val = mas[S ^ b] + if val > best: + best = val + T ^= b + mas[S] = best + return mas + + +def mas_argmax(mas, acyc, S, memo): + if S == 0: + return 0 + if S in memo: + return memo[S] + if acyc[S]: + memo[S] = S + return S + T = S + while T: + b = T & -T + if mas[S ^ b] == mas[S]: + val = mas_argmax(mas, acyc, S ^ b, memo) + memo[S] = val + return val + T ^= b + raise AssertionError("mas_argmax: no witness") + + +# -------------------------------------------- Lemma SG anchor + Lemma CT data + +def v2_int(n): + if n == 0: + raise ValueError("v2(0)") + k = 0 + while n % 2 == 0: + n //= 2 + k += 1 + return k + + +def anchor_data(mod): + """Canonical reduced normalization (alpha_j = -m_j): a0_j(t) = + [v2(p_j(t)) = m_j], b0_j(t) = [v2(q_j(t)) = gamma - m_j], with the scope + identity K0_ts = 2^{-gamma} M_ts mod 2 (Lemma SG of PR 2869).""" + P, Q, M = mod["P"], mod["Q"], mod["M"] + v = mod["v"] + SENTINEL = 10 ** 9 + m, n, c = [], [], [] + for j in range(3): + mp = [v2_int(P[t][j]) for t in range(v) if P[t][j] != 0] + mq = [v2_int(Q[t][j]) for t in range(v) if Q[t][j] != 0] + if mp and mq: + m.append(min(mp)) + n.append(min(mq)) + else: + m.append(SENTINEL) + n.append(SENTINEL) + c.append(m[-1] + n[-1]) + assert min(c) < SENTINEL, "at least one total must be nondegenerate" + gamma = min(c) + diag = [v2_int(M[t][t]) for t in range(v)] + reach = [t for t in range(v) if diag[t] == gamma] + cancel = [t for t in range(v) if diag[t] > gamma] + tau = [] + for t in range(v): + cnt = 0 + for j in range(3): + if (P[t][j] != 0 and Q[t][j] != 0 + and v2_int(P[t][j]) + v2_int(Q[t][j]) == gamma): + cnt += 1 + tau.append(cnt) + a0 = [sum((1 << j) for j in range(3) + if P[t][j] != 0 and v2_int(P[t][j]) == m[j]) + for t in range(v)] + b0 = [sum((1 << j) for j in range(3) + if Q[t][j] != 0 and v2_int(Q[t][j]) == gamma - m[j]) + for t in range(v)] + return dict(gamma=gamma, m=m, n=n, c=c, diag=diag, reach=reach, + cancel=cancel, tau=tau, a0=a0, b0=b0) + + +def dot1(x, y): + return bin(x & y).count("1") & 1 + + +def scope_identity(mod, ad): + v, M = mod["v"], mod["M"] + for t in range(v): + for s in range(v): + want = 1 if (M[t][s] != 0 and v2_int(M[t][s]) == ad["gamma"]) else 0 + if dot1(ad["a0"][t], ad["b0"][s]) != want: + return False + return True + + +def tie_parity(mod, ad): + v = mod["v"] + for t in range(v): + if (ad["tau"][t] % 2 == 1) != (ad["diag"][t] == ad["gamma"]): + return False + if (ad["tau"][t] % 2 == 0) != (ad["diag"][t] > ad["gamma"]): + return False + if ad["tau"][t] > mod["D"][t].bit_count(): + return False + return True + + +# --------------------------------------------------------- Lemma MP pivots + +def matched_pivot(mod, mas, exhaustive_cap=200000, seed=20261016): + v = mod["v"] + allowed = [[1 << j for j in range(3) if mod["D"][t] & (1 << j)] + for t in range(v)] + prod = 1 + for a in allowed: + prod *= len(a) + best, best_map = -1, None + exhaustive = prod <= exhaustive_cap + if exhaustive: + for combo in itertools.product(*allowed): + classes = [0, 0, 0] + for t in range(v): + i = combo[t].bit_length() - 1 + classes[i] |= 1 << t + val = mas[classes[0]] + mas[classes[1]] + mas[classes[2]] + if val > best: + best, best_map = val, combo + else: + rng = random.Random(seed) + for _ in range(exhaustive_cap): + combo = tuple(a[rng.randrange(len(a))] for a in allowed) + classes = [0, 0, 0] + for t in range(v): + i = combo[t].bit_length() - 1 + classes[i] |= 1 << t + val = mas[classes[0]] + mas[classes[1]] + mas[classes[2]] + if val > best: + best, best_map = val, combo + return best, best_map, exhaustive, prod + + +# --------------------------------------------------------- cert engine +# (PR 2717's exact-completion engine design (Aaron Wang), adapted: for fixed +# a-labels the completion over b-labels, order and kept set is exact by +# subset DP.) + +def span_add(basis, x): + pivots = {} + for r in list(basis) + [x]: + while r: + p = r.bit_length() - 1 + if p in pivots: + r ^= pivots[p] + else: + pivots[p] = r + break + return tuple(sorted(pivots.values(), reverse=True)) + + +def completion(mod, a): + """Exact completion over b-labels/order/kept set for fixed a-labels. + Returns (best size, witness dict or None).""" + v = mod["v"] + sg = mod["sg"] + inm, _ = digraph_tables(v, mod["arcs"]) + blockers = [inm[t] for t in range(v)] + bex = {} + basis_tab = [dict() for _ in range(v)] + b_all = [[b for b in range(8) if (b & ~sg[t]) == 0] for t in range(v)] + + def b_exists(t, basis): + key = (t, basis) + if key in bex: + return bex[key] + for b in b_all[t]: + if dot1(a[t], b) != 1: + continue + if all(dot1(x, b) == 0 for x in basis): + bex[key] = (True, b) + return bex[key] + bex[key] = (False, 0) + return bex[key] + + def basis_of(t, T): + d = basis_tab[t] + if T in d: + return d[T] + if T == 0: + d[0] = () + return () + b = T & -T + s = b.bit_length() - 1 + prev = basis_of(t, T ^ b) + val = span_add(prev, a[s]) if (blockers[t] & b) else prev + d[T] = val + return val + + n = 1 << v + feas = [False] * n + feas[0] = True + choice = [-1] * n + for T in range(1, n): + U = T + while U: + b = U & -U + t = b.bit_length() - 1 + rest = T ^ b + if feas[rest]: + ok, _bv = b_exists(t, basis_of(t, rest)) + if ok: + feas[T] = True + choice[T] = t + break + U ^= b + best = max(T for T in range(n) if feas[T]) + if best == 0: + return 0, None + kept = [] + bvec = [0] * v + T = best + while T: + t = choice[T] + _ok, bv = b_exists(t, basis_of(t, T ^ (1 << t))) + bvec[t] = bv + kept.append(t) + T ^= 1 << t + kept.reverse() + return best.bit_count(), dict(a=list(a), b=bvec, order=list(kept), + kept=list(kept)) + + +def completion_box(mod, ad, a): + """Completion with every b-label restricted to b(t) subset of b0(t). + Used for the sub-anchor-box value (new here).""" + v = mod["v"] + b0 = ad["b0"] + inm, _ = digraph_tables(v, mod["arcs"]) + blockers = [inm[t] for t in range(v)] + bex = {} + basis_tab = [dict() for _ in range(v)] + b_all = [[b for b in range(8) if (b & ~b0[t]) == 0] for t in range(v)] + + def b_exists(t, basis): + key = (t, basis) + if key in bex: + return bex[key] + for b in b_all[t]: + if dot1(a[t], b) != 1: + continue + if all(dot1(x, b) == 0 for x in basis): + bex[key] = (True, b) + return bex[key] + bex[key] = (False, 0) + return bex[key] + + def basis_of(t, T): + d = basis_tab[t] + if T in d: + return d[T] + if T == 0: + d[0] = () + return () + b = T & -T + s = b.bit_length() - 1 + prev = basis_of(t, T ^ b) + val = span_add(prev, a[s]) if (blockers[t] & b) else prev + d[T] = val + return val + + n = 1 << v + feas = [False] * n + feas[0] = True + choice = [-1] * n + for T in range(1, n): + U = T + while U: + b = U & -U + t = b.bit_length() - 1 + rest = T ^ b + if feas[rest]: + ok, _bv = b_exists(t, basis_of(t, rest)) + if ok: + feas[T] = True + choice[T] = t + break + U ^= b + best = max(T for T in range(n) if feas[T]) + if best == 0: + return 0, None + kept = [] + bvec = [0] * v + T = best + while T: + t = choice[T] + _ok, bv = b_exists(t, basis_of(t, T ^ (1 << t))) + bvec[t] = bv + kept.append(t) + T ^= 1 << t + kept.reverse() + return best.bit_count(), dict(a=list(a), b=bvec, order=list(kept), + kept=list(kept)) + + +def replay_witness(mod, wit): + """Independent replay: supports, K_tt = 1 on kept, order constraints.""" + v, M = mod["v"], mod["M"] + a, b = wit["a"], wit["b"] + kept = list(wit["kept"]) + order = list(wit["order"]) + if sorted(order) != sorted(kept): + return False + for t in kept: + if (a[t] & ~mod["pi"][t]) or (b[t] & ~mod["sg"][t]): + return False + if dot1(a[t], b[t]) != 1: + return False + pos = {t: i for i, t in enumerate(order)} + for t in kept: + for s in kept: + if t == s: + continue + if M[t][s] == 0 and pos[t] < pos[s]: + if dot1(a[t], b[s]) != 0: + return False + return True + + +def in_box(mod, ad, wit): + """Every kept label pair is a sub-anchor pair: a(t) subset of a0(t) and + b(t) subset of b0(t). Returns (all_in_box, escape_lines).""" + esc = [] + for t in wit["kept"]: + if (wit["a"][t] & ~ad["a0"][t]) or (wit["b"][t] & ~ad["b0"][t]): + esc.append(t) + return (not esc), esc + + +def cert_exact(mod, max_v=6): + """Exact cert by exhaustive a-enumeration (small v only).""" + v = mod["v"] + if v > max_v: + return None, None + choices = [[m for m in range(8) if (m & ~mod["pi"][t]) == 0] + for t in range(v)] + best, best_wit = -1, None + for combo in itertools.product(*choices): + val, wit = completion(mod, list(combo)) + if val > best: + best, best_wit = val, wit + return best, best_wit + + +def box_exact(mod, ad, max_v=6): + """Exact sub-anchor-box value: exhaustive a-subsets of a0 with the + b-side completed inside b0 (small v only).""" + v = mod["v"] + if v > max_v: + return None, None + choices = [] + for t in range(v): + subs = [m for m in range(8) if (m & ~ad["a0"][t]) == 0] + subs = [m for m in subs + if any(dot1(m, b) == 1 and (b & ~ad["b0"][t]) == 0 + for b in range(8))] + choices.append(subs) + best, best_wit = -1, None + for combo in itertools.product(*choices): + val, wit = completion_box(mod, ad, list(combo)) + if val > best: + best, best_wit = val, wit + return best, best_wit + + +def cert_hillclimb(mod, iters=400, seed=1234, box=False, ad=None): + """Bounded deterministic hill-climb over a-labels with exact completion. + box=True restricts both sides to the sub-anchor box.""" + v = mod["v"] + rng = random.Random(seed) + if box: + choices = [[m for m in range(8) if (m & ~ad["a0"][t]) == 0] + for t in range(v)] + comp = lambda a: completion_box(mod, ad, a) # noqa: E731 + else: + choices = [[m for m in range(8) if (m & ~mod["pi"][t]) == 0] + for t in range(v)] + comp = lambda a: completion(mod, a) # noqa: E731 + a = [c[rng.randrange(len(c))] for c in choices] + best, best_wit = comp(a) + cur = list(a) + for _ in range(iters): + t = rng.randrange(v) + old = cur[t] + new = choices[t][rng.randrange(len(choices[t]))] + if new == old: + continue + cur[t] = new + val, wit = comp(cur) + if val >= best: + best, best_wit = val, wit + else: + cur[t] = old + return best, best_wit + + +# ----------------------------------------------- chain machinery (falsifier) +# (PR 2717/2901 lineage) + +def gf2_rank(rows): + pivots = {} + for x in rows: + while x: + p = x.bit_length() - 1 + if p in pivots: + x ^= pivots[p] + else: + pivots[p] = x + break + return len(pivots) + + +def chain_cost(mod, B): + P, Q, v = mod["P"], mod["Q"], mod["v"] + total = 0 + for j in range(3): + R = [t for t in range(v) if P[t][j] != 0] + A = [s for s in range(v) if Q[s][j] != 0] + rows = [] + for t in R: + mask = 0 + for s in A: + if B[t][s]: + mask |= 1 << A.index(s) + rows.append(mask) + total += gf2_rank(rows) + return total + + +def admissible(mod, B): + v, M = mod["v"], mod["M"] + for t in range(v): + if B[t][t] != 1: + return False + for s in range(v): + if t != s and B[t][s] == 1 and M[t][s] != 0: + return False + return True + + +def chain_scan(mod, threshold, seed=99, tries=3000): + """Bounded deterministic scan for an admissible B with chain cost below + the threshold (the falsifier criterion of PR 2901).""" + v = mod["v"] + rng = random.Random(seed) + best, best_cost, hit = None, None, False + for _ in range(tries): + B = [[0] * v for _ in range(v)] + for t in range(v): + B[t][t] = 1 + for s in range(v): + if t != s and mod["M"][t][s] == 0 and rng.randrange(2): + B[t][s] = 1 + if not admissible(mod, B): + continue + cc = chain_cost(mod, B) + if best_cost is None or cc < best_cost: + best, best_cost = B, cc + if cc < threshold: + hit = True + break + return best_cost, best, hit + + +# ------------------------------- named label forms and the ladder (NEW here) +# +# The named families of PR 2901 (Lemma SG anchor, Lemma MX one-sided +# repairs, Lemma MP matched pivots, Lemma CL3 insertion mixings) all build +# their certificates from per-line labels of three forms: (a0(t), b0(t)), +# (a*(t), b0(t)) with a* . b0(t) = 1, or (e_c, e_c) with c in D(t). Call +# their union the Form-R space. For ANY fixed label assignment (a, b) its +# exact certificate value is MAS(D_K[good]) where D_K is the conflict +# digraph and good = {t : K_tt = 1}; so the Form-R maximum is a rigorous +# upper bound on the PR 2901 named value and a lower bound on cert(M). +# +# Ladder per instance: MP <= named_lo <= named <= form_r <= box <= cert +# named_lo = max(MP, |S_gamma|) (PR 2901's cheap rung) +# named = PR 2901's family value (<= form_r, proved above) +# form_r = max over Form-R labels (NEW upper bound on named) +# box = max over a(t) subset of a0(t), b(t) subset of b0(t) (NEW) +# cert = max over all labels. + +def ab_value(mod, a, b): + """Exact certificate value of a fixed label assignment: the largest kept + set with K_tt = 1 and every conflict pointing backward in some order.""" + v, M = mod["v"], mod["M"] + good = 0 + inm = [0] * v + for t in range(v): + if dot1(a[t], b[t]) == 1: + good |= 1 << t + for t in range(v): + for s in range(v): + if t != s and M[t][s] == 0 and dot1(a[t], b[s]) == 1: + inm[s] |= 1 << t + n = 1 << v + acyc = [False] * n + acyc[0] = True + best = 0 + for S in range(1, n): + if S & ~good: + continue + ok = False + T = S + while T: + x = T & -T + t = x.bit_length() - 1 + if (inm[t] & S) == 0 and acyc[S ^ x]: + ok = True + break + T ^= x + acyc[S] = ok + if ok and S.bit_count() > best: + best = S.bit_count() + return best + + +def form_r_options(mod, ad, t): + """The named-form label pairs on line t (deduplicated): anchor (a0, b0), + one-sided repairs (a*, b0) with a* . b0(t) = 1, matched pivots (e_c, e_c).""" + opts = {(ad["a0"][t], ad["b0"][t])} + for a in range(8): + if (a & ~mod["pi"][t]) == 0 and dot1(a, ad["b0"][t]) == 1: + opts.add((a, ad["b0"][t])) + for j in range(3): + if mod["D"][t] & (1 << j): + opts.add((1 << j, 1 << j)) + return sorted(opts) + + +def form_r_max(mod, ad, exhaustive_cap=300000, iters=250, seed=4242): + """Max of ab_value over the Form-R label space. Exact when the product of + per-line option counts is within the cap; deterministic hill-climb + otherwise (lower bound, flagged).""" + v = mod["v"] + opts = [form_r_options(mod, ad, t) for t in range(v)] + prod = 1 + for o in opts: + prod *= len(o) + best, best_wit = -1, None + + def take(combo): + nonlocal best, best_wit + a = [c[0] for c in combo] + b = [c[1] for c in combo] + val = ab_value(mod, a, b) + if val > best: + best = val + best_wit = dict(a=list(a), b=b, order=list(range(v)), kept=[]) + return val + + exhaustive = prod <= exhaustive_cap + if exhaustive: + for combo in itertools.product(*opts): + take(combo) + else: + rng = random.Random(seed) + cur = [o[rng.randrange(len(o))] for o in opts] + take(cur) + for _ in range(iters): + t = rng.randrange(v) + old = cur[t] + new = opts[t][rng.randrange(len(opts[t]))] + if new == old: + continue + cur[t] = new + val = take(cur) + if val < best: + cur[t] = old + # materialize a replayable witness for the best assignment: kept set is + # the largest acyclic conflict subset; order is a backward topological + # order of the conflicts (sink-first). + a = best_wit["a"] + b = best_wit["b"] + v_, M = mod["v"], mod["M"] + good = [t for t in range(v_) if dot1(a[t], b[t]) == 1] + inm = [0] * v_ + for t in good: + for s in good: + if t != s and M[t][s] == 0 and dot1(a[t], b[s]) == 1: + inm[s] |= 1 << t + S = 0 + for t in good: + S |= 1 << t + acyc = [False] * (1 << v_) + acyc[0] = True + for X in range(1, 1 << v_): + if X & ~S: + continue + ok = False + Tm = X + while Tm: + x = Tm & -Tm + t = x.bit_length() - 1 + if (inm[t] & X) == 0 and acyc[X ^ x]: + ok = True + break + Tm ^= x + acyc[X] = ok + bestS, bestN = 0, -1 + for X in range(1, 1 << v_): + if (X & ~S) == 0 and acyc[X] and X.bit_count() > bestN: + bestS, bestN = X, X.bit_count() + order = [] + rem = bestS + while rem: + sinks = [t for t in range(v_) if (rem >> t) & 1 and (inm[t] & rem) == 0] + t = min(sinks) + order.append(t) + rem ^= 1 << t + order.reverse() + best_wit = dict(a=a, b=b, order=order, kept=list(order)) + return best, best_wit, exhaustive, prod + + +def box_witness_from(mod, ad, a, b, order): + return dict(a=list(a), b=list(b), order=list(order), kept=list(order)) + + +def diff_labels(mod, ad, wit): + """Classify each kept line's label pair against the named forms and the + sub-anchor box (PR 2901 open question 2, first step).""" + rows = [] + for t in wit["kept"]: + a, b = wit["a"][t], wit["b"][t] + anchor = (a, b) == (ad["a0"][t], ad["b0"][t]) + repair = (b == ad["b0"][t] and dot1(a, b) == 1 + and (a & ~mod["pi"][t]) == 0) + pivot = a == b and a in (1, 2, 4) and (mod["D"][t] & a) != 0 + inbox = (a & ~ad["a0"][t]) == 0 and (b & ~ad["b0"][t]) == 0 + if anchor: + kind = "ANCHOR" + elif repair: + kind = "REPAIR" + elif pivot: + kind = "PIVOT" + elif inbox: + kind = "BOX-INTERIOR" + else: + kind = "BOX-ESCAPE" + rows.append(dict(t=t, a=a, b=b, a0=ad["a0"][t], b0=ad["b0"][t], + tau=ad["tau"][t], D=mod["D"][t], kind=kind)) + return rows + + +def named_exact_small(mod, ad, mas, acyc, cap=400000, scan_iters=None): + """Exact PR 2901 named value on small instances: max over the union of + the named families' constructions (Lemma SG anchor |S_gamma|, Lemma MP + matched pivots, Lemma MX one-sided-repair constructions with their two + exact hypothesis sets, Lemma CL3 insertion mixings - whose value for its + label forms is exactly ab_value). Returns (named, detail). Large + construction spaces fall back to a deterministic bounded scan (the + detail flags exactness).""" + v = mod["v"] + if scan_iters is None: + scan_iters = 20000 if v <= 13 else 300 + mp, _m, _e, _p = matched_pivot(mod, mas) + best = max(mp, len(ad["reach"])) + detail = dict(MP=mp, reach=len(ad["reach"]), mx=None, cl3=None, + exhaustive=True, product=0) + # per-line options for the MX construction space: ('A'), ('U', a*), + # ('T', c-bit) + opts = [] + for t in range(v): + o = [("A", 0)] + for a in range(8): + if (a & ~mod["pi"][t]) == 0 and dot1(a, ad["b0"][t]) == 1 \ + and a != ad["a0"][t]: + o.append(("U", a)) + for j in range(3): + if mod["D"][t] & (1 << j): + o.append(("T", 1 << j)) + opts.append(o) + prod = 1 + for o in opts: + prod *= len(o) + detail["product"] = prod + M = mod["M"] + + def mx_eval(combo): + A = [t for t in range(v) if combo[t][0] == "A"] + U = [t for t in range(v) if combo[t][0] == "U"] + T = [t for t in range(v) if combo[t][0] == "T"] + for t in A: + if not (mod["M"][t][t] != 0 and ad["tau"][t] % 2 == 1): + return None # Lemma MX: every t in A has K0_tt = 1 + classes = [0, 0, 0] + cval = [0] * v + for t in T: + c = combo[t][1] + cval[t] = c + classes[c.bit_length() - 1] |= 1 << t + val = len(A) + len(U) + mas[classes[0]] + mas[classes[1]] \ + + mas[classes[2]] + # (A-first) (i): for t in U: a* . b0(s) = 0 for s in A+U with + # M_ts = 0, and no pivot bit c(s) set in a* for s in T with M_ts = 0; + # (ii): no c(s) set in a0(t) for t in A, s in T with M_ts = 0. + ok_a = True + for t in U: + a_star = combo[t][1] + for s in A + U: + if M[t][s] == 0 and dot1(a_star, ad["b0"][s]) != 0: + ok_a = False + for s in T: + if M[t][s] == 0 and (a_star & cval[s]) != 0: + ok_a = False + for t in A: + for s in T: + if M[t][s] == 0 and (ad["a0"][t] & cval[s]) != 0: + ok_a = False + # (T-first) (i')/(ii') + ok_t = True + for t in U: + a_star = combo[t][1] + for s in A + U: + if M[t][s] == 0 and dot1(a_star, ad["b0"][s]) != 0: + ok_t = False + for t in T: + for s in A + U: + if M[s][t] == 0 and (cval[t] & ad["b0"][s]) != 0: + ok_t = False + return val if (ok_a or ok_t) else None + + if prod <= cap: + mx_best = 0 + for combo in itertools.product(*opts): + val = mx_eval(combo) + if val is not None and val > mx_best: + mx_best = val + detail["mx"] = mx_best + best = max(best, mx_best) + else: + detail["exhaustive"] = False + rng = random.Random(31337) + mx_best = 0 + best_cur = None + # structured seeds (pure matched-pivot maps always satisfy both MX + # forms; the greedy walk below gets stuck in hypothesis-failing + # mixed assignments without them) + seeds = [[("A", 0)] * v] + for j in range(3): + seeds.append([("T", (1 << j)) if (mod["D"][t] & (1 << j)) + else ("T", 1 << (mod["D"][t].bit_length() - 1)) + for t in range(v)]) + mp0, mpmap0, _e0, _p0 = matched_pivot(mod, mas) + if mpmap0 is not None: + seeds.append([("T", mpmap0[t]) for t in range(v)]) + for s0 in seeds: + val = mx_eval(s0) + if val is not None and val > mx_best: + mx_best, best_cur = val, list(s0) + cur = list(best_cur) if best_cur is not None \ + else [o[rng.randrange(len(o))] for o in opts] + since_restart = 0 + for _ in range(scan_iters): + if since_restart >= 4 * v: + since_restart = 0 + if best_cur is not None and rng.randrange(2): + cur = list(best_cur) + else: + cur = [o[rng.randrange(len(o))] for o in opts] + since_restart += 1 + t = rng.randrange(v) + old = cur[t] + cur[t] = opts[t][rng.randrange(len(opts[t]))] + val = mx_eval(cur) + if val is None or val < mx_best: + cur[t] = old + elif val > mx_best: + mx_best = val + best_cur = list(cur) + detail["mx"] = mx_best + best = max(best, mx_best) + # CL3 value for its label forms (anchor (a0,b0) on A, matched pivots): + # exact ab_value over the combined forms, small product only. + cl3_opts = [[(ad["a0"][t], ad["b0"][t], "A")] + + [((1 << j), (1 << j), "T") for j in range(3) + if mod["D"][t] & (1 << j)] + for t in range(v)] + cl3_prod = 1 + for o in cl3_opts: + cl3_prod *= len(o) + cl3_best = 0 + if cl3_prod <= cap: + for combo in itertools.product(*cl3_opts): + a = [c[0] for c in combo] + b = [c[1] for c in combo] + val = ab_value(mod, a, b) + if val > cl3_best: + cl3_best = val + else: + rng = random.Random(4242) + cur = [o[rng.randrange(len(o))] for o in cl3_opts] + for _ in range(scan_iters): + t = rng.randrange(v) + old = cur[t] + cur[t] = cl3_opts[t][rng.randrange(len(cl3_opts[t]))] + a = [c[0] for c in cur] + b = [c[1] for c in cur] + val = ab_value(mod, a, b) + if val < cl3_best: + cur[t] = old + elif val > cl3_best: + cl3_best = val + detail["exhaustive"] = False + detail["cl3"] = cl3_best + best = max(best, cl3_best) + return best, detail + + +def settle_ladder(mod, ad, mas, acyc, exact=False, engine_iters=150, + provided_cert_wit=None, label=""): + """One ladder record: all rungs, the gap decomposition, and the armed + falsifier criterion (exact cert below threshold where exhaustive, or an + explicit admissible B with chain cost below threshold). exact=True runs + the exhaustive Form-R / box / cert rungs (small v); otherwise the engine + rungs are deterministic hill-climbs (lower bounds) and provided_cert_wit + (e.g. a stored witness) is used as the cert rung on large instances.""" + v = mod["v"] + thr = (2 * v) // 3 + mp, mpmap, mp_exh, mp_prod = matched_pivot(mod, mas) + named_lo = max(mp, len(ad["reach"])) + fr_val, fr_wit, fr_exh, fr_prod = form_r_max( + mod, ad, exhaustive_cap=(300000 if exact else 0)) + assert fr_wit is not None and replay_witness(mod, fr_wit), "form-R witness" + if exact: + bx_val, bx_wit = box_exact(mod, ad, max_v=6) + ce_val, ce_wit = cert_exact(mod, max_v=6) + bx_exact, ce_exact = True, True + else: + if v > 13: + bx_val, bx_wit = None, None + else: + bx_val, bx_wit = cert_hillclimb(mod, iters=engine_iters, seed=2024, + box=True, ad=ad) + if provided_cert_wit is not None: + ce_wit = provided_cert_wit + ce_val = len(ce_wit["kept"]) + elif v > 13: + ce_val, ce_wit = 0, None + else: + ce_val, ce_wit = cert_hillclimb(mod, iters=engine_iters, seed=2025) + bx_exact, ce_exact = False, False + if bx_wit is not None: + assert replay_witness(mod, bx_wit), "box witness" + if ce_wit is not None: + assert replay_witness(mod, ce_wit), "engine witness" + named_val, named_detail = None, None + if exact: + named_val, named_detail = named_exact_small(mod, ad, mas, acyc) + rec = dict(label=label, v=v, threshold=thr, k_cancel=len(ad["cancel"]), + reach=len(ad["reach"]), MP=mp, MP_exhaustive=mp_exh, + MP_product=mp_prod, named_lo=named_lo, + named=named_val, named_detail=named_detail, + form_r=fr_val, form_r_exhaustive=fr_exh, form_r_product=fr_prod, + box=bx_val, box_exact=bx_exact, + cert=ce_val, cert_exact=ce_exact, + gap_forms=(ce_val - fr_val), gap_pr=(ce_val - named_lo), + gap_named=((ce_val - named_val) if named_val is not None + else None), + named_ge_threshold=(named_lo >= thr), + forms_ge_threshold=(fr_val >= thr), + cert_ge_threshold=(ce_val >= thr)) + if ce_wit is not None: + inb, esc = in_box(mod, ad, ce_wit) + rec["cert_witness_in_box"] = inb + rec["cert_witness_box_escape"] = esc + rec["cert_witness_diff"] = diff_labels(mod, ad, ce_wit) + rec["falsifier"] = None + if rec["cert_exact"]: + if ce_val < thr: + rec["falsifier"] = "exact cert %d < threshold %d" % (ce_val, thr) + elif named_lo < thr or ce_val < thr: + cc, _B, hit = chain_scan(mod, thr) + rec["chain_scan_best"] = cc + if hit: + rec["falsifier"] = ("admissible B with chain cost %d < " + "threshold %d" % (cc, thr)) + return rec + + +# --------------------------------------------------------------- controls + +def brute_force_cert(mod): + """Cert from the definition: all labellings, all orders (tiny v only).""" + v, M = mod["v"], mod["M"] + choices = [[m for m in range(8) if (m & ~mod["pi"][t]) == 0] + for t in range(v)] + bchoices = [[m for m in range(8) if (m & ~mod["sg"][t]) == 0] + for t in range(v)] + best = 0 + for a in itertools.product(*choices): + for b in itertools.product(*bchoices): + for k in range(1, v + 1): + for sub in itertools.permutations(range(v), k): + ok = True + for i, t in enumerate(sub): + if dot1(a[t], b[t]) != 1: + ok = False + break + for s in sub[i + 1:]: + if M[t][s] == 0 and dot1(a[t], b[s]) != 0: + ok = False + break + if not ok: + break + if ok and k > best: + best = k + return best + + +def sparse_v3(seed): + """A tiny v = 3 decoder with sparse supports (for the brute-force + control). Deterministic small-integer factorization.""" + rng = random.Random(seed) + while True: + P = [tuple(rng.choice([0, 0, 0, 1, -1, 2]) for _ in range(3)) + for _ in range(3)] + Q = [tuple(rng.choice([0, 0, 0, 1, -1, 2]) for _ in range(3)) + for _ in range(3)] + try: + mod = model(P, Q) + except AssertionError: + continue + if max(mod["pi"][t].bit_count() for t in range(3)) <= 2: + return mod + + +def run_controls(): + # 1. exact cert vs brute force from the definition (3 sparse v = 3 cases) + agree = 0 + for seed in (11, 22, 33): + mod = sparse_v3(seed) + bf = brute_force_cert(mod) + ex, wit = cert_exact(mod, max_v=6) + assert ex == bf and wit is not None and replay_witness(mod, wit), \ + "cert_exact must agree with brute force at v = 3" + agree += 1 + # 2. corrupted witnesses must fail the independent replay + mod = sparse_v3(44) + ex, wit = cert_exact(mod, max_v=6) + bad = dict(a=list(wit["a"]), b=list(wit["b"]), order=list(wit["order"]), + kept=list(wit["kept"])) + bad["a"][bad["kept"][0]] = 0 # kills K_tt on a kept line + assert not replay_witness(mod, bad), "corrupted label must be rejected" + bad2 = dict(a=list(wit["a"]), b=list(wit["b"]), order=list(wit["order"]), + kept=list(wit["kept"])) + bad2["kept"] = bad2["kept"][1:] # kept/order mismatch + assert not replay_witness(mod, bad2), "corrupted kept set must be rejected" + # 3. ab_value is a sound rung: for random fixed labels it never exceeds + # the exact completion value for the same a-side + rng = random.Random(7) + sound = 0 + for seed in (55, 66): + m2 = sparse_v3(seed) + ad2 = anchor_data(m2) + tries = 0 + while sound < 10 and tries < 500: + tries += 1 + a = [rng.randrange(8) & m2["pi"][t] for t in range(m2["v"])] + b = [rng.randrange(8) & m2["sg"][t] for t in range(m2["v"])] + if any(dot1(a[t], b[t]) != 1 for t in range(m2["v"])): + continue + f_ab = ab_value(m2, a, b) + f_a, _w = completion(m2, a) + assert f_ab <= f_a, "ab_value must not exceed completion" + sound += 1 + # 4. restriction exactness: M[S,S] rows, nonzero diagonal, and the + # per-instance Lemma CT / scope identities on a sub-decoder + mod = load_model("tied_min.json") + S = [0, 2, 5, 7] + sub = restrict(mod, S) + for i, t in enumerate(S): + for j, s in enumerate(S): + assert sub["M"][i][j] == mod["M"][t][s], "restriction must be exact" + ads = anchor_data(sub) + assert tie_parity(sub, ads) and scope_identity(sub, ads), \ + "sub-decoder must satisfy the CT/scope identities" + # 5. diagonal decoder sanity: cert = v and MP = v + md = model([(1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0)], + [(1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 0, 1)]) + inm, _ = digraph_tables(md["v"], md["arcs"]) + mas = mas_table(md["v"], acyclic_table(md["v"], inm)) + mp, _mpmap, _e, _p = matched_pivot(md, mas) + ex, _w = cert_exact(md, max_v=6) + assert mp == 4 and ex == 4, "diagonal-style decoder must give 4" + print("PASS_FG_CONTROLS brute-force=%d/3 corrupted=2/2 ab-sound=%d " + "restriction=1/1 diagonal=1/1" % (agree, sound)) + + +# ------------------------------------------------------------- calibration + +def run_calibration(): + recs = {} + for name, want in (("tied_min.json", dict(mp=9, prod=4096, reach=[], + wit=11, chain=None)), + ("cex_min_1.json", dict(mp=16, prod=6144, + reach=[0, 4, 5, 6, 8, 11, 14, 15], + wit=18, chain=22))): + mod = load_model(name) + ad = anchor_data(mod) + assert tie_parity(mod, ad) and scope_identity(mod, ad), name + inm, _ = digraph_tables(mod["v"], mod["arcs"]) + acyc = acyclic_table(mod["v"], inm) + mas = mas_table(mod["v"], acyc) + mp, mpmap, exh, prod = matched_pivot(mod, mas) + assert exh and prod == want["prod"] and mp == want["mp"], \ + "%s MP must match the recorded anchors" % name + assert sorted(ad["reach"]) == want["reach"], "%s reach" % name + if name == "cex_min_1.json": + with open(os.path.join(DATA, "cex_min_1.witness.json"), "r", + encoding="utf-8") as fh: + sw = json.load(fh) + wit = dict(a=sw["a"], b=sw["b"], order=sw["order"], kept=sw["kept"]) + assert replay_witness(mod, wit) and len(wit["kept"]) == 18, \ + "cex_min_1 stored witness must replay at 18" + got = 18 + with open(os.path.join(DATA, "cex_min_1.B22.json"), "r", + encoding="utf-8") as fh: + B = json.load(fh) + if isinstance(B, dict): + B = B.get("B", B.get("pairing")) + assert admissible(mod, B), "stored pairing admissible" + cc = chain_cost(mod, B) + assert cc == want["chain"], "chain engine must reproduce 22" + else: + val, wit = cert_hillclimb(mod, iters=400, seed=1234) + assert wit is not None and replay_witness(mod, wit), name + got = val + assert got == want["wit"], \ + "tied_min hill-climb must re-find 11 (got %d)" % got + rows = diff_labels(mod, ad, wit) + inb, esc = in_box(mod, ad, wit) + kinds = {} + for r in rows: + kinds[r["kind"]] = kinds.get(r["kind"], 0) + 1 + recs[name] = dict(v=mod["v"], threshold=(2 * mod["v"]) // 3, + MP=mp, reach=len(ad["reach"]), + cancel=len(ad["cancel"]), witness=got, + in_box=inb, box_escape=esc, kinds=kinds, + diff=rows) + log("%s: MP=%d reach=%d witness=%d in_box=%s kinds=%s" + % (name, mp, len(ad["reach"]), got, inb, kinds)) + print("PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 mp=9/16 " + "chain=22 reach=0/12,8/19") + return recs + + +# -------------------------------------------- fixture ladder + form-R probes + +def run_fixture_ladder(): + """The ladder on both fixtures, plus the Form-R / box probes that answer + PR 2901 open question 2 (what do the attaining certificates use?).""" + out = {} + for name in ("tied_min.json", "cex_min_1.json"): + mod = load_model(name) + ad = anchor_data(mod) + inm, _ = digraph_tables(mod["v"], mod["arcs"]) + acyc = acyclic_table(mod["v"], inm) + mas = mas_table(mod["v"], acyc) + provided = None + if name == "cex_min_1.json": + with open(os.path.join(DATA, "cex_min_1.witness.json"), "r", + encoding="utf-8") as fh: + sw = json.load(fh) + provided = dict(a=sw["a"], b=sw["b"], order=sw["order"], + kept=sw["kept"]) + rec = settle_ladder(mod, ad, mas, acyc, exact=False, + engine_iters=(400 if name == "tied_min.json" + else 0), + provided_cert_wit=provided, label=name) + named_v, named_det = named_exact_small( + mod, ad, mas, acyc, + scan_iters=(20000 if name == "tied_min.json" else 300)) + rec["named_scan"] = named_v + rec["named_scan_detail"] = named_det + # probe: can the Form-R space alone reach the recorded witness value? + fr_deep, fr_wit, fr_exh, fr_prod = form_r_max( + mod, ad, exhaustive_cap=0, + iters=(800 if name == "tied_min.json" else 300), seed=909) + if fr_wit is not None and replay_witness(mod, fr_wit): + rec["form_r_deep"] = fr_deep + rec["form_r_deep_witness_in_box"] = in_box(mod, ad, fr_wit)[0] + rec["form_r_deep_witness_diff"] = diff_labels(mod, ad, fr_wit) + if name == "tied_min.json": + bx_deep, bx_wit = cert_hillclimb(mod, iters=400, seed=910, + box=True, ad=ad) + if bx_wit is not None and replay_witness(mod, bx_wit): + rec["box_deep"] = bx_deep + rec["box_deep_witness_in_box"] = in_box(mod, ad, bx_wit)[0] + ce_deep, ce_wit = cert_hillclimb(mod, iters=400, seed=911) + if ce_wit is not None and replay_witness(mod, ce_wit): + rec["cert_deep"] = ce_deep + rec["cert_deep_witness_in_box"] = in_box(mod, ad, ce_wit)[0] + rec["cert_deep_witness_diff"] = diff_labels(mod, ad, ce_wit) + out[name] = rec + log("fixture ladder %s: named_lo=%d form_r=%d box=%s cert=%d" % + (name, rec["named_lo"], rec["form_r"], rec["box"], rec["cert"])) + return out + + +# ------------------------------------------------------- sub-instance census + +def subsets_smallest_first(v, size, cap, stride=1): + """Deterministic enumeration of `size`-subsets of range(v), lexicographic, + thinned by a fixed stride when the count exceeds cap (the thinning and + the exact domain are recorded in CERTIFICATE.json).""" + all_subs = list(itertools.combinations(range(v), size)) + if len(all_subs) <= cap: + return all_subs, len(all_subs), False + step = max(1, len(all_subs) // cap) + picked = all_subs[::step][:cap] + return picked, len(all_subs), True + + +def run_census(): + """Smallest-first sub-decoder census of both fixtures. Sub-decoders are + exact 3-total decoders and inherit fixture-density zero digraphs (the + exact recorded generator obstruction of PR 2901). Cheap rungs on every + enumerated subset; the exact ladder (Form-R / box / cert exhaustive) on + every flagged subset (gap risk or falsifier risk), smallest first.""" + plan = [ + ("tied_min.json", 3, 240), ("tied_min.json", 4, 240), + ("tied_min.json", 5, 240), ("tied_min.json", 6, 60), + ("cex_min_1.json", 3, 240), ("cex_min_1.json", 4, 240), + ("cex_min_1.json", 5, 120), ("cex_min_1.json", 6, 50), + ] + deep_budget = {"n": 20, "v6": 1} + records = [] + domain = [] + falsifier = None + deep_done = 0 + for name, size, cap in plan: + mod = load_model(name) + subs, total, thinned = subsets_smallest_first(mod["v"], size, cap) + domain.append(dict(fixture=name, size=size, enumerated=len(subs), + total=total, thinned=thinned)) + flagged_here = 0 + for S in subs: + sub = restrict(mod, list(S)) + ad = anchor_data(sub) + assert tie_parity(sub, ad) and scope_identity(sub, ad) + inm, _ = digraph_tables(sub["v"], sub["arcs"]) + acyc = acyclic_table(sub["v"], inm) + mas = mas_table(sub["v"], acyc) + iters = 40 if size <= 4 else 120 + rec = settle_ladder(sub, ad, mas, acyc, exact=False, + engine_iters=iters, + label="%s|%s" % (name.split(".")[0], + ",".join(map(str, S)))) + risk = (not rec["cert_ge_threshold"]) or rec["gap_pr"] >= 1 \ + or rec["gap_forms"] >= 1 + if risk and rec["falsifier"] is None and size <= 5 \ + and deep_done < deep_budget["n"]: + deep = settle_ladder(sub, ad, mas, acyc, exact=True, + engine_iters=iters, + label=rec["label"] + "|deep") + rec = deep + deep_done += 1 + flagged_here += 1 + elif risk and size == 6 and deep_budget["v6"] > 0 \ + and rec["falsifier"] is None: + deep = settle_ladder(sub, ad, mas, acyc, exact=True, + engine_iters=300, + label=rec["label"] + "|deep6") + rec = deep + deep_budget["v6"] -= 1 + flagged_here += 1 + records.append(rec) + if rec["falsifier"] is not None: + falsifier = rec + log("FALSIFIER: %s" % rec["falsifier"]) + return records, domain, falsifier + log("census %s size=%d: %d enumerated (of %d%s), flagged/deep %d" + % (name, size, len(subs), total, + ", thinned" if thinned else "", flagged_here)) + return records, domain, falsifier + + +def summarize(records): + n = len(records) + gap2 = [r for r in records if r["gap_pr"] >= 2 or r["gap_forms"] >= 2 + or (r.get("gap_named") or 0) >= 2] + gap1 = [r for r in records if r["gap_pr"] >= 1 or r["gap_forms"] >= 1 + or (r.get("gap_named") or 0) >= 1] + named_gap = [r for r in records if r.get("gap_named") is not None] + below = [r for r in records if not r["cert_ge_threshold"]] + min_named_ratio = min( + (r["named_lo"] / r["v"]) for r in records) if records else 1.0 + exact_n = sum(1 for r in records if r["cert_exact"]) + max_gap_named = max((r["gap_named"] for r in named_gap), default=None) + return dict(records=n, exact_records=exact_n, gap2=len(gap2), + gap1=len(gap1), below_threshold=len(below), + min_named_ratio=round(min_named_ratio, 4), + falsifiers=sum(1 for r in records if r["falsifier"]), + exact_named_records=len(named_gap), + max_gap_named=max_gap_named, + gap2_records=gap2[:6], gap1_records=gap1[:10]) + + +def main(): + run_controls() + cal = run_calibration() + ladder = run_fixture_ladder() + records, domain, falsifier = run_census() + stats = summarize(records) + cert = dict( + package="research/fstar-family-gap-seed1c25f56f", + controls="PASS_FG_CONTROLS", + calibration="PASS_FG_CALIBRATION", + fixtures=cal, + fixture_ladder=ladder, + census_domain=domain, + census_stats=stats, + census_records=records, + falsifier=falsifier, + ) + blob = json.dumps(cert, sort_keys=True).encode("utf-8") + digest = hashlib.sha256(blob).hexdigest()[:16] + cert["digest"] = digest + with open(os.path.join(HERE, "CERTIFICATE.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump(cert, fh, indent=1, sort_keys=True) + fh.write("\n") + log("certificate digest %s" % digest) + print("PASS_FG_CENSUS records=%d exact=%d exact-named=%d gap1=%d gap2=%d " + "below-threshold=%d falsifiers=%d max-gap-named=%s" + % (stats["records"], stats["exact_records"], + stats["exact_named_records"], stats["gap1"], stats["gap2"], + stats["below_threshold"], stats["falsifiers"], + stats["max_gap_named"])) + if falsifier is not None: + print("PASS_FSTAR_FAMILY_GAP falsifier-realized") + else: + print("PASS_FSTAR_FAMILY_GAP no-falsifier-in-domain") + + +if __name__ == "__main__": + sys.stdout.reconfigure(encoding="utf-8") + main() diff --git a/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2936/receipt-tied_min-s11-deep.json b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2936/receipt-tied_min-s11-deep.json new file mode 100644 index 0000000000..736822efb9 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/predecessor/pr2936/receipt-tied_min-s11-deep.json @@ -0,0 +1,878 @@ +{ + "cap": 240, + "done_subsets": [ + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + ], + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 11 + ], + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 10, + 11 + ], + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 9, + 10, + 11 + ], + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 8, + 9, + 10, + 11 + ], + [ + 0, + 1, + 2, + 3, + 4, + 5, + 7, + 8, + 9, + 10, + 11 + ], + [ + 0, + 1, + 2, + 3, + 4, + 6, + 7, + 8, + 9, + 10, + 11 + ], + [ + 0, + 1, + 2, + 3, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + [ + 0, + 1, + 2, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + [ + 0, + 1, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + [ + 0, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ] + ], + "finished_utc": "2026-10-16T12:13:47Z", + "fixture": "tied_min.json", + "mode": "deep", + "records": [ + { + "MP": 9, + "S": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + ], + "box": 10, + "box_exact": false, + "box_product": 8589934592, + "cert": 10, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 45.72, + "falsifier": null, + "gap_box": 0, + "gap_named": 1, + "gap_pr": 1, + "k_cancel": 11, + "label": "tied_min|0,1,2,3,4,5,6,7,8,9,10", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 11 + ], + "box": 11, + "box_exact": true, + "box_exact_reason": "box witness of size v + ceiling", + "box_product": 8589934592, + "cert": 10, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 45.43, + "falsifier": null, + "gap_box": -1, + "gap_named": 1, + "gap_pr": 1, + "k_cancel": 11, + "label": "tied_min|0,1,2,3,4,5,6,7,8,9,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 10, + 11 + ], + "box": 10, + "box_exact": false, + "box_product": 8589934592, + "cert": 11, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 50.06, + "falsifier": null, + "gap_box": 1, + "gap_named": 2, + "gap_pr": 2, + "k_cancel": 11, + "label": "tied_min|0,1,2,3,4,5,6,7,8,10,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 9, + 10, + 11 + ], + "box": 11, + "box_exact": false, + "box_product": 8589934592, + "cert": 10, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 47.65, + "falsifier": null, + "gap_box": -1, + "gap_named": 1, + "gap_pr": 1, + "k_cancel": 11, + "label": "tied_min|0,1,2,3,4,5,6,7,9,10,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 8, + 9, + 10, + 11 + ], + "box": 10, + "box_exact": false, + "box_product": 8589934592, + "cert": 11, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 43.11, + "falsifier": null, + "gap_box": 1, + "gap_named": 2, + "gap_pr": 2, + "k_cancel": 11, + "label": "tied_min|0,1,2,3,4,5,6,8,9,10,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 0, + 1, + 2, + 3, + 4, + 5, + 7, + 8, + 9, + 10, + 11 + ], + "box": 10, + "box_exact": false, + "box_product": 8589934592, + "cert": 10, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 43.42, + "falsifier": null, + "gap_box": 0, + "gap_named": 1, + "gap_pr": 1, + "k_cancel": 11, + "label": "tied_min|0,1,2,3,4,5,7,8,9,10,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 0, + 1, + 2, + 3, + 4, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "box": 10, + "box_exact": false, + "box_product": 8589934592, + "cert": 11, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 43.54, + "falsifier": null, + "gap_box": 1, + "gap_named": 2, + "gap_pr": 2, + "k_cancel": 11, + "label": "tied_min|0,1,2,3,4,6,7,8,9,10,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 0, + 1, + 2, + 3, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "box": 11, + "box_exact": false, + "box_product": 8589934592, + "cert": 11, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 45.04, + "falsifier": null, + "gap_box": 0, + "gap_named": 2, + "gap_pr": 2, + "k_cancel": 11, + "label": "tied_min|0,1,2,3,5,6,7,8,9,10,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 0, + 1, + 2, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "box": 11, + "box_exact": false, + "box_product": 8589934592, + "cert": 10, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 46.22, + "falsifier": null, + "gap_box": -1, + "gap_named": 1, + "gap_pr": 1, + "k_cancel": 11, + "label": "tied_min|0,1,2,4,5,6,7,8,9,10,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 0, + 1, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "box": 11, + "box_exact": true, + "box_exact_reason": "box witness of size v + ceiling", + "box_product": 8589934592, + "cert": 11, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 47.56, + "falsifier": null, + "gap_box": 0, + "gap_named": 2, + "gap_pr": 2, + "k_cancel": 11, + "label": "tied_min|0,1,3,4,5,6,7,8,9,10,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 0, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "box": 10, + "box_exact": false, + "box_product": 8589934592, + "cert": 10, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 46.38, + "falsifier": null, + "gap_box": 0, + "gap_named": 1, + "gap_pr": 1, + "k_cancel": 11, + "label": "tied_min|0,2,3,4,5,6,7,8,9,10,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + }, + { + "MP": 9, + "S": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "box": 10, + "box_exact": false, + "box_product": 8589934592, + "cert": 9, + "cert_exact": false, + "cert_product": 8589934592, + "cert_witness_in_box": true, + "deep_s": 49.38, + "falsifier": null, + "gap_box": -1, + "gap_named": 0, + "gap_pr": 0, + "k_cancel": 11, + "label": "tied_min|1,2,3,4,5,6,7,8,9,10,11", + "mx_product": 1977326743, + "named": 9, + "named_detail": { + "MP": 9, + "cl3": 9, + "exhaustive": false, + "mx": 9, + "product": 1977326743, + "reach": 0 + }, + "named_exhaustive": false, + "named_lo": 9, + "reach": 0, + "tau": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "tau_min": 2, + "threshold": 7, + "v": 11 + } + ], + "size": 11, + "started_utc": "2026-10-16T11:29:06Z" +} diff --git a/research/fstar-gap2-v11-seed42ff0611/run_named_v11.py b/research/fstar-gap2-v11-seed42ff0611/run_named_v11.py new file mode 100644 index 0000000000..a39ccefda4 --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/run_named_v11.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python3 +"""KB5i bounded run (job 1 + job 2 inputs): EXACT named on the twelve open +tied_min v = 11 sub-decoders, with replayed construction witnesses, plus a +deterministic multi-seed witness regeneration for cert/box cross-checked +against PR 2936's stored values (predecessor/pr2936/receipt-*.json). + +Recorded evidence only: every value carries its status + exact - both sides settled (named is exact by construction here; cert/box + exact when a replayed witness hits the ceiling v or an exact rung) + lower - witnessed lower bound only. + +Writes data/named-v11-receipt.json. Stdlib, deterministic. +Run: python3 -B run_named_v11.py +""" +import importlib.util +import json +import os +import sys +import time + +T0 = time.time() +HERE = os.path.dirname(os.path.abspath(__file__)) +sys.path.insert(0, HERE) +import named_exact as ne # noqa: E402 + +fg = ne.fg +DATA = os.path.join(HERE, "predecessor", "pr2914", "data") +PR2936 = os.path.join(HERE, "predecessor", "pr2936", + "receipt-tied_min-s11-deep.json") + +# deterministic regeneration seeds: the deep run's own seeds first +# (census_v7_11.py used iters=400, box seed 910, cert seed 911), then extra +# deterministic restarts to look for ceiling witnesses +CERT_SEEDS = [(911, 400), (2025, 400), (1234, 400), (2026, 2000), + (42, 2000), (7, 2000), (13, 2000), (99, 2000), (31, 2000)] +BOX_SEEDS = [(910, 400), (2024, 400), (2026, 2000), (42, 2000), + (7, 2000), (13, 2000), (99, 2000), (31, 2000)] + + +def log(msg): + print("[%7.1fs] %s" % (time.time() - T0, msg), flush=True) + + +def load_sub(label): + fx = label.split("|")[0] + ".json" + mod0 = fg.model(*fg.load_decoder(os.path.join(DATA, fx))) + S = [int(x) for x in label.split("|")[1].split(",")] + return fg.restrict(mod0, S) + + +def tables(sub): + inm, _ = fg.digraph_tables(sub["v"], sub["arcs"]) + acyc = fg.acyclic_table(sub["v"], inm) + mas = fg.mas_table(sub["v"], acyc) + return mas, acyc + + +def best_witness(sub, ad, seeds, box): + """Deterministic multi-seed hill-climb; returns (value, witness, runs).""" + best, best_wit = -1, None + runs = [] + for seed, iters in seeds: + if box: + val, wit = fg.cert_hillclimb(sub, iters=iters, seed=seed, + box=True, ad=ad) + else: + val, wit = fg.cert_hillclimb(sub, iters=iters, seed=seed) + ok = wit is not None and fg.replay_witness(sub, wit) + runs.append(dict(seed=seed, iters=iters, value=val, replayed=ok)) + assert ok, "hill-climb witness must replay" + if val > best: + best, best_wit = val, wit + return best, best_wit, runs + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + with open(PR2936, encoding="utf-8") as fh: + stored = {r["label"]: r for r in json.load(fh)["records"]} + out = {} + for label in sorted(stored): + sub = load_sub(label) + ad = fg.anchor_data(sub) + mas, acyc = tables(sub) + v = sub["v"] + named, det = ne.named_exact(sub, ad, mas, acyc, cap=6000000) + wit = det["mx_detail"]["witness"] + replayed = ne.replay_mx_witness(sub, ad, mas, wit) + assert replayed == det["mx"], "mx witness replay" + mp, _m, mp_exh, mp_prod = fg.matched_pivot(sub, mas) + assert mp_exh and mp == det["MP"] == stored[label]["MP"] + r = stored[label] + ce, ce_wit, ce_runs = best_witness(sub, ad, CERT_SEEDS, box=False) + bx, bx_wit, bx_runs = best_witness(sub, ad, BOX_SEEDS, box=True) + ce_inb, ce_esc = fg.in_box(sub, ad, ce_wit) + bx_inb, _ = fg.in_box(sub, ad, bx_wit) + assert bx <= ce, "box witness exceeds cert witness" + cert_exact = ce >= v or bx >= v # ceiling; box <= cert always + cert_val = v if cert_exact else None + box_exact = bx >= v + rec = dict( + label=label, v=v, threshold=(2 * v) // 3, + named=named, named_exact=True, named_detail=dict( + MP=det["MP"], reach=det["reach"], mx=det["mx"], + cl3=det["cl3"], cl3_how=det["cl3_how"], + mx_coarse_product=det["mx_detail"]["coarse_product"]), + mx_witness=wit, mx_witness_replayed=True, + stored_cert=r["cert"], stored_box=r["box"], + stored_named=r["named"], + stored_cert_exact=r["cert_exact"], stored_box_exact=r["box_exact"], + cert_witness=ce_wit, cert_witness_value=ce, + cert_witness_replayed=True, + cert_witness_in_box=ce_inb, cert_witness_escapes_box=ce_esc, + cert_exact=cert_exact, cert=(cert_val if cert_exact else ce), + cert_status=("exact" if cert_exact else "lower"), + box_witness=bx_wit, box_witness_value=bx, + box_witness_replayed=True, box_witness_in_box=bx_inb, + box_exact=box_exact, + box=(v if box_exact else bx), box_status=("exact" if box_exact + else "lower"), + cert_runs=ce_runs, box_runs=bx_runs, + mx_product=r["mx_product"], + gap_named=(None if not cert_exact else cert_val - named), + gap_named_lo=(ce - named), + ) + out[label] = rec + log("%s: named=%d(exact) cert=%s(%s) box=%s(%s) gap=%s" % ( + label, named, rec["cert"], rec["cert_status"], rec["box"], + rec["box_status"], rec["gap_named"])) + with open(os.path.join(HERE, "data", "named-v11-receipt.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump(dict(records=out, generator="run_named_v11.py", + cert_seeds=CERT_SEEDS, box_seeds=BOX_SEEDS), + fh, indent=1, sort_keys=True) + fh.write("\n") + n2 = [l for l, r in out.items() if r["gap_named"] == 2] + log("gap_named = 2 PROVEN on %d records" % len(n2)) + print("PASS_NAMED_V11 records=%d named-exact=12 gap2-proven=%d" + % (len(out), len(n2))) + + +if __name__ == "__main__": + main() diff --git a/research/fstar-gap2-v11-seed42ff0611/test_named_exact.py b/research/fstar-gap2-v11-seed42ff0611/test_named_exact.py new file mode 100644 index 0000000000..44c89ac66e --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/test_named_exact.py @@ -0,0 +1,171 @@ +#!/usr/bin/env python3 +"""Tests for named_exact.py (KB5i). + +RED before GREEN: test_exact_named_on_the_12 fails against the vendored +scan-only predecessor (named is not exact on those records); it passes once +named_exact.py settles them. The agreement tests pin the port to the +vendored engine's own mx_eval semantics on the whole small domain. + +Run: python3 -B test_named_exact.py +""" +import json +import os +import random +import sys +import unittest + +sys.stdout.reconfigure(encoding="utf-8") +HERE = os.path.dirname(os.path.abspath(__file__)) +sys.path.insert(0, HERE) +import named_exact as ne # noqa: E402 + +fg = ne.fg +DATA = os.path.join(HERE, "predecessor", "pr2914", "data") +PR2936 = os.path.join(HERE, "predecessor", "pr2936", + "receipt-tied_min-s11-deep.json") + +TARGETS = [ + "tied_min|0,1,2,3,4,5,6,7,8,9,10", + "tied_min|0,1,2,3,4,5,6,7,8,9,11", + "tied_min|0,1,2,3,4,5,6,7,8,10,11", + "tied_min|0,1,2,3,4,5,6,7,9,10,11", + "tied_min|0,1,2,3,4,5,6,8,9,10,11", + "tied_min|0,1,2,3,4,5,7,8,9,10,11", + "tied_min|0,1,2,3,4,6,7,8,9,10,11", + "tied_min|0,1,2,3,5,6,7,8,9,10,11", + "tied_min|0,1,2,4,5,6,7,8,9,10,11", + "tied_min|0,1,3,4,5,6,7,8,9,10,11", + "tied_min|0,2,3,4,5,6,7,8,9,10,11", + "tied_min|1,2,3,4,5,6,7,8,9,10,11", +] + + +def load_sub(label): + fx = label.split("|")[0] + ".json" + mod0 = fg.model(*fg.load_decoder(os.path.join(DATA, fx))) + S = [int(x) for x in label.split("|")[1].split(",")] + return fg.restrict(mod0, S) + + +def tables(sub): + inm, _ = fg.digraph_tables(sub["v"], sub["arcs"]) + acyc = fg.acyclic_table(sub["v"], inm) + mas = fg.mas_table(sub["v"], acyc) + return mas, acyc + + +class TestPortAgreement(unittest.TestCase): + def test_mx_exact_matches_engine_exhaustive(self): + """mx_exact == the engine's own exhaustive mx_eval product max.""" + n = 0 + for fixture in ("tied_min.json", "cex_min_1.json"): + mod0 = fg.model(*fg.load_decoder(os.path.join(DATA, fixture))) + for size in (4, 5, 6): + subs, _n, _t = fg.subsets_smallest_first(mod0["v"], size, + 12, 3) + for S in subs: + sub = fg.restrict(mod0, list(S)) + ad = fg.anchor_data(sub) + mas, acyc = tables(sub) + ref, det = fg.named_exact_small( + sub, ad, mas, acyc, cap=3000000, scan_iters=0) + self.assertTrue(det["exhaustive"], + "reference must be exhaustive here") + mine, mdet = ne.mx_exact(sub, ad, mas, cap=3000000) + self.assertEqual(mine, det["mx"], + "mx mismatch at %s size %d" % (fixture, size)) + n += 1 + self.assertGreaterEqual(n, 20) + + def test_random_decoder_agreement(self): + rng = random.Random(777) + pool = [0, 0, 1, -1, 1, -1, 3, -3, 2, -2, 6, -6] + checked = 0 + while checked < 12: + v = 4 + P = [tuple(rng.choice(pool) for _ in range(3)) for _ in range(v)] + Q = [tuple(rng.choice(pool) for _ in range(3)) for _ in range(v)] + try: + mod = fg.model(P, Q) + except (AssertionError, ValueError): + continue + ad = fg.anchor_data(mod) + if not (fg.tie_parity(mod, ad) and fg.scope_identity(mod, ad)): + continue + mas, acyc = tables(mod) + ref, det = fg.named_exact_small(mod, ad, mas, acyc, + cap=3000000, scan_iters=0) + self.assertTrue(det["exhaustive"]) + mine, _ = ne.mx_exact(mod, ad, mas, cap=3000000) + self.assertEqual(mine, det["mx"], "mx mismatch on random decoder") + checked += 1 + + def test_cl3_equals_mp_at_even_tau(self): + for label in TARGETS[:4]: + sub = load_sub(label) + ad = fg.anchor_data(sub) + mas, acyc = tables(sub) + mp, _m, exh, _p = fg.matched_pivot(sub, mas) + self.assertTrue(exh) + self.assertTrue(all(x % 2 == 0 for x in ad["tau"])) + self.assertEqual(ne._cl3_brute(sub, ad), mp, + "CL3 != MP at even tau on %s" % label) + + +class TestTargets(unittest.TestCase): + def test_scan_is_not_exact_on_the_12(self): + """The recorded obstruction: the vendored scan cannot settle these.""" + with open(PR2936, encoding="utf-8") as fh: + rec = json.load(fh) + self.assertEqual(len(rec["records"]), 12) + for r in rec["records"]: + self.assertFalse(r["named_exhaustive"], r["label"]) + self.assertEqual(r["named"], 9, r["label"]) + + def test_exact_named_on_the_12(self): + """GREEN after named_exact.py: exact named + replayed witness.""" + with open(PR2936, encoding="utf-8") as fh: + rec = json.load(fh) + stored = {r["label"]: r for r in rec["records"]} + out = {} + for label in TARGETS: + sub = load_sub(label) + ad = fg.anchor_data(sub) + mas, acyc = tables(sub) + named, det = ne.named_exact(sub, ad, mas, acyc, cap=6000000) + self.assertTrue(det["exhaustive"], label) + self.assertGreaterEqual(named, 9, label) + self.assertLessEqual(named, 11, label) + wit = det["mx_detail"]["witness"] + self.assertIsNotNone(wit, label) + replayed = ne.replay_mx_witness(sub, ad, mas, wit) + self.assertEqual(replayed, det["mx"], + "witness replay mismatch on %s" % label) + r = stored[label] + self.assertEqual(det["MP"], r["MP"], label) + self.assertEqual(r["mx_product"], 1977326743, label) + self.assertLessEqual(r["named"], named, + "exact named must cover the scan value") + out[label] = dict(named=named, detail=det, + cert_stored=r["cert"], box_stored=r["box"]) + print(json.dumps({k: v["named"] for k, v in out.items()}, + indent=1, sort_keys=True)) + with open(os.path.join(HERE, "data", "named-v11-values.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump({k: dict(named=v["named"], + MP=v["detail"]["MP"], + reach=v["detail"]["reach"], + mx=v["detail"]["mx"], + cl3=v["detail"]["cl3"], + cl3_how=v["detail"]["cl3_how"], + mx_witness=v["detail"]["mx_detail"]["witness"], + mx_coarse_product=v["detail"]["mx_detail"]["coarse_product"], + cert_stored=v["cert_stored"], + box_stored=v["box_stored"]) + for k, v in out.items()}, + fh, indent=1, sort_keys=True) + fh.write("\n") + + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/research/fstar-gap2-v11-seed42ff0611/verify.py b/research/fstar-gap2-v11-seed42ff0611/verify.py new file mode 100644 index 0000000000..e5a47d4ccc --- /dev/null +++ b/research/fstar-gap2-v11-seed42ff0611/verify.py @@ -0,0 +1,246 @@ +#!/usr/bin/env python3 +"""KB5i registered replay: exact named on the twelve open tied_min v = 11 +sub-decoders (the recorded remainder of PR 2936), its cert/box cross-check, +and the bounded box-completeness attack. + +What this replay does (deterministic, stdlib, single process): + 1. verifies every vendored predecessor pin (byte-exact engine + fixtures + + PR 2936 remainder; predecessor/PINS.json); + 2. runs the vendored PR 2914 controls and calibration (reproduces every + recorded anchor: PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 + mp=9/16 chain=22 reach=0/12,8/19); + 3. RECOMPUTES the exact named value from scratch on all 12 records (the + coarse DP - it does not trust the receipts), replays the MX + construction witnesses, and asserts named = 9 exact and gap_named = 2 + with cert = 11 from replayed ceiling witnesses; + 4. cross-checks PR 2936's vendored stored values (MP, products, tau) and + counts the stored cert under-reports; + 5. independently replays every stored cert/box witness of + data/named-v11-receipt.json (supports, K_tt, order constraints, box + membership); + 6. re-runs the box-search core (the v = 2 tau = 0 BPP strictness + demonstration and a bounded deterministic sample of the 60 + fixture-density tau >= 1 instances) against + data/box-search-receipt.json; + 7. writes CERTIFICATE.json (newline="\\n") and prints PASS markers. + +Run: python3 -B verify.py +""" +import hashlib +import importlib.util +import json +import os +import sys +import time + +T0 = time.time() +HERE = os.path.dirname(os.path.abspath(__file__)) +sys.path.insert(0, HERE) +import named_exact as ne # noqa: E402 + +fg = ne.fg +DATA = os.path.join(HERE, "predecessor", "pr2914", "data") +PR2936_RECEIPT = os.path.join(HERE, "predecessor", "pr2936", + "receipt-tied_min-s11-deep.json") +spec = importlib.util.spec_from_file_location( + "box_attack", os.path.join(HERE, "predecessor", "pr2936", "box_attack.py")) +ba = importlib.util.module_from_spec(spec) +spec.loader.exec_module(ba) + + +def log(msg): + print("[%7.1fs] %s" % (time.time() - T0, msg), flush=True) + + +def sha256_file(path): + h = hashlib.sha256() + with open(path, "rb") as fh: + for chunk in iter(lambda: fh.read(65536), b""): + h.update(chunk) + return h.hexdigest() + + +def load_json(path): + with open(path, encoding="utf-8") as fh: + return json.load(fh) + + +def load_sub(label): + fx = label.split("|")[0] + ".json" + mod0 = fg.model(*fg.load_decoder(os.path.join(DATA, fx))) + S = [int(x) for x in label.split("|")[1].split(",")] + return fg.restrict(mod0, S) + + +def tables(sub): + inm, _ = fg.digraph_tables(sub["v"], sub["arcs"]) + acyc = fg.acyclic_table(sub["v"], inm) + mas = fg.mas_table(sub["v"], acyc) + return mas, acyc + + +def check_pins(): + pins = load_json(os.path.join(HERE, "predecessor", "PINS.json")) + n = 0 + for rel, want in sorted(pins["files"].items()): + p = os.path.join(HERE, "predecessor", *rel.split("/")) + got = sha256_file(p) + assert got == want, "pin mismatch: %s" % rel + n += 1 + assert pins["files"]["pr2914/data/tied_min.json"] == \ + "670ed90924b601ade22f0d4adaff46d1667e5449326a0f7ba7b88dd8f5906f93" + assert pins["files"]["pr2914/data/cex_min_1.json"] == \ + "86064701dde94b4f35427bc3e19275eaf1e40e9e90d4fea28e7857f3564d4dd7" + print("PASS_KB5I_PINS files=%d" % n) + return n + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + npins = check_pins() + fg.run_controls() + fg.run_calibration() + named_receipt = load_json(os.path.join(HERE, "data", + "named-v11-receipt.json")) + stored2936 = {r["label"]: r for r in load_json(PR2936_RECEIPT)["records"]} + labels = sorted(stored2936) + assert len(labels) == 12 + + # (3) recompute exact named from scratch on all 12 + cross-checks + named_vals = {} + under = 0 + for label in labels: + sub = load_sub(label) + ad = fg.anchor_data(sub) + mas, acyc = tables(sub) + assert fg.tie_parity(sub, ad) and fg.scope_identity(sub, ad) + named, det = ne.named_exact(sub, ad, mas, acyc, cap=6000000) + assert det["exhaustive"], label + wit = det["mx_detail"]["witness"] + assert wit is not None + assert ne.replay_mx_witness(sub, ad, mas, wit) == det["mx"], label + r2936 = stored2936[label] + assert det["MP"] == r2936["MP"], label + assert det["reach"] == r2936["reach"], label + assert det["mx_detail"]["coarse_product"] == 3 ** 11, label + assert r2936["mx_product"] == 1977326743, label + assert list(ad["tau"]) == r2936["tau"], label + assert len(ad["cancel"]) == r2936["k_cancel"], label + rec = named_receipt["records"][label] + assert rec["named"] == named == 9, label + assert rec["named_detail"]["mx"] == det["mx"], label + assert rec["named_detail"]["cl3"] == det["cl3"] == det["MP"], label + named_vals[label] = named + if r2936["cert"] < 11: + under += 1 + log("exact named recomputed: 12 records, all named = 9") + print("PASS_KB5I_NAMED records=12 named-exact=12 named=9x12 gap2-proven=12") + print("PASS_KB5I_CROSSCHECK stored-under-reports=%d" % under) + assert under == 7, "expected 7 stored cert under-reports, got %d" % under + + # (5) replay every stored witness of the named receipt + inbox = 0 + for label in labels: + sub = load_sub(label) + ad = fg.anchor_data(sub) + rec = named_receipt["records"][label] + cw = rec["cert_witness"] + assert fg.replay_witness(sub, cw), label + assert len(cw["kept"]) == 11 == rec["cert_witness_value"], label + inb, esc = fg.in_box(sub, ad, cw) + assert inb == rec["cert_witness_in_box"], label + inbox += 1 if inb else 0 + bw = rec["box_witness"] + assert fg.replay_witness(sub, bw), label + assert len(bw["kept"]) == 11 == rec["box_witness_value"], label + assert fg.in_box(sub, ad, bw)[0], label + assert rec["gap_named"] == 2 and rec["cert"] == 11 \ + and rec["box"] == 11 and rec["named"] == 9, label + print("PASS_KB5I_BOXREPLAY in-box=%d/12" % inbox) + + # (6) box-search core re-run against its receipt + bs = load_json(os.path.join(HERE, "data", "box-search-receipt.json")) + demo = bs["bpp_proven"] + P = [(1, 0, 1), (2, 1, 0)] + Q = [(1, 0, 0), (1, 0, 1)] + sub = fg.model(P, Q) + ad = fg.anchor_data(sub) + ce, cew = fg.cert_exact(sub, max_v=2) + assert fg.replay_witness(sub, cew) + from box_search import bpp_projection, bpp_conditions + val = fg.ab_value(sub, cew["a"], cew["b"]) + proj = bpp_projection(sub, ad, cew) + pval = fg.ab_value(sub, proj["a"], proj["b"]) + assert (val, pval) == (demo["witness_value"], demo["projected_value"]) \ + == (2, 1) + ok1, ok2 = bpp_conditions(sub, ad, cew) + assert (ok1, ok2) == (demo["condition_i"], demo["condition_ii"]) + bx, bxw = ba.box_exact_tolerant(sub, ad) + assert (ce, bx) == (2, 1) + swept = bs["sweep"] + assert len(swept) == 60 and bs["counterexample"] is None + assert all(r["gap_box"] == 0 and r["cert"] == r["box"] for r in swept) + sample = ([r for r in swept if r["v"] == 4] + + [r for r in swept if r["v"] == 5][:4] + + [r for r in swept if r["v"] == 6][:2]) + for r in sample: + sub = fg.model([tuple(x) for x in r["P"]], + [tuple(x) for x in r["Q"]]) + ad = fg.anchor_data(sub) + assert fg.tie_parity(sub, ad) and fg.scope_identity(sub, ad) + ce, cew = fg.cert_exact(sub, max_v=r["v"]) + bx, bxw = ba.box_exact_tolerant(sub, ad) + assert fg.replay_witness(sub, cew) + assert (ce, bx) == (r["cert"], r["box"]), r["S"] + assert ce == bx == r["v"], r["S"] + log("box-search core re-run: demo + %d sweep records" % len(sample)) + print("PASS_BOX_SEARCH bpp-strict-tau0=yes bpp-strict-tau1=no tau-ge1=60 " + "hard=0 box-violations=0") + + print("PASS_FSTAR_GAP2_V11 gap2-below-v12-confirmed") + + # (7) certificate + files = ["README.md", "TASK.json", "TASK-CARD.md", "named_exact.py", + "test_named_exact.py", "run_named_v11.py", "box_search.py", + "verify.py", "make_meta.py", + "data/named-v11-receipt.json", "data/box-search-receipt.json", + "predecessor/PINS.json"] + digests = {f: sha256_file(os.path.join(HERE, *f.split("/"))) for f in files} + cert = dict(schema_version=1, package="fstar-gap2-v11-seed42ff0611", + base_commit="991c50d1ea8ddb7cf88c1b4a45c7b409c02d38fb", + predecessor_pins=npins, + markers=["PASS_KB5I_PINS files=%d" % npins, + "PASS_FG_CONTROLS", "PASS_FG_CALIBRATION", + "PASS_KB5I_NAMED records=12 named-exact=12 " + "named=9x12 gap2-proven=12", + "PASS_KB5I_CROSSCHECK stored-under-reports=%d" % under, + "PASS_KB5I_BOXREPLAY in-box=%d/12" % inbox, + "PASS_BOX_SEARCH bpp-strict-tau0=yes " + "bpp-strict-tau1=no tau-ge1=60 hard=0 " + "box-violations=0", + "PASS_FSTAR_GAP2_V11 gap2-below-v12-confirmed"], + headline=dict( + named_exact=9, named_exact_records=12, + cert_exact=11, cert_exact_records=12, + box_exact=11, box_exact_records=12, + gap_named=2, gap_named_records=12, + verdict="gap_named = 2 EXISTS below v = 12 " + "(minimal exact gap-2 instance at v = 11)", + stored_cert_under_reports=under, + tau_ge1_sweep_instances=60, box_violations=0, + bpp_strict_tau0="PROVEN (v=2: 2 -> 1)", + bpp_strict_tau1="no drop in 21 escaping witnesses " + "(CHECKED bounded)"), + files=digests) + body = json.dumps(cert, indent=1, sort_keys=True) + digest = hashlib.sha256(body.encode("utf-8")).hexdigest()[:16] + cert["digest"] = digest + with open(os.path.join(HERE, "CERTIFICATE.json"), "w", encoding="utf-8", + newline="\n") as fh: + json.dump(cert, fh, indent=1, sort_keys=True) + fh.write("\n") + log("certificate digest %s" % digest) + + +if __name__ == "__main__": + main()