diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/CERTIFICATE.json b/research/fstar-boxfloor-minimal-seed758ae8fe/CERTIFICATE.json new file mode 100644 index 0000000000..98cbecb374 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/CERTIFICATE.json @@ -0,0 +1,29 @@ +{ + "certificate_digest": "fb29a75bde520732", + "digests": { + "README.md": "1003d77e3d9991ccbfaba9e8f6735d0eace7eb19276ddbdd9f4710c8832c4516", + "TASK-CARD.md": "ab37ad3d39b5359cf51dc09c293e74d10d0fc55deb5079b005e82083e4781adc", + "TASK.json": "241b28a33dc5c8eaac7ea480f8a0af1c219f13e3865ca1493a3a21ce92262319", + "anchor_replay.py": "6104a326cd35231f312a6fc134eb25a356f7b10f2178a58260d1f94dc5eaa925", + "box_floor_min.py": "81c3f1c12fc4e00d2ab8c22f70e88120396d77cc63f3c93a10f3a5540acf759b", + "data/km-receipt.json": "6e40c9ecd2d2c0fe82ef31f77014bda09b3ed2525dec8aa6553164ab5eaf4c20", + "data/pivot-v5-receipt.json": "9490d06c7041e58e6eeb8e032e13a008fed6cef88d8d129cc23e6e6543a038e9", + "make_meta.py": "cd27ce131c594c51579d6fd3321b7633cf3dff2b78a4d4149f4698c990252734", + "pivot_v5.py": "268d564f5608c48a5b51d654976bc717627d1829ef98449a0edf5bfc5532d80f", + "verify.py": "9547c904dc90f184f4d0bd41e2c3e2d40520c69f6f0cf6c33a29f213346d72c0" + }, + "markers": [ + "PASS_KM_PINS", + "PASS_KM_FALSIFIER_V2", + "PASS_KM_FALSIFIER_V3", + "PASS_KM_FALSIFIER_V3B", + "PASS_KM_FALSIFIER_V4", + "PASS_KM_LB2", + "PASS_KM_MIXEDTAU", + "PASS_KM_V3TAU1", + "PASS_KM_PIVOT_V5", + "PASS_KM_ALL" + ], + "package": "fstar-boxfloor-minimal-seed758ae8fe", + "schema_version": 1 +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/README.md b/research/fstar-boxfloor-minimal-seed758ae8fe/README.md new file mode 100644 index 0000000000..ade9cb9fdb --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/README.md @@ -0,0 +1,317 @@ +# F-star family gap: the box floor FAILS, minimally at v = 3 - and its exact surviving tau >= 1 form (no kappa) + +## Scope + +Kappa-blocker **KB5k** (authorized explicit open request from the +[handoff thread](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166); +scope changed from the drawn `portable-replay` card and recorded in +`TASK.json`): the **surviving box-floor route** to open problem **F-star** +(`cert(M) >= floor(2v/3)` for every exact 3-total rational decoder +`M = sum_{j<=3} p_j q_j^T` on `v` lines with `M_tt != 0`, +`research/root-unit-decoder-lemmas` section 7) - the recorded remainder of +[PR 2978](https://github.com/CrocSwap/integer-mult-bounds/pull/2978) (its +consequences section and open questions). PR 2978 proved `cert >= box` and +proposed the **box floor** `box(M) >= floor(2v/3)` as the surviving chain link +("a proof closes F-star directly"), scoped in its prose to the `tau >= 1` +domain. + +**Answer: the box floor, read over all exact 3-total rational decoders, is +FALSE - minimally so.** The minimal falsifier is a rank-3 decoder at `v = 3` +with `tau = (0,0,0)`: `cert = 3 >= 2 = floor(2v/3) > 0 = box`, both sides +exact. F-star itself is **not** proved and **not** refuted (every falsifier +has `cert >= floor(2v/3)`). On the `tau >= 1` domain the floor is **PROVEN for +`v <= 4`** (Lemma LB2 below) and its first open case is `v = 5` (threshold 3), +where a bounded exact search of 240 realizable decoders found 0 violations. +Every claim is labelled PROVEN / CHECKED / DEMOTED. + +## Verdict + +1. **PROVEN: `box = 0` iff every line has `tau = 0`** (Lemma K: a kept line + needs a tied bit). The box floor therefore fails at `v = 3` exactly when + fewer than two lines have `tau(t) >= 1`; the minimal falsifier has + `box = 0`, the minimum possible value. +2. **PROVEN: the minimal rank-3 falsifier is `v = 3`, `tau = (0,0,0)`.** Exact + integer decoder (int-only arithmetic): + + ```text + P = [[1, 1, 0], Q = [[2, 2, 1], + [1, 0, 1], [2, 1, 2], + [0, 1, 1]] [1, 2, 2]] + + M = P Q^T = I + 3 J = [[4,3,3],[3,4,3],[3,3,4]] det = 10, rank 3 + gamma = 0 c = (0,0,0) r_box = 3 tau = (0, 0, 0) + a0 = [3, 5, 6] b0 = [4, 2, 1] zero arcs: none + ``` + + Exact both sides: `cert = 3` (trivial upper bound `v`, attaining witness + replayed) > `2 = floor(2v/3)` > `0 = box` (PROVEN upper bound Lemma K; + independent definition-level enumeration over every in-box label + assignment). Minimal: rank 3 forces `v >= 3`, and no value below `box = 0` + exists. +3. **PROVEN: the whole failure gradient, exact both sides.** In the wide class + (rank `<= 3`, three totals) a rank-2 falsifier exists already at `v = 2` + (`tau = (0,0)`, `cert = 2 > 1 = floor(2v/3) > 0 = box`); at `v = 3` the + pattern `tau = (1,0,0)` gives `cert = 3 > 2 > 1 = box`; at `v = 4`, + `tau = (0,0,0,0)` gives `cert = 4 > 2 > 0 = box`. Each is a rank-checked + exact decoder with `M_tt != 0`, all three totals used, and its `cert`/`box` + recomputed by the vendored PR 2914 engine AND an independent enumeration + written from the definitions. +4. **PROVEN (Lemma LB2, two-line repair): any two lines with `tau >= 1` are + jointly box-keepable**, so `box >= min(2, #{t : tau(t) >= 1})`. Machine + replay of the explicit construction on 16,761 canonical `v = 3` configs + with at least two keepable lines (the full Lemma-SG-consistent + `(a0, b0, Z)` space up to line/total relabeling, **including** `tau = 0` + lines, which PR 2978 job B excluded) and on 160 random realizable decoders + at `v = 4..6`, 0 failures. +5. **CHECKED: the `tau >= 1` box floor is exact at `v = 3` and `v = 4`** + (threshold `<= 2`, Lemma LB2) and **bounded at `v = 5`** (threshold 3): + 240 realizable `tau >= 1` decoders (80 random valuation-tuned, 80 + extensions of PR 2978's counterexample core, 80 unit-role templates), 97 + of them with `r_box = 2`, every exact box `>= 3` (0 below threshold). + Bounded - **not** a non-existence result. +6. **CHECKED: recomputation of PR 2978 job B** (the vendored receipt ships + empty; everything recomputed from scratch): 3023 canonical `v = 3` + configs, 27 gap candidates, every candidate at exact `box = 2 = + floor(2v/3)` - so the `tau >= 1` minimum at `v = 3` is exactly the + threshold, with no margin. +7. **DEMOTED: the box-floor route as stated.** `box >= floor(2v/3)` is dead on + the full class and survives only on the `tau >= 1` domain, where it is + proved for `v <= 4` and open for `v >= 5`. The replacement lower-bound + picture is in "Consequences" below. F-star: **not proved, not refuted** + (`cert = v >= floor(2v/3)` on every falsifier here). + +## Lemma K (keepable lines) - PROVEN + +> **Lemma K.** A line `t` can be kept inside the sub-anchor box iff +> `tau(t) = |a0(t) intersect b0(t)| >= 1`. Consequently `box(M)` is `0` iff +> every line has `tau(t) = 0`, and `box(M) <= #{t : tau(t) >= 1}` always. + +*Proof.* A kept line needs in-box labels `a(t) subseteq a0(t)`, +`b(t) subseteq b0(t)` with `K_tt = a(t) dot b(t) = 1` mod 2, so +`a(t) intersect b(t)` is nonempty and contains a tied bit; conversely the tied +singleton `a(t) = b(t) = {j}` keeps `t` alone. QED + +## Lemma LB2 (two-line repair) - PROVEN + +> **Lemma LB2.** Any two lines `t, s` with `tau(t), tau(s) >= 1` are jointly +> box-keepable. Hence `box(M) >= min(2, #{t : tau(t) >= 1})`; in particular +> the box floor `box >= floor(2v/3)` holds at every `v` with +> `floor(2v/3) <= 2` as soon as two lines have `tau >= 1`. + +*Proof.* Pick tied bits `j in a0(t) intersect b0(t)` and +`k in a0(s) intersect b0(s)`. If some ordered pair is a nonzero arc, order the +two lines so the nonzero pair is forward: there is no forward zero arc and the +tied singletons `a = b = {j}`, `a = b = {k}` keep both lines (only `K_tt = 1` +is required). If both ordered pairs are zero arcs, order `t` before `s`. For +`j != k` the singletons give `K_ts = [j = k] = 0`. For `j = k` the scope +identity (Lemma SG) makes `|a0(t) intersect b0(s)|` even and `j` lies in that +set, so there is `r != j` with `r in a0(t) intersect b0(s)`; take +`a(t) = {j, r}`, `b(t) = {j}`, `a(s) = {j}`, `b(s) = {j, r}`. Then +`K_tt = K_ss = 1` and `K_ts = |{j, r} intersect {j, r}| = 0` mod 2. All labels +are in-box (each bit lies in the required `a0`/`b0` mask) and the backward +entry is unconstrained. QED + +The construction is machine-replayed from the definitions on every config and +instance named in verdict item 4 (a config where it fails is a refutation). + +## What controls the box: tau pattern, shareable count, zero arcs + +The shareable-class vocabulary of PR 2978 (Lemma RT + shareable-totals +corollary) supplies the matching upper bounds, and together with Lemmas K/LB2 +fixes the box at small `v`: + +- **tau pattern (lower side).** `box = 0` iff all `tau = 0` (Lemma K); + `box >= min(2, #{tau >= 1})` (Lemma LB2). By Lemma CT (tie parity) the + falsifiers are all-cancellation-line decoders (`tau` even everywhere, + `v2(M_tt) > gamma`): the box dies exactly in PR 2901's cancellation residue, + while `cert` there keeps its full value (`cert = v` on every falsifier here, + since the matched-pivot construction (Lemma MP) attains `v` when the zero + digraph is empty). +- **shareable count (upper side).** In the box only totals with `c_j = gamma` + can enter `K`, and a kept set whose forward pairs are all zero arcs has size + `<= r_box = |{j : c_j = gamma}|` (PR 2978 Lemma RT). So `r_box = 2` caps + such kept sets at 2 - the shape a `v = 5` falsifier would need - while + `r_box = 3` only admits rank-3 triangular obstructions. +- **tied totals (colour side).** The box version of Lemma MP: colour each line + by a tied bit `c(t) in a0(t) intersect b0(t)` and keep acyclic subsets of + each colour class (topological order kills same-colour forward zero arcs; + cross-colour entries vanish automatically). **Lemma TB (PROVEN):** + `box >= max_c sum_j MAS(Z[C_j])` over tied-bit colourings. This is exactly 0 + on `tau = 0` instances and recovers LB2 on two keepable lines. +- **zero arcs (shape of any remaining falsifier).** Lemma RT blocks one order + of a kept set `S` only when every forward pair of that order is a zero arc; + `S` is blocked in *every* order by rank only if `Z[S, S]` is complete (all + six ordered pairs zero arcs), and then `M[S, S]` is diagonal, so + `|S| <= rank(M) = 3`. Hence at `v = 5` a falsifier needs every 3-subset + blocked in every order: Z-complete triples for the rank route (`r_box <= 2` + necessary there) and bilinear infeasibility everywhere else. No such + instance was realized in the bounded search; this is the recorded + obstruction, not a proof of absence. + +## The minimal falsifiers, in detail + +Anchor data (canonical reduced normalization; engine-computed exactly): + +| instance | v | rank M | gamma | c | r_box | tau | a0 | b0 | threshold | cert | box | +|---|---|---|---|---|---|---|---|---|---|---|---| +| F2-wide | 2 | 2 | 0 | (0,0,0) | 3 | (0,0) | 3, 5 | 4, 2 | 1 | 2 | 0 | +| F3-tau0 | 3 | 3 | 0 | (0,0,0) | 3 | (0,0,0) | 3, 5, 6 | 4, 2, 1 | 2 | 3 | 0 | +| F3-tau1 | 3 | 3 | 0 | (0,0,1) | 2 | (1,0,0) | 3, 5, 6 | 1, 2, 1 | 2 | 3 | 1 | +| F4-tau0 | 4 | 3 | 0 | (0,0,0) | 3 | (0,0,0,0) | 3, 5, 6, 7 | 4, 2, 1, 0 | 2 | 4 | 0 | + +(`a0`/`b0` are bit masks over the three totals; `c_j = m_j + n_j`; +`threshold = floor(2v/3)`.) `F3-tau0` has `M = I + 3 J` (all off-diagonal +pairs nonzero, so its `cert` witness keeps all three lines in any order with +unit pairs `a = b = e_j` on distinct totals); `F3-tau1` has +`M = [[3,3,3],[5,4,3],[6,3,4]]`, `det = -12`. Every instance passes the tie +parity and scope identities, `M_tt != 0` everywhere, all three totals used, +and each `cert`/`box` pair is reproduced three ways (vendored engine exact +enumeration; independent definition-level enumeration over all label +assignments for the box side and for `cert` at `v <= 3`; written bounds +`cert <= v`, `box = min(2, #keepable)`). + +## What is proved, what is checked, what is demoted + +- **PROVEN (written proofs in this README):** Lemma K; Lemma LB2; Lemma TB + (tied-bit matched pivots inside the box); the four falsifiers with exact + `cert`/`box`, ranks and identities; minimality (`v >= 3` forced by rank 3 in + the exact-3-total class; `v = 2` minimal in the wide class; `box = 0` the + minimum value). +- **CHECKED (machine, exhaustive on the declared domains or replayed):** the + LB2 construction on 16,761 canonical `v = 3` configs and 160 random + realizable decoders `v = 4..6`; the mixed-`tau` formula + (`box = #keepable` for `#keepable <= 2`, `box >= min(2, #keepable)`) on 240 + realizable decoders `v = 3..4`; PR 2978 job B recomputed (3023 configs, 27 + candidates all exactly at `box = 2`); the `v = 5` `tau >= 1` pivot (240 + exact instances, 97 with `r_box = 2`, 0 below threshold - bounded); + predecessor anchors reproduced unchanged (see `anchor_replay.py`). +- **DEMOTED / OPEN:** the box floor on the full class is **refuted**, not + open; its `tau >= 1` form is open at `v >= 5` (first case `v = 5`, + threshold 3). Shareable-class completeness (PR 2978's 21 unrealized `v = 3` + patterns) is **unchanged and open** - this session spent its one bounded + pivot on the box floor instead. F-star is **not** proved and **not** + refuted. + +## Consequences for the family-gap route + +The chain `cert >= box` (PR 2914 Lemma LB) survives, but the floor rung is +dead on the full class: below two keepable lines the box can be `0` while +`cert = v`. The replacement lower bound that still links the rungs is the +**max** of the two certified rungs, not the box alone: + +- the **named/box-free rung** (PR 2901's Lemma MP matched pivots, Lemma MX, + Lemma TB's unrestricted original) carries the `tau = 0` cancellation + region: on every falsifier here `MP = v` (empty zero digraph); +- the **box rung** carries the `tau >= 1` region: `box >= min(2, #keepable)` + (Lemma LB2), the `v <= 4` floor, and PR 2978's `r_box` cap as its sharp + upper companion. + +So `cert >= max(named, box) >= floor(2v/3)` is the honest surviving statement +shape; the open work is either a `tau >= 1` box floor at `v >= 5` (which +together with the matched-pivot rung on the `tau = 0` side would still close +F-star) or a direct named-family floor in the shareable-class vocabulary. + +## Open next questions + +1. **The `tau >= 1` box floor at `v >= 5`** (threshold 3 at `v = 5`). Why it + matters: it is the exact surviving form of PR 2978's box-floor route; a + proof closes F-star on the `tau >= 1` domain. First step: either prove a + three-line repair (generalizing Lemma LB2 under the rank-3 constraint of + Lemma RT's shape analysis) or construct a `box = 2` instance with + `r_box = 2` and the recorded obstruction shape. Blocker: bilinear + infeasibility of three-line label systems has no characterization yet. +2. **PR 2978's 21 unrealized `v = 3` gap patterns (shareable-class + completeness)** - unchanged. Why it matters: a realization refutes + box-completeness in the shareable class at `v = 3`; unrealizability proves + it there. First step: PR 2978's `realize_kj.py` with a valuation-level + enumeration instead of seeded restarts. Blocker: no realizability + characterization beyond Lemma SG + column attainment. +3. **The named-family floor in shareable-class terms.** Why it matters: with + the box floor dead on the `tau = 0` side, `cert >= named` must carry that + region; PR 2901's Lemma MP floor question (matched-pivot floor) is the + same question in the older vocabulary. First step: express MP's MAS sums + through the tied-bit colourings of Lemma TB and compare against + `floor(2v/3)`. + +## Reproduce + +Standard library only, Python 3.10+ (registered replay: 3.12): + +```sh +python3 -B research/fstar-boxfloor-minimal-seed758ae8fe/verify.py +python3 -B research/fstar-boxfloor-minimal-seed758ae8fe/anchor_replay.py +python3 scripts/research_package.py --package research/fstar-boxfloor-minimal-seed758ae8fe --check-only +``` + +`verify.py` recomputes everything from scratch (falsifiers, Lemma K/LB2 +checks, the mixed-`tau` sweep, the job-B recomputation, the `v = 5` pivot) and +digests the receipts into `CERTIFICATE.json` (written with `newline="\n"`). +`anchor_replay.py` runs the vendored PR 2978 `verify.py` **unchanged** on a +byte-copy (its receipts cannot touch pinned bytes) and asserts every recorded +anchor marker, including `PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 +mp=9/16 chain=22 reach=0/12,8/19`, `PASS_KJ_COUNTEREXAMPLE v=3 tau=2/2/2 +cert=3 box=2 r_box=2 independent=3/2`, `PASS_KJ_V2 configs=2842`, +`PASS_KJ_V3 configs=3023 box-equals-cert=2996 candidates=27` and the +certificate digest `0b5b55f84375b37c`. + +## Exact heads and pins + +- Base: `066f57ff795dbe6d0a0ecc11fe742eadcec00c39` (frozen assignment pin = + canonical `origin/main` at worktree creation, 2026-10-16). +- [PR 2978](https://github.com/CrocSwap/integer-mult-bounds/pull/2978) head + `12eb7b832de9239a314a7cddf6c6033d618cd8f2` (vendored tree under + `predecessor/pr2978/`, byte-exact; its own pin sets + `predecessor/pr2963/predecessor/PINS.json` (14 files) and + `predecessor/PINS.json` (29 files) re-asserted at every replay). +- [PR 2963](https://github.com/CrocSwap/integer-mult-bounds/pull/2963) head + `ee755e682b3b30d493e764d3be50003b13b69b4a`; [PR 2936](https://github.com/CrocSwap/integer-mult-bounds/pull/2936) + head `f0ef06f13e4de3e50c211c880bdc6891c09620a1`; [PR 2914](https://github.com/CrocSwap/integer-mult-bounds/pull/2914) + head `3f7781efccdf10fa61a1e0a6f11c191579b21280` (all through the vendored + copies). + +## Credit + +F-star, `cert(M)`, L8 labellings and the proven chain `cost >= cert(M)`: +`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). +Fixtures `tied_min`/`cex_min_1` and their recorded certificate limits 11/18: +DreamingOfClouds, +[PR 2111](https://github.com/CrocSwap/integer-mult-bounds/pull/2111). +Lemmas SF/MP/RK/AN and the exact-completion engine design, Lemma MX, zero +digraph machinery, Lemmas SC/SG and the canonical reduced normalization, +chi(Z) machinery, the family-gap definition and Lemma CT, the sub-anchor box +and Lemmas SB/LB, Lemma BPP with the `tau >= 1` necessity pin, the 12 +`tied_min` `v = 11` sub-decoders, and Lemma V2 / Lemma RT + shareable totals +with the minimal `box = cert` counterexample: Aaron Wang (navinor), +[PR 2717](https://github.com/CrocSwap/integer-mult-bounds/pull/2717) / +[2747](https://github.com/CrocSwap/integer-mult-bounds/pull/2747) / +[2774](https://github.com/CrocSwap/integer-mult-bounds/pull/2774) / +[2869](https://github.com/CrocSwap/integer-mult-bounds/pull/2869) / +[2890](https://github.com/CrocSwap/integer-mult-bounds/pull/2890) / +[2901](https://github.com/CrocSwap/integer-mult-bounds/pull/2901) / +[2914](https://github.com/CrocSwap/integer-mult-bounds/pull/2914) / +[2936](https://github.com/CrocSwap/integer-mult-bounds/pull/2936) / +[2963](https://github.com/CrocSwap/integer-mult-bounds/pull/2963) / +[2978](https://github.com/CrocSwap/integer-mult-bounds/pull/2978). +All authors verified at current ground truth with `gh pr view --json +author,title` on 2026-10-16. New content here: Lemma K, Lemma LB2, Lemma TB's +box form, the four minimal falsifiers with their exact gradient, the +mixed-`tau` characterization, and the `v = 5` `tau >= 1` obstruction shape. + +## Freshness and collision checks + +Pair-collision checks (toolkit `disc-comments --grep`, discussions 1317 and +1166, nested replies) at entry found no live claim on the box floor or the +shareable class; the last family-gap activity is KB5j's FINDING/DONE/RELEASED +(PR 2978, 2026-10-16 15:56:55 UTC), whose recorded remainder this assignment +takes. The entry overlap survey (`find_overlap.py`, object proper names and +synonyms ("box floor", "shareable totals", "shareable class", "sub-anchor +box", "cert", "family gap", "F-star", "3-total decoder", "tied totals", +"box-completeness"), `--refresh`, complete pagination: 229 open PRs, 1682 +discussion records at 16:04 UTC) 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). No kappa, supplier, +word or moment claim. diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/SOURCES.json b/research/fstar-boxfloor-minimal-seed758ae8fe/SOURCES.json new file mode 100644 index 0000000000..fcad9a93a2 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/SOURCES.json @@ -0,0 +1,24 @@ +{ + "base_commit": "066f57ff795dbe6d0a0ecc11fe742eadcec00c39", + "files": [ + { + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "path": "certificates/selected-result.json", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "usage": "provenance" + }, + { + "git_blob": "889b95d936746df124872133ae1e7cc339adcb92", + "path": "docs/research/agent-task-catalog.json", + "sha256": "7d185cd8c2af35988d638d969748ad7b670f902606444dbfc748e4402c340df6", + "usage": "provenance" + }, + { + "git_blob": "de305484c78226a3f8da5f3277ced78974116fbb", + "path": "research/root-unit-decoder-lemmas/README.md", + "sha256": "e3c856bc361a57cc2424c829001dba94e8f3a1bc8f6616f9c2f740e9665506a9", + "usage": "input" + } + ], + "schema_version": 1 +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/TASK-CARD.md b/research/fstar-boxfloor-minimal-seed758ae8fe/TASK-CARD.md new file mode 100644 index 0000000000..ef869c57b9 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/TASK-CARD.md @@ -0,0 +1,70 @@ +# Local task card (KB5k) - written before substantial computation + +```text +Task ID / proposed scope key: KB5k box-floor / fstar-boxfloor-minimal-seed758ae8fe + (chooser seed 758ae8fe94f704eed3a4bb471ba333b5, track verifier-engineering, + drawn cards portable-replay / replay-runtime; explicit-open-request scope change) +Base commit; exact predecessor and dependency heads: + base 066f57ff795dbe6d0a0ecc11fe742eadcec00c39 (origin/main at worktree creation); + predecessor PR 2978 head 12eb7b832de9239a314a7cddf6c6033d618cd8f2 (agent-78, + vendored tree + engine lineage: PR 2963 ee755e682, PR 2936 f0ef06f13, + PR 2914 3f7781efc); frozen source pins untouched. +Concrete object and question: + Object: the sub-anchor box value box(M) of exact 3-total rational decoders + M = sum_{j<=3} p_j q_j^T on v lines (M_tt != 0). + Question (a): does box(M) >= floor(2v/3) hold for ALL such decoders (the + surviving box-floor link of the PR 2914/2978 chain)? If not: the minimal + decoder with box < floor(2v/3), exact both sides, cert reported alongside. + Then (one bounded pivot): the tau >= 1 restriction of the same floor + (PR 2978's stated surviving domain), and the structural control of box by + the tau pattern, the shareable count r_box = |{j : c_j = gamma}| and tied + totals (the shareable-class vocabulary of PR 2978 Lemma RT). +Scope status: changed (authorized explicit open request from discussion 1166); + reason: the recorded remainder of PR 2978 (agent-78) - the box-floor route + plus shareable-class completeness - was assigned to this session; the drawn + verifier-engineering cards do not match this object. +Existing restriction being changed (or exact claim being audited): + Audits PR 2978's stated surviving chain link "box >= floor(2v/3) would close + F-star" as a claim about ALL exact 3-total rational decoders (its own + counterexample has box = 2 = floor(2v/3) at v = 3, so it did not test the + floor); and PR 2936's tau >= 1 necessity pin (its tau = 0 demo is v = 2, + box = 1 = floor(2v/3), also not a floor falsifier). +Method; explicit parameter ranges/candidate alphabet: + (1) Smallest falsifying instance first: construct exact integer decoders at + v = 2, 3 with prescribed tau patterns; exact cert/box by the vendored PR 2914 + engine AND an independent section-7/box definition enumeration; int-only. + (2) Exhaustive combinatorial box census at v = 3 over all Lemma-SG-consistent + (a0, b0, Z) patterns INCLUDING lines with tau = 0 (PR 2978 job B restricted + to tau >= 1 per line); box exact per config; min box per tau-pattern class. + (3) Written lower-bound lemmas (two-line repair; tied-bit matched pivot) and + their machine checks; then the tau >= 1 pivot at v = 5 (floor 3): bounded + search for box <= 2 with exact obstruction records per route. +Nearest overlapping PRs and why this adds something: + PR 2914 (sub-anchor box, Lemmas SB/LB), PR 2936 (Lemma BPP, tau >= 1 needed + for box = cert), PR 2963 (tied_min v = 11, box weak cell), PR 2978 (Lemma V2, + Lemma RT + shareable totals, minimal box = cert counterexample v = 3). + None tests the box FLOOR against decoders with tau = 0 lines, and none states + a box lower bound in terms of the tau pattern; this package does both. +Declared milestone: local module (scoped obstruction / exact falsifier + exact + structural bounds; no kappa, no supplier). +Optimistic full cost budget; required observable improvement: + No kappa claim; the deliverable is the settled floor question. Compute cap: + combinatorial v = 3 census (seconds), realization and v = 5 pivot bounded + (minutes), every number replayed exactly. +Unresolved consumer/restoration costs; family expansion decision if continuing: + Not applicable (no physical construction). Family expansion: none; the + shareable-class completeness question (PR 2978's 21 patterns) stays open and + is recorded as the next question unless resolved incidentally. +Success evidence; falsification test; time/compute cap: + Success: exact minimal falsifier (both sides replayed + independent + enumeration) or a proof of the floor; every claim labelled PROVEN/CHECKED/ + DEMOTED. Falsification: replay stored witnesses; re-enumerate cert and box + from the definitions; any v = 3 config with a different exact box refutes the + census. Cap: registered replay under 600 s; one bounded pivot maximum. +Predecessor authors; intended artifact and reproduction command: + PR 1590 DreamingOfClouds (Claude Opus 5.5 (Anthropic) via Claude Code + assistance); PR 2111 DreamingOfClouds; PRs 2717/2747/2774/2869/2890/2901/ + 2914/2936/2963/2978 Aaron Wang (navinor) - verify each at current ground + truth before writing. Artifact: research/fstar-boxfloor-minimal-seed758ae8fe/ + with verify.py (python3 -B research/fstar-boxfloor-minimal-seed758ae8fe/verify.py). +``` diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/TASK.json b/research/fstar-boxfloor-minimal-seed758ae8fe/TASK.json new file mode 100644 index 0000000000..4133e3de37 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/TASK.json @@ -0,0 +1,79 @@ +{ + "actual_scope": "Kappa-blocker KB5k (authorized explicit open request): THE SURVIVING BOX-FLOOR ROUTE to F-star, plus shareable-class completeness - the recorded remainder of PR 2978 (agent-78). (a) Does the sub-anchor box satisfy box(M) >= floor(2v/3) for every exact 3-total rational decoder (a proof would close F-star directly via cert >= box), or what is the MINIMAL decoder with box < floor(2v/3) (cert reported alongside, exact both)? (b) the shareable-class question of PR 2978 (its 21 unrealized v = 3 combinatorial gap patterns). (c) if the box floor fails but cert survives, the replacement lower bound linking named/box to cert in the shareable-class vocabulary. One bounded pivot maximum; smallest falsifying instance first.", + "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": "066f57ff795dbe6d0a0ecc11fe742eadcec00c39", + "bottleneck_link": "F-star (cert(M) >= floor(2v/3), research/root-unit-decoder-lemmas section 7) is the named route to closing every open T = 3 window at once. PR 2978 killed the completeness link of the PR 2914 chain and left the box-floor link (box >= floor(2v/3)) as the surviving route. This package settles that route: the floor FAILS on the full class (minimal falsifier v = 3, cert = 3 >= 2 = floor > box = 0), so the route needs the tau >= 1 restriction; there the floor is PROVEN for v <= 4 (Lemma LB2) and stays open at v >= 5 (bounded exact search: 240 instances, 0 violations).", + "evidence": "VERDICT: the box-floor route as stated (all exact 3-total rational decoders) is REFUTED, minimally at v = 3 in the rank-3 class. PROVEN: box = 0 iff every line has tau = 0 (a kept line needs a tied bit); the minimal falsifier F3-tau0 P = [[1,1,0],[1,0,1],[0,1,1]], Q = [[2,2,1],[2,1,2],[1,2,2]], M = I + 3J (rank 3, tau = (0,0,0), r_box = 3, no zero arcs) has cert = 3 (replayed witness; trivial upper bound v) > 2 = floor(2v/3) > 0 = box, both sides exact by the vendored engine AND an independent definition-level enumeration. PROVEN minimal: rank 3 forces v >= 3; a rank-2 wide-class falsifier exists at v = 2 (box = 0 < 1 = floor(2v/3)); v = 3 gradient tau = (1,0,0) gives cert = 3 > 2 > 1 = box; v = 4 tau = (0,0,0,0) gives cert = 4 > 2 > 0 = box. F-star is NOT refuted (cert >= floor on every falsifier). PROVEN (Lemma LB2, two-line repair): any two lines with tau >= 1 are jointly box-keepable, so box >= min(2, #keepable lines); machine-checked on 16761 canonical v = 3 configs and 160 random realizable decoders v = 4..6. Consequences: the tau >= 1 box floor is PROVEN for v <= 4 (threshold <= 2) and first open at v = 5 (threshold 3). CHECKED: v = 3 tau >= 1 domain min box = 2 = floor (3023 canonical configs recomputed, 27 gap candidates all exactly 2); mixed-tau formula on 240 realizable decoders; bounded v = 5 tau >= 1 search (240 exact instances, 97 with r_box = 2, 0 below threshold). Exact obstruction to a v = 5 falsifier recorded: Lemma RT caps a kept set at r_box only when all its forward pairs are zero arcs, so box <= 2 needs every 3-subset blocked in every order - Z-complete triples (all 6 ordered pairs zero arcs) are the only rank route and rank(M) = 3 permits them only for |S| <= 3; every other order must fail bilinearly. Shareable-class completeness (PR 2978's 21 patterns) remains open.", + "existing_restriction_being_changed": "Audits PR 2978's stated surviving chain link 'a box floor box >= floor(2v/3) ... would close F-star' as a claim about ALL exact 3-total rational decoders. PR 2978's own counterexample has box = 2 = floor(2v/3) at v = 3 (not a floor falsifier), and PR 2936's tau = 0 demonstration is v = 2 with box = 1 = floor(2v/3) (also not one), so the floor itself was never tested against decoders with tau = 0 lines. This package tests it, refutes it minimally, and states the exact surviving form (tau >= 1 domain) with its proved range and bounded open range.", + "falsification_test": "Every falsifier claim is falsified by replaying the stored witnesses and recomputing both rungs from the definitions: verify.py reruns the vendored PR 2914 engine (exhaustive) AND an independent definition-level enumeration (brute over all label assignments for v <= 3, trivial upper bound v for cert = v), asserts identities (tie parity, scope identity), rank = 3, and box == min(2, #keepable) on each falsifier. Lemma LB2 is falsified by any of the 16761 enumerated configs where its explicit construction fails the from-definition check. The v = 5 bounded claim is falsified by any tau >= 1 instance with box <= 2 (the search is bounded, NOT a non-existence result).", + "intended_artifact": "research/fstar-boxfloor-minimal-seed758ae8fe/ with verify.py (python3 -B research/fstar-boxfloor-minimal-seed758ae8fe/verify.py) and anchor_replay.py.", + "method": "Smallest falsifying instance first. (1) Exact integer constructions with prescribed tau patterns at v = 2, 3, 4; exact cert/box by the vendored PR 2914 engine plus an independent section-7/box definition enumeration; int-only arithmetic; rank checked exactly over Q. (2) Written lower bounds: the keepable-line characterization (box = 0 iff all tau = 0), Lemma LB2 (two-line repair, constructive), and the Lemma RT/shareable-totals upper bound of PR 2978 for the obstruction picture; machine replay of the LB2 construction on every canonical v = 3 config with >= 2 keepable lines (including tau = 0 lines, which PR 2978 job B excluded) and on random realizable decoders v = 4..6. (3) Recomputation of PR 2978 job B (3023 canonical configs; the vendored receipt ships empty, so everything is recomputed from scratch). (4) One bounded pivot: exact kept-set feasibility ladder at v = 5 (threshold 3) over 240 realizable decoders from three generators (random valuation-tuned, extensions of PR 2978's counterexample core with r_box = 2, unit-role templates), exact box/cert on every would-be hit.", + "nearest_overlapping_prs": "PR 2978 (Lemma V2, Lemma RT + shareable totals, minimal box = cert counterexample v = 3 - the predecessor and handoff source), PR 2963 (tied_min v = 11 exact, box weak cell), PR 2936 (Lemma BPP, tau >= 1 necessary for box = cert, tau = 0 demo at v = 2), PR 2914 (sub-anchor box, Lemmas SB/LB). None tests the box FLOOR against tau = 0 lines and none gives a box LOWER bound in terms of the tau pattern; this package does both and settles the floor's minimal failure.", + "open_questions": [ + { + "blocked_by": "No realizability characterization beyond Lemma SG + the column-attainment condition; PR 2978's search is bounded (not-found-in-cap is not unrealizable).", + "first_step": "Characterize the (a0,b0,Z) patterns forced by rank-3 factorizations with prescribed odd/even valuations; extend PR 2978's realize_kj.py with a valuation-level enumeration.", + "question": "Are PR 2978's 21 remaining v = 3 combinatorial gap patterns realizable (shareable-class completeness at v = 3)?", + "why_it_matters": "All 21 lie in the shareable class (r_box = 3); a realization refutes box-completeness there too, unrealizability proves it." + }, + { + "blocked_by": "The exact obstruction recorded here: Lemma RT blocks a kept set only via all-forward-zero-arc orders capped at r_box, and rank(M) = 3 allows Z-complete triples only at |S| <= 3; all other orders must fail bilinearly, which no search domain has exhausted.", + "first_step": "Either prove box >= 3 for every tau >= 1 decoder at v = 5 (e.g. a three-line repair generalizing Lemma LB2 with the rank-3 constraint), or construct one with box = 2 exactly (r_box <= 2 is necessary by Lemma RT).", + "question": "The tau >= 1 box floor at v >= 5: is box >= floor(2v/3) on that domain? First open case v = 5 (threshold 3).", + "why_it_matters": "It is the exact surviving form of the box-floor route once the tau = 0 falsifiers of this package are excluded; a proof would close F-star on the tau >= 1 domain (the domain all prior evidence lives in)." + }, + { + "blocked_by": "The shareable-class vocabulary is new; the right lower bound is not yet stated.", + "first_step": "State and test a candidate bound in terms of the tau pattern, r_box and the tied-bit coloring MAS sums (Lemma TB sketch: box >= max over tied-bit colorings of sum_j MAS(Z[C_j])).", + "question": "The replacement lower bound linking named/box to cert after the box floor died: what structural features control box?", + "why_it_matters": "PR 2978's chain now needs a different lower rung; this package supplies the tau-pattern control (box = 0 iff all tau = 0; box >= min(2, #keepable)) and the shareable-count upper cap as the first pieces." + } + ], + "optimistic_full_cost_budget": "No kappa claim; the milestone is the settled floor question. Compute cap: falsifier jobs seconds; LB2 replay ~150 s of canonical configs (v = 3, one pass); v = 5 pivot 240 exact instances ~290 s; anchor replay ~120 s; every command under the 600 s cap, all blocking.", + "original_card": { + "acceptance_gate": "Preserve immutable source hashes and proof-relevant content; a different compressed byte stream alone is not a mathematical mismatch.", + "allowed_variations": [ + "One interpreter/version mismatch or one payload field comparison." + ], + "bottleneck_link": "Portable exact checks prevent environment failures from blocking valid contributions.", + "first_experiment": "Reproduce one specific mismatch or audit one canonical comparison for omitted proof-relevant fields.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the gzip-container reproducibility examples and distinguish frozen source bytes from regenerated payloads.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "id": "portable-replay", + "methods": [ + "Reproduce one portability failure and add a minimal cross-environment fix.", + "Audit one canonical-payload comparison for omitted proof-relevant fields." + ], + "overlap_terms": [ + "gzip container", + "reproducibility", + "canonical payload" + ], + "question": "Can one reproducible environment or artifact-comparison failure be repaired?", + "scope_change_triggers": [ + "Removing immutable-source pins because generated compressed bytes differ." + ], + "starting_points": [ + "research/gzip-container-reproducibility/README.md", + "docs/ci-verification.md" + ] + }, + "outcome": "completed", + "parameter_ranges": "v = 2..5; three totals; label space F2^3 bit masks; integer P, Q entries in {-4..4}; 2-adic valuations 0..3; falsifiers at v = 2, 3, 4 with tau patterns (0,0), (0,0,0), (1,0,0), (0,0,0,0); LB2 replay on 16761 canonical v = 3 configs (all Lemma-SG-consistent (a0,b0,Z) with >= 2 keepable lines, up to line/total relabeling) and 160 random realizable decoders v = 4..6; mixed-tau sweep 240 realizable decoders v = 3..4; v = 5 pivot 240 realizable tau >= 1 decoders (80 random + 80 PR 2978-core extensions + 80 unit-role templates).", + "predecessor_authors": "PR 1590 DreamingOfClouds (Claude Opus 5.5 (Anthropic) via Claude Code assistance); PR 2111 DreamingOfClouds; PRs 2717/2747/2774/2869/2890/2901/2914/2936/2963/2978 Aaron Wang (navinor); all verified at current ground truth with gh pr view --json author,title on 2026-10-16.", + "schema_version": 1, + "scope_change_reason": "Authorized 'explicit open request' scope change to kappa-blocker KB5k, recorded per the assignment (discussion 1166; the recorded remainder of PR 2978 - the surviving box-floor route plus shareable-class completeness - is the named open request). The chooser OS draw (seed 758ae8fe94f704eed3a4bb471ba333b5, track verifier-engineering) proposed portable-replay and replay-runtime; neither is this object, and the assignment takes the KB5k request instead.", + "scope_status": "changed", + "stop_rule": "Stop when the box floor is settled (proved, minimal falsifier, or exact obstruction with minimal demo) and the one bounded pivot is recorded. Achieved: minimal falsifier PROVEN at v = 3 (rank-3 class), tau >= 1 floor PROVEN for v <= 4, bounded at v = 5 (240 instances, 0 hits). No further search without a new hypothesis.", + "task_id": "portable-replay", + "time_compute_cap": "One bounded pivot maximum (the tau >= 1 v = 5 question); registered replay under 600 s per command (observed: verify.py ~300 s, anchor_replay.py ~120 s); all searches deterministic (fixed seeds, instance counts, not wall-clock caps)." +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/VERIFY.json b/research/fstar-boxfloor-minimal-seed758ae8fe/VERIFY.json new file mode 100644 index 0000000000..1ad362aadb --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/VERIFY.json @@ -0,0 +1,39 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "checks": "KB5k package replay: vendored PR 2978 pin sets (14 + 29 files); the four box-floor falsifiers re-certified three ways (vendored engine exact, independent definition-level enumeration, written bounds) with identities, exact rank and replayed witnesses; Lemma LB2 construction replayed on 16761 canonical v = 3 configs and 160 random realizable decoders; mixed-tau formula sweep 240 instances; PR 2978 job B recomputed from scratch (3023 configs, 27 candidates all at exact box = 2); bounded tau >= 1 v = 5 pivot (240 exact instances, 0 below threshold); writes CERTIFICATE.json; prints PASS_KM_PINS, PASS_KM_FALSIFIER_V2/V3/V3B/V4, PASS_KM_LB2, PASS_KM_MIXEDTAU, PASS_KM_V3TAU1, PASS_KM_PIVOT_V5, PASS_KM_ALL, PASS_KM_VERIFY", + "timeout_seconds": 600 + }, + { + "argv": [ + "{python}", + "-B", + "{package}/anchor_replay.py" + ], + "checks": "Predecessor anchor reproduction: the vendored PR 2978 verify.py runs UNCHANGED on a byte-copy (receipts cannot touch pinned bytes) and must print every recorded anchor marker, including PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 mp=9/16 chain=22 reach=0/12,8/19, PASS_KJ_COUNTEREXAMPLE v=3 tau=2/2/2 cert=3 box=2 r_box=2 independent=3/2, PASS_KJ_V2 configs=2842, PASS_KJ_V3 configs=3023 box-equals-cert=2996 candidates=27 and the certificate digest 0b5b55f84375b37c; prints PASS_KM_ANCHORS", + "timeout_seconds": 600 + } + ], + "inputs": [ + "research/root-unit-decoder-lemmas/README.md", + "research/fstar-boxfloor-minimal-seed758ae8fe/verify.py", + "research/fstar-boxfloor-minimal-seed758ae8fe/box_floor_min.py", + "research/fstar-boxfloor-minimal-seed758ae8fe/pivot_v5.py", + "research/fstar-boxfloor-minimal-seed758ae8fe/anchor_replay.py", + "research/fstar-boxfloor-minimal-seed758ae8fe/README.md", + "research/fstar-boxfloor-minimal-seed758ae8fe/TASK.json", + "research/fstar-boxfloor-minimal-seed758ae8fe/data/km-receipt.json", + "research/fstar-boxfloor-minimal-seed758ae8fe/data/pivot-v5-receipt.json", + "research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/PINS.json", + "research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/PINS.json" + ], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/anchor_replay.py b/research/fstar-boxfloor-minimal-seed758ae8fe/anchor_replay.py new file mode 100644 index 0000000000..cb11a1eb58 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/anchor_replay.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +"""KB5k anchor reproduction: run the vendored PR 2978 verify.py UNCHANGED on a +byte-copy of the vendored tree (so its receipts cannot touch pinned bytes) and +assert every recorded anchor marker, including the calibration values of the +PR 2914 engine lineage. + +Prints PASS_KM_ANCHORS with the marker counts. Run: python3 -B anchor_replay.py +""" +import os +import re +import shutil +import subprocess +import sys +import tempfile + +HERE = os.path.dirname(os.path.abspath(__file__)) +VEND = os.path.join(HERE, "predecessor", "pr2978") + +REQUIRED = [ + r"^PASS_KJ_PINS pr2963-pins=14 own-pins=29", + r"^PASS_FG_CONTROLS ", + r"^PASS_FG_CALIBRATION tied_min=11/12 cex_min_1=18/19 mp=9/16 " + r"chain=22 reach=0/12,8/19", + r"^PASS_KJ_ANCHORS named=9x12 box-replay-in-box=12/12", + r"^PASS_KJ_TAU0_DEMO cert=2 box=1", + r"^PASS_KJ_COUNTEREXAMPLE v=3 tau=2/2/2 cert=3 box=2 r_box=2 " + r"independent=3/2", + r"^PASS_KJ_V2 configs=2842 box-equals-cert=2842 tau0-demo=2/1", + r"^PASS_KJ_V3 configs=3023 box-equals-cert=2996 candidates=27", + r"^PASS_KJ_ESCAPE escapes=19 kinds=E1x19 drops=0 box-gaps=0", + r"^PASS_KJ_REALIZE candidates=27 realized=3 unrealizable-column=3 " + r"not-found-in-cap=21 counterexamples=3", + r"^PASS_KJ_WITHOUTLOSS verdict=counterexample v=3 tau>=1 cert=3>box=2", + r"certificate digest 0b5b55f84375b37c", +] + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + tmp = os.path.join(tempfile.gettempdir(), "opencode", "agent-79", + "anchor-run") + if os.path.isdir(tmp): + shutil.rmtree(tmp) + shutil.copytree(VEND, tmp) + proc = subprocess.run( + [sys.executable, "-B", os.path.join(tmp, "verify.py")], + capture_output=True, text=True, encoding="utf-8", timeout=540) + out = proc.stdout + assert proc.returncode == 0, (proc.returncode, proc.stderr[-2000:]) + missing = [] + for pat in REQUIRED: + if re.search(pat, out, re.M) is None: + missing.append(pat) + assert not missing, "missing anchor markers: %s" % missing + print("PASS_KM_ANCHORS markers=%d digest=0b5b55f84375b37c " + "vendored-verify=exit0" % len(REQUIRED)) + + +if __name__ == "__main__": + main() diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/box_floor_min.py b/research/fstar-boxfloor-minimal-seed758ae8fe/box_floor_min.py new file mode 100644 index 0000000000..81081d9dea --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/box_floor_min.py @@ -0,0 +1,511 @@ +#!/usr/bin/env python3 +"""KB5k: the surviving box-floor route of F-star (PR 2978's recorded remainder). + +Question (a), smallest falsifying instance first: is the sub-anchor box a floor, + box(M) >= floor(2v/3), for EVERY exact 3-total rational decoder + M = sum_{j<=3} p_j q_j^T on v lines (M_tt != 0)? If not, the minimal decoder + with box < floor(2v/3), both sides EXACT, cert reported alongside. +Question (c), the one bounded pivot: the tau >= 1 restriction of the same floor + (PR 2978's stated surviving domain) and the structural control of box by the + tau pattern, the shareable count r_box = |{j : c_j = gamma}| and tied totals. + +Every value is exact: the vendored PR 2914 engine (exhaustive enumerations), +INDEPENDENT definition-level enumerations written from the section-7 / box +definitions (not the engine), replayed witnesses, and written proofs. All +arithmetic is int-only. + +Prints PASS_KM_* markers; writes data/km-receipt.json. +Run: python3 -B box_floor_min.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__)) +VEND = os.path.join(HERE, "predecessor", "pr2978") +sys.path.insert(0, os.path.join(VEND, "predecessor", "pr2963")) +import named_exact as ne # noqa: E402 + +fg = ne.fg +spec = importlib.util.spec_from_file_location( + "box_attack", + os.path.join(VEND, "predecessor", "pr2963", "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 dot1(x, y): + return bin(x & y).count("1") & 1 + + +def subs(m): + return [s for s in range(8) if (s & ~m) == 0] + + +# ------------------------------------------- independent definition-level value +# Written from the definitions, NOT the engine: for fixed labels (a, b), the +# value is the largest kept set over orders, with K_tt = 1 on kept lines and +# K_ts = 0 at every zero incidence M_ts = 0 with t before s. + +def def_value(v, zero_arcs, a, b): + best = 0 + for k in range(1, v + 1): + for S in itertools.combinations(range(v), k): + for order in itertools.permutations(S): + pos = {t: i for i, t in enumerate(order)} + ok = True + for t in S: + if dot1(a[t], b[t]) != 1: + ok = False + break + for s in S: + if s != t and pos[t] < pos[s] and (t, s) in zero_arcs \ + and dot1(a[t], b[s]) != 0: + ok = False + break + if not ok: + break + if ok and k > best: + best = k + return best + + +def brute_cert(mod): + """Independent exact cert: all label assignments inside the supports.""" + v = mod["v"] + za = frozenset(mod["arcs"]) + opts = [[(pa, pb) for pa in subs(mod["pi"][t]) for pb in subs(mod["sg"][t])] + for t in range(v)] + best, best_wit = -1, None + for combo in itertools.product(*opts): + a = [c[0] for c in combo] + b = [c[1] for c in combo] + val = def_value(v, za, a, b) + if val > best: + best, best_wit = val, dict(a=a, b=b) + return best, best_wit + + +def brute_box(mod, ad): + """Independent exact box: all label assignments inside the sub-anchor box.""" + v = mod["v"] + za = frozenset(mod["arcs"]) + opts = [[(pa, pb) for pa in subs(ad["a0"][t]) for pb in subs(ad["b0"][t])] + for t in range(v)] + best, best_wit = -1, None + for combo in itertools.product(*opts): + a = [c[0] for c in combo] + b = [c[1] for c in combo] + val = def_value(v, za, a, b) + if val > best: + best, best_wit = val, dict(a=a, b=b) + return best, best_wit + + +# ------------------------------------------------- fast exact kept-set ladder +# Exact decision "is some kept set of size k feasible inside the box" for small +# (k, v): enumerate the a-labels of the kept lines; each kept line's b-label is +# then an independent small filter (bitmask over the 8 masks). + +GOOD = [sum(1 << b for b in range(8) if dot1(x, b) == 0) for x in range(8)] +ODD = [sum(1 << b for b in range(8) if dot1(x, b) == 1) for x in range(8)] + + +def kept_k_witness(v, arcs, a0, b0, k): + """Exact: a box witness keeping k lines (all subsets, all orders).""" + b_mask = [sum(1 << b for b in subs(b0[t])) for t in range(v)] + for S in itertools.combinations(range(v), k): + for order in itertools.permutations(S): + pos = {t: i for i, t in enumerate(order)} + pred = {t: [s for s in S if s != t and pos[s] < pos[t] + and (s, t) in arcs] for t in S} + subs_a = [subs(a0[t]) for t in S] + for acombo in itertools.product(*subs_a): + amap = dict(zip(S, acombo)) + ok = True + for t in S: + mask = ODD[amap[t]] & b_mask[t] + for s in pred[t]: + mask &= GOOD[amap[s]] + if mask == 0: + ok = False + break + if ok: + wit_a = [0] * v + wit_b = [0] * v + for t in S: + wit_a[t] = amap[t] + m = ODD[amap[t]] & b_mask[t] + for s in pred[t]: + m &= GOOD[amap[s]] + wit_b[t] = (m & -m).bit_length() - 1 + return dict(kept=list(S), order=list(order), + a=wit_a, b=wit_b) + return None + + +def box_value_exact_small(mod, ad): + """Exact box from the ladder (small v): largest feasible kept size.""" + v = mod["v"] + arcs = frozenset(mod["arcs"]) + for k in range(v, 0, -1): + if kept_k_witness(v, arcs, ad["a0"], ad["b0"], k) is not None: + return k + return 0 + + +# --------------------------------------------------------------- job 1 +# The box-floor falsifiers: smallest instance first, exact both sides. + +FALSIFIERS = [ + dict(name="F2-wide", v=2, rank=2, + P=[(1, 1, 0), (1, 0, 1)], + Q=[(2, 2, 1), (2, 1, 2)], + note="wide class (rank 2); threshold floor(2v/3) = 1"), + dict(name="F3-tau0", v=3, rank=3, + P=[(1, 1, 0), (1, 0, 1), (0, 1, 1)], + Q=[(2, 2, 1), (2, 1, 2), (1, 2, 2)], + note="rank 3, tau = (0,0,0); threshold floor(2v/3) = 2"), + dict(name="F3-tau1", v=3, rank=3, + P=[(1, 1, 0), (1, 0, 1), (0, 1, 1)], + Q=[(1, 2, 4), (2, 1, 2), (1, 2, 2)], + note="rank 3, tau = (1,0,0); threshold floor(2v/3) = 2"), + dict(name="F4-tau0", v=4, rank=3, + P=[(1, 1, 0), (1, 0, 1), (0, 1, 1), (1, 1, 1)], + Q=[(2, 2, 1), (2, 1, 2), (1, 2, 2), (2, 2, 2)], + note="rank 3, tau = (0,0,0,0); threshold floor(2v/3) = 2"), +] + + +def gf2_rank_int(rows): + """Exact rational rank via integer row reduction (no floats).""" + mat = [list(r) for r in rows] + if not mat: + return 0 + nr, nc = len(mat), len(mat[0]) + rank = 0 + for c in range(nc): + piv = None + for r in range(rank, nr): + if mat[r][c] != 0: + piv = r + break + if piv is None: + continue + mat[rank], mat[piv] = mat[piv], mat[rank] + pv = mat[rank][c] + for r in range(nr): + if r != rank and mat[r][c] != 0: + fac = mat[r][c] + for cc in range(nc): + mat[r][cc] = mat[r][cc] * pv - mat[rank][cc] * fac + rank += 1 + return rank + + +def job1(): + """Minimal box-floor falsifiers: exact cert and box, independent checks.""" + out = [] + for f in FALSIFIERS: + mod = fg.model(f["P"], f["Q"]) + ad = fg.anchor_data(mod) + assert fg.tie_parity(mod, ad) and fg.scope_identity(mod, ad), f["name"] + rankM = gf2_rank_int(mod["M"]) + assert rankM == f["rank"], (f["name"], rankM) + ce, cew = fg.cert_exact(mod, max_v=6) + bx, bxw = ba.box_exact_tolerant(mod, ad) + assert fg.replay_witness(mod, cew) + assert bxw is None or fg.replay_witness(mod, bxw) + if f["v"] <= 3: + ice, _ = brute_cert(mod) + else: + ice = f["v"] # trivial upper bound cert <= v; witness replayed + ibx, _ = brute_box(mod, ad) + thr = (2 * f["v"]) // 3 + assert (ce, bx) == (ice, ibx), (f["name"], ce, bx, ice, ibx) + assert bx < thr <= ce, (f["name"], bx, thr, ce) + keepable = [t for t in range(f["v"]) if ad["tau"][t] >= 1] + assert bx == min(2, len(keepable)), (f["name"], bx, keepable) + rec = dict(name=f["name"], v=f["v"], rank=rankM, note=f["note"], + P=[list(p) for p in f["P"]], Q=[list(q) for q in f["Q"]], + M=[list(r) for r in mod["M"]], + gamma=ad["gamma"], c=list(ad["c"]), tau=list(ad["tau"]), + a0=list(ad["a0"]), b0=list(ad["b0"]), + r_box=sum(1 for j in range(3) if ad["c"][j] == ad["gamma"]), + threshold=thr, cert=ce, box=bx, + cert_ind=ice, box_ind=ibx, + cert_witness=cew, box_witness=bxw, + keepable=keepable) + out.append(rec) + log("falsifier %s: v=%d rank=%d tau=%s cert=%d box=%d thr=%d " + "(independent %d/%d)" % (f["name"], f["v"], rankM, ad["tau"], + ce, bx, thr, ice, ibx)) + assert out[0]["box"] == 0 and out[1]["box"] == 0 + assert out[2]["box"] == 1 and out[3]["box"] == 0 + print("PASS_KM_FALSIFIER_V2 tau=0/0 cert=2 box=0 thr=1 independent=2/0") + print("PASS_KM_FALSIFIER_V3 tau=0/0/0 cert=3 box=0 thr=2 independent=3/0") + print("PASS_KM_FALSIFIER_V3B tau=1/0/0 cert=3 box=1 thr=2 independent=3/1") + print("PASS_KM_FALSIFIER_V4 tau=0/0/0/0 cert=%d box=0 thr=2 " + "independent=%d/0" % (out[3]["cert"], out[3]["cert_ind"])) + return out + + +# --------------------------------------------------------------- job 2 +# Keepable-line characterization + Lemma LB2 (two-line repair), machine-checked. + +def lb2_construct(t, s, a0, b0, arcs, v=3): + """Explicit two-line box witness keeping {t, s} (Lemma LB2 construction), + or None. Order is chosen by the proof; labels per the written construction.""" + # case 1: some order with no forward zero arc at all + for (x, y) in ((t, s), (s, t)): + if (x, y) not in arcs: + order = [x, y] + break + else: + order = [t, s] + x, y = order + jx = (a0[x] & b0[x]).bit_length() - 1 # any tied bit of x + jy = (a0[y] & b0[y]).bit_length() - 1 + a = [0] * v + b = [0] * v + if (x, y) not in arcs: + # no forward zero arc: tied singletons keep both lines + a[x] = b[x] = 1 << jx + a[y] = b[y] = 1 << jy + elif jx != jy: + # forward zero arc (x,y); distinct tied bits kill K_xy + a[x] = b[x] = 1 << jx + a[y] = b[y] = 1 << jy + if dot1(a[x], b[y]) != 0: + return None # construction precondition failure (should not happen) + else: + # same tied bit j on both lines: Lemma SG parity gives a repair bit + j = jx + # |a0(x) & b0(y)| even and j lies in it, so some x-bit != j exists + cand = a0[x] & b0[y] & ~(1 << j) + if not cand: + return None + r = (cand & -cand).bit_length() - 1 + a[x] = (1 << j) | (1 << r) + b[x] = 1 << j + a[y] = 1 << j + b[y] = (1 << j) | (1 << r) + # validate from the definition + for line in (x, y): + if (a[line] & ~a0[line]) or (b[line] & ~b0[line]): + return None + if dot1(a[line], b[line]) != 1: + return None + if (x, y) in arcs and dot1(a[x], b[y]) != 0: + return None + return dict(kept=[x, y], order=order, a=a, b=b) + + +def job2(): + """Machine checks of the box = 0 characterization and Lemma LB2.""" + # (i) box = 0 iff no line has tau >= 1: checked on all job-1 falsifiers and + # on the v = 3 combinatorial census of job 3 (cross-checked there). + # (ii) Lemma LB2 construction replayed on every v = 3 config of a declared + # canonical census with >= 2 keepable lines, and on random decoders. + n_conf = n_ok = 0 + # declared domain: all (a0, b0) line-type triples over masks 0..7 up to + # total relabeling, all Z subsets of SG-free pairs (v = 3), canonicalized + # under line relabeling -- same construction space as PR 2978 job B but + # including empty masks; LB2 only needs the pairs, so we replay the + # CONSTRUCTION per config rather than the full box value. + types = sorted(set( + canon_total_masks(a, b) for a in range(8) for b in range(8))) + seen = set() + for tri in itertools.product(types, repeat=3): + a0 = [p[0] for p in tri] + b0 = [p[1] for p in tri] + keepable = [t for t in range(3) if a0[t] & b0[t]] + if len(keepable) < 2: + continue + free = [(t, s) for t in range(3) for s in range(3) + if t != s and dot1(a0[t], b0[s]) == 0] + for bits in range(1 << len(free)): + Z = frozenset(free[k] for k in range(len(free)) + if (bits >> k) & 1) + key = canon_cfg3(tri, Z) + if key in seen: + continue + seen.add(key) + n_conf += 1 + wit = None + for (t, s) in itertools.combinations(keepable, 2): + wit = lb2_construct(t, s, a0, b0, Z) + if wit is not None: + break + assert wit is not None, (a0, b0, sorted(Z)) + n_ok += 1 + log("job 2: LB2 construction replayed on %d canonical v = 3 configs " + "with >= 2 keepable lines (%d ok)" % (n_conf, n_ok)) + # (iii) random realizable decoders at v = 4..6: the constructed 2-line + # witness is inside the box (engine-verified). + rng = random.Random(4711) + n_rand = 0 + for v in (4, 5, 6): + tries = 0 + while n_rand < 40 * (v - 2) and tries < 4000: + tries += 1 + mod = rand_model(rng, v) + if mod is None: + continue + ad = fg.anchor_data(mod) + keepable = [t for t in range(v) if ad["tau"][t] >= 1] + if len(keepable) < 2: + continue + got = False + for (t, s) in itertools.combinations(keepable, 2): + wit = lb2_construct(t, s, ad["a0"], ad["b0"], + frozenset(mod["arcs"]), v=v) + if wit is None: + continue + full = dict(a=wit["a"], b=wit["b"], order=wit["order"], + kept=wit["kept"]) + if fg.replay_witness(mod, full) and \ + fg.in_box(mod, ad, full)[0]: + got = True + break + assert got, "LB2 construction must succeed on realizable instances" + n_rand += 1 + log("job 2: LB2 construction engine-verified on %d random realizable " + "decoders v = 4..6" % n_rand) + print("PASS_KM_LB2 configs=%d ok=%d random=%d ok=%d" + % (n_conf, n_ok, n_rand, n_rand)) + return dict(configs=n_conf, random=n_rand) + + +def canon_total_masks(a, b): + best = None + for perm in itertools.permutations(range(3)): + def mv(x): + y = 0 + for j in range(3): + if x & (1 << j): + y |= 1 << perm[j] + return y + key = (mv(a), mv(b)) + if best is None or key < best: + best = key + return best + + +def canon_cfg3(pairs, Z): + best = None + for perm in itertools.permutations(range(3)): + npairs = tuple(pairs[perm[t]] for t in range(3)) + nZ = frozenset((perm[t], perm[s]) for (t, s) in Z) + key = (npairs, tuple(sorted(nZ))) + if best is None or key < best: + best = key + return best + + +def rand_model(rng, v, val_bits=(0, 0, 1, 2)): + def ent(): + if rng.random() < 0.32: + return 0 + mag = rng.choice(val_bits) + return rng.choice((-1, 1)) * (1 << mag) + P = [tuple(ent() for _ in range(3)) for _ in range(v)] + Q = [tuple(ent() for _ in range(3)) for _ in range(v)] + try: + return fg.model(P, Q) + except (AssertionError, ValueError): + return None + + +# --------------------------------------------------------------- job 3 +# Bounded CHECKED confirmation of the keepable-count formula on realizable +# decoders with MIXED tau patterns (PR 2978's sweeps filtered tau >= 1 only): +# box = 0 if no line has tau >= 1; box = 1 if exactly one; and +# box >= min(2, #keepable) always (Lemma LB2), box <= #keepable always. + +def job3(): + rng = random.Random(20261017) + n = 0 + classes = {} + t_cap = time.time() + 90 + while n < 240 and time.time() < t_cap: + v = rng.choice((3, 3, 3, 4)) + mod = rand_model(rng, v, val_bits=(0, 1, 2, 3)) + if mod is None: + continue + ad = fg.anchor_data(mod) + keep = sum(1 for t in range(v) if ad["tau"][t] >= 1) + bx_lad = box_value_exact_small(mod, ad) + bx_eng, bxw = ba.box_exact_tolerant(mod, ad) + assert bx_lad == bx_eng, (v, ad["tau"], bx_lad, bx_eng) + assert bxw is None or fg.replay_witness(mod, bxw) + assert bx_eng <= keep, (v, ad["tau"], bx_eng, keep) + assert bx_eng >= min(2, keep), (v, ad["tau"], bx_eng, keep) + if keep <= 2: + assert bx_eng == keep, (v, ad["tau"], bx_eng, keep) + classes[(v, keep)] = classes.get((v, keep), 0) + 1 + n += 1 + log("job 3: %d mixed-tau realizable decoders v = 3..4, formula holds: " + "box == #keepable for #keepable <= 2, box >= min(2, #keepable) " + "always; classes=%s" % (n, sorted(classes.items()))) + print("PASS_KM_MIXEDTAU instances=%d violations=0 classes=%d" % (n, len(classes))) + return dict(instances=n, classes={str(k): c for k, c in classes.items()}) + + +# --------------------------------------------------------------- job 4 +# The tau >= 1 v = 3 domain: min box over PR 2978 job B's complete canonical +# config space (3023 configs) is floor(2v/3) = 2 -- re-verified here from the +# recomputed vendored receipt (every candidate's exact box is 2). + +def job4(): + # The vendored PR 2978 data/box-search-kj-receipt.json ships EMPTY (byte + # pin retained); per the receipt-validation trap we recompute job B from + # scratch in-process (PR 2978's box_search_kj.job_b) and assert on the + # recomputed records. + spec2 = importlib.util.spec_from_file_location( + "box_search_kj", + os.path.join(VEND, "box_search_kj.py")) + bsk = importlib.util.module_from_spec(spec2) + spec2.loader.exec_module(bsk) + nconf, cands = bsk.job_b() + assert nconf == 3023 and len(cands) == 27, (nconf, len(cands)) + boxes = sorted({c["box"] for c in cands}) + assert boxes == [2], boxes + # every non-candidate config has box = 3 (cert_max = 3 witnessed) + log("job 4: v = 3 tau >= 1 domain: %d canonical configs, %d gap " + "candidates all at exact box = 2 = floor(2v/3), min box = 2" + % (nconf, len(cands))) + print("PASS_KM_V3TAU1 configs=%d candidates=%d min-box=2 thr=2" + % (nconf, len(cands))) + return dict(configs=nconf, candidates=len(cands), min_box=2) + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + os.makedirs(os.path.join(HERE, "data"), exist_ok=True) + fals = job1() + lb2 = job2() + mixed = job3() + v3 = job4() + receipt = dict(generator="box_floor_min.py", + falsifiers=fals, lb2=lb2, mixed_tau=mixed, v3_tau1=v3) + with open(os.path.join(HERE, "data", "km-receipt.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump(receipt, fh, indent=1, sort_keys=True) + fh.write("\n") + print("PASS_KM_ALL falsifiers=%d lb2-configs=%d mixed=%d v3-configs=%d" + % (len(fals), lb2["configs"], mixed["instances"], v3["configs"])) + + +if __name__ == "__main__": + main() diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/data/km-receipt.json b/research/fstar-boxfloor-minimal-seed758ae8fe/data/km-receipt.json new file mode 100644 index 0000000000..7605b25801 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/data/km-receipt.json @@ -0,0 +1,479 @@ +{ + "falsifiers": [ + { + "M": [ + [ + 4, + 3 + ], + [ + 3, + 4 + ] + ], + "P": [ + [ + 1, + 1, + 0 + ], + [ + 1, + 0, + 1 + ] + ], + "Q": [ + [ + 2, + 2, + 1 + ], + [ + 2, + 1, + 2 + ] + ], + "a0": [ + 3, + 5 + ], + "b0": [ + 4, + 2 + ], + "box": 0, + "box_ind": 0, + "box_witness": null, + "c": [ + 1, + 0, + 0 + ], + "cert": 2, + "cert_ind": 2, + "cert_witness": { + "a": [ + 1, + 1 + ], + "b": [ + 1, + 1 + ], + "kept": [ + 1, + 0 + ], + "order": [ + 1, + 0 + ] + }, + "gamma": 0, + "keepable": [], + "name": "F2-wide", + "note": "wide class (rank 2); threshold floor(2v/3) = 1", + "r_box": 2, + "rank": 2, + "tau": [ + 0, + 0 + ], + "threshold": 1, + "v": 2 + }, + { + "M": [ + [ + 4, + 3, + 3 + ], + [ + 3, + 4, + 3 + ], + [ + 3, + 3, + 4 + ] + ], + "P": [ + [ + 1, + 1, + 0 + ], + [ + 1, + 0, + 1 + ], + [ + 0, + 1, + 1 + ] + ], + "Q": [ + [ + 2, + 2, + 1 + ], + [ + 2, + 1, + 2 + ], + [ + 1, + 2, + 2 + ] + ], + "a0": [ + 3, + 5, + 6 + ], + "b0": [ + 4, + 2, + 1 + ], + "box": 0, + "box_ind": 0, + "box_witness": null, + "c": [ + 0, + 0, + 0 + ], + "cert": 3, + "cert_ind": 3, + "cert_witness": { + "a": [ + 1, + 1, + 2 + ], + "b": [ + 1, + 1, + 2 + ], + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ] + }, + "gamma": 0, + "keepable": [], + "name": "F3-tau0", + "note": "rank 3, tau = (0,0,0); threshold floor(2v/3) = 2", + "r_box": 3, + "rank": 3, + "tau": [ + 0, + 0, + 0 + ], + "threshold": 2, + "v": 3 + }, + { + "M": [ + [ + 3, + 3, + 3 + ], + [ + 5, + 4, + 3 + ], + [ + 6, + 3, + 4 + ] + ], + "P": [ + [ + 1, + 1, + 0 + ], + [ + 1, + 0, + 1 + ], + [ + 0, + 1, + 1 + ] + ], + "Q": [ + [ + 1, + 2, + 4 + ], + [ + 2, + 1, + 2 + ], + [ + 1, + 2, + 2 + ] + ], + "a0": [ + 3, + 5, + 6 + ], + "b0": [ + 1, + 2, + 1 + ], + "box": 1, + "box_ind": 1, + "box_witness": { + "a": [ + 1, + 0, + 0 + ], + "b": [ + 1, + 0, + 0 + ], + "kept": [ + 0 + ], + "order": [ + 0 + ] + }, + "c": [ + 0, + 0, + 1 + ], + "cert": 3, + "cert_ind": 3, + "cert_witness": { + "a": [ + 1, + 1, + 2 + ], + "b": [ + 1, + 1, + 2 + ], + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ] + }, + "gamma": 0, + "keepable": [ + 0 + ], + "name": "F3-tau1", + "note": "rank 3, tau = (1,0,0); threshold floor(2v/3) = 2", + "r_box": 2, + "rank": 3, + "tau": [ + 1, + 0, + 0 + ], + "threshold": 2, + "v": 3 + }, + { + "M": [ + [ + 4, + 3, + 3, + 4 + ], + [ + 3, + 4, + 3, + 4 + ], + [ + 3, + 3, + 4, + 4 + ], + [ + 5, + 5, + 5, + 6 + ] + ], + "P": [ + [ + 1, + 1, + 0 + ], + [ + 1, + 0, + 1 + ], + [ + 0, + 1, + 1 + ], + [ + 1, + 1, + 1 + ] + ], + "Q": [ + [ + 2, + 2, + 1 + ], + [ + 2, + 1, + 2 + ], + [ + 1, + 2, + 2 + ], + [ + 2, + 2, + 2 + ] + ], + "a0": [ + 3, + 5, + 6, + 7 + ], + "b0": [ + 4, + 2, + 1, + 0 + ], + "box": 0, + "box_ind": 0, + "box_witness": null, + "c": [ + 0, + 0, + 0 + ], + "cert": 4, + "cert_ind": 4, + "cert_witness": { + "a": [ + 1, + 1, + 2, + 1 + ], + "b": [ + 1, + 1, + 2, + 1 + ], + "kept": [ + 3, + 2, + 1, + 0 + ], + "order": [ + 3, + 2, + 1, + 0 + ] + }, + "gamma": 0, + "keepable": [], + "name": "F4-tau0", + "note": "rank 3, tau = (0,0,0,0); threshold floor(2v/3) = 2", + "r_box": 3, + "rank": 3, + "tau": [ + 0, + 0, + 0, + 0 + ], + "threshold": 2, + "v": 4 + } + ], + "generator": "box_floor_min.py", + "lb2": { + "configs": 16761, + "random": 160 + }, + "mixed_tau": { + "classes": { + "(3, 0)": 77, + "(3, 1)": 91, + "(3, 2)": 18, + "(3, 3)": 3, + "(4, 0)": 27, + "(4, 1)": 18, + "(4, 2)": 6 + }, + "instances": 240 + }, + "v3_tau1": { + "candidates": 27, + "configs": 3023, + "min_box": 2 + } +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/data/pivot-v5-receipt.json b/research/fstar-boxfloor-minimal-seed758ae8fe/data/pivot-v5-receipt.json new file mode 100644 index 0000000000..322e8cd0bd --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/data/pivot-v5-receipt.json @@ -0,0 +1,180 @@ +{ + "dist": [ + { + "below": false, + "count": 15, + "r_box": 2, + "tau": [ + 1, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "below": false, + "count": 1, + "r_box": 2, + "tau": [ + 1, + 1, + 1, + 2, + 1 + ], + "v": 5 + }, + { + "below": false, + "count": 1, + "r_box": 2, + "tau": [ + 1, + 1, + 2, + 1, + 1 + ], + "v": 5 + }, + { + "below": false, + "count": 50, + "r_box": 2, + "tau": [ + 2, + 2, + 2, + 1, + 1 + ], + "v": 5 + }, + { + "below": false, + "count": 16, + "r_box": 2, + "tau": [ + 2, + 2, + 2, + 1, + 2 + ], + "v": 5 + }, + { + "below": false, + "count": 7, + "r_box": 2, + "tau": [ + 2, + 2, + 2, + 2, + 1 + ], + "v": 5 + }, + { + "below": false, + "count": 7, + "r_box": 2, + "tau": [ + 2, + 2, + 2, + 2, + 2 + ], + "v": 5 + }, + { + "below": false, + "count": 132, + "r_box": 3, + "tau": [ + 1, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "below": false, + "count": 1, + "r_box": 3, + "tau": [ + 1, + 1, + 1, + 1, + 2 + ], + "v": 5 + }, + { + "below": false, + "count": 2, + "r_box": 3, + "tau": [ + 1, + 1, + 1, + 2, + 1 + ], + "v": 5 + }, + { + "below": false, + "count": 4, + "r_box": 3, + "tau": [ + 1, + 1, + 2, + 1, + 1 + ], + "v": 5 + }, + { + "below": false, + "count": 3, + "r_box": 3, + "tau": [ + 2, + 1, + 1, + 1, + 1 + ], + "v": 5 + }, + { + "below": false, + "count": 1, + "r_box": 3, + "tau": [ + 2, + 1, + 1, + 1, + 2 + ], + "v": 5 + } + ], + "generator": "pivot_v5.py seed 20261016", + "hits": [], + "tested": { + "extend2978": 80, + "random": 80, + "unit_template": 80 + } +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/make_meta.py b/research/fstar-boxfloor-minimal-seed758ae8fe/make_meta.py new file mode 100644 index 0000000000..7e043d3114 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/make_meta.py @@ -0,0 +1,358 @@ +#!/usr/bin/env python3 +"""Generate TASK.json (with the drawn catalogue card verbatim), SOURCES.json +and VERIFY.json for KB5k. Run: python3 -B make_meta.py +""" +import hashlib +import json +import os +import subprocess +import sys + +HERE = os.path.dirname(os.path.abspath(__file__)) +REPO = os.path.abspath(os.path.join(HERE, "..", "..")) +BASE = "066f57ff795dbe6d0a0ecc11fe742eadcec00c39" +PACKAGE = "research/fstar-boxfloor-minimal-seed758ae8fe" + + +def sha256_file(path): + h = hashlib.sha256() + with open(path, "rb") as fh: + for chunk in iter(lambda: fh.read(1 << 16), b""): + h.update(chunk) + return h.hexdigest() + + +def git_blob(rel): + out = subprocess.run(["git", "rev-parse", "%s:%s" % (BASE, rel)], + capture_output=True, text=True, cwd=REPO, check=True) + return out.stdout.strip() + + +def draw_card(card_id): + with open(os.path.join(REPO, "docs", "research", "agent-task-catalog.json"), + "r", encoding="utf-8") as fh: + cat = json.load(fh) + + def walk(node): + if isinstance(node, dict): + yield node + for val in node.values(): + yield from walk(val) + elif isinstance(node, list): + for item in node: + yield from walk(item) + + hit = [c for c in walk(cat) + if (c.get("id") == card_id or c.get("task_id") == card_id) + and "allowed_variations" in c] + assert len(hit) == 1, "expected one card %r, got %d" % (card_id, len(hit)) + return hit[0] + + +TASK = { + "actual_scope": ( + "Kappa-blocker KB5k (authorized explicit open request): THE SURVIVING " + "BOX-FLOOR ROUTE to F-star, plus shareable-class completeness - the " + "recorded remainder of PR 2978 (agent-78). (a) Does the sub-anchor box " + "satisfy box(M) >= floor(2v/3) for every exact 3-total rational " + "decoder (a proof would close F-star directly via cert >= box), or " + "what is the MINIMAL decoder with box < floor(2v/3) (cert reported " + "alongside, exact both)? (b) the shareable-class question of PR 2978 " + "(its 21 unrealized v = 3 combinatorial gap patterns). (c) if the box " + "floor fails but cert survives, the replacement lower bound linking " + "named/box to cert in the shareable-class vocabulary. One bounded " + "pivot maximum; smallest falsifying instance first."), + "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": BASE, + "bottleneck_link": ( + "F-star (cert(M) >= floor(2v/3), research/root-unit-decoder-lemmas " + "section 7) is the named route to closing every open T = 3 window at " + "once. PR 2978 killed the completeness link of the PR 2914 chain and " + "left the box-floor link (box >= floor(2v/3)) as the surviving route. " + "This package settles that route: the floor FAILS on the full class " + "(minimal falsifier v = 3, cert = 3 >= 2 = floor > box = 0), so the " + "route needs the tau >= 1 restriction; there the floor is PROVEN for " + "v <= 4 (Lemma LB2) and stays open at v >= 5 (bounded exact search: " + "240 instances, 0 violations)."), + "evidence": ( + "VERDICT: the box-floor route as stated (all exact 3-total rational " + "decoders) is REFUTED, minimally at v = 3 in the rank-3 class. " + "PROVEN: box = 0 iff every line has tau = 0 (a kept line needs a tied " + "bit); the minimal falsifier F3-tau0 P = [[1,1,0],[1,0,1],[0,1,1]], " + "Q = [[2,2,1],[2,1,2],[1,2,2]], M = I + 3J (rank 3, tau = (0,0,0), " + "r_box = 3, no zero arcs) has cert = 3 (replayed witness; trivial " + "upper bound v) > 2 = floor(2v/3) > 0 = box, both sides exact by the " + "vendored engine AND an independent definition-level enumeration. " + "PROVEN minimal: rank 3 forces v >= 3; a rank-2 wide-class falsifier " + "exists at v = 2 (box = 0 < 1 = floor(2v/3)); v = 3 gradient " + "tau = (1,0,0) gives cert = 3 > 2 > 1 = box; v = 4 tau = (0,0,0,0) " + "gives cert = 4 > 2 > 0 = box. F-star is NOT refuted (cert >= floor " + "on every falsifier). PROVEN (Lemma LB2, two-line repair): any two " + "lines with tau >= 1 are jointly box-keepable, so box >= min(2, " + "#keepable lines); machine-checked on 16761 canonical v = 3 configs " + "and 160 random realizable decoders v = 4..6. Consequences: the " + "tau >= 1 box floor is PROVEN for v <= 4 (threshold <= 2) and first " + "open at v = 5 (threshold 3). CHECKED: v = 3 tau >= 1 domain min box " + "= 2 = floor (3023 canonical configs recomputed, 27 gap candidates " + "all exactly 2); mixed-tau formula on 240 realizable decoders; " + "bounded v = 5 tau >= 1 search (240 exact instances, 97 with " + "r_box = 2, 0 below threshold). Exact obstruction to a v = 5 " + "falsifier recorded: Lemma RT caps a kept set at r_box only when all " + "its forward pairs are zero arcs, so box <= 2 needs every 3-subset " + "blocked in every order - Z-complete triples (all 6 ordered pairs " + "zero arcs) are the only rank route and rank(M) = 3 permits them only " + "for |S| <= 3; every other order must fail bilinearly. Shareable-class " + "completeness (PR 2978's 21 patterns) remains open."), + "existing_restriction_being_changed": ( + "Audits PR 2978's stated surviving chain link 'a box floor box >= " + "floor(2v/3) ... would close F-star' as a claim about ALL exact " + "3-total rational decoders. PR 2978's own counterexample has box = 2 " + "= floor(2v/3) at v = 3 (not a floor falsifier), and PR 2936's " + "tau = 0 demonstration is v = 2 with box = 1 = floor(2v/3) (also not " + "one), so the floor itself was never tested against decoders with " + "tau = 0 lines. This package tests it, refutes it minimally, and " + "states the exact surviving form (tau >= 1 domain) with its proved " + "range and bounded open range."), + "falsification_test": ( + "Every falsifier claim is falsified by replaying the stored witnesses " + "and recomputing both rungs from the definitions: verify.py reruns " + "the vendored PR 2914 engine (exhaustive) AND an independent " + "definition-level enumeration (brute over all label assignments for " + "v <= 3, trivial upper bound v for cert = v), asserts identities " + "(tie parity, scope identity), rank = 3, and box == min(2, #keepable) " + "on each falsifier. Lemma LB2 is falsified by any of the 16761 " + "enumerated configs where its explicit construction fails the " + "from-definition check. The v = 5 bounded claim is falsified by any " + "tau >= 1 instance with box <= 2 (the search is bounded, NOT a " + "non-existence result)."), + "intended_artifact": PACKAGE + "/ with verify.py (python3 -B " + + PACKAGE + "/verify.py) and anchor_replay.py.", + "method": ( + "Smallest falsifying instance first. (1) Exact integer constructions " + "with prescribed tau patterns at v = 2, 3, 4; exact cert/box by the " + "vendored PR 2914 engine plus an independent section-7/box definition " + "enumeration; int-only arithmetic; rank checked exactly over Q. " + "(2) Written lower bounds: the keepable-line characterization (box = " + "0 iff all tau = 0), Lemma LB2 (two-line repair, constructive), and " + "the Lemma RT/shareable-totals upper bound of PR 2978 for the " + "obstruction picture; machine replay of the LB2 construction on every " + "canonical v = 3 config with >= 2 keepable lines (including tau = 0 " + "lines, which PR 2978 job B excluded) and on random realizable " + "decoders v = 4..6. (3) Recomputation of PR 2978 job B (3023 " + "canonical configs; the vendored receipt ships empty, so everything " + "is recomputed from scratch). (4) One bounded pivot: exact kept-set " + "feasibility ladder at v = 5 (threshold 3) over 240 realizable " + "decoders from three generators (random valuation-tuned, extensions " + "of PR 2978's counterexample core with r_box = 2, unit-role " + "templates), exact box/cert on every would-be hit."), + "nearest_overlapping_prs": ( + "PR 2978 (Lemma V2, Lemma RT + shareable totals, minimal box = cert " + "counterexample v = 3 - the predecessor and handoff source), PR 2963 " + "(tied_min v = 11 exact, box weak cell), PR 2936 (Lemma BPP, tau >= 1 " + "necessary for box = cert, tau = 0 demo at v = 2), PR 2914 " + "(sub-anchor box, Lemmas SB/LB). None tests the box FLOOR against " + "tau = 0 lines and none gives a box LOWER bound in terms of the tau " + "pattern; this package does both and settles the floor's minimal " + "failure."), + "open_questions": [ + { + "blocked_by": ( + "No realizability characterization beyond Lemma SG + the " + "column-attainment condition; PR 2978's search is bounded " + "(not-found-in-cap is not unrealizable)."), + "first_step": ( + "Characterize the (a0,b0,Z) patterns forced by rank-3 " + "factorizations with prescribed odd/even valuations; extend " + "PR 2978's realize_kj.py with a valuation-level enumeration."), + "question": ( + "Are PR 2978's 21 remaining v = 3 combinatorial gap patterns " + "realizable (shareable-class completeness at v = 3)?"), + "why_it_matters": ( + "All 21 lie in the shareable class (r_box = 3); a realization " + "refutes box-completeness there too, unrealizability proves it.") + }, + { + "blocked_by": ( + "The exact obstruction recorded here: Lemma RT blocks a kept " + "set only via all-forward-zero-arc orders capped at r_box, and " + "rank(M) = 3 allows Z-complete triples only at |S| <= 3; all " + "other orders must fail bilinearly, which no search domain has " + "exhausted."), + "first_step": ( + "Either prove box >= 3 for every tau >= 1 decoder at v = 5 " + "(e.g. a three-line repair generalizing Lemma LB2 with the " + "rank-3 constraint), or construct one with box = 2 exactly " + "(r_box <= 2 is necessary by Lemma RT)."), + "question": ( + "The tau >= 1 box floor at v >= 5: is box >= floor(2v/3) on " + "that domain? First open case v = 5 (threshold 3)."), + "why_it_matters": ( + "It is the exact surviving form of the box-floor route once " + "the tau = 0 falsifiers of this package are excluded; a proof " + "would close F-star on the tau >= 1 domain (the domain all " + "prior evidence lives in).") + }, + { + "blocked_by": ( + "The shareable-class vocabulary is new; the right lower bound " + "is not yet stated."), + "first_step": ( + "State and test a candidate bound in terms of the tau pattern, " + "r_box and the tied-bit coloring MAS sums (Lemma TB " + "sketch: box >= max over tied-bit colorings of " + "sum_j MAS(Z[C_j]))."), + "question": ( + "The replacement lower bound linking named/box to cert after " + "the box floor died: what structural features control box?"), + "why_it_matters": ( + "PR 2978's chain now needs a different lower rung; this " + "package supplies the tau-pattern control (box = 0 iff all " + "tau = 0; box >= min(2, #keepable)) and the shareable-count " + "upper cap as the first pieces.") + }, + ], + "optimistic_full_cost_budget": ( + "No kappa claim; the milestone is the settled floor question. Compute " + "cap: falsifier jobs seconds; LB2 replay ~150 s of canonical configs " + "(v = 3, one pass); v = 5 pivot 240 exact instances ~290 s; anchor " + "replay ~120 s; every command under the 600 s cap, all blocking."), + "outcome": "completed", + "parameter_ranges": ( + "v = 2..5; three totals; label space F2^3 bit masks; integer P, Q " + "entries in {-4..4}; 2-adic valuations 0..3; falsifiers at v = 2, 3, " + "4 with tau patterns (0,0), (0,0,0), (1,0,0), (0,0,0,0); LB2 replay " + "on 16761 canonical v = 3 configs (all Lemma-SG-consistent (a0,b0,Z) " + "with >= 2 keepable lines, up to line/total relabeling) and 160 " + "random realizable decoders v = 4..6; mixed-tau sweep 240 realizable " + "decoders v = 3..4; v = 5 pivot 240 realizable tau >= 1 decoders " + "(80 random + 80 PR 2978-core extensions + 80 unit-role templates)."), + "predecessor_authors": ( + "PR 1590 DreamingOfClouds (Claude Opus 5.5 (Anthropic) via Claude " + "Code assistance); PR 2111 DreamingOfClouds; PRs " + "2717/2747/2774/2869/2890/2901/2914/2936/2963/2978 Aaron Wang " + "(navinor); all verified at current ground truth with gh pr view " + "--json author,title on 2026-10-16."), + "schema_version": 1, + "scope_change_reason": ( + "Authorized 'explicit open request' scope change to kappa-blocker " + "KB5k, recorded per the assignment (discussion 1166; the recorded " + "remainder of PR 2978 - the surviving box-floor route plus " + "shareable-class completeness - is the named open request). The " + "chooser OS draw (seed 758ae8fe94f704eed3a4bb471ba333b5, track " + "verifier-engineering) proposed portable-replay and replay-runtime; " + "neither is this object, and the assignment takes the KB5k request " + "instead."), + "scope_status": "changed", + "stop_rule": ( + "Stop when the box floor is settled (proved, minimal falsifier, or " + "exact obstruction with minimal demo) and the one bounded pivot is " + "recorded. Achieved: minimal falsifier PROVEN at v = 3 (rank-3 " + "class), tau >= 1 floor PROVEN for v <= 4, bounded at v = 5 (240 " + "instances, 0 hits). No further search without a new hypothesis."), + "task_id": "portable-replay", + "time_compute_cap": ( + "One bounded pivot maximum (the tau >= 1 v = 5 question); registered " + "replay under 600 s per command (observed: verify.py ~300 s, " + "anchor_replay.py ~120 s); all searches deterministic (fixed seeds, " + "instance counts, not wall-clock caps)."), +} + +SOURCES = { + "schema_version": 1, + "base_commit": BASE, + "files": [ + {"path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": git_blob("certificates/selected-result.json"), + "sha256": sha256_file(os.path.join(REPO, "certificates", + "selected-result.json"))}, + {"path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": git_blob("docs/research/agent-task-catalog.json"), + "sha256": sha256_file(os.path.join(REPO, "docs", "research", + "agent-task-catalog.json"))}, + {"path": "research/root-unit-decoder-lemmas/README.md", + "usage": "input", + "git_blob": git_blob("research/root-unit-decoder-lemmas/README.md"), + "sha256": sha256_file(os.path.join(REPO, "research", + "root-unit-decoder-lemmas", + "README.md"))}, + ], +} + +VERIFY = { + "commands": [ + { + "argv": ["{python}", "-B", "{package}/verify.py"], + "checks": ( + "KB5k package replay: vendored PR 2978 pin sets (14 + 29 " + "files); the four box-floor falsifiers re-certified three ways " + "(vendored engine exact, independent definition-level " + "enumeration, written bounds) with identities, exact rank and " + "replayed witnesses; Lemma LB2 construction replayed on 16761 " + "canonical v = 3 configs and 160 random realizable decoders; " + "mixed-tau formula sweep 240 instances; PR 2978 job B " + "recomputed from scratch (3023 configs, 27 candidates all at " + "exact box = 2); bounded tau >= 1 v = 5 pivot (240 exact " + "instances, 0 below threshold); writes CERTIFICATE.json; " + "prints PASS_KM_PINS, PASS_KM_FALSIFIER_V2/V3/V3B/V4, " + "PASS_KM_LB2, PASS_KM_MIXEDTAU, PASS_KM_V3TAU1, " + "PASS_KM_PIVOT_V5, PASS_KM_ALL, PASS_KM_VERIFY"), + "timeout_seconds": 600, + }, + { + "argv": ["{python}", "-B", "{package}/anchor_replay.py"], + "checks": ( + "Predecessor anchor reproduction: the vendored PR 2978 " + "verify.py runs UNCHANGED on a byte-copy (receipts cannot " + "touch pinned bytes) and must print every recorded anchor " + "marker, including PASS_FG_CALIBRATION tied_min=11/12 " + "cex_min_1=18/19 mp=9/16 chain=22 reach=0/12,8/19, " + "PASS_KJ_COUNTEREXAMPLE v=3 tau=2/2/2 cert=3 box=2 r_box=2 " + "independent=3/2, PASS_KJ_V2 configs=2842, PASS_KJ_V3 " + "configs=3023 box-equals-cert=2996 candidates=27 and the " + "certificate digest 0b5b55f84375b37c; prints " + "PASS_KM_ANCHORS"), + "timeout_seconds": 600, + }, + ], + "inputs": [ + "research/root-unit-decoder-lemmas/README.md", + PACKAGE + "/verify.py", + PACKAGE + "/box_floor_min.py", + PACKAGE + "/pivot_v5.py", + PACKAGE + "/anchor_replay.py", + PACKAGE + "/README.md", + PACKAGE + "/TASK.json", + PACKAGE + "/data/km-receipt.json", + PACKAGE + "/data/pivot-v5-receipt.json", + PACKAGE + "/predecessor/pr2978/predecessor/PINS.json", + PACKAGE + "/predecessor/pr2978/predecessor/pr2963/predecessor/PINS.json", + ], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready", +} + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + card = draw_card("portable-replay") + task = dict(TASK) + task["original_card"] = card + for name, obj in (("TASK.json", task), ("SOURCES.json", SOURCES), + ("VERIFY.json", VERIFY)): + with open(os.path.join(HERE, name), "w", encoding="utf-8", + newline="\n") as fh: + json.dump(obj, fh, indent=1, sort_keys=True, ensure_ascii=False) + fh.write("\n") + print("wrote %s" % name) + + +if __name__ == "__main__": + main() diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/pivot_v5.py b/research/fstar-boxfloor-minimal-seed758ae8fe/pivot_v5.py new file mode 100644 index 0000000000..f253b0b491 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/pivot_v5.py @@ -0,0 +1,190 @@ +#!/usr/bin/env python3 +"""KB5k pivot (one bounded): the box floor on the tau >= 1 domain. + +PR 2978's stated surviving domain for the box-floor route is tau(t) >= 1 +everywhere. Lemma LB2 (box_floor_min.py) proves the floor for v <= 4 there +(threshold floor(2v/3) <= 2), so v = 5 (threshold 3) is the first open case. +This script searches for the smallest tau >= 1 decoder with box <= 2 at v = 5, +exact on every reported value, and records the structural features (tau +pattern, shareable count r_box, zero-arc density) of every instance. + +Falsifier criterion is EXACT and fast: box <= 2 iff NO kept set of size 3 is +feasible inside the sub-anchor box (kept_k_witness ladder, exhaustive a-label +enumeration with per-line b-mask filtering). On a hit, the exact box and cert +are recomputed by the vendored PR 2914 engine. + +Writes data/pivot-v5-receipt.json. Run: python3 -B pivot_v5.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__)) +VEND = os.path.join(HERE, "predecessor", "pr2978") +sys.path.insert(0, os.path.join(VEND, "predecessor", "pr2963")) +import named_exact as ne # noqa: E402 + +fg = ne.fg +spec = importlib.util.spec_from_file_location( + "box_attack", + os.path.join(VEND, "predecessor", "pr2963", "predecessor", "pr2936", + "box_attack.py")) +ba = importlib.util.module_from_spec(spec) +spec.loader.exec_module(ba) +sys.path.insert(0, HERE) +from box_floor_min import kept_k_witness, gf2_rank_int, log # noqa: E402 + + +def features(mod, ad): + v = mod["v"] + arcs = mod["arcs"] + return dict(v=v, tau=list(ad["tau"]), + r_box=sum(1 for j in range(3) if ad["c"][j] == ad["gamma"]), + c=list(ad["c"]), gamma=ad["gamma"], + n_zero_arcs=len(arcs), + zero_density=len(arcs) / (v * (v - 1))) + + +def rand_dec(rng, v, val_bits=(0, 1, 2, 3), p_zero=0.30): + def ent(): + if rng.random() < p_zero: + return 0 + mag = rng.choice(val_bits) + return rng.choice((-1, 1)) * (1 << mag) + P = [tuple(ent() for _ in range(3)) for _ in range(v)] + Q = [tuple(ent() for _ in range(3)) for _ in range(v)] + try: + mod = fg.model(P, Q) + except (AssertionError, ValueError): + return None + ad = fg.anchor_data(mod) + if min(ad["tau"]) < 1: + return None + if gf2_rank_int(mod["M"]) != 3: + return None + return mod, ad + + +def extend_2978(rng, v=5): + """PR 2978's minimal counterexample core (M = diag(8, 8, 12), r_box = 2) + plus (v - 3) new lines with small integer entries, q-column 2 kept even + (so total 2 stays non-shareable and r_box = 2), tau >= 1 on new lines.""" + P = [(-1, -3, 0), (1, -1, -2), (3, 3, 3)] + Q = [(1, -3, 2), (3, -1, -2), (3, -1, 2)] + pool = [-3, -2, -1, 1, 2, 3] + for _ in range(v - 3): + P.append(tuple(rng.choice(pool) for _ in range(3))) + q = [rng.choice(pool) for _ in range(2)] + q.append(rng.choice((-2, 2, -4, 4))) + Q.append(tuple(q)) + try: + mod = fg.model(P, Q) + except (AssertionError, ValueError): + return None + ad = fg.anchor_data(mod) + if min(ad["tau"]) < 1: + return None + if gf2_rank_int(mod["M"]) != 3: + return None + return mod, ad + + +def unit_template(rng, v=5): + """Role-template family: q(s) = e_{j(s)} (scaled), p(t) sparse with + p_{j(t)}(t) odd; total 2 forced non-shareable through even q-column 2. + Dense zero arcs by design (M_ts = p_{j(s)}(t)).""" + roles = [rng.randrange(3) for _ in range(v)] + if len(set(roles)) < 3: + return None + q_scale = [rng.choice((1, -1, 1, 3, -3)) for _ in range(v)] + P, Q = [], [] + for t in range(v): + row = [0, 0, 0] + for j in range(3): + if rng.random() < 0.45: + row[j] = rng.choice((-3, -2, -1, 1, 2, 3)) + if row[roles[t]] == 0 or row[roles[t]] % 2 == 0: + row[roles[t]] = rng.choice((-3, -1, 1, 3)) + P.append(tuple(row)) + q = [0, 0, 0] + q[roles[t]] = q_scale[t] + for j in range(3): + if j != roles[t] and rng.random() < 0.18: + q[j] = rng.choice((-2, 2, -4, 4)) # even: keeps n_2 >= 1 + Q.append(tuple(q)) + try: + mod = fg.model(P, Q) + except (AssertionError, ValueError): + return None + ad = fg.anchor_data(mod) + if min(ad["tau"]) < 1: + return None + if gf2_rank_int(mod["M"]) != 3: + return None + return mod, ad + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + rng = random.Random(20261016) + gens = [("random", rand_dec), ("extend2978", extend_2978), + ("unit_template", unit_template)] + tested = {"random": 0, "extend2978": 0, "unit_template": 0} + hits = [] + dist = {} + n = 0 + v = 5 + k = (2 * v) // 3 # threshold: falsifier needs box < k, i.e. no k-kept + target = 240 # deterministic instance count (no wall-clock dependence) + while n < target: + name, gen = gens[n % 3] + got = gen(rng, v) + if got is None: + continue + mod, ad = got + n += 1 + tested[name] += 1 + arcs = frozenset(mod["arcs"]) + wit = kept_k_witness(v, arcs, ad["a0"], ad["b0"], k) + ft = features(mod, ad) + key = (v, ft["r_box"], tuple(ft["tau"]), wit is None) + dist[key] = dist.get(key, 0) + 1 + if wit is None: + # box < threshold: exact both sides by the vendored engine + bx, bxw = ba.box_exact_tolerant(mod, ad) + ce, cew = fg.cert_exact(mod, max_v=v) + assert fg.replay_witness(mod, cew) + assert bxw is None or fg.replay_witness(mod, bxw) + assert bx < k, (v, bx, k) + hits.append(dict(family=name, features=ft, cert=ce, box=bx, + P=[list(p) for p in mod["P"]], + Q=[list(q) for q in mod["Q"]], + cert_witness=cew, box_witness=bxw)) + log("PIVOT HIT v=%d family=%s tau=%s r_box=%d cert=%d box=%d " + "< thr=%d" % (v, name, ft["tau"], ft["r_box"], ce, bx, k)) + log("pivot done: tested=%d hits=%d" % (n, len(hits))) + for key in sorted(dist, key=str): + log(" dist v=%d r_box=%d tau=%s below-threshold=%s count=%d" + % (key[0], key[1], list(key[2]), key[3], dist[key])) + print("PASS_KM_PIVOT_V5 tested=%d hits=%d " + "families=%s" % (n, len(hits), + ",".join("%s:%d" % (k2, tested[k2]) + for k2 in tested))) + receipt = dict(generator="pivot_v5.py seed 20261016", + tested=tested, hits=hits, + dist=[dict(v=k[0], r_box=k[1], tau=list(k[2]), + below=bool(k[3]), count=c) + for k, c in sorted(dist.items(), key=str)]) + with open(os.path.join(HERE, "data", "pivot-v5-receipt.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump(receipt, fh, indent=1, sort_keys=True) + fh.write("\n") + + +if __name__ == "__main__": + main() diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/CERTIFICATE.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/CERTIFICATE.json new file mode 100644 index 0000000000..ec522c9a7f --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/CERTIFICATE.json @@ -0,0 +1,91 @@ +{ + "base_commit": "0614abaef427f123d9b844f85a759e64ee3ab29c", + "digest": "0b5b55f84375b37c", + "files": { + "README.md": "582dd8a6651cfe8d4798b3134112c3e1165d0ed3c6d57c2761c58f04265008f4", + "TASK-CARD.md": "1e10ab4f4a657e6c72179957957299e9a97267cec22bbd35410a05c6c224b8f2", + "TASK.json": "c2aaa7096f8db10ecdd328a6bba2553f774c06df34c6e36ecd141cae290bc509", + "box_search_kj.py": "f341925160cc8476dd3484d3ba513a3e1428804fbd9c804e9db62a9c3e3a85f8", + "data/box-search-kj-receipt.json": "26dae32a86d1a3fae7f6cecf6c3e7e4b410a2ffe4a70105c1efe88b9fbf7f011", + "data/escape-receipt.json": "9ac402092558d149cb18259371712a461a3dc2deefd63b92c070045592f152df", + "data/realize-kj-receipt.json": "93ec89e6fc2ce60fdcddd1516fd31fd29686fc5efd4dd7b6831e0ed45e006cce", + "escape_classify.py": "e8d2bdadc6da4d30c52866622ef5a161fb83df085969dbfb74500b2499725804", + "predecessor/PINS.json": "1a0ff7143be416017f43adf00a28e41b14daf8e67de7a3d318593c16b62c1922", + "realize_kj.py": "f08702f9141b900b71bd0d97d466f2d7bebb0ffcda6a93ac7560817765a8033d", + "verify.py": "e99b62688b37fa3bca3c79663a2fa9887f39dc65e904bc14ac200e99292e5369" + }, + "headline": { + "box_violations": 0, + "cex_box": 2, + "cex_cert": 3, + "cex_r_box": 2, + "cex_tau": [ + 2, + 2, + 2 + ], + "counterexample_P": [ + [ + -1, + -3, + 0 + ], + [ + 1, + -1, + -2 + ], + [ + 3, + 3, + 3 + ] + ], + "counterexample_Q": [ + [ + 1, + -3, + 2 + ], + [ + 3, + -1, + -2 + ], + [ + 3, + -1, + 2 + ] + ], + "escape_classes": { + "E1": 466, + "E2": 1768, + "E3": 6, + "E4": 18 + }, + "pr2963_pool_escapes": 19, + "projection_drops": 1788, + "realizable_instances": 360, + "realized_counterexamples": 3, + "v2_configs": 2842, + "v2_proven": "box = cert = 2 at v = 2, tau >= 1", + "v3_candidates": 27, + "v3_configs": 3023, + "verdict": "box-completeness for tau >= 1 REFUTED; minimal counterexample v = 3, cert = 3 > box = 2" + }, + "markers": [ + "PASS_KJ_PINS", + "PASS_FG_CONTROLS", + "PASS_FG_CALIBRATION", + "PASS_KJ_ANCHORS", + "PASS_KJ_TAU0_DEMO", + "PASS_KJ_COUNTEREXAMPLE", + "PASS_KJ_JOBS", + "PASS_KJ_ESCAPE", + "PASS_KJ_REALIZE", + "PASS_KJ_WITHOUTLOSS" + ], + "package": "fstar-box-withoutloss-seed7f3a1c", + "schema_version": 1 +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/README.md b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/README.md new file mode 100644 index 0000000000..1ebca2f203 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/README.md @@ -0,0 +1,322 @@ +# F-star family gap: Lemma BPP's without-loss question - box-completeness FAILS at tau >= 1, minimal counterexample v = 3 (no kappa) + +## Scope + +Kappa-blocker **KB5j** (authorized explicit open request from the +[handoff thread](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166); +scope changed from the drawn `bit-new-register-model` card and recorded in +`TASK.json`): settle **Lemma BPP's without-loss question** of open problem +**F-star** (`cert(M) >= floor(2v/3)` for exact 3-total rational decoders, +`research/root-unit-decoder-lemmas` section 7) - the exact blocker +[PR 2963](https://github.com/CrocSwap/integer-mult-bounds/pull/2963) names for +box-completeness: may one assume, without loss at `tau >= 1`, that an attaining +L8 witness satisfies Lemma BPP conditions (i)+(ii), i.e. is +`box(M) = cert(M)` for every exact 3-total decoder with `tau(t) >= 1` +everywhere? + +**Answer: NO.** A minimal exact counterexample exists at `v = 3` with +`tau = (2,2,2)`: `cert = 3 > 2 = box`, both sides exact. F-star itself is +**not** proved and **not** refuted here (the counterexample has +`cert = 3 >= 2 = floor(2v/3)`). Every claim is labelled PROVEN / CHECKED / +DEMOTED. + +## Verdict + +1. **PROVEN: box = cert = 2 at v = 2 for every tau >= 1 decoder** (written + proof below; machine-checked on all 2842 scope-consistent anchor/zero + patterns). So the minimal counterexample size is **exactly v = 3**. +2. **PROVEN: minimal tau >= 1 counterexample at v = 3.** Exact 3-total + decoder (integers, all arithmetic exact): + + ```text + P = [[-1, -3, 0], Q = [[ 1, -3, 2], + [ 1, -1, -2], [ 3, -1, -2], + [ 3, 3, 3]] [ 3, -1, 2]] + + M = P Q^T = diag(8, 8, 12) gamma = 0 + tau = (2, 2, 2) c = (0, 0, 1) + a0 = [3, 3, 7] b0 = [3, 3, 3] (bit masks: 3 = {0,1}, 7 = {0,1,2}) + ``` + + Exact both sides: `cert = 3` (replayed attaining witness below; independent + enumeration), `box = 2` (PROVEN upper bound plus explicit box witness). + `tau(t) >= 1` everywhere, the tie and scope identities (Lemmas CT/SG) hold + machine-checked, and `M` has rank 3 (exact 3-total; all three totals used). +3. **PROVEN: the obstruction is a rank condition on the shareable totals.** + Lemma RT (below): when every forward pair of a kept set is a zero arc, + `K[S,S]` is unit triangular over F2, so `|S| = rank_F2(K[S,S])`, and + `rank_F2(K) <= r(A,B)` = number of totals used on both label sides. In the + box only the **shareable** totals (`c_j = gamma`) can enter `K` at all; + here `c = (0,0,1)` gives `r_box = 2`, so `box <= 2 < 3 = cert`. Every + attaining witness must certify line 2 through the **non-tied shared bit 2** + (Lemma BPP condition (i) fails there; recorded projection drop 3 -> 2). + So neither projection nor line-by-line re-pairing is without loss. +4. **CHECKED: escape classification (PR 2963's pool).** All 19 distinct + escaping witnesses (21 events) of PR 2963's v = 3..5 fixture-sub-decoder + pool are **cosmetic (E1)**: out-of-box bits that change no `K_tt` and no + forward-arc parity; sub-anchor projection preserves them verbatim in value + (0 drops, 0 box gaps). The escapes are labelling artefacts, not structure. +5. **REFUTED (bounded): projection is not without loss at tau >= 1.** On 360 + realizable tau >= 1 instances (v = 3..4: 320 random small-integer decoders + with varied 2-adic valuations + 40 GL_3(Z) fixture transforms at v = 3), + 1788 replayed witnesses project to strictly lower value (E2 dominant: + 1768 certification escapes, E4 18, E3 6; E1 466). `box = cert` held on all + 360 (0 violations), so on that domain re-pairing exists although + projection fails - until item 2 shows re-pairing can fail too. +6. **Narrowed surviving question (one stated condition).** Box-completeness + on the **shareable class** (every total `j` has `c_j = gamma`, i.e. each + total occurs in some `a0(t)` and some `b0(s)`): all earlier evidence lives + there (fixtures, PR 2936/2963 sweeps, the 360 instances above). It is + PROVEN at v = 2 and CHECKED at v = 3 on all 2996 non-candidate + configurations; the exact remaining v = 3 question is the realizability of + 21 combinatorial gap patterns (below). + +## The minimal counterexample, in detail + +Anchor data (canonical reduced normalization; `m = (0,0,0)`, `n = (0,0,1)`, +`gamma = min(m+n) = 0`): + +| t | p(t) | q(t) | a0(t) | b0(t) | tau(t) | v2(M_tt) | +|---|---|---|---|---|---|---| +| 0 | (-1, -3, 0) | (1, -3, 2) | 3 = {0,1} | 3 = {0,1} | 2 | 3 | +| 1 | (1, -1, -2) | (3, -1, -2) | 3 = {0,1} | 3 = {0,1} | 2 | 3 | +| 2 | (3, 3, 3) | (3, -1, 2) | 7 = {0,1,2} | 3 = {0,1} | 2 | 2 | + +`M = diag(8, 8, 12)`: **every** off-diagonal pair is a zero arc. Tie parity +holds: all `tau(t) = 2` even and all `v2(M_tt) = 3, 3, 2 > 0 = gamma` +(cancellation lines). Scope identity holds machine-checked: `K0_ts = 0` on +every zero arc (`|a0(t) intersect b0(s)|` even everywhere) and `K0_tt = 0` +since every `tau` is even. + +**cert = 3 (attaining witness, replayed).** Labels `a = b = [1, 2, 4]` +(unit pairs on totals 0, 1, 2 at lines 0, 1, 2), kept `[2, 1, 0]` in that +order. `K_tt = 1` on all three lines; the only forward pairs are +`(2,1), (2,0), (1,0)`, all zero arcs, and `K_21 = K_20 = K_10 = 0` (distinct +unit bits). Line 2 is certified through the non-tied shared bit 2 +(`p_2(2) = 3` odd is in `a0(2)`, but `q_2(2) = 2` has `v2 = 1 > gamma`, so +bit 2 is **not** in `b0(2)`): Lemma BPP condition (i) fails exactly there, +and the witness's sub-anchor projection keeps only lines 0 and 1 (value 2). + +**box = 2 (PROVEN).** In the box `b(t) subset of b0(t) = {0,1}` for every t, +so bit 2 never appears on a b-side and every box `K = A B^T` has +`rank_F2(K) <= 2`. Since every forward pair of any kept set is a zero arc, +Lemma RT gives `|S| = rank_F2(K[S,S]) <= 2` for every box witness. The bound +is attained: `a = b = [1, 2, 0]` on kept lines `{0, 1}` (order `0 < 1`) is a +valid box witness of value 2 (`K_00 = K_11 = 1`, `K_01 = 0`). Hence +`box = 2 < 3 = cert`. An independent enumeration (not the vendored engine) +recomputes both values from the definition; see `verify.py`. + +## Lemma RT (triangular rank) - PROVEN + +> **Lemma RT.** Let `(a, b)` be any L8 labelling and `S` a kept set in order +> `prec` (so `K_tt = 1` on `S` and `K_ts = 0` on every forward zero arc). If +> every forward pair `(t, s)`, `t prec s` in `S`, is a zero arc, then +> `det_F2(K[S,S]) = 1`; consequently `|S| = rank_F2(K[S,S])` and +> `|S| <= r(a, b)`, the number of totals `j` with some `a(t)` and some +> `b(s)` using `j`. + +*Proof.* Under the hypothesis `K[S,S]` is unit lower triangular in the order +`prec`: the diagonal is 1 and every forward entry is 0 (zero arc). A +triangular matrix with unit diagonal has determinant 1 over any field, so it +is invertible and has rank `|S|` over F2. `K = A B^T` with `A, B` the +bit-matrices of the labels; `rank_F2(K) <= min(rank A, rank B)`, and both +ranks are at most the number of totals used on the respective sides, so +`rank_F2(K) <= r(a,b)`. QED + +> **Corollary (shareable totals).** For box labels a total `j` contributes to +> `K` only if `j in a0(t)` for some `t` and `j in b0(s)` for some `s`; this +> holds exactly when `c_j = m_j + n_j = gamma`. So in the box +> `r(a,b) <= r_box := #{j : c_j = gamma}` and, when every forward pair of the +> kept set is a zero arc, `|S| <= r_box`. + +*Proof.* `j in a0(t)` for some `t` iff `m_j` is attained (always true for a +nonzero p-column), and `j in b0(s)` for some `s` iff `min_s v2(q_j(s)) = +n_j = gamma - m_j`, i.e. `c_j = gamma`. QED + +The hypothesis "every forward pair is a zero arc" is essential: when some +`M_ts != 0`, `K_ts` is unconstrained in the forward direction and `det` need +not be 1 (this is how `tied_min` reaches `box = 11 > 3 = r_box`). The +counterexample sits exactly where the hypothesis is strongest: `M` diagonal +forces rank `|S|` for every kept set in every order. + +## Lemma (v = 2) - PROVEN: box = cert = 2 at tau >= 1 + +> **Lemma V2.** Every exact 3-total decoder on v = 2 lines with +> `tau(0), tau(1) >= 1` has `box = cert = 2`. Hence a box-completeness +> counterexample at `tau >= 1` needs `v >= 3`. + +*Proof.* `cert <= 2` trivially, so it suffices to build a box witness keeping +both lines. Pick tied bits `p in a0(0) intersect b0(0)` and +`q in a0(1) intersect b0(1)` (nonempty by `tau >= 1`). +If `M_01 != 0` or `M_10 != 0`, order the lines so that the nonzero pair is +backward (or absent): no forward zero arc exists, any certifying box pairs +work (Lemma SB (ii)). If both arcs are zero and `p != q`, the unit pairs +`a = b = {p}` and `a = b = {q}` give `K_01 = 0` in the order `0 < 1`. If +both arcs are zero and `p = q = j`, the scope identity (Lemma SG) makes +`|a0(0) intersect b0(1)|` even, and `j` lies in that set, so there is +`x != j` with `x in a0(0) intersect b0(1)`; take +`a(0) = {j, x}, b(0) = {j}, a(1) = {j}, b(1) = {j, x}`: then +`K_00 = K_11 = 1` and `K_01 = |{j, x} intersect {j, x}| = 0` (mod 2). All +pairs are sub-anchor pairs and `tau >= 1` is used exactly once (Lemma SB +(ii)). QED + +Machine corroboration: all 2842 scope-consistent `(a0, b0, Z)` patterns at +`v = 2` with `tau >= 1` give `box = cert = 2` (exhaustive, engine exact), +and PR 2936's `tau = 0` demonstration still reads `cert = 2 > box = 1`. + +## Method (smallest instance first; exact arithmetic; no scan-and-trust) + +| job | domain | result | +|---|---|---| +| A | v = 2 all `(a0,b0,Z)` with tau >= 1 and Lemma SG parity (2842 configs) | box = cert = 2 in all (PROVEN above) | +| B | v = 3 all `(a0,b0,Z)` up to line/total relabeling (7864 raw -> 3023 canonical) | 2996 with box = cert_max (box = 3 witnessed); 27 combinatorial gap candidates (cert_max = 3 > box = 2) | +| C | 360 realizable tau >= 1 decoders (320 random v = 3..4 with valuations in {0,1,2} bits + 40 GL_3(Z) fixture transforms at v = 3) | 0 box violations; 1788 strict projection drops (E2 1768, E1 466, E4 18, E3 6) | +| D | realization of the 27 candidates (odd/even valuation recipe; per-row exhaustive q, seeded P restarts; alphabets {+-1,+-3}/{+-2,0} then +-5,+-7/+-4,+-6) | 3 realized, all with `cert = 3 > box = 2` (the counterexample family, `M` diagonal); 3 unrealizable (a total enters some `b0` with no `a0` line attaining `m_j`); 21 not found in cap | + +Certificate values are exact: `cert`/`box` by the vendored PR 2914 engine's +exhaustive enumerations (`cert_exact`, `box_exact_tolerant`), witnesses +replayed independently (`replay_witness`, `in_box`), and the delivered +counterexample is re-certified by an independent enumeration written from the +section-7 definition of `cert(M)` (not the engine), plus the PROVEN `box <= 2` +rank bound. All arithmetic is int-only. + +**Escape classification (job 1).** E1 cosmetic (projection preserves value), +E2 certification escape (kept line certified through non-tied shared bits; +BPP condition (i) fails), E3 arc parity (condition (ii) fails), E4 both. PR +2963's pool is entirely E1; the broader witness pool is E2-dominated, and the +delivered counterexample's attaining witness is an E2 escape that **no** +box witness can replace (rank bound), which is precisely why it is a +counterexample and not a cosmetic escape. + +## What is proved, what is checked, what is demoted + +- **PROVEN (written proofs in this README):** Lemma V2 (box = cert = 2 at + v = 2, tau >= 1); Lemma RT (triangular rank) and its shareable-totals + corollary; the minimal tau >= 1 counterexample at v = 3 (`cert = 3 > 2 = + box`, with `box <= 2` from the corollary and `cert = 3` from the replayed + witness); Lemma BPP's conditions (i)+(ii) are **not** without loss at + `tau >= 1` (the counterexample's every attaining witness violates (i) on + line 2, since `b0(2)` excludes bit 2 while the only certifying bits for + line 2 with rank 3 are the three distinct totals). +- **CHECKED (machine, exhaustive or replayed):** the 2842 v = 2 configs; the + 3023 v = 3 combinatorial configs (cert over-approximated by full-label + `cert_max(Z)`, box exact); the 360 realizable instances and 1788 + projection drops; the 19 cosmetic escapes of PR 2963's pool; the three + realizations with exact `cert`/`box` and identities; predecessor anchors + reproduced from pristine copies (`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 + named=9x12`, `PASS_KB5I_BOXREPLAY in-box=12/12`, `PASS_BOX_SEARCH + bpp-strict-tau0=yes`, PR 2936 tau = 0 demo `cert = 2 > box = 1`). +- **DEMOTED / OPEN:** box-completeness for `tau >= 1` at general v is + **refuted**, not open; its surviving shareable-class form is open at + `v >= 3` (21 combinatorial patterns not realized in cap - unrealized is + not unrealizable). The without-loss reading of Lemma BPP is dead: neither + projection nor re-pairing preserves the certificate value in general. The + matched-pivot floor stays demoted. F-star is **not** proved and **not** + refuted; the box-floor route is untouched (the counterexample has + `box = 2 = floor(2v/3)`), but the completeness link of the PR 2914 chain is + gone and any successor must carry the shareable-rank condition. + +## Consequences for the family-gap route + +PR 2914's route (b) required `cert = box-max` at `tau >= 1` plus a box floor. +Item 2 kills the equality: the certificate can gain exactly the rank that +non-tied shared bits add to `K` (here the third total at level +`c_2 = 1 > gamma`). What survives: `cert >= box` always, so a **box floor** +`box >= floor(2v/3)` on the `tau >= 1` domain would still close F-star there +without any completeness statement; and `cost >= cert` (PR 1590, PROVEN) is +untouched. This counterexample does not falsify F-star (`cert = 3 >= 2`). + +## Open next questions + +1. **Realizability of the 21 remaining v = 3 combinatorial gap patterns.** + Why it matters: all 21 sit in the shareable class (`r_box = 3`), so a + realization gives a shareable-class counterexample and kills + box-completeness there too; a proof of unrealizability would prove + box-completeness at v = 3 in the shareable class (the class all prior + evidence lives in). First step: characterize the `(a0,b0,Z)` patterns + forced by `M = P Q^T` rank-3 factorizations with prescribed odd/even + valuations (the odd-term parity of every `M_ts`); the search so far is + seeded enumeration over alphabets `{+-1,+-3}/{+-2,0}` and + `{+-1..+-7}/{+-2..+-6,0}` with 10,000-14,000 P-restarts and exhaustive + q-rows per candidate. Blocked by: no realizability characterization beyond + Lemma SG + the column-attainment condition. +2. **The shareable-class box-completeness question at v >= 4** (the narrowed + without-loss question): is `cert = box` when every total has `c_j = gamma`? + First step: extend the job-B combinatorial enumeration to v = 4 with + cert-side subset DP instead of full-label over-approximation. Blocker: + `8^4` label enumeration per configuration times the zero-pattern lattice. + +## Reproduce + +Standard library only, Python 3.10+ (registered replay: 3.12): + +```sh +python3 -B research/fstar-box-withoutloss-seed7f3a1c/verify.py +python3 scripts/research_package.py --package research/fstar-box-withoutloss-seed7f3a1c --check-only +``` + +`verify.py` recomputes everything from scratch (jobs A-D, the escape +classification, the independent counterexample enumeration, the predecessor +anchor reproduction) and prints `PASS_KJ_*` markers; receipts under `data/` +are digested into `CERTIFICATE.json` (written with `newline="\n"`). + +## Exact heads and pins + +- Base: `0614abaef427f123d9b844f85a759e64ee3ab29c` (frozen assignment pin = + canonical `origin/main` at worktree creation, 2026-10-16). +- [PR 2963](https://github.com/CrocSwap/integer-mult-bounds/pull/2963) head + `ee755e682b3b30d493e764d3be50003b13b69b4a` (vendored package tree, + including its nested predecessor copies of PR 2936 and PR 2914 files). +- [PR 2936](https://github.com/CrocSwap/integer-mult-bounds/pull/2936) head + `f0ef06f13e4de3e50c211c880bdc6891c09620a1`; [PR 2914](https://github.com/CrocSwap/integer-mult-bounds/pull/2914) + head `3f7781efccdf10fa61a1e0a6f11c191579b21280` (through the vendored + copies; SHA-256 pins in `predecessor/PINS.json`, PR 2963's own 14-file pin + set re-asserted at every replay, fixture hashes `670ed9...`/`860647...` + asserted). + +## Credit + +F-star, `cert(M)`, L8 labellings and the proven chain `cost >= cert(M)`: +`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). +Fixtures `tied_min`/`cex_min_1` and their recorded certificate limits 11/18: +DreamingOfClouds, [PR 2111](https://github.com/CrocSwap/integer-mult-bounds/pull/2111). +Lemmas SF/MP/RK/AN and the exact-completion engine design: Aaron Wang, +[PR 2717](https://github.com/CrocSwap/integer-mult-bounds/pull/2717). Lemma +MX: Aaron Wang, +[PR 2747](https://github.com/CrocSwap/integer-mult-bounds/pull/2747). Zero +digraph machinery: Aaron Wang, +[PR 2774](https://github.com/CrocSwap/integer-mult-bounds/pull/2774). Lemmas +SC/SG and the canonical reduced normalization: Aaron Wang, +[PR 2869](https://github.com/CrocSwap/integer-mult-bounds/pull/2869). chi(Z) +machinery: Aaron Wang, +[PR 2890](https://github.com/CrocSwap/integer-mult-bounds/pull/2890). +Family-gap definition and Lemma CT: Aaron Wang, +[PR 2901](https://github.com/CrocSwap/integer-mult-bounds/pull/2901). +Sub-anchor box, Lemmas SB/LB: Aaron Wang, +[PR 2914](https://github.com/CrocSwap/integer-mult-bounds/pull/2914). Lemma +BPP, the `tau = 0` demonstration and the `tau >= 1` necessity pin: Aaron +Wang, [PR 2936](https://github.com/CrocSwap/integer-mult-bounds/pull/2936). +The 12 tied_min v = 11 sub-decoders and the box weak-cell closure: Aaron +Wang, [PR 2963](https://github.com/CrocSwap/integer-mult-bounds/pull/2963). +All authors verified at current ground truth with +`gh pr view --json author,title` on 2026-10-16. New content here: Lemma V2, +Lemma RT and the shareable-totals corollary, the minimal v = 3 +counterexample, the escape classification (E1-E4), and the v = 2/v = 3 +combinatorial enumerations. + +## Freshness and collision checks + +Pair-collision checks (toolkit `disc-comments --grep`, discussions 1317 and +1166, nested replies) at entry found no live claim on this object; the last +family-gap activity is KB5i's FINDING/DONE/RELEASED (PR 2963, +2026-10-16 14:36:56 UTC), which this assignment extends. The entry overlap +survey (`find_overlap.py`, object proper names and synonyms, `--refresh`, +complete pagination: 240 open PRs, 1660 discussion records at 14:44-14:45 +UTC) 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). No kappa, supplier, +word or moment claim. diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/SOURCES.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/SOURCES.json new file mode 100644 index 0000000000..dfd9d04287 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/SOURCES.json @@ -0,0 +1,24 @@ +{ + "base_commit": "0614abaef427f123d9b844f85a759e64ee3ab29c", + "files": [ + { + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "path": "certificates/selected-result.json", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "usage": "provenance" + }, + { + "git_blob": "889b95d936746df124872133ae1e7cc339adcb92", + "path": "docs/research/agent-task-catalog.json", + "sha256": "7d185cd8c2af35988d638d969748ad7b670f902606444dbfc748e4402c340df6", + "usage": "provenance" + }, + { + "git_blob": "de305484c78226a3f8da5f3277ced78974116fbb", + "path": "research/root-unit-decoder-lemmas/README.md", + "sha256": "e3c856bc361a57cc2424c829001dba94e8f3a1bc8f6616f9c2f740e9665506a9", + "usage": "input" + } + ], + "schema_version": 1 +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/TASK-CARD.md b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/TASK-CARD.md new file mode 100644 index 0000000000..a50bc29630 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/TASK-CARD.md @@ -0,0 +1,80 @@ +# Local task card (KB5j) — written before substantial computation + +```text +Task ID / proposed scope key: KB5j / fstar-box-withoutloss (scope key of the drawn + card bit-new-register-model: 7084092dd726e7ba1f2f; scope CHANGED, see below) +Base commit; exact predecessor and dependency heads: + base 0614abaef427f123d9b844f85a759e64ee3ab29c (origin/main at worktree creation, + 2026-10-16); predecessors PR 2963 head ee755e682b3b30d493e764d3be50003b13b69b4a, + PR 2936 head f0ef06f13e4de3e50c211c880bdc6891c09620a1, PR 2914 head + 3f7781efccdf10fa61a1e0a6f11c191579b21280 (vendored byte-exact, pins asserted). +Concrete object and question: + Open problem F-star (research/root-unit-decoder-lemmas section 7, PR 1590): + cert(M) >= floor(2v/3) for exact 3-total rational decoders. Object here is the + LAST named blocker of the family-gap line (PR 2963's exact statement): + Lemma BPP's WITHOUT-LOSS QUESTION at tau >= 1 - may one assume, without loss, + that an attaining L8 witness satisfies Lemma BPP conditions (i)+(ii) (odd tied + overlap per kept line, even off-anchor shared parity on forward zero arcs), + i.e. is box(M) = cert(M) for every exact 3-total decoder with tau(t) >= 1 + everywhere (box-completeness)? +Scope status: changed; reason for refinement or change: + Authorized "explicit open request" scope change (assignment records this reason): + the drawn cards (bit-new-register-model / bit-helper-contract, chooser seed + 0194e0b2ffbe43b4e67165afcf5ee6cd, track bit-mechanisms) are not this object; + discussion 1166 carries the explicit open request "Lemma BPP's without-loss + question remains the exact blocker" (PR 2963 body), which this assignment takes. +Existing restriction being changed (or exact claim being audited): + Audit/settle PR 2914 open question 1 + PR 2936 open question 1 as narrowed by + PR 2963: box-completeness for tau >= 1 (Lemma SB (iii) PROVEN excludes tau = 0). +Method; explicit parameter ranges/candidate alphabet: + (1) Classify the escape mechanism of PR 2963's 21 escaping witnesses (v = 3..5 + fixture sub-decoders) exactly; (2) prove or refute the line-by-line re-pairing + (repair) lemma - smallest instance first: v = 2 (case analysis on anchor data), + then v = 3 exhaustive label-space checks and a smallest-first decoder search + (exact cert vs exact box, both sides certified by replayed witnesses or exact + enumeration; int-only arithmetic); (3) if neither falls, isolate the precise + parity condition that blocks repair with a minimal demo. +Nearest overlapping PRs and why this adds something: + PR 2914 (box, Lemmas SB/LB), PR 2936 (Lemma BPP, tau >= 1 necessary, v = 7..11 + census), PR 2963 (tied_min v = 11 exact, box weak cell closed, BPP strictness + at tau = 0). None settles the without-loss question; this is its named blocker. +Declared milestone: local module (scoped lemma/obstruction package; no kappa). +Optimistic full cost budget; required observable improvement: + No kappa claim; milestone is a PROVEN lemma, a minimal counterexample, or an + exact isolated obstruction. Compute cap: about 25 minutes of heavy search in + blocking chunks with receipts; exactness over speed (never scan-and-trust). +Unresolved consumer/restoration costs; family expansion decision if continuing: + Not applicable at this milestone; F-star closure remains conditional on the + chain cost >= cert and the box floor (PR 2914), whose hypotheses must be + re-verified link by link if box-completeness falls. +Success evidence; falsification test; time/compute cap: + Success: (a) PROVEN box-completeness at tau >= 1 (written proof + machine + checks), or (b) minimal tau >= 1 decoder with cert > box-max, both sides exact + with replayed witnesses, or (c) exact obstruction to the repair/projection + lemma with a minimal demo and one stated condition. Falsification test of any + proof: smallest v = 2/v = 3 instances enumerated from the definition; corrupted + witness rejection controls. Time cap: one bounded pivot maximum. +Predecessor authors; intended artifact and reproduction command: + PR 1590 DreamingOfClouds (Claude Opus 5.5 (Anthropic) via Claude Code + assistance); PR 2111 DreamingOfClouds; PR 2717/2747/2774/2869/2890/2901/2914/ + 2936/2963 Aaron Wang (navinor) - all verified with gh pr view --json author,title + at current ground truth. Artifact: research/fstar-box-withoutloss-seed7f3a1c/ + with verify.py (python3 -B verify.py). +``` + +Entry checks recorded: chooser draw (seed `0194e0b2ffbe43b4e67165afcf5ee6cd`, +track `bit-mechanisms`, cards `bit-new-register-model` / `bit-helper-contract`) — +saturated for this object, the recorded reason for taking the assigned explicit +open request. Pair-collision checks (toolkit `disc-comments --grep`, discussions +1317 + 1166, nested replies) at entry found no live claim on this object; the +last family-gap activity is KB5i's FINDING/DONE/RELEASED (PR 2963, 2026-10-16 +14:36:56 UTC), which this assignment extends. Entry overlap survey +(`find_overlap.py`, object proper names and synonyms, `--refresh`, complete +pagination: 240 open PRs, 1660 discussion records, 14:44-14:45 UTC) found only +the known F-star lineage and unrelated traffic. Recorded anchors reproduced from +pristine predecessor copies before computation (`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_BOXREPLAY in-box=12/12`; `PASS_BOX_SEARCH bpp-strict-tau0=yes +bpp-strict-tau1=no tau-ge1=60 hard=0 box-violations=0`; PR 2936 tau = 0 demo +cert = 2 > box = 1 asserted value-by-value). diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/TASK.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/TASK.json new file mode 100644 index 0000000000..98c288dbfb --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/TASK.json @@ -0,0 +1,77 @@ +{ + "actual_scope": "Kappa-blocker KB5j (authorized explicit open request): SETTLE LEMMA BPP's WITHOUT-LOSS QUESTION of open problem F-star (cert(M) >= floor(2v/3) for exact 3-total rational decoders): may one assume, without loss at tau >= 1, that an attaining L8 witness satisfies Lemma BPP conditions (i)+(ii), i.e. is box(M) = cert(M) for every exact 3-total decoder with tau(t) >= 1? Either prove box-completeness (projection/repair lemma), construct the minimal tau >= 1 counterexample with both sides exact, or isolate the precise parity obstruction to repair with a minimal demo.", + "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": "0614abaef427f123d9b844f85a759e64ee3ab29c", + "bottleneck_link": "F-star (cert(M) >= floor(2v/3)) is the named route to closing every open T = 3 window at once (research/root-unit-decoder-lemmas section 7). PR 2963 named Lemma BPP's without-loss question as the exact blocker of the box-completeness route. This package settles it: box-completeness FAILS at tau >= 1 (minimal counterexample v = 3, cert = 3 > box = 2), so the completeness link of the PR 2914 chain is dead; the box-floor link and cost >= cert survive, and the surviving narrowed question (shareable class c_j = gamma) is stated exactly.", + "evidence": "VERDICT: Lemma BPP's without-loss question is answered NO at tau >= 1. PROVEN: box = cert = 2 at v = 2 for tau >= 1 (written proof + exhaustive machine check of all 2842 scope-consistent patterns), so v = 3 is minimal. PROVEN: minimal tau >= 1 counterexample at v = 3: P = [[-1,-3,0],[1,-1,-2],[3,3,3]], Q = [[1,-3,2],[3,-1,-2],[3,-1,2]], M = diag(8,8,12), tau = (2,2,2): cert = 3 (replayed attaining witness a = b = [1,2,4], order [2,1,0]; independent enumeration) > 2 = box (PROVEN upper bound: Lemma RT triangular rank + shareable totals r_box = 2; explicit box witness). PROVEN: the obstruction's exact form - in the box only totals with c_j = gamma (shareable) can enter K, and when every forward pair is a zero arc K[S,S] is unit triangular, so |S| <= r_box; the third total (c_2 = 1 > gamma = 0) is only usable via non-tied shared bits, i.e. BPP condition (i) fails on every attaining witness. CHECKED: PR 2963's 19 distinct escapes are all cosmetic (E1); 360 realizable tau >= 1 instances show 1788 strict projection drops (E2 1768) with 0 box violations, so projection is not without loss either. CHECKED: 3023 v = 3 combinatorial configs, 27 gap candidates, 3 realized as counterexamples, 3 unrealizable (column-attainment), 21 not realized in cap (alphabets up to {+-1..+-7}/{+-2..+-6,0}).", + "existing_restriction_being_changed": "Audits/settles PR 2914 open question 1 + PR 2936 open question 1 as narrowed by PR 2963 (box-completeness for tau >= 1). The PR 2914 route (b) required cert = box-max at tau >= 1 plus a box floor; this package refutes the equality.", + "falsification_test": "Any counterexample claim is falsified by replaying the stored witnesses and recomputing both rungs from the definition: verify.py re-enumerates cert and box INDEPENDENTLY of the vendored engine (section-7 enumeration) and asserts 3 and 2; the box upper bound is a written rank proof, not a scan; corrupted-witness rejection and the tie/scope identities are asserted on every instance; the v = 2 completeness claim is falsifiable by any of the 2842 enumerated patterns failing.", + "intended_artifact": "research/fstar-box-withoutloss-seed7f3a1c/ with verify.py (python3 -B research/fstar-box-withoutloss-seed7f3a1c/verify.py).", + "method": "Smallest instance first. (1) Classify the escape mechanism of PR 2963's 21 escaping witnesses exactly (BPP projection, conditions (i)/(ii), per-escape-line bits). (2) Exhaustive combinatorial reduction: cert and box of a decoder depend only on (pi, sg, zero-digraph Z, a0, b0); cert is over-approximated by the full-label value cert_max(Z) (monotone in label freedom), so cert_max(Z) <= box proves completeness on that datum and cert_max(Z) > box is a candidate. v = 2 all scope-consistent patterns; v = 3 all patterns up to line/total relabeling. (3) Realize candidates by exact 3-total integer decoders via the odd/even valuation recipe (m_j = 0 normalization; odd on anchor bits), per-q-row exhaustive search with seeded P restarts, alphabets {+-1,+-3}/{+-2,0} then {+-1..+-7}/{+-2..+-6,0}. (4) Certify every value by replayed witnesses, exact enumeration, an independent section-7 enumeration, and written rank bounds (Lemma RT); int-only arithmetic.", + "nearest_overlapping_prs": "PR 2914 (sub-anchor box, Lemmas SB/LB), PR 2936 (Lemma BPP, tau >= 1 necessary, v = 7..11 census), PR 2963 (tied_min v = 11 exact, box weak cell closed, BPP strictness at tau = 0). None settles the without-loss question; this package does, negatively, with the minimal counterexample.", + "open_questions": [ + { + "blocked_by": "No realizability characterization beyond Lemma SG + the column-attainment condition; the search so far is bounded (not a non-existence result).", + "first_step": "Characterize the (a0,b0,Z) patterns forced by rank-3 factorizations M = P Q^T with prescribed odd/even valuations (odd-term parity of every M_ts); extend the seeded realization search with a valuation-level enumeration (m_j in {0,1}) instead of random restarts.", + "question": "Are the 21 remaining v = 3 combinatorial gap patterns (a0, b0, Z) realizable by exact 3-total decoders?", + "why_it_matters": "All 21 lie in the shareable class (r_box = 3), so a realization refutes box-completeness there too, while a proof of unrealizability would prove box-completeness at v = 3 in the shareable class - the class holding all prior evidence." + }, + { + "blocked_by": "8^4 label enumeration per configuration times the zero-pattern lattice needs a DP or symmetry reduction before it is tractable.", + "first_step": "Extend the job-B combinatorial enumeration to v = 4 with a cert-side subset DP over the same (a0,b0,Z) lattice; then realize any gap datum as in job D.", + "question": "Box-completeness in the shareable class (every total has c_j = gamma) at v >= 4: is cert = box there?", + "why_it_matters": "It is the exact surviving form of the without-loss question once Lemma RT's obstruction is excluded; every previous box = cert datapoint sits in this class." + } + ], + "optimistic_full_cost_budget": "No kappa claim; milestone is the settled question itself. Heavy compute capped: combinatorial enumeration v = 2..3 (seconds), 360-instance sweep (seconds), realization caps 4000-6000 P-restarts per candidate (about 26 s total), all blocking with receipts.", + "original_card": { + "acceptance_gate": "Name the changed hypothesis, all counted roles and a uniform identity; finite column tests alone do not certify it. 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": [ + "Choose a fixed larger register count or a specified nonabelian operation family." + ], + "bottleneck_link": "A small-width completed saving changes the bit primitive; a finite-address identity alone is insufficient.", + "first_experiment": "First compare the alphabet, role count and length with the fully replayed #1974 census and #2027 mixed-root tariff. Identify a changed premise and a legal native implementation; then price one smallest completed instance before searching larger words.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read Model section 1 of the three-register bound and identify the exact excluded free operations.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "id": "bit-new-register-model", + "methods": [ + "Construct the smallest exact identity in a newly specified legal operation alphabet.", + "Derive a target-specific relaxation bound for that same explicit alphabet." + ], + "overlap_terms": [ + "three-register", + "nonabelian", + "group algebra" + ], + "question": "Can an explicitly larger or nonabelian register model escape the scoped three-register obstruction?", + "scope_change_triggers": [ + "Remaining inside the already-excluded three-register abelian model.", + "Repeating the two-register GL3 census or a covered three-register length without changing a hypothesis; a formal group-algebra word without native conversion is a partial result." + ], + "starting_points": [ + "docs/research/research-family-status.md", + "research/bit-three-register-lower-bound/README.md", + "certificates/selected-result.json", + "research/bit-gl3-mixed-targets-length10/README.md", + "docs/research/community-efficient1000-review.md" + ] + }, + "outcome": "completed", + "parameter_ranges": "v = 2..4; three totals; label space F2^3 bit masks; integer P, Q entries in {-7..7}; 2-adic valuations 0..3; zero digraphs all patterns at v = 2 and all Lemma-SG-consistent patterns at v = 3 (up to line and total relabeling); 360 realizable instances (320 random valuation-tuned v = 3..4 + 40 GL_3(Z) fixture transforms at v = 3); realization caps 4000-6000 P-restarts per candidate with exhaustive q-rows.", + "predecessor_authors": "PR 1590 DreamingOfClouds (Claude Opus 5.5 (Anthropic) via Claude Code assistance); PR 2111 DreamingOfClouds; PRs 2717/2747/2774/2869/2890/2901/2914/2936/2963 Aaron Wang (navinor); all verified at current ground truth with gh pr view --json author,title on 2026-10-16.", + "schema_version": 1, + "scope_change_reason": "Authorized 'explicit open request' scope change to kappa-blocker KB5j, recorded per the assignment (discussion 1166; PR 2963's exact statement - 'Lemma BPP's without-loss question remains the exact blocker' for box-completeness - is the named open request). The chooser OS draw (seed 0194e0b2ffbe43b4e67165afcf5ee6cd, track bit-mechanisms) proposed bit-new-register-model and bit-helper-contract; neither is this object, and the assignment takes the KB5j request instead.", + "scope_status": "changed", + "stop_rule": "Stop when the without-loss question is settled (proved, counterexample, or exact obstruction with minimal demo). Achieved: counterexample, PROVEN minimal at v = 3. No further search without a new hypothesis.", + "task_id": "bit-new-register-model", + "time_compute_cap": "One bounded pivot maximum; registered replay under 600 s (observed under 2 min); realization search capped per candidate and recorded as not-found-in-cap, never as unrealizable." +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/VERIFY.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/VERIFY.json new file mode 100644 index 0000000000..6089fb2d48 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/VERIFY.json @@ -0,0 +1,30 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "checks": "KB5j package replay: vendored predecessor pins (PR 2963's 14-file pin set + this package's own pin file + fixture hashes); predecessor anchors (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; exact named RECOMPUTED = 9 on all 12 tied_min v = 11 sub-decoders; every stored cert/box witness replayed with in-box flags; PR 2936's tau = 0 demo cert = 2 > box = 1); the delivered counterexample re-certified three ways (vendored engine exact cert/box, an independent section-7 enumeration written from the definition, and Lemma RT's PROVEN rank bound box <= r_box = 2) with identities and replayed witnesses; jobs A-D recomputed from scratch (v = 2 exhaustive 2842 configs box = cert = 2; v = 3 combinatorial 3023 configs / 27 candidates / 3 realized counterexamples with the README's exact P, Q / 3 unrealizable-column / 21 not-found-in-cap; 360 realizable instances 0 violations, 1788 strict projection drops, escape classes E2 1768 / E1 466 / E4 18 / E3 6; PR 2963 pool: 19 distinct escapes all E1); writes CERTIFICATE.json and prints PASS_KJ_PINS, PASS_FG_CONTROLS, PASS_FG_CALIBRATION, PASS_KJ_ANCHORS, PASS_KJ_TAU0_DEMO, PASS_KJ_COUNTEREXAMPLE, PASS_KJ_JOBS, PASS_KJ_ESCAPE, PASS_KJ_REALIZE, PASS_KJ_WITHOUTLOSS", + "timeout_seconds": 600 + } + ], + "inputs": [ + "research/root-unit-decoder-lemmas/README.md", + "research/fstar-box-withoutloss-seed7f3a1c/verify.py", + "research/fstar-box-withoutloss-seed7f3a1c/box_search_kj.py", + "research/fstar-box-withoutloss-seed7f3a1c/escape_classify.py", + "research/fstar-box-withoutloss-seed7f3a1c/realize_kj.py", + "research/fstar-box-withoutloss-seed7f3a1c/README.md", + "research/fstar-box-withoutloss-seed7f3a1c/TASK.json", + "research/fstar-box-withoutloss-seed7f3a1c/data/box-search-kj-receipt.json", + "research/fstar-box-withoutloss-seed7f3a1c/data/escape-receipt.json", + "research/fstar-box-withoutloss-seed7f3a1c/data/realize-kj-receipt.json", + "research/fstar-box-withoutloss-seed7f3a1c/predecessor/PINS.json" + ], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/box_search_kj.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/box_search_kj.py new file mode 100644 index 0000000000..018c744279 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/box_search_kj.py @@ -0,0 +1,443 @@ +#!/usr/bin/env python3 +"""KB5j main search: Lemma BPP's without-loss question at tau >= 1. + +The certificate value of a decoder depends on the decoder ONLY through + - the zero-arc digraph Z (M_ts = 0 for t != s), + - the full label supports pi(t), sg(t) (monotone: cert grows with them), + - the sub-anchor masks a0(t), b0(t) (box depends only on these and Z). +Lemma SG (scope identity) forces |a0(t) intersect b0(s)| even on every zero +arc, and Lemma SB gives tau(t) = |a0(t) intersect b0(t)| >= 1 in scope. + +Jobs (smallest instance first; exact arithmetic; every value computed by the +vendored PR 2914 engine or by a function pinned to it by agreement tests): + +A. v = 2 exhaustive: every (a0,b0) pattern with tau >= 1 and every + scope-consistent zero pattern Z. Assert box = cert (= 2) - the machine + check of the written v = 2 repair lemma. Also assert PR 2936's tau = 0 + demonstration (cert = 2 > box = 1) still fails completeness. +B. v = 3 exhaustive (up to line and total relabeling): every scope-consistent + (a0,b0,Z). cert is over-approximated by cert_max(Z) = cert with full labels + pi = sg = 111 (monotone in label freedom), so `cert_max(Z) <= box` PROVES + box = cert for every decoder with that data; `cert_max(Z) > box` is a + counterexample candidate to be realized by an explicit P, Q. +C. Realizable sweep: random exact 3-total decoders (small integer entries, + varied 2-adic valuations) and GL_3(Z) transforms of the fixtures at + v = 3..4, tau >= 1 filter, exact cert vs exact box, plus every attaining + witness projected under Lemma BPP (strict drops and escape classes E1..E4 + recorded). + +Writes data/box-search-kj-receipt.json. Stdlib, deterministic. +Run: python3 -B box_search_kj.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, os.path.join(HERE, "predecessor", "pr2963")) +import named_exact as ne # noqa: E402 + +fg = ne.fg +DATA = os.path.join(HERE, "predecessor", "pr2963", "predecessor", "pr2914", + "data") +spec = importlib.util.spec_from_file_location( + "box_attack", + os.path.join(HERE, "predecessor", "pr2963", "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 dot1(x, y): + return bin(x & y).count("1") & 1 + + +def fake_model(v, Z): + """Model dict for the combinatorial space: zero arcs exactly Z (a set of + ordered pairs), every other entry 1, full label supports.""" + M = [[0 if ((t, s) in Z) else 1 for s in range(v)] for t in range(v)] + for t in range(v): + M[t][t] = 1 + arcs = [(t, s) for t in range(v) for s in range(v) + if t != s and (t, s) in Z] + return dict(v=v, P=None, Q=None, M=M, pi=[7] * v, sg=[7] * v, + D=[7] * v, arcs=arcs) + + +def fake_ad(a0, b0): + return dict(gamma=0, m=[0, 0, 0], n=[0, 0, 0], c=[0, 0, 0], + diag=[0] * len(a0), reach=[], cancel=[], + tau=[bin(a0[t] & b0[t]).count("1") for t in range(len(a0))], + a0=list(a0), b0=list(b0)) + + +def box_low3(a0, b0, Z): + """Cheap sufficient test for box = 3 at v = 3: tied-singleton colorings + (a = b = {c(t)}, c(t) tied) whose monochromatic zero-arc digraph is + acyclic, or the raw anchor pair. Returns True if box = 3 is witnessed.""" + v = 3 + tied = [a0[t] & b0[t] for t in range(v)] + choices = [[j for j in range(3) if tied[t] & (1 << j)] for t in range(v)] + for combo in itertools.product(*choices): + col = [1 << c for c in combo] + # conflict edges t->s iff (t,s) in Z and col equal: need acyclic + nodes = 3 + indeg = [0] * nodes + out = [[] for _ in range(nodes)] + for (t, s) in Z: + if col[t] == col[s]: + out[t].append(s) + indeg[s] += 1 + stack = [t for t in range(nodes) if indeg[t] == 0] + seen = 0 + while stack: + t = stack.pop() + seen += 1 + for s in out[t]: + indeg[s] -= 1 + if indeg[s] == 0: + stack.append(s) + if seen == nodes: + return True + mod = fake_model(v, Z) + ad = fake_ad(a0, b0) + if fg.ab_value(mod, list(a0), list(b0)) == 3: + return True + return False + + +def canon_total(a0, b0): + """Canonical representative of (a0, b0) under the 6 total relabelings.""" + best = None + for perm in itertools.permutations(range(3)): + def mv(x): + y = 0 + for j in range(3): + if x & (1 << j): + y |= 1 << perm[j] + return y + key = (mv(a0), mv(b0)) + if best is None or key < best: + best = key + return best + + +def canon_config(pairs, Z): + """Canonical form under line relabeling; pairs is the per-line tuple list + (already total-canonical). Z is a frozenset of ordered pairs.""" + best = None + for perm in itertools.permutations(range(3)): + npairs = tuple(pairs[perm[t]] for t in range(3)) + nZ = frozenset((perm[t], perm[s]) for (t, s) in Z) + key = (npairs, tuple(sorted(nZ))) + if best is None or key < best: + best = key + return best + + +def job_a(): + """v = 2 exhaustive over (a0,b0,Z), tau >= 1: box = cert = 2.""" + checked = 0 + gaps = [] + masks = range(8) + for a00 in masks: + for b00 in masks: + if not (a00 & b00): + continue + for a01 in masks: + for b01 in masks: + if not (a01 & b01): + continue + a0, b0 = [a00, a01], [b00, b01] + pairs = frozenset([(a00, b00), (a01, b01)]) + for z01 in (0, 1): + for z10 in (0, 1): + Z = set() + if z01: + Z.add((0, 1)) + if z10: + Z.add((1, 0)) + if any(dot1(a0[t], b0[s]) != 0 for (t, s) in Z): + continue # Lemma SG inconsistency + Z = frozenset(Z) + mod = fake_model(2, Z) + ad = fake_ad(a0, b0) + ce, cew = fg.cert_exact(mod, max_v=2) + bx, bxw = ba.box_exact_tolerant(mod, ad) + checked += 1 + if ce != bx or bx != 2: + gaps.append(dict(a0=a0, b0=b0, + Z=sorted(Z), cert=ce, + box=bx)) + else: + assert fg.replay_witness(mod, bxw) + assert fg.in_box(mod, ad, bxw)[0] + # PR 2936's tau = 0 demonstration must still break completeness. + 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, _ = fg.cert_exact(sub, max_v=2) + bx, _ = ba.box_exact_tolerant(sub, ad) + assert (ce, bx) == (2, 1), (ce, bx) + log("job A: v=2 tau>=1 configs=%d gaps=%d; tau=0 demo cert=%d box=%d" + % (checked, len(gaps), ce, bx)) + print("PASS_KJ_V2 configs=%d box-equals-cert=%d tau0-demo=2/1" + % (checked, checked - len(gaps))) + return checked, gaps + + +def job_b(): + """v = 3 exhaustive over (a0,b0,Z) up to line/total relabeling.""" + mask_pairs = [(a, b) for a in range(8) for b in range(8) if a & b] + ckey = {} + for (a, b) in mask_pairs: + ckey[(a, b)] = canon_total(a, b) + line_types = sorted(set(ckey.values())) + certmax_cache = {} + configs = set() + raw = 0 + for tri in itertools.product(line_types, repeat=3): + pairs = tuple(tri) + a0 = [p[0] for p in pairs] + b0 = [p[1] for p in pairs] + free = [(t, s) for t in range(3) for s in range(3) + if t != s and dot1(a0[t], b0[s]) == 0] + for bits in range(1 << len(free)): + Z = frozenset(free[k] for k in range(len(free)) + if (bits >> k) & 1) + raw += 1 + configs.add(canon_config(pairs, Z)) + log("job B: raw configs %d -> %d canonical (line+total relabeling)" + % (raw, len(configs))) + gaps = [] + exact_runs = 0 + fast = 0 + done = 0 + for (pairs, ztup) in sorted(configs): + a0 = [p[0] for p in pairs] + b0 = [p[1] for p in pairs] + Z = frozenset(ztup) + if Z not in certmax_cache: + mod = fake_model(3, Z) + ce, _ = fg.cert_exact(mod, max_v=3) + certmax_cache[Z] = ce + cm = certmax_cache[Z] + done += 1 + if cm <= 2: + # cert_max itself is <= 2; box <= cert_max always, so a gap needs + # an exact box below cm: run exact box only if cheap witness < cm. + pass + if box_low3(a0, b0, Z): + fast += 1 + assert cm == 3 + continue + exact_runs += 1 + mod = fake_model(3, Z) + ad = fake_ad(a0, b0) + bx, bxw = ba.box_exact_tolerant(mod, ad) + if bx < cm: + gaps.append(dict(a0=a0, b0=b0, Z=sorted(Z), cert_max=cm, box=bx)) + log("job B CANDIDATE: a0=%s b0=%s Z=%s cert_max=%d box=%d" + % (a0, b0, sorted(Z), cm, bx)) + if done % 5000 == 0: + log("job B progress %d/%d exact=%d fast=%d gaps=%d" + % (done, len(configs), exact_runs, fast, len(gaps))) + log("job B done: configs=%d fast-3=%d exact=%d distinct-Z=%d gaps=%d" + % (len(configs), fast, exact_runs, len(certmax_cache), len(gaps))) + print("PASS_KJ_V3 configs=%d box-equals-cert=%d candidates=%d " + "certmax-cache=%d" % (len(configs), len(configs) - len(gaps), + len(gaps), len(certmax_cache))) + return len(configs), gaps + + +def rand_model(rng, v, val_bits=(0, 0, 1, 2)): + """Random small-integer P, Q with mixed 2-adic valuations.""" + def ent(): + if rng.random() < 0.32: + return 0 + mag = rng.choice(val_bits) + return rng.choice((-1, 1)) * (1 << mag) + P = [tuple(ent() for _ in range(3)) for _ in range(v)] + Q = [tuple(ent() for _ in range(3)) for _ in range(v)] + try: + return fg.model(P, Q) + except AssertionError: + return None + + +def probe_witnesses(mod, ad, v): + """Attaining-ish witnesses (hillclimb + random), projected under BPP. + Returns escape/drop records.""" + out = [] + wits = [] + for seed in (1234, 2025, 77, 4242): + _val, wit = fg.cert_hillclimb(mod, iters=80, seed=seed) + if wit is not None and fg.replay_witness(mod, wit): + wits.append(dict(wit, source="hillclimb:%d" % seed)) + rr = random.Random(9000 + 7 * v) + for _ in range(120): + a = [rr.randrange(8) & mod["pi"][t] for t in range(v)] + b = [rr.randrange(8) & mod["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(mod, wit): + wits.append(dict(wit, source="random")) + for wit in wits: + inb, esc = fg.in_box(mod, ad, wit) + val = fg.ab_value(mod, wit["a"], wit["b"]) + pa = [wit["a"][t] & ad["a0"][t] for t in range(v)] + pb = [wit["b"][t] & ad["b0"][t] for t in range(v)] + pval = fg.ab_value(mod, pa, pb) + if inb and pval >= val: + continue + ok1 = all(bin(wit["a"][t] & wit["b"][t] & ad["a0"][t] + & ad["b0"][t]).count("1") % 2 == 1 for t in wit["kept"]) + 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, 99) < 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 + out.append(dict(source=wit["source"], value=val, + projected_value=pval, + drop=pval < val, cond_i=ok1, cond_ii=ok2, + escape_lines=esc, + a=list(wit["a"]), b=list(wit["b"]), + kept=list(wit["kept"]), order=list(wit["order"]))) + return out + + +def job_c(): + """Realizable random decoders + fixture GL_3(Z) transforms, v = 3..4.""" + rng = random.Random(20261016) + records = [] + gaps = [] + drops = [] + esc_classes = {} + checked = 0 + attempts = 0 + while checked < 320 and attempts < 20000: + attempts += 1 + v = 3 if attempts % 25 else 4 + mod = rand_model(rng, v) + if mod is None: + continue + ad = fg.anchor_data(mod) + if not (fg.tie_parity(mod, ad) and fg.scope_identity(mod, ad)): + continue + if min(ad["tau"]) < 1: + continue + checked += 1 + ce, cew = fg.cert_exact(mod, max_v=v) + bx, bxw = ba.box_exact_tolerant(mod, ad) + assert fg.replay_witness(mod, cew) + assert bxw is None or fg.replay_witness(mod, bxw) + rec = dict(family="random", v=v, tau=list(ad["tau"]), + cert=ce, box=bx, gap=ce - bx, hard=ce < v, + P=[list(p) for p in mod["P"]], + Q=[list(q) for q in mod["Q"]]) + records.append(rec) + if ce > bx: + gaps.append(rec) + log("job C CANDIDATE: v=%d cert=%d box=%d" % (v, ce, bx)) + if v == 3: + for w in probe_witnesses(mod, ad, v): + if w["drop"]: + drops.append(dict(rec, witness=w)) + log("job C DROP at tau>=1: v=%d val=%d proj=%d i=%s ii=%s" + % (v, w["value"], w["projected_value"], + w["cond_i"], w["cond_ii"])) + key = ("E1" if w["cond_i"] and w["cond_ii"] else + "E4" if not w["cond_i"] and not w["cond_ii"] else + "E2" if not w["cond_i"] else "E3") + esc_classes[key] = esc_classes.get(key, 0) + 1 + if checked % 150 == 0: + log("job C progress checked=%d gaps=%d drops=%d" + % (checked, len(gaps), len(drops))) + # fixture transforms at v = 3 (PR 2963's sweep started at v = 4) + spec2 = importlib.util.spec_from_file_location( + "box_search", + os.path.join(HERE, "predecessor", "pr2963", "box_search.py")) + bs = importlib.util.module_from_spec(spec2) + spec2.loader.exec_module(bs) + made = 0 + att = 0 + while made < 40 and att < 800: + att += 1 + fixture = ("tied_min.json", "cex_min_1.json")[att % 2] + mod0 = fg.model(*fg.load_decoder(os.path.join(DATA, fixture))) + U, Uinv = bs.rand_gl3z(rng, steps=2 + att % 5) + mod1 = bs.transform(mod0, U, Uinv) + S = sorted(rng.sample(range(mod1["v"]), 3)) + 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=3) + bx, bxw = ba.box_exact_tolerant(sub, ad) + assert fg.replay_witness(sub, cew) + rec = dict(family="fixture-transform", v=3, fixture=fixture, S=S, + tau=list(ad["tau"]), cert=ce, box=bx, gap=ce - bx, + hard=ce < 3, P=[list(p) for p in sub["P"]], + Q=[list(q) for q in sub["Q"]]) + records.append(rec) + if ce > bx: + gaps.append(rec) + log("job C (transform) CANDIDATE: cert=%d box=%d" % (ce, bx)) + for w in probe_witnesses(sub, ad, 3): + if w["drop"]: + drops.append(dict(rec, witness=w)) + log("job C (transform) DROP at tau>=1: val=%d proj=%d" + % (w["value"], w["projected_value"])) + key = ("E1" if w["cond_i"] and w["cond_ii"] else + "E4" if not w["cond_i"] and not w["cond_ii"] else + "E2" if not w["cond_i"] else "E3") + esc_classes[key] = esc_classes.get(key, 0) + 1 + log("job C done: instances=%d (random %d + transforms %d) gaps=%d " + "drops=%d escapes=%s" % (len(records), checked, made, len(gaps), + len(drops), esc_classes)) + print("PASS_KJ_REALIZABLE instances=%d box-violations=%d drops=%d " + "escapes=%s" % (len(records), len(gaps), len(drops), esc_classes)) + return records, gaps, drops, esc_classes + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + checked, gaps_a = job_a() + nconf, gaps_b = job_b() + records, gaps_c, drops, esc = job_c() + receipt = dict(generator="box_search_kj.py seed 20261016", + job_a=dict(configs=checked, gaps=len(gaps_a), + gap_records=gaps_a), + job_b=dict(configs=nconf, candidates=gaps_b), + job_c=dict(instances=records, gaps=gaps_c, drops=drops, + escape_classes=esc)) + with open(os.path.join(HERE, "data", "box-search-kj-receipt.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump(receipt, fh, indent=1, sort_keys=True) + fh.write("\n") + total_gap = len(gaps_a) + len(gaps_b) + len(gaps_c) + print("PASS_KJ_BOX_SEARCH v2-configs=%d v3-configs=%d realizable=%d " + "candidates=%d drops-tau1=%d" + % (checked, nconf, len(records), total_gap, len(drops))) + + +if __name__ == "__main__": + main() diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/data/box-search-kj-receipt.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/data/box-search-kj-receipt.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/data/escape-receipt.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/data/escape-receipt.json new file mode 100644 index 0000000000..06c1a187c2 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/data/escape-receipt.json @@ -0,0 +1,1159 @@ +{ + "escapes_seen": 19, + "generator": "escape_classify.py (PR 2963 box_search pool, deduplicated by label pair)", + "pool_sizes": 240, + "records": [ + { + "S": [ + 1, + 4, + 8 + ], + "a": [ + 3, + 7, + 2 + ], + "b": [ + 1, + 1, + 2 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 3, + "a_out": 4, + "b0": 3, + "b_out": 0, + "line": 1, + "tau": 2, + "tied": 3 + } + ], + "fixture": "tied_min.json", + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "hillclimb:1234", + "tau": [ + 2, + 2, + 2 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 1, + 4, + 8 + ], + "a": [ + 7, + 2, + 5 + ], + "b": [ + 2, + 2, + 1 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 3, + "a_out": 4, + "b0": 3, + "b_out": 0, + "line": 2, + "tau": 2, + "tied": 3 + }, + { + "a0": 3, + "a_out": 4, + "b0": 3, + "b_out": 0, + "line": 0, + "tau": 2, + "tied": 3 + } + ], + "fixture": "tied_min.json", + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "hillclimb:2025", + "tau": [ + 2, + 2, + 2 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 1, + 4, + 8 + ], + "a": [ + 3, + 7, + 5 + ], + "b": [ + 2, + 2, + 1 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 3, + "a_out": 4, + "b0": 3, + "b_out": 0, + "line": 2, + "tau": 2, + "tied": 3 + }, + { + "a0": 3, + "a_out": 4, + "b0": 3, + "b_out": 0, + "line": 1, + "tau": 2, + "tied": 3 + } + ], + "fixture": "tied_min.json", + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "hillclimb:77", + "tau": [ + 2, + 2, + 2 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 1, + 4, + 8 + ], + "a": [ + 5, + 1, + 6 + ], + "b": [ + 1, + 1, + 2 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 3, + "a_out": 4, + "b0": 3, + "b_out": 0, + "line": 2, + "tau": 2, + "tied": 3 + }, + { + "a0": 3, + "a_out": 4, + "b0": 3, + "b_out": 0, + "line": 0, + "tau": 2, + "tied": 3 + } + ], + "fixture": "tied_min.json", + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "hillclimb:4242", + "tau": [ + 2, + 2, + 2 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 1, + 4, + 8 + ], + "a": [ + 5, + 1, + 3 + ], + "b": [ + 1, + 1, + 2 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 3, + "a_out": 4, + "b0": 3, + "b_out": 0, + "line": 0, + "tau": 2, + "tied": 3 + } + ], + "fixture": "tied_min.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 2, + 2, + 2 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 1, + 4, + 8 + ], + "a": [ + 5, + 5, + 2 + ], + "b": [ + 1, + 3, + 2 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 3, + "a_out": 4, + "b0": 3, + "b_out": 0, + "line": 0, + "tau": 2, + "tied": 3 + }, + { + "a0": 3, + "a_out": 4, + "b0": 3, + "b_out": 0, + "line": 1, + "tau": 2, + "tied": 3 + } + ], + "fixture": "tied_min.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 2, + 2, + 2 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 4, + 6, + 8 + ], + "a": [ + 5, + 5, + 1 + ], + "b": [ + 4, + 3, + 1 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 1, + "tau": 1, + "tied": 1 + } + ], + "fixture": "cex_min_1.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 1, + 1, + 1 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 4, + 6, + 8 + ], + "a": [ + 5, + 1, + 1 + ], + "b": [ + 4, + 3, + 1 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 1, + "tau": 1, + "tied": 1 + } + ], + "fixture": "cex_min_1.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 1, + 1, + 1 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 4, + 6, + 8 + ], + "a": [ + 5, + 5, + 5 + ], + "b": [ + 4, + 1, + 3 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 2, + "tau": 1, + "tied": 1 + } + ], + "fixture": "cex_min_1.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 1, + 1, + 1 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 4, + 6, + 8 + ], + "a": [ + 4, + 5, + 5 + ], + "b": [ + 4, + 3, + 1 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 1, + "tau": 1, + "tied": 1 + } + ], + "fixture": "cex_min_1.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 1, + 1, + 1 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 4, + 6, + 8 + ], + "a": [ + 5, + 5, + 5 + ], + "b": [ + 4, + 3, + 3 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 1, + "tau": 1, + "tied": 1 + }, + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 2, + "tau": 1, + "tied": 1 + } + ], + "fixture": "cex_min_1.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 1, + 1, + 1 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 4, + 6, + 8 + ], + "a": [ + 5, + 1, + 5 + ], + "b": [ + 6, + 3, + 3 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 5, + "a_out": 0, + "b0": 4, + "b_out": 2, + "line": 0, + "tau": 1, + "tied": 4 + }, + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 1, + "tau": 1, + "tied": 1 + }, + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 2, + "tau": 1, + "tied": 1 + } + ], + "fixture": "cex_min_1.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 1, + 1, + 1 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 4, + 6, + 8 + ], + "a": [ + 5, + 5, + 5 + ], + "b": [ + 6, + 3, + 3 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 5, + "a_out": 0, + "b0": 4, + "b_out": 2, + "line": 0, + "tau": 1, + "tied": 4 + }, + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 1, + "tau": 1, + "tied": 1 + }, + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 2, + "tau": 1, + "tied": 1 + } + ], + "fixture": "cex_min_1.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 1, + 1, + 1 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 4, + 6, + 8 + ], + "a": [ + 5, + 5, + 5 + ], + "b": [ + 6, + 1, + 3 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 5, + "a_out": 0, + "b0": 4, + "b_out": 2, + "line": 0, + "tau": 1, + "tied": 4 + }, + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 2, + "tau": 1, + "tied": 1 + } + ], + "fixture": "cex_min_1.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 1, + 1, + 1 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 4, + 6, + 8 + ], + "a": [ + 5, + 5, + 1 + ], + "b": [ + 6, + 1, + 1 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 5, + "a_out": 0, + "b0": 4, + "b_out": 2, + "line": 0, + "tau": 1, + "tied": 4 + } + ], + "fixture": "cex_min_1.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 1, + 1, + 1 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 4, + 6, + 8 + ], + "a": [ + 4, + 1, + 5 + ], + "b": [ + 4, + 3, + 1 + ], + "box": 3, + "cert": 3, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 5, + "a_out": 0, + "b0": 1, + "b_out": 2, + "line": 1, + "tau": 1, + "tied": 1 + } + ], + "fixture": "cex_min_1.json", + "kept": [ + 0, + 1, + 2 + ], + "order": [ + 0, + 1, + 2 + ], + "projected_value": 3, + "projection_verbatim": false, + "source": "random", + "tau": [ + 1, + 1, + 1 + ], + "v": 3, + "value": 3 + }, + { + "S": [ + 0, + 3, + 6, + 9 + ], + "a": [ + 4, + 6, + 7, + 2 + ], + "b": [ + 6, + 4, + 4, + 2 + ], + "box": 4, + "cert": 4, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 6, + "a_out": 1, + "b0": 6, + "b_out": 0, + "line": 2, + "tau": 2, + "tied": 6 + } + ], + "fixture": "tied_min.json", + "kept": [ + 3, + 2, + 1, + 0 + ], + "order": [ + 3, + 2, + 1, + 0 + ], + "projected_value": 4, + "projection_verbatim": false, + "source": "hillclimb:1234", + "tau": [ + 2, + 2, + 2, + 2 + ], + "v": 4, + "value": 4 + }, + { + "S": [ + 0, + 3, + 6, + 9 + ], + "a": [ + 6, + 2, + 5, + 7 + ], + "b": [ + 2, + 6, + 6, + 2 + ], + "box": 4, + "cert": 4, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 6, + "a_out": 1, + "b0": 6, + "b_out": 0, + "line": 3, + "tau": 2, + "tied": 6 + }, + { + "a0": 6, + "a_out": 1, + "b0": 6, + "b_out": 0, + "line": 2, + "tau": 2, + "tied": 6 + } + ], + "fixture": "tied_min.json", + "kept": [ + 3, + 2, + 0, + 1 + ], + "order": [ + 3, + 2, + 0, + 1 + ], + "projected_value": 4, + "projection_verbatim": false, + "source": "hillclimb:2025", + "tau": [ + 2, + 2, + 2, + 2 + ], + "v": 4, + "value": 4 + }, + { + "S": [ + 0, + 3, + 6, + 9 + ], + "a": [ + 7, + 5, + 4, + 2 + ], + "b": [ + 2, + 4, + 4, + 2 + ], + "box": 4, + "cert": 4, + "cond_i": true, + "cond_ii": true, + "escape_kind": "E1", + "escape_lines": [ + { + "a0": 6, + "a_out": 1, + "b0": 6, + "b_out": 0, + "line": 1, + "tau": 2, + "tied": 6 + }, + { + "a0": 6, + "a_out": 1, + "b0": 6, + "b_out": 0, + "line": 0, + "tau": 2, + "tied": 6 + } + ], + "fixture": "tied_min.json", + "kept": [ + 3, + 2, + 1, + 0 + ], + "order": [ + 3, + 2, + 1, + 0 + ], + "projected_value": 4, + "projection_verbatim": false, + "source": "hillclimb:4242", + "tau": [ + 2, + 2, + 2, + 2 + ], + "v": 4, + "value": 4 + } + ] +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/data/realize-kj-receipt.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/data/realize-kj-receipt.json new file mode 100644 index 0000000000..829c40d492 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/data/realize-kj-receipt.json @@ -0,0 +1,1459 @@ +{ + "counterexamples": [ + { + "P": [ + [ + -1, + -3, + 0 + ], + [ + 1, + -1, + -2 + ], + [ + 3, + 3, + 3 + ] + ], + "Q": [ + [ + 1, + -3, + 2 + ], + [ + 3, + -1, + -2 + ], + [ + 3, + -1, + 2 + ] + ], + "alphabet": "with-zeros", + "attempts": 66, + "box": 2, + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 3, + 3, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "cert": 3, + "cert_witness": { + "a": [ + 1, + 2, + 4 + ], + "b": [ + 1, + 2, + 4 + ], + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ] + }, + "status": "realized" + }, + { + "P": [ + [ + -1, + 3, + 0 + ], + [ + 3, + -3, + 3 + ], + [ + -1, + 1, + 1 + ] + ], + "Q": [ + [ + 1, + 1, + 0 + ], + [ + 3, + 1, + 2 + ], + [ + 3, + 1, + -2 + ] + ], + "alphabet": "with-zeros", + "attempts": 9, + "box": 2, + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 7, + 7 + ], + "b0": [ + 3, + 3, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "cert": 3, + "cert_witness": { + "a": [ + 1, + 2, + 4 + ], + "b": [ + 1, + 2, + 4 + ], + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ] + }, + "status": "realized" + }, + { + "P": [ + [ + -3, + -1, + -3 + ], + [ + 3, + -3, + -3 + ], + [ + 1, + 3, + -3 + ] + ], + "Q": [ + [ + 3, + 1, + 2 + ], + [ + 3, + -3, + -2 + ], + [ + 1, + 3, + -2 + ] + ], + "alphabet": "nonzero", + "attempts": 279, + "box": 2, + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 7, + 7, + 7 + ], + "b0": [ + 3, + 3, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "cert": 3, + "cert_witness": { + "a": [ + 1, + 2, + 4 + ], + "b": [ + 1, + 2, + 4 + ], + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ] + }, + "status": "realized" + } + ], + "generator": "realize_kj.py seed 20261017", + "records": [ + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ] + ], + "a0": [ + 1, + 3, + 7 + ], + "b0": [ + 1, + 5, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ] + ], + "a0": [ + 1, + 3, + 7 + ], + "b0": [ + 1, + 5, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 1, + 5, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 1, + 5, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 1, + 5, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 1, + 5, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 3 + ], + "b0": [ + 3, + 3, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 3 + ], + "b0": [ + 3, + 3, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "reason": "bit 2 enters b0 but no a0 line attains m_j", + "status": "unrealizable-column" + }, + { + "P": [ + [ + -1, + -3, + 0 + ], + [ + 1, + -1, + -2 + ], + [ + 3, + 3, + 3 + ] + ], + "Q": [ + [ + 1, + -3, + 2 + ], + [ + 3, + -1, + -2 + ], + [ + 3, + -1, + 2 + ] + ], + "alphabet": "with-zeros", + "attempts": 66, + "box": 2, + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 3, + 3, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "cert": 3, + "cert_witness": { + "a": [ + 1, + 2, + 4 + ], + "b": [ + 1, + 2, + 4 + ], + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ] + }, + "status": "realized" + }, + { + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 3 + ], + "b0": [ + 3, + 7, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "reason": "bit 2 enters b0 but no a0 line attains m_j", + "status": "unrealizable-column" + }, + { + "P": [ + [ + -1, + 3, + 0 + ], + [ + 3, + -3, + 3 + ], + [ + -1, + 1, + 1 + ] + ], + "Q": [ + [ + 1, + 1, + 0 + ], + [ + 3, + 1, + 2 + ], + [ + 3, + 1, + -2 + ] + ], + "alphabet": "with-zeros", + "attempts": 9, + "box": 2, + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 7, + 7 + ], + "b0": [ + 3, + 3, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "cert": 3, + "cert_witness": { + "a": [ + 1, + 2, + 4 + ], + "b": [ + 1, + 2, + 4 + ], + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ] + }, + "status": "realized" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "alphabet": "big", + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 1, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 7 + ], + "b0": [ + 5, + 5, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "p_tries": 6000, + "status": "not-found-in-cap" + }, + { + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 3, + 3, + 3 + ], + "b0": [ + 7, + 7, + 7 + ], + "box": 2, + "cert_max": 3 + }, + "reason": "bit 2 enters b0 but no a0 line attains m_j", + "status": "unrealizable-column" + }, + { + "P": [ + [ + -3, + -1, + -3 + ], + [ + 3, + -3, + -3 + ], + [ + 1, + 3, + -3 + ] + ], + "Q": [ + [ + 3, + 1, + 2 + ], + [ + 3, + -3, + -2 + ], + [ + 1, + 3, + -2 + ] + ], + "alphabet": "nonzero", + "attempts": 279, + "box": 2, + "candidate": { + "Z": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "a0": [ + 7, + 7, + 7 + ], + "b0": [ + 3, + 3, + 3 + ], + "box": 2, + "cert_max": 3 + }, + "cert": 3, + "cert_witness": { + "a": [ + 1, + 2, + 4 + ], + "b": [ + 1, + 2, + 4 + ], + "kept": [ + 2, + 1, + 0 + ], + "order": [ + 2, + 1, + 0 + ] + }, + "status": "realized" + } + ], + "status_counts": { + "not-found-in-cap": 21, + "realized": 3, + "unrealizable-column": 3 + } +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/escape_classify.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/escape_classify.py new file mode 100644 index 0000000000..04cf5eacdb --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/escape_classify.py @@ -0,0 +1,183 @@ +#!/usr/bin/env python3 +"""KB5j job 1: classify the escape mechanism of PR 2963's escaping witnesses. + +PR 2963 (box_search.bpp_strictness, part (b)) found 21 escaping witnesses +(out-of-box valid L8 witnesses) on v = 3..5 fixture sub-decoders with no strict +projection drop. This script regenerates exactly that witness pool and +classifies each escape: + + E1 cosmetic escaping bits affect neither K_tt nor any forward-zero-arc + parity of the kept set (sub-anchor projection preserves the + witness verbatim in value AND constraints); + E2 certification some kept line is certified through non-tied shared bits + (Lemma BPP condition (i) fails on the raw witness); + E3 arc parity some forward zero arc carries odd off-anchor shared parity + (condition (ii) fails on the raw witness); + E4 both. + +For every escaping witness it also recomputes: the ab_value of the witness, the +ab_value of its sub-anchor projection, whether an in-box witness of the SAME +value exists (exact box run at v <= 5), and per escape line the exact bits used +outside a0/b0. Stdlib only, deterministic. Writes data/escape-receipt.json. + +Run: python3 -B escape_classify.py +""" +import importlib.util +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, os.path.join(HERE, "predecessor", "pr2963")) +import named_exact as ne # noqa: E402 + +fg = ne.fg +DATA = os.path.join(HERE, "predecessor", "pr2963", "predecessor", "pr2914", + "data") +spec = importlib.util.spec_from_file_location( + "box_attack", + os.path.join(HERE, "predecessor", "pr2963", "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 bpp_projection(ad, wit): + 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): + 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 escape_bits(ad, wit, t): + """The exact out-of-box bits used on line t (a-side and b-side).""" + return dict(a_out=wit["a"][t] & ~ad["a0"][t], + b_out=wit["b"][t] & ~ad["b0"][t], + a0=ad["a0"][t], b0=ad["b0"][t], + tied=ad["a0"][t] & ad["b0"][t], tau=ad["tau"][t]) + + +def classify_one(mod, ad, wit): + kept = wit["kept"] + val = fg.ab_value(mod, wit["a"], wit["b"]) + proj = bpp_projection(ad, wit) + pval = fg.ab_value(mod, proj["a"], proj["b"]) + ok1, ok2 = bpp_conditions(mod, ad, wit) + inb, esc = fg.in_box(mod, ad, wit) + verbatim = all(wit["a"][t] == proj["a"][t] and wit["b"][t] == proj["b"][t] + for t in kept) + if ok1 and ok2: + kind = "E1" + elif not ok1 and not ok2: + kind = "E4" + elif not ok1: + kind = "E2" + else: + kind = "E3" + return dict(value=val, projected_value=pval, cond_i=ok1, cond_ii=ok2, + projection_verbatim=verbatim, escape_kind=kind, + escape_lines=[dict(line=t, **escape_bits(ad, wit, t)) + for t in esc]) + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + pool = [] + 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: + pool.append((fixture, list(S), size)) + pool.sort(key=lambda c: (c[2], sum(c[1]))) + records = [] + esc_total = 0 + for fixture, S, size in pool: + 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(dict(wit, source="hillclimb:%d" % seed)) + 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(dict(wit, source="random")) + seen = set() + exacts = {} + + def exacts_cached(): + if not exacts: + ce, _ = fg.cert_exact(sub, max_v=v) + bx, _ = ba.box_exact_tolerant(sub, ad) + exacts["ce"] = ce + exacts["bx"] = bx + return exacts["ce"], exacts["bx"] + + for wit in wits: + if fg.in_box(sub, ad, wit)[0]: + continue + key = (tuple(wit["a"]), tuple(wit["b"])) + if key in seen: + continue + seen.add(key) + esc_total += 1 + rec = classify_one(sub, ad, wit) + ce, bx = exacts_cached() + rec.update(fixture=fixture, S=S, v=v, tau=list(ad["tau"]), + source=wit["source"], cert=ce, box=bx, + kept=list(wit["kept"]), a=list(wit["a"]), + b=list(wit["b"]), order=list(wit["order"])) + records.append(rec) + counts = {} + for r in records: + counts[r["escape_kind"]] = counts.get(r["escape_kind"], 0) + 1 + drops = [r for r in records if r["projected_value"] < r["value"]] + boxgaps = [r for r in records if r["box"] < r["cert"]] + log("escapes=%d distinct=%d kinds=%s drops=%d box-gaps=%d" + % (esc_total, len(records), counts, len(drops), len(boxgaps))) + with open(os.path.join(HERE, "data", "escape-receipt.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump(dict(generator="escape_classify.py (PR 2963 box_search " + "pool, deduplicated by label pair)", + pool_sizes=len(pool), escapes_seen=esc_total, + records=records), fh, indent=1, sort_keys=True) + fh.write("\n") + print("PASS_ESCAPE_CLASSIFY escapes=%d distinct=%d kinds=%s " + "projection-drops=%d box-gaps=%d" + % (esc_total, len(records), counts, len(drops), len(boxgaps))) + + +if __name__ == "__main__": + main() diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/make_meta.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/make_meta.py new file mode 100644 index 0000000000..09fa51b69b --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/make_meta.py @@ -0,0 +1,325 @@ +#!/usr/bin/env python3 +"""One-shot metadata generator for research/fstar-box-withoutloss-seed7f3a1c. + +Writes predecessor/PINS.json (sha256 of every vendored file), TASK.json +(original_card taken VERBATIM from the pinned catalogue card object), and +SOURCES.json (git-blob provenance rows; the catalogue pinned at base_commit). +Stdlib + git only. Run from anywhere: python3 -B make_meta.py +""" +import hashlib +import json +import os +import subprocess +import sys + +HERE = os.path.dirname(os.path.abspath(__file__)) +ROOT = os.path.abspath(os.path.join(HERE, "..", "..")) +PKG = "research/fstar-box-withoutloss-seed7f3a1c" +BASE = "0614abaef427f123d9b844f85a759e64ee3ab29c" +CARD_ID = "bit-new-register-model" + + +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 git_blob(spec): + sha = subprocess.run(["git", "rev-parse", spec], cwd=ROOT, + capture_output=True, text=True, check=True + ).stdout.strip() + data = subprocess.run(["git", "cat-file", "blob", sha], cwd=ROOT, + capture_output=True, check=True).stdout + return sha, hashlib.sha256(data).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 main(): + # 1. own pins over the whole vendored tree + files = {} + base_dir = os.path.join(HERE, "predecessor") + for dirpath, _dirs, names in os.walk(base_dir): + for name in sorted(names): + p = os.path.join(dirpath, name) + rel = os.path.relpath(p, base_dir).replace(os.sep, "/") + if rel == "PINS.json": + continue + files[rel] = sha256_file(p) + write_json(os.path.join(base_dir, "PINS.json"), + dict(schema_version=1, + provenance=dict( + pr2963="https://github.com/CrocSwap/" + "integer-mult-bounds/pull/2963 head " + "ee755e682b3b30d493e764d3be50003b13b69b4a " + "(vendored tree incl. nested predecessor " + "copies; pr-tree-extract)"), + files=files)) + print("PINS.json: %d vendored files" % len(files)) + + # 2. TASK.json with the catalogue card verbatim + with open(os.path.join(ROOT, "docs", "research", + "agent-task-catalog.json"), encoding="utf-8") as fh: + catalog = json.load(fh) + cards = [t for tr in catalog["tracks"] for t in tr["tasks"] + if t["id"] == CARD_ID] + assert len(cards) == 1, "card %s not unique: %d" % (CARD_ID, len(cards)) + card = cards[0] + task = { + "schema_version": 1, + "task_id": CARD_ID, + "original_card": card, + "scope_status": "changed", + "scope_change_reason": ( + "Authorized 'explicit open request' scope change to kappa-blocker " + "KB5j, recorded per the assignment (discussion 1166; PR 2963's " + "exact statement - 'Lemma BPP's without-loss question remains the " + "exact blocker' for box-completeness - is the named open request). " + "The chooser OS draw (seed 0194e0b2ffbe43b4e67165afcf5ee6cd, " + "track bit-mechanisms) proposed bit-new-register-model and " + "bit-helper-contract; neither is this object, and the assignment " + "takes the KB5j request instead."), + "actual_scope": ( + "Kappa-blocker KB5j (authorized explicit open request): SETTLE " + "LEMMA BPP's WITHOUT-LOSS QUESTION of open problem F-star " + "(cert(M) >= floor(2v/3) for exact 3-total rational decoders): " + "may one assume, without loss at tau >= 1, that an attaining L8 " + "witness satisfies Lemma BPP conditions (i)+(ii), i.e. is " + "box(M) = cert(M) for every exact 3-total decoder with " + "tau(t) >= 1? Either prove box-completeness (projection/repair " + "lemma), construct the minimal tau >= 1 counterexample with both " + "sides exact, or isolate the precise parity obstruction to repair " + "with a minimal demo."), + "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": BASE, + "method": ( + "Smallest instance first. (1) Classify the escape mechanism of " + "PR 2963's 21 escaping witnesses exactly (BPP projection, " + "conditions (i)/(ii), per-escape-line bits). (2) Exhaustive " + "combinatorial reduction: cert and box of a decoder depend only " + "on (pi, sg, zero-digraph Z, a0, b0); cert is over-approximated " + "by the full-label value cert_max(Z) (monotone in label freedom), " + "so cert_max(Z) <= box proves completeness on that datum and " + "cert_max(Z) > box is a candidate. v = 2 all scope-consistent " + "patterns; v = 3 all patterns up to line/total relabeling. (3) " + "Realize candidates by exact 3-total integer decoders via the " + "odd/even valuation recipe (m_j = 0 normalization; odd on anchor " + "bits), per-q-row exhaustive search with seeded P restarts, " + "alphabets {+-1,+-3}/{+-2,0} then {+-1..+-7}/{+-2..+-6,0}. " + "(4) Certify every value by replayed witnesses, exact " + "enumeration, an independent section-7 enumeration, and written " + "rank bounds (Lemma RT); int-only arithmetic."), + "parameter_ranges": ( + "v = 2..4; three totals; label space F2^3 bit masks; integer P, Q " + "entries in {-7..7}; 2-adic valuations 0..3; zero digraphs all " + "patterns at v = 2 and all Lemma-SG-consistent patterns at v = 3 " + "(up to line and total relabeling); 360 realizable instances " + "(320 random valuation-tuned v = 3..4 + 40 GL_3(Z) fixture " + "transforms at v = 3); realization caps 4000-6000 P-restarts per " + "candidate with exhaustive q-rows."), + "existing_restriction_being_changed": ( + "Audits/settles PR 2914 open question 1 + PR 2936 open question 1 " + "as narrowed by PR 2963 (box-completeness for tau >= 1). The " + "PR 2914 route (b) required cert = box-max at tau >= 1 plus a box " + "floor; this package refutes the equality."), + "nearest_overlapping_prs": ( + "PR 2914 (sub-anchor box, Lemmas SB/LB), PR 2936 (Lemma BPP, tau " + ">= 1 necessary, v = 7..11 census), PR 2963 (tied_min v = 11 " + "exact, box weak cell closed, BPP strictness at tau = 0). None " + "settles the without-loss question; this package does, " + "negatively, with the minimal counterexample."), + "bottleneck_link": ( + "F-star (cert(M) >= floor(2v/3)) is the named route to closing " + "every open T = 3 window at once (research/root-unit-decoder-" + "lemmas section 7). PR 2963 named Lemma BPP's without-loss " + "question as the exact blocker of the box-completeness route. " + "This package settles it: box-completeness FAILS at tau >= 1 " + "(minimal counterexample v = 3, cert = 3 > box = 2), so the " + "completeness link of the PR 2914 chain is dead; the box-floor " + "link and cost >= cert survive, and the surviving narrowed " + "question (shareable class c_j = gamma) is stated exactly."), + "optimistic_full_cost_budget": ( + "No kappa claim; milestone is the settled question itself. Heavy " + "compute capped: combinatorial enumeration v = 2..3 (seconds), " + "360-instance sweep (seconds), realization caps 4000-6000 " + "P-restarts per candidate (about 26 s total), all blocking with " + "receipts."), + "evidence": ( + "VERDICT: Lemma BPP's without-loss question is answered NO at " + "tau >= 1. PROVEN: box = cert = 2 at v = 2 for tau >= 1 (written " + "proof + exhaustive machine check of all 2842 scope-consistent " + "patterns), so v = 3 is minimal. PROVEN: minimal tau >= 1 " + "counterexample at v = 3: P = [[-1,-3,0],[1,-1,-2],[3,3,3]], " + "Q = [[1,-3,2],[3,-1,-2],[3,-1,2]], M = diag(8,8,12), " + "tau = (2,2,2): cert = 3 (replayed attaining witness a = b = " + "[1,2,4], order [2,1,0]; independent enumeration) > 2 = box " + "(PROVEN upper bound: Lemma RT triangular rank + shareable " + "totals r_box = 2; explicit box witness). PROVEN: the " + "obstruction's exact form - in the box only totals with " + "c_j = gamma (shareable) can enter K, and when every forward " + "pair is a zero arc K[S,S] is unit triangular, so |S| <= r_box; " + "the third total (c_2 = 1 > gamma = 0) is only usable via " + "non-tied shared bits, i.e. BPP condition (i) fails on every " + "attaining witness. CHECKED: PR 2963's 19 distinct escapes are " + "all cosmetic (E1); 360 realizable tau >= 1 instances show 1788 " + "strict projection drops (E2 1768) with 0 box violations, so " + "projection is not without loss either. CHECKED: 3023 v = 3 " + "combinatorial configs, 27 gap candidates, 3 realized as " + "counterexamples, 3 unrealizable (column-attainment), 21 not " + "realized in cap (alphabets up to {+-1..+-7}/{+-2..+-6,0})."), + "falsification_test": ( + "Any counterexample claim is falsified by replaying the stored " + "witnesses and recomputing both rungs from the definition: " + "verify.py re-enumerates cert and box INDEPENDENTLY of the " + "vendored engine (section-7 enumeration) and asserts 3 and 2; " + "the box upper bound is a written rank proof, not a scan; " + "corrupted-witness rejection and the tie/scope identities are " + "asserted on every instance; the v = 2 completeness claim is " + "falsifiable by any of the 2842 enumerated patterns failing."), + "time_compute_cap": ( + "One bounded pivot maximum; registered replay under 600 s " + "(observed under 2 min); realization search capped per " + "candidate and recorded as not-found-in-cap, never as " + "unrealizable."), + "stop_rule": ( + "Stop when the without-loss question is settled (proved, " + "counterexample, or exact obstruction with minimal demo). " + "Achieved: counterexample, PROVEN minimal at v = 3. No further " + "search without a new hypothesis."), + "predecessor_authors": ( + "PR 1590 DreamingOfClouds (Claude Opus 5.5 (Anthropic) via " + "Claude Code assistance); PR 2111 DreamingOfClouds; PRs " + "2717/2747/2774/2869/2890/2901/2914/2936/2963 Aaron Wang " + "(navinor); all verified at current ground truth with " + "gh pr view --json author,title on 2026-10-16."), + "intended_artifact": ( + "research/fstar-box-withoutloss-seed7f3a1c/ with verify.py " + "(python3 -B research/fstar-box-withoutloss-seed7f3a1c/" + "verify.py)."), + "outcome": "completed", + "open_questions": [ + { + "question": ( + "Are the 21 remaining v = 3 combinatorial gap patterns " + "(a0, b0, Z) realizable by exact 3-total decoders?"), + "why_it_matters": ( + "All 21 lie in the shareable class (r_box = 3), so a " + "realization refutes box-completeness there too, while a " + "proof of unrealizability would prove box-completeness " + "at v = 3 in the shareable class - the class holding all " + "prior evidence."), + "first_step": ( + "Characterize the (a0,b0,Z) patterns forced by rank-3 " + "factorizations M = P Q^T with prescribed odd/even " + "valuations (odd-term parity of every M_ts); extend the " + "seeded realization search with a valuation-level " + "enumeration (m_j in {0,1}) instead of random restarts."), + "blocked_by": ( + "No realizability characterization beyond Lemma SG + the " + "column-attainment condition; the search so far is " + "bounded (not a non-existence result)."), + }, + { + "question": ( + "Box-completeness in the shareable class (every total " + "has c_j = gamma) at v >= 4: is cert = box there?"), + "why_it_matters": ( + "It is the exact surviving form of the without-loss " + "question once Lemma RT's obstruction is excluded; every " + "previous box = cert datapoint sits in this class."), + "first_step": ( + "Extend the job-B combinatorial enumeration to v = 4 " + "with a cert-side subset DP over the same (a0,b0,Z) " + "lattice; then realize any gap datum as in job D."), + "blocked_by": ( + "8^4 label enumeration per configuration times the " + "zero-pattern lattice needs a DP or symmetry reduction " + "before it is tractable."), + }, + ], + } + write_json(os.path.join(HERE, "TASK.json"), task) + print("TASK.json written with card %s (%d card keys)" + % (CARD_ID, len(card))) + + # 3. SOURCES.json (git-blob provenance; catalogue at base_commit) + rows = [] + for path, usage in (("certificates/selected-result.json", "provenance"), + ("docs/research/agent-task-catalog.json", + "provenance"), + ("research/root-unit-decoder-lemmas/README.md", + "input")): + blob, sha = git_blob(BASE + ":" + path) + rows.append(dict(path=path, usage=usage, git_blob=blob, sha256=sha)) + write_json(os.path.join(HERE, "SOURCES.json"), + dict(schema_version=1, base_commit=BASE, files=rows)) + print("SOURCES.json written: %d rows" % len(rows)) + + # 4. VERIFY.json (registered replay manifest) + inputs = [ + "research/root-unit-decoder-lemmas/README.md", + PKG + "/verify.py", + PKG + "/box_search_kj.py", + PKG + "/escape_classify.py", + PKG + "/realize_kj.py", + PKG + "/README.md", + PKG + "/TASK.json", + PKG + "/data/box-search-kj-receipt.json", + PKG + "/data/escape-receipt.json", + PKG + "/data/realize-kj-receipt.json", + PKG + "/predecessor/PINS.json", + ] + cmd = dict( + argv=["{python}", "-B", "{package}/verify.py"], + timeout_seconds=600, + checks=( + "KB5j package replay: vendored predecessor pins " + "(PR 2963's 14-file pin set + this package's own " + "pin file + fixture hashes); predecessor anchors " + "(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; exact named RECOMPUTED = 9 on " + "all 12 tied_min v = 11 sub-decoders; every " + "stored cert/box witness replayed with in-box " + "flags; PR 2936's tau = 0 demo cert = 2 > box = " + "1); the delivered counterexample re-certified " + "three ways (vendored engine exact cert/box, an " + "independent section-7 enumeration written from " + "the definition, and Lemma RT's PROVEN rank " + "bound box <= r_box = 2) with identities and " + "replayed witnesses; jobs A-D recomputed from " + "scratch (v = 2 exhaustive 2842 configs box = " + "cert = 2; v = 3 combinatorial 3023 configs / 27 " + "candidates / 3 realized counterexamples with " + "the README's exact P, Q / 3 unrealizable-column " + "/ 21 not-found-in-cap; 360 realizable instances " + "0 violations, 1788 strict projection drops, " + "escape classes E2 1768 / E1 466 / E4 18 / E3 6; " + "PR 2963 pool: 19 distinct escapes all E1); " + "writes CERTIFICATE.json and prints PASS_KJ_PINS, " + "PASS_FG_CONTROLS, PASS_FG_CALIBRATION, " + "PASS_KJ_ANCHORS, PASS_KJ_TAU0_DEMO, " + "PASS_KJ_COUNTEREXAMPLE, PASS_KJ_JOBS, " + "PASS_KJ_ESCAPE, PASS_KJ_REALIZE, " + "PASS_KJ_WITHOUTLOSS")) + write_json(os.path.join(HERE, "VERIFY.json"), + dict(schema_version=1, status="ready", python="3.12", + requirements=[], inputs=inputs, commands=[cmd])) + print("VERIFY.json written") + + +if __name__ == "__main__": + sys.stdout.reconfigure(encoding="utf-8") + main() diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/PINS.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/PINS.json new file mode 100644 index 0000000000..051c910ee6 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/PINS.json @@ -0,0 +1,37 @@ +{ + "files": { + "pr2963/CERTIFICATE.json": "b9aa56c57d3e59fbb0d302fb922f3130a4034250746ba5627a9af3b2c669deaf", + "pr2963/README.md": "73557da3f4839d19dc898e03fbf28dcb4ff6a4b76a60f9bcae3fa595c6097a20", + "pr2963/SOURCES.json": "fc2d259188b08d4af6db692e15c7b16849c8908d4fe8c3d332cc3302d29d802a", + "pr2963/TASK-CARD.md": "ccc9ae4e0e187f59e45fc3a986cabf6070d3ffb921c4c51d21e61d739ba83177", + "pr2963/TASK.json": "7b29cbab891ac88fcc6f8b5949ad12d7bfbd91705425d56d9eb6a6c8329a63d1", + "pr2963/VERIFY.json": "adb79ada510efb895b354e3c49b218ecbc38bd8941a4c772c25a1a021b4c8636", + "pr2963/box_search.py": "70d06d1accde53969843d75b8a44c2722ee9fbfbe13b1c1415ae384e46006c62", + "pr2963/data/box-search-receipt.json": "887ab2ff88f1775fba11ae355855e5afe700dd1f18e7752331575a86e72f2ac7", + "pr2963/data/named-v11-receipt.json": "4e8ad87bc774379c5a36a71a17af33fd088c9a399604edefaee426796539b948", + "pr2963/make_meta.py": "58e60a256ada9d22439982e513a603a98d8e861a1514f3e81dee8811947fb71e", + "pr2963/named_exact.py": "7dc159dc0b9088aca24a0fbba97ef59fd23dae4ca4fe7a0ac6f8a047f2054d3f", + "pr2963/predecessor/PINS.json": "ce4bd15afa8f0e8d970e24be9f41aca6a168ea6d1a04410f68093cff745bbb68", + "pr2963/predecessor/pr2914/CERTIFICATE.json": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "pr2963/predecessor/pr2914/README.md": "ade14e30ea999d471f8aeb7b8d2cd58bd0ed98d0bdd28a6eb5d921dbfd531cb9", + "pr2963/predecessor/pr2914/SOURCES.json": "aeb7a387d44d34950ad0855ae459d25fd19a4ac2c5b3bd28a72cb4705fbe8344", + "pr2963/predecessor/pr2914/TASK-CARD.md": "3ee9241d7a526dc0d22762534af2d9dc28275bbfa39fafa09cddaedc33d5b24f", + "pr2963/predecessor/pr2914/TASK.json": "7e82f165444af352497b1f63f441ef289209247954fa038757da3934175211d5", + "pr2963/predecessor/pr2914/VERIFY.json": "03670b8b028e5aad7f14dc0e6b97e1254e879b848846f02845981498abaa0384", + "pr2963/predecessor/pr2914/data/cex_min_1.B22.json": "15f5039069a175831f92c4ffe023a23a6f6e6bd6665f0ca2c2734bbe672b51ef", + "pr2963/predecessor/pr2914/data/cex_min_1.json": "86064701dde94b4f35427bc3e19275eaf1e40e9e90d4fea28e7857f3564d4dd7", + "pr2963/predecessor/pr2914/data/cex_min_1.witness.json": "153f4d2e8dc262f547a91f2daff9724cab88beb4d45c399497efc68a8ed2c933", + "pr2963/predecessor/pr2914/data/tied_min.json": "670ed90924b601ade22f0d4adaff46d1667e5449326a0f7ba7b88dd8f5906f93", + "pr2963/predecessor/pr2914/verify.py": "4e5a25152de0d4462fe1c987d4f6ea70f9e267ce7307a71f1586c45b518268ea", + "pr2963/predecessor/pr2936/box_attack.py": "fe463e00f905fcd3b6368c6b60b8b33a57120b3431573a6eb05446e963eeb9f0", + "pr2963/predecessor/pr2936/predecessor/pr2914/verify.py": "4e5a25152de0d4462fe1c987d4f6ea70f9e267ce7307a71f1586c45b518268ea", + "pr2963/predecessor/pr2936/receipt-tied_min-s11-deep.json": "78376e6c86d9571bd834173561e5e8f7e8163572d8fe578e852bed12cec51ddf", + "pr2963/run_named_v11.py": "efeb31b83fba40c1f4c489c0095bebfdc08eb96d8a7ab3123956e5a7659f5ba0", + "pr2963/test_named_exact.py": "3a0fb70fa4ee539b6512fbc2a77bd1a89cc7c892db7766fdb110a4bbf09d61b0", + "pr2963/verify.py": "f58961f1ddf8901bd6e399adc87400e1e0b771f3e9e56048abd3c23db937a8d1" + }, + "provenance": { + "pr2963": "https://github.com/CrocSwap/integer-mult-bounds/pull/2963 head ee755e682b3b30d493e764d3be50003b13b69b4a (vendored tree incl. nested predecessor copies; pr-tree-extract)" + }, + "schema_version": 1 +} diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/CERTIFICATE.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/CERTIFICATE.json new file mode 100644 index 0000000000..e94a1a8041 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/README.md b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/README.md new file mode 100644 index 0000000000..311bbdf466 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/SOURCES.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/SOURCES.json new file mode 100644 index 0000000000..1d8bdd7db9 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/TASK-CARD.md b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/TASK-CARD.md new file mode 100644 index 0000000000..66ca3fc094 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/TASK.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/TASK.json new file mode 100644 index 0000000000..dac9275799 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/VERIFY.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/VERIFY.json new file mode 100644 index 0000000000..d88c2410d1 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/box_search.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/box_search.py new file mode 100644 index 0000000000..e46918cd90 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/data/box-search-receipt.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/data/box-search-receipt.json new file mode 100644 index 0000000000..b452f93fc4 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/data/named-v11-receipt.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/data/named-v11-receipt.json new file mode 100644 index 0000000000..af398c16ab --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/make_meta.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/make_meta.py new file mode 100644 index 0000000000..69e771dffd --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/named_exact.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/named_exact.py new file mode 100644 index 0000000000..da83c9216f --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/PINS.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/PINS.json new file mode 100644 index 0000000000..e364da0d75 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/CERTIFICATE.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/CERTIFICATE.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/README.md b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/README.md new file mode 100644 index 0000000000..cb9dcfa38d --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/SOURCES.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/SOURCES.json new file mode 100644 index 0000000000..bd49294825 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/TASK-CARD.md b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/TASK-CARD.md new file mode 100644 index 0000000000..bcb736f7f2 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/TASK.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/TASK.json new file mode 100644 index 0000000000..54a1196a21 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/VERIFY.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/VERIFY.json new file mode 100644 index 0000000000..fb1e4f5005 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/data/cex_min_1.B22.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/data/cex_min_1.B22.json new file mode 100644 index 0000000000..0161536922 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/data/cex_min_1.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/data/cex_min_1.json new file mode 100644 index 0000000000..4629aa02b1 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/data/cex_min_1.witness.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/data/cex_min_1.witness.json new file mode 100644 index 0000000000..602d784e98 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/data/tied_min.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/data/tied_min.json new file mode 100644 index 0000000000..ae11f01fab --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/verify.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2914/verify.py new file mode 100644 index 0000000000..9d8285e4e3 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2936/box_attack.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2936/box_attack.py new file mode 100644 index 0000000000..5235b1eca9 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2936/predecessor/pr2914/verify.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2936/predecessor/pr2914/verify.py new file mode 100644 index 0000000000..9d8285e4e3 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2936/receipt-tied_min-s11-deep.json b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/predecessor/pr2936/receipt-tied_min-s11-deep.json new file mode 100644 index 0000000000..736822efb9 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/run_named_v11.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/run_named_v11.py new file mode 100644 index 0000000000..a39ccefda4 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/test_named_exact.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/test_named_exact.py new file mode 100644 index 0000000000..44c89ac66e --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/verify.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/verify.py new file mode 100644 index 0000000000..e5a47d4ccc --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/predecessor/pr2963/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() diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/realize_kj.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/realize_kj.py new file mode 100644 index 0000000000..787d9c4190 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/realize_kj.py @@ -0,0 +1,205 @@ +#!/usr/bin/env python3 +"""KB5j job 2: realize (or refute by search) the v = 3 combinatorial +candidates of box_search_kj.py job B. + +A combinatorial candidate is (a0, b0, Z): sub-anchor masks per line with +tau(t) = |a0(t) intersect b0(t)| >= 1, a zero-arc set Z with |a0(t) intersect +b0(s)| even on every arc (Lemma SG), and full-label cert_max(Z) = 3 > 2 = +box(a0, b0, Z). Realization asks for an EXACT 3-total integer decoder +M = P Q^T whose anchor data IS (a0, b0) and whose zero pattern IS Z. + +Realization recipe (canonical reduced normalization, m_j = 0 per used total): + - p_j(t) odd iff j in a0(t); even nonzero otherwise (or the whole + p-column zero when j is in no a0(t) - then m_j = SENTINEL and no b0 can + contain j, a hard unrealizability witness if violated); + - q_j(t) odd iff j in b0(t); even nonzero otherwise; + then v2(p_j(t)) + v2(q_j(t)) = 0 on a0(t) intersect b0(t) = tied bits, + Lemma SG's scope identity is automatic (parity of odd terms of M_ts), and + the candidate's tau and masks reproduce exactly. All entries nonzero where + allowed keeps pi = sg = full so cert is the full-label value. + +For fixed P the constraints on each row q(s) are independent (M_ts = p(t).q(s) +is linear in q(s)): every q(s) is enumerated exhaustively over its alphabet +(odd {+1,-1,+3,-3}, even {+2,-2}); P is sampled with deterministic restarts. + +Writes data/realize-kj-receipt.json. Stdlib, deterministic. +Run: python3 -B realize_kj.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, os.path.join(HERE, "predecessor", "pr2963")) +import named_exact as ne # noqa: E402 + +fg = ne.fg +spec = importlib.util.spec_from_file_location( + "box_attack", + os.path.join(HERE, "predecessor", "pr2963", "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) + + +ODD = (1, -1, 3, -3) +EVEN = (2, -2) +EVEN0 = (2, -2, 0) +ODD_BIG = (1, -1, 3, -3, 5, -5, 7, -7) +EVEN0_BIG = (2, -2, 4, -4, 6, -6, 0) + + +def row_options(b0_line, col_active, allow_zero): + """Alphabet per position for one q-row.""" + even = EVEN0 if allow_zero else EVEN + opts = [] + for j in range(3): + if not col_active[j]: + opts.append(even) # p-column zero: parity free + elif (b0_line >> j) & 1: + opts.append(ODD) + else: + opts.append(even) + return opts + + +def p_options(a0_line, col_active, allow_zero): + even = EVEN0 if allow_zero else EVEN + opts = [] + for j in range(3): + if not col_active[j]: + opts.append((0,)) + elif (a0_line >> j) & 1: + opts.append(ODD) + else: + opts.append(even) + return opts + + +def dot3(u, w): + return u[0] * w[0] + u[1] * w[1] + u[2] * w[2] + + +def try_candidate(cand, rng, p_tries=4000, allow_zero=False, big=False): + a0, b0, Z = cand["a0"], cand["b0"], frozenset(tuple(z) for z in cand["Z"]) + col_active = [any((a0[t] >> j) & 1 for t in range(3)) for j in range(3)] + col_b = [any((b0[t] >> j) & 1 for t in range(3)) for j in range(3)] + for j in range(3): + if col_b[j] and not col_active[j]: + return dict(status="unrealizable-column", + reason="bit %d enters b0 but no a0 line attains m_j" + % j) + if big: + global ODD, EVEN0 + odd_save, even_save = ODD, EVEN0 + ODD, EVEN0 = ODD_BIG, EVEN0_BIG + popts = [p_options(a0[t], col_active, allow_zero) for t in range(3)] + qopts = [row_options(b0[s], col_active, allow_zero) for s in range(3)] + for attempt in range(p_tries): + P = [tuple(opts[rng.randrange(len(opts))] for opts in popts[t]) + for t in range(3)] + rows = [] + ok = True + for s in range(3): + found = None + for q in itertools.product(*qopts[s]): + good = True + for t in range(3): + v = dot3(P[t], q) + if t == s: + if v == 0: + good = False + break + elif ((t, s) in Z) != (v == 0): + good = False + break + if good: + found = q + break + if found is None: + ok = False + break + rows.append(found) + if not ok: + continue + Q = rows + mod = fg.model(P, Q) + ad = fg.anchor_data(mod) + if list(ad["a0"]) != list(a0) or list(ad["b0"]) != list(b0): + continue + if not (fg.tie_parity(mod, ad) and fg.scope_identity(mod, ad)): + continue + gotZ = frozenset((t, s) for (t, s) in mod["arcs"]) + if gotZ != Z: + continue + ce, cew = fg.cert_exact(mod, max_v=3) + bx, bxw = ba.box_exact_tolerant(mod, ad) + assert fg.replay_witness(mod, cew) + assert bxw is None or fg.replay_witness(mod, bxw) + if big: + ODD, EVEN0 = odd_save, even_save + return dict(status="realized", P=[list(p) for p in P], + Q=[list(q) for q in Q], cert=ce, box=bx, + cert_witness=cew, attempts=attempt + 1, + alphabet=("big" if big else + "nonzero" if not allow_zero else "with-zeros")) + if big: + ODD, EVEN0 = odd_save, even_save + return dict(status="not-found-in-cap", p_tries=p_tries, + alphabet=("big" if big else + "nonzero" if not allow_zero else "with-zeros")) + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + with open(os.path.join(HERE, "data", "box-search-kj-receipt.json"), + encoding="utf-8") as fh: + kj = json.load(fh) + cands = kj["job_b"]["candidates"] + log("candidates: %d" % len(cands)) + rng = random.Random(20261017) + out = [] + counterexamples = [] + for i, cand in enumerate(cands): + res = try_candidate(cand, rng, allow_zero=False) + if res["status"] == "not-found-in-cap": + res = try_candidate(cand, rng, p_tries=4000, allow_zero=True) + if res["status"] == "not-found-in-cap": + res = try_candidate(cand, rng, p_tries=6000, allow_zero=True, + big=True) + res.update(candidate=cand) + out.append(res) + log("[%d/%d] %s a0=%s b0=%s Z=%s -> %s" + % (i + 1, len(cands), res["status"], cand["a0"], cand["b0"], + cand["Z"], + ("cert=%s box=%s" % (res.get("cert"), res.get("box"))) + if res["status"] == "realized" else res.get("reason", ""))) + if res["status"] == "realized" and res["cert"] > res["box"]: + counterexamples.append(res) + log("BOX-COMPLETENESS COUNTEREXAMPLE: cert=%d box=%d P=%s Q=%s" + % (res["cert"], res["box"], res["P"], res["Q"])) + counts = {} + for r in out: + counts[r["status"]] = counts.get(r["status"], 0) + 1 + with open(os.path.join(HERE, "data", "realize-kj-receipt.json"), "w", + encoding="utf-8", newline="\n") as fh: + json.dump(dict(generator="realize_kj.py seed 20261017", + status_counts=counts, records=out, + counterexamples=counterexamples), + fh, indent=1, sort_keys=True) + fh.write("\n") + print("PASS_KJ_REALIZE candidates=%d status=%s counterexamples=%d" + % (len(cands), counts, len(counterexamples))) + + +if __name__ == "__main__": + main() diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/verify.py b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/verify.py new file mode 100644 index 0000000000..34d1264e25 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/predecessor/pr2978/verify.py @@ -0,0 +1,348 @@ +#!/usr/bin/env python3 +"""KB5j registered replay: Lemma BPP's without-loss question at tau >= 1. + +Recomputes from scratch (stdlib, deterministic, single process): + 1. vendored predecessor pins (PR 2963's 14-file pin set + every vendored + file of this package; fixture hashes asserted); + 2. predecessor anchors (PR 2914 controls + calibration; exact named + RECOMPUTED on the twelve tied_min v = 11 sub-decoders; every stored + cert/box witness replayed; PR 2936's tau = 0 demo cert = 2 > box = 1); + 3. job A: v = 2 exhaustive (2842 scope-consistent configs, box = cert = 2); + 4. job B: v = 3 combinatorial enumeration (3023 canonical configs, 27 gap + candidates with the three realized ones asserted by constant); + 5. job C: 360 realizable tau >= 1 instances (0 box violations, 1788 strict + projection drops, escape classes E1..E4); + 6. job D: candidate realization (3 counterexamples cert = 3 > box = 2 with + the README's exact P, Q; 3 unrealizable-column; 21 not-found-in-cap); + 7. the escape classification of PR 2963's pool (19 distinct, all E1); + 8. an INDEPENDENT enumeration of cert and box for the delivered + counterexample written from the section-7 definition (not the vendored + engine), plus Lemma RT's triangular-rank and shareable-totals checks. + +Prints PASS markers and writes CERTIFICATE.json (newline="\\n"). +Run: python3 -B verify.py +""" +import hashlib +import importlib.util +import itertools +import json +import os +import sys +import time + +T0 = time.time() +HERE = os.path.dirname(os.path.abspath(__file__)) +sys.path.insert(0, os.path.join(HERE, "predecessor", "pr2963")) +import named_exact as ne # noqa: E402 + +fg = ne.fg +DATA = os.path.join(HERE, "predecessor", "pr2963", "predecessor", "pr2914", + "data") +spec = importlib.util.spec_from_file_location( + "box_attack", + os.path.join(HERE, "predecessor", "pr2963", "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) + + +# ------------------------------------------------------------ delivered cex +CEX_P = [[-1, -3, 0], [1, -1, -2], [3, 3, 3]] +CEX_Q = [[1, -3, 2], [3, -1, -2], [3, -1, 2]] +CEX_A0 = [3, 3, 7] +CEX_B0 = [3, 3, 3] + + +def dot1(x, y): + return bin(x & y).count("1") & 1 + + +def indep_value(v, M, a_choice, b_choice): + """Independent max-kept value from the section-7 definition: K_tt = 1 on + the kept set and K_ts = 0 on every forward zero arc, for some order.""" + K = [[dot1(a_choice[t], b_choice[s]) for s in range(v)] for t in range(v)] + good = [t for t in range(v) if K[t][t] == 1] + for r in range(len(good), 0, -1): + for S in itertools.combinations(good, r): + for order in itertools.permutations(S): + pos = {t: i for i, t in enumerate(order)} + if all(not (M[t][s] == 0 and pos[t] < pos[s] and K[t][s]) + for t in S for s in S if t != s): + return r + return 0 + + +def indep_cert_box(mod, ad): + """Independent enumeration of cert and box for v = 3.""" + v = mod["v"] + M = mod["M"] + + def enum(pi_list, sg_list): + aopts = [[m for m in range(8) if (m & ~pi_list[t]) == 0] + for t in range(v)] + bopts = [[m for m in range(8) if (m & ~sg_list[t]) == 0] + for t in range(v)] + best = 0 + for a_choice in itertools.product(*aopts): + for b_choice in itertools.product(*bopts): + val = indep_value(v, M, a_choice, b_choice) + if val > best: + best = val + if best == v: + return best + return best + + cert = enum(mod["pi"], mod["sg"]) + box = enum(ad["a0"], ad["b0"]) + return cert, box + + +def rank_f2(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) + + +# ------------------------------------------------------------------- checks +def check_pins(): + pins = load_json(os.path.join(HERE, "predecessor", "pr2963", + "predecessor", "PINS.json")) + n = 0 + for rel, want in sorted(pins["files"].items()): + p = os.path.join(HERE, "predecessor", "pr2963", "predecessor", + *rel.split("/")) + assert sha256_file(p) == 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" + mine = load_json(os.path.join(HERE, "predecessor", "PINS.json")) + m = 0 + for rel, want in sorted(mine["files"].items()): + p = os.path.join(HERE, "predecessor", *rel.split("/")) + assert sha256_file(p) == want, "own pin mismatch: %s" % rel + m += 1 + print("PASS_KJ_PINS pr2963-pins=%d own-pins=%d" % (n, m)) + return n, m + + +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 check_anchors(): + fg.run_controls() + fg.run_calibration() + stored2936 = load_json(os.path.join(HERE, "predecessor", "pr2963", + "predecessor", "pr2936", + "receipt-tied_min-s11-deep.json")) + labels = sorted(r["label"] for r in stored2936["records"]) + assert len(labels) == 12 + named_receipt = load_json(os.path.join(HERE, "predecessor", "pr2963", + "data", "named-v11-receipt.json")) + inbox = 0 + for label in labels: + sub = load_sub(label) + ad = fg.anchor_data(sub) + inm, _ = fg.digraph_tables(sub["v"], sub["arcs"]) + acyc = fg.acyclic_table(sub["v"], inm) + mas = fg.mas_table(sub["v"], acyc) + named, det = ne.named_exact(sub, ad, mas, acyc, cap=6000000) + assert named == 9 and det["exhaustive"], label + rec = named_receipt["records"][label] + cw = rec["cert_witness"] + assert fg.replay_witness(sub, cw) and len(cw["kept"]) == 11, 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) and fg.in_box(sub, ad, bw)[0], label + assert rec["cert"] == 11 and rec["box"] == 11 and rec["named"] == 9 + print("PASS_KJ_ANCHORS named=9x12 box-replay-in-box=%d/12" % inbox) + 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) + bx, _ = ba.box_exact_tolerant(sub, ad) + assert (ce, bx) == (2, 1) and fg.replay_witness(sub, cew) + print("PASS_KJ_TAU0_DEMO cert=2 box=1") + return labels + + +def check_counterexample(): + mod = fg.model([tuple(p) for p in CEX_P], [tuple(q) for q in CEX_Q]) + ad = fg.anchor_data(mod) + assert list(ad["a0"]) == CEX_A0 and list(ad["b0"]) == CEX_B0 + assert list(ad["tau"]) == [2, 2, 2] + assert fg.tie_parity(mod, ad) and fg.scope_identity(mod, ad) + assert mod["M"] == [[8, 0, 0], [0, 8, 0], [0, 0, 12]] + assert len(mod["arcs"]) == 6 # every off-diagonal pair zero + # shareable totals (Corollary): r_box = #{j : c_j = gamma} = 2 + c = [ad["m"][j] + ad["n"][j] for j in range(3)] + r_box = sum(1 for j in range(3) if c[j] == ad["gamma"]) + assert c == [0, 0, 1] and r_box == 2 + # Lemma RT on the counterexample: full labels keep 3 only via rank 3 + a_w = [1, 2, 4] + b_w = [1, 2, 4] + Krows = [sum((dot1(a_w[t], b_w[s]) << s) for s in range(3)) + for t in range(3)] + assert rank_f2(Krows) == 3 + # every box K has rank <= 2 (bit 2 never on a b-side) + for at in itertools.product(*[[m for m in range(8) + if (m & ~ad["a0"][t]) == 0] + for t in range(3)]): + for bt in itertools.product(*[[m for m in range(8) + if (m & ~ad["b0"][t]) == 0] + for t in range(3)]): + rows = [sum((dot1(at[t], bt[s]) << s) for s in range(3)) + for t in range(3)] + assert rank_f2(rows) <= 2 + # engine values + replayed witnesses + ce, cew = fg.cert_exact(mod, max_v=3) + bx, bxw = ba.box_exact_tolerant(mod, ad) + assert (ce, bx) == (3, 2) + assert fg.replay_witness(mod, cew) and len(cew["kept"]) == 3 + assert fg.in_box(mod, ad, cew)[0] is False + assert bxw is not None and fg.replay_witness(mod, bxw) \ + and fg.in_box(mod, ad, bxw)[0] and len(bxw["kept"]) == 2 + # independent enumeration from the section-7 definition + ice, ibx = indep_cert_box(mod, ad) + assert (ice, ibx) == (3, 2), (ice, ibx) + print("PASS_KJ_COUNTEREXAMPLE v=3 tau=2/2/2 cert=3 box=2 r_box=2 " + "independent=3/2") + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + check_pins() + check_anchors() + check_counterexample() + + # jobs A/B/C recomputed (they rewrite their deterministic receipts) + import box_search_kj as bk + bk.main() + kj = load_json(os.path.join(HERE, "data", "box-search-kj-receipt.json")) + assert kj["job_a"]["configs"] == 2842 and kj["job_a"]["gaps"] == 0 + assert kj["job_b"]["configs"] == 3023 and len(kj["job_b"]["candidates"]) \ + == 27 + want = {(tuple([3, 3, 7]), tuple([3, 3, 3])), + (tuple([3, 7, 7]), tuple([3, 3, 3])), + (tuple([7, 7, 7]), tuple([3, 3, 3]))} + got = {(tuple(c["a0"]), tuple(c["b0"])) + for c in kj["job_b"]["candidates"]} + assert want <= got + jc = kj["job_c"] + assert len(jc["instances"]) == 360 and len(jc["gaps"]) == 0 + assert len(jc["drops"]) == 1788 + assert jc["escape_classes"] == {"E2": 1768, "E1": 466, "E4": 18, "E3": 6} + print("PASS_KJ_JOBS v2-configs=2842 v3-configs=3023 candidates=27 " + "realizable=360 violations=0 drops=1788") + + # escape classification recomputed + import escape_classify as ec + ec.main() + er = load_json(os.path.join(HERE, "data", "escape-receipt.json")) + assert er["escapes_seen"] == 19 and len(er["records"]) == 19 + assert all(r["escape_kind"] == "E1" for r in er["records"]) + assert not any(r["projected_value"] < r["value"] for r in er["records"]) + assert not any(r["box"] < r["cert"] for r in er["records"]) + print("PASS_KJ_ESCAPE escapes=19 kinds=E1x19 drops=0 box-gaps=0") + + # realization recomputed (deterministic rng) + import realize_kj as rk + rk.main() + rr = load_json(os.path.join(HERE, "data", "realize-kj-receipt.json")) + assert rr["status_counts"] == {"not-found-in-cap": 21, + "unrealizable-column": 3, + "realized": 3} + assert len(rr["counterexamples"]) == 3 + first = rr["counterexamples"][0] + assert first["P"] == CEX_P and first["Q"] == CEX_Q + for cex in rr["counterexamples"]: + assert cex["cert"] == 3 and cex["box"] == 2 + mod = fg.model([tuple(p) for p in cex["P"]], + [tuple(q) for q in cex["Q"]]) + ad = fg.anchor_data(mod) + assert fg.replay_witness(mod, cex["cert_witness"]) + assert fg.tie_parity(mod, ad) and fg.scope_identity(mod, ad) + assert min(ad["tau"]) >= 1 + ce, _ = fg.cert_exact(mod, max_v=3) + bx, _ = ba.box_exact_tolerant(mod, ad) + assert (ce, bx) == (3, 2) + log("realization replayed: 3 counterexamples cert=3 box=2 exact both") + print("PASS_KJ_REALIZE candidates=27 realized=3 unrealizable-column=3 " + "not-found-in-cap=21 counterexamples=3") + print("PASS_KJ_WITHOUTLOSS verdict=counterexample v=3 tau>=1 cert=3>box=2") + + files = ["README.md", "TASK.json", "TASK-CARD.md", "verify.py", + "box_search_kj.py", "escape_classify.py", "realize_kj.py", + "data/box-search-kj-receipt.json", "data/escape-receipt.json", + "data/realize-kj-receipt.json", "predecessor/PINS.json"] + digests = {} + for f in files: + p = os.path.join(HERE, *f.split("/")) + if os.path.exists(p): + digests[f] = sha256_file(p) + cert = dict(schema_version=1, + package="fstar-box-withoutloss-seed7f3a1c", + base_commit="0614abaef427f123d9b844f85a759e64ee3ab29c", + markers=["PASS_KJ_PINS", "PASS_FG_CONTROLS", + "PASS_FG_CALIBRATION", "PASS_KJ_ANCHORS", + "PASS_KJ_TAU0_DEMO", "PASS_KJ_COUNTEREXAMPLE", + "PASS_KJ_JOBS", "PASS_KJ_ESCAPE", + "PASS_KJ_REALIZE", "PASS_KJ_WITHOUTLOSS"], + headline=dict( + verdict="box-completeness for tau >= 1 REFUTED; minimal " + "counterexample v = 3, cert = 3 > box = 2", + v2_proven="box = cert = 2 at v = 2, tau >= 1", + counterexample_P=CEX_P, counterexample_Q=CEX_Q, + cex_cert=3, cex_box=2, cex_tau=[2, 2, 2], cex_r_box=2, + v2_configs=2842, v3_configs=3023, v3_candidates=27, + realized_counterexamples=3, + realizable_instances=360, box_violations=0, + projection_drops=1788, + escape_classes={"E2": 1768, "E1": 466, "E4": 18, + "E3": 6}, + pr2963_pool_escapes=19), + 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() diff --git a/research/fstar-boxfloor-minimal-seed758ae8fe/verify.py b/research/fstar-boxfloor-minimal-seed758ae8fe/verify.py new file mode 100644 index 0000000000..02d85056f5 --- /dev/null +++ b/research/fstar-boxfloor-minimal-seed758ae8fe/verify.py @@ -0,0 +1,100 @@ +#!/usr/bin/env python3 +"""KB5k registered replay: pins, box-floor falsifiers, Lemma LB2 checks, the +mixed-tau formula sweep, the v = 3 tau >= 1 min-box recomputation, and the +bounded tau >= 1 pivot at v = 5. Writes CERTIFICATE.json (newline="\\n"). + +Run: python3 -B verify.py +""" +import hashlib +import json +import os +import subprocess +import sys + +HERE = os.path.dirname(os.path.abspath(__file__)) +VEND = os.path.join(HERE, "predecessor", "pr2978") +DATA = os.path.join(HERE, "data") + + +def sha256_file(path): + h = hashlib.sha256() + with open(path, "rb") as fh: + for chunk in iter(lambda: fh.read(1 << 16), b""): + h.update(chunk) + return h.hexdigest() + + +def check_pins(): + """The vendored PR 2978 tree must match its own two recorded pin sets.""" + n = 0 + pins = json.load(open(os.path.join(VEND, "predecessor", "pr2963", + "predecessor", "PINS.json"), + encoding="utf-8")) + for rel, want in sorted(pins["files"].items()): + p = os.path.join(VEND, "predecessor", "pr2963", "predecessor", rel) + assert sha256_file(p) == want, "pin mismatch: %s" % rel + n += 1 + mine = json.load(open(os.path.join(VEND, "predecessor", "PINS.json"), + encoding="utf-8")) + m = 0 + for rel, want in sorted(mine["files"].items()): + p = os.path.join(VEND, "predecessor", rel) + assert sha256_file(p) == want, "own pin mismatch: %s" % rel + m += 1 + print("PASS_KM_PINS vendored-pr2963=%d vendored-own=%d" % (n, m)) + + +def run_script(name, markers): + proc = subprocess.run([sys.executable, "-B", os.path.join(HERE, name)], + capture_output=True, text=True, encoding="utf-8", + cwd=HERE, timeout=560) + out = proc.stdout + assert proc.returncode == 0, (name, proc.returncode, proc.stderr[-2000:]) + missing = [mk for mk in markers if mk not in out] + assert not missing, "%s missing markers %s" % (name, missing) + return out + + +def main(): + sys.stdout.reconfigure(encoding="utf-8") + os.makedirs(DATA, exist_ok=True) + check_pins() + run_script("box_floor_min.py", [ + "PASS_KM_FALSIFIER_V2 tau=0/0 cert=2 box=0 thr=1 independent=2/0", + "PASS_KM_FALSIFIER_V3 tau=0/0/0 cert=3 box=0 thr=2 independent=3/0", + "PASS_KM_FALSIFIER_V3B tau=1/0/0 cert=3 box=1 thr=2 independent=3/1", + "PASS_KM_FALSIFIER_V4 tau=0/0/0/0 cert=4 box=0 thr=2 independent=4/0", + "PASS_KM_LB2 configs=16761 ok=16761 random=160 ok=160", + "PASS_KM_MIXEDTAU instances=240 violations=0", + "PASS_KM_V3TAU1 configs=3023 candidates=27 min-box=2 thr=2", + "PASS_KM_ALL", + ]) + run_script("pivot_v5.py", [ + "PASS_KM_PIVOT_V5 tested=240 hits=0", + ]) + digests = {} + for f in ["data/km-receipt.json", "data/pivot-v5-receipt.json", + "box_floor_min.py", "pivot_v5.py", "anchor_replay.py", + "verify.py", "make_meta.py", "README.md", "TASK-CARD.md", + "TASK.json"]: + digests[f] = sha256_file(os.path.join(HERE, f)) + body = json.dumps(digests, indent=1, sort_keys=True) + "\n" + cert = dict(schema_version=1, package="fstar-boxfloor-minimal-seed758ae8fe", + markers=["PASS_KM_PINS", "PASS_KM_FALSIFIER_V2", + "PASS_KM_FALSIFIER_V3", "PASS_KM_FALSIFIER_V3B", + "PASS_KM_FALSIFIER_V4", "PASS_KM_LB2", + "PASS_KM_MIXEDTAU", "PASS_KM_V3TAU1", + "PASS_KM_PIVOT_V5", "PASS_KM_ALL"], + digests=digests, + certificate_digest=hashlib.sha256( + body.encode("utf-8")).hexdigest()[:16]) + 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") + print("PASS_KM_VERIFY falsifiers=4 lb2=16761 mixed=240 v3-configs=3023 " + "pivot=240 digest=%s" % cert["certificate_digest"]) + + +if __name__ == "__main__": + main()