From d8fc71358866efc605c626ddfc0402d0a7e3d657 Mon Sep 17 00:00:00 2001 From: AlephNaN <206279168+alephnan@users.noreply.github.com> Date: Wed, 18 Nov 2026 14:07:47 -0600 Subject: [PATCH 1/2] Prove the global helper-restriction ceiling for the selected BIT supplier --- .../PROOF.md | 150 ++++++ .../README.md | 42 ++ .../RESULT.json | 500 ++++++++++++++++++ .../SOURCES.json | 30 ++ .../TASK.json | 96 ++++ .../VERIFY.json | 37 ++ .../crosscheck.py | 310 +++++++++++ .../flags.py | 218 ++++++++ .../invoice_bound.py | 87 +++ .../sharp.py | 106 ++++ .../verify.py | 85 +++ .../bit-simultaneous-helper-relations/word.py | 159 ++++++ 12 files changed, 1820 insertions(+) create mode 100644 research/bit-simultaneous-helper-relations/PROOF.md create mode 100644 research/bit-simultaneous-helper-relations/README.md create mode 100644 research/bit-simultaneous-helper-relations/RESULT.json create mode 100644 research/bit-simultaneous-helper-relations/SOURCES.json create mode 100644 research/bit-simultaneous-helper-relations/TASK.json create mode 100644 research/bit-simultaneous-helper-relations/VERIFY.json create mode 100644 research/bit-simultaneous-helper-relations/crosscheck.py create mode 100644 research/bit-simultaneous-helper-relations/flags.py create mode 100644 research/bit-simultaneous-helper-relations/invoice_bound.py create mode 100644 research/bit-simultaneous-helper-relations/sharp.py create mode 100644 research/bit-simultaneous-helper-relations/verify.py create mode 100644 research/bit-simultaneous-helper-relations/word.py diff --git a/research/bit-simultaneous-helper-relations/PROOF.md b/research/bit-simultaneous-helper-relations/PROOF.md new file mode 100644 index 0000000000..a01800d30d --- /dev/null +++ b/research/bit-simultaneous-helper-relations/PROOF.md @@ -0,0 +1,150 @@ +# A sharp envelope for simultaneous block-local quotients + +## The comparison + +Fix either the forward PR7001 BIT word or its transpose. The first 222 public coordinates are the 111 main pairs. The other 437 coordinates are helpers. The scalar endpoint on these helpers is the identity. Group them by their ordered pair of entrance and exit charts. Write $H_g$ for the span over $\mathbf F_2$ of the entrance coordinate **functionals** of group $g$, and $H=\bigoplus_g H_g$. The nine dimensions are 410, 7, 6, 5, 3, 2, 2, 1, 1. The replay checks full row rank and orthogonality in all 636 rational eight-axis charts, and nesting on all 2,374 directed paid pairs and nine helper boundaries. This certifies the dimension-difference tariffs used below. [Pinned word and caller](SOURCES.json) + +Choose a subspace $U_g\le H_g$ independently for each group. Restrict the inputs to the common zero set of $U=\bigoplus_g U_g$. An invertible change of basis at that group's two boundaries realizes its kernel as arbitrary surviving helper coordinates. The main inputs stay independent. The group surrenders $\dim U_g$ identity targets, each of rank $d_g$, the absolute difference in its two chart dimensions. Keeping all original paid forms, ranks, charts, and chronological order, permit omission of an arrival whenever its value can be synthesized by scalar XOR from the free entrances and strictly earlier arrivals at that receiver. Grant the storage and ordinary XOR work for free. This is the causal-bank relaxation introduced for the selected word. [Bank model and single-relation proof](https://github.com/aliromman/integer-mult-bounds/blob/3e56de8c160f259612f9766e06bf6990c7b5a3ef/research/bit-single-relation-bank-obstruction/PROOF.md) + +Write $G_t(U)$ for the saved paid price minus $\sum_g d_g^t\dim U_g$, for $0\le t\le1$. Let $q=\log_2(5/3)$. We prove + +$$ +\max_U G_t(U)=\max(0,1+4^t-6^t)\qquad(q\le t\le1). +$$ + +The proof also determines the sign of the optimal complete invoice over the entire interval $0\le t\le1$. Section 5 gives the resulting global raw BIT ceiling. + +## 1. Chronological rank loss + +At chart $C$ put all initial local fields first and then all arriving paid forms in their literal order. Let $V_j$ be the span of the first $j$ rows in this list. The raw-word replay verifies that every whole list is independent in each orientation. On inputs annihilated by $U$, the rank of the first $j$ rows is + +$$ +\dim V_j-\dim(U\cap V_j). +$$ + +Consequently a paid row at position $j$ can be omitted exactly when $D_j=\dim(U\cap V_j)$ increases by one. The earlier-bank equality supplies a reconstruction. Induction in the word order permits all such omissions together, because an earlier reconstructed value can itself be retained. This is optimal for the declared fixed arrival and deadline contract. + +Put $F_j=V_j\cap H$ and $F_{g,j}=V_j\cap H_g$. A *birth* at $j$ means the dimension of the stated space increases at that row. If $j_0$ is the end of the free entrances and $m$ the final position, the saved paid price at this receiver is + +$$ +D_m-D_{j_0}+\sum_{\substack{j>j_0\\r_j>1}} (r_j^t-1)(D_j-D_{j-1}). +$$ + +Only births of $F_j$ can contribute to the sum. Whenever $\dim F_j=\sum_g\dim F_{g,j}$, inclusion and disjoint coordinate supports give $F_j=\bigoplus_g F_{g,j}$. At such a prefix $D_j=\sum_g\dim(U_g\cap F_{g,j})$ for every simultaneous choice of $U$. + +## 2. Where the groups interact + +The following finite facts are checked from the word, at every free and paid prefix in each receiver. The counts include free rows. The maximum dimension excess in the table is $\max_{C,j}(\dim F_j-\sum_g\dim F_{g,j})$. + +| Quantity | Forward | Transpose | +|---|---:|---:| +| Receiver charts | 636 | 636 | +| Nonempty bank prefixes | 3,530 | 3,530 | +| Charts with a mixed prefix | 5 | 31 | +| Maximum dimension excess | 7 | 2 | +| Charts still mixed at the final prefix | 3 | 26 | +| Potential paid births of rank greater than one | 254 | 235 | + +At each free prefix the full flag decomposes. Immediately before **and** after every possible paid birth of rank greater than one it decomposes as well. Thus the higher-price terms in section 1 add across the groups. At a receiver whose final flag decomposes, the entire saved price adds across the groups, even if an intermediate rank-one prefix was mixed. + +Write $B=H_{\rm large}$, the 410-dimensional group, and $S=\bigoplus_{g\ne{\rm large}}H_g$. The replay checks $V_j\cap S=\bigoplus_{g\ne{\rm large}}F_{g,j}$ at *every* prefix. At all mixed-final receivers, every possible full-helper birth has price one and occurs at a paid row. The kernel of the projection $\pi_B:F_m\cap U\longrightarrow B$ is $(V_m\cap S)\cap U$. Its image is contained in $(\pi_BF_m)\cap U_{\rm large}$. Hence + +$$ +D_m\ \le\ +\sum_{g\ne{\rm large}}\dim(F_{g,m}\cap U_g) ++\dim(\pi_B F_m\cap U_{\rm large}). +$$ + +On just these receivers we charge the projected space to the large group at unit price. This grants the large group every possible small-group cancellation. The final flag at every group boundary decomposes. Setting $U_{\rm large}=0$ gives exact additivity among all the small groups. The forward arrival at chart 50, clock 19881, checks that a mixed term can be essential in an actual prefix. [All mixed charts and witness](RESULT.json) + +## 3. Charging the large space and the other groups + +Fix an ordered coordinate basis in a group. For a subspace $W$, let $P(W)$ be all possible leading positions of its nonzero vectors, with the largest nonzero coordinate leading. Elimination gives $|P(W)|=\dim W$. At the entrance chart the entire group's relation space already lies in the free prefix, so it saves zero paid rows there. At every other chart the original independent bank list gives each clean signal a unique representation. Its latest bank determines its chronological price. + +At a nonterminal receiver enumerate its clean signals for this group. Denote by $b_C(i)$ the maximum possible price at coordinate pivot $i$, or zero if absent. The chronological prices removed by $U_g$ at this receiver sum to at most $\sum_{i\in P(U_g)} b_C(i)$. To prove it, take a basis of $W=U_g\cap F_{g,m}$ with distinct, increasing latest-bank positions. These are precisely the removed positions. Process this basis in that order, eliminating previous **coordinate** pivots. Each modified vector keeps its own latest bank, since every eliminator uses earlier banks, and acquires a distinct coordinate pivot in $P(U_g)$. Its price is bounded by $b_C(i)$. The same bound for a mixed projected receiver follows by counting distinct coordinate pivots at unit price. Every enumerated nonterminal space after projection has dimension at most four. + +At its terminal the clean flag spans the full group. Use the basis vectors introduced at its successive births. A combination whose last nonzero coordinate is $i$ has the price of the $i$th terminal birth. A permutation within one consecutive equal-price run preserves this statement. For the large forward group the original role basis with a uniform terminal bound of rank two suffices. For the large transpose group the terminal prices in order have run lengths 2, 153 and 255, with ranks 4, 2 and 1. In the final run apply the following six swaps of zero-based positions, in order. + +~~~ +(365,156) (401,237) (380,200) (409,329) (296,251) (376,162) +~~~ + +These are choices of proof coordinates. Independently, the initial 410 chronological basis vectors can be recovered by taking all original unit roles except 332 and 340, adding $e_{332}+e_{333}$ and $e_{340}+e_{375}$, and sorting by each vector's latest terminal bank. All 410 latest banks are distinct. [Primary charge computation](flags.py) · [Independent terminal reconstruction](crosscheck.py) + +At $t=q$, multiply prices by 27. The integer prices of ranks 1, 2, 4 and 8 become 27, 45, 75 and 125. Add each terminal charge to the nonterminal maxima on the same coordinate. The table gives the maximum resulting numerator per coordinate. Boundary pairs are named in the forward direction on both sides. + +| Forward group | Helpers | Target rank | Forward maximum | Transpose maximum | +|---|---:|---:|---:|---:| +| $0\to1$ | 410 | 8 | 120 | 117 | +| $506\to1$ | 7 | 4 | 75 | 75 | +| $507\to1$ | 6 | 4 | 27 | 72 | +| $508\to1$ | 5 | 4 | 27 | 72 | +| $509\to1$ | 3 | 4 | 27 | 72 | +| $0\to506$ | 2 | 4 | 72 | 72 | +| $520\to1$ | 2 | 4 | 27 | 72 | +| $374\to1$ | 1 | 2 | 45 | 45 | +| $0\to374$ | 1 | 6 | Ranks 1 and 4 | Ranks 1 and 4 | + +For example the four forward profiles on the 410-dimensional group are $(1,2)$ on 252 coordinates, $(2,2)$ on 153, $(1,2,2)$ on three, and $(2,4)$ on two. They account for every coordinate. The highest price is $45+75=120<125$. The cross-check independently recovers the profile counts in both orientations. [Group receipts](RESULT.json) + +Every charged rank $r$ is at most its group's $d_g$. The normalized price $(r/d_g)^t$ decreases or stays constant as $t$ increases. All inequalities verified at $q$ thus hold through 1. Every nonzero large-group restriction incurs a strict loss. On a small group other than the rank-six group, every coordinate either loses strictly at $q$ or has the solitary charge $(d_g)$. + +## 4. Attainment, threshold and maximizers + +The unique rank-six group consists of role 341. Choosing its full one-dimensional relation space sets $x_{341}=0$. Direct chronological elimination gives the complete list of paid omissions below. A blank donor list means the restricted arrival is zero. Clocks start at zero in the indicated orientation. + +| Orientation | Chart | Omitted clock | Rank | Earlier donor clock | +|---|---:|---:|---:|---:| +| Forward | 53 | 19929 | 1 | 19928 | +| Forward | 374 | 21559 | 4 | 21547 | +| Transpose | 0 | 14207 | 1 | 13967 | +| Transpose | 177 | 12577 | 4 | empty | + +In each row the arrival XOR its listed donor equals $x_{341}$ on every original input. The joint upper bound permits exactly the gain $1+4^t-6^t$ for this group. Taking this restriction alone attains it. Taking the zero relation in every group attains zero. This proves the envelope. + +Dividing by $6^t$ gives $(1/6)^t+(2/3)^t-1$, which strictly decreases, is positive at zero, and is negative at one. Its unique zero $t_*$ exceeds $q$. Indeed $2^{37}3^{50}>5^{50}$ and $6^{37}9^{50}<34^{50}$ give $q<37/50$ and $6^{37/50}<34/9<1+4^{37/50}$. Below $q$ the same single helper already yields a positive gain. Thus the first profitable price saving over the whole unit interval occurs strictly beyond $\eta_*=1-t_*$. Rational logarithm and exponential series with outward tails certify + +$$ +0.2517782975220009 < \eta_* < 0.2517782975220010. +$$ + +For the logarithm the checker bounds the tail after $N$ terms of $2\sum_{j\ge0}z^{2j+1}/(2j+1)$ by $2z^{2N+1}/((2N+1)(1-z^2))$, with $z=(b-1)/(b+1)$. For $0\le y<2$ the exponential tail after degree 44 is less than $2^{46}/45!$. [Exact interval arithmetic](sharp.py) + +For $q\le t\le1$, every maximizing tuple has zero large-group component. On the eight small groups the flags split, so every coordinate with a strict deficit excludes that subspace from equality. Conversely, when all selected pivots have the solitary terminal charge $(d_g)$, the terminal attains that charge and the allowed nonterminal contribution is zero. The rank-six line is forced on for $tt_*$ and optional at equality. The rank-two line is always optional. The only remaining choices lie in the seven-dimensional block $506\to1$. + +* In the forward flag the allowed pivots are 5 and 6. Each neutral space is the graph of a linear map from a subspace of the terminal two-dimensional quotient to the first five coordinates. There are $1+3\cdot2^5+2^{10}=1121$ choices. +* In the transposed flag the allowed pivots are 0 and 1. Its neutral spaces are precisely the five subspaces of that initial two-dimensional plane. + +Thus, away from the switch in the envelope's range, **2,242 forward tuples and 10 transposed tuples** attain the maximum. At the switch these counts double. Direct enumeration checks every small-block subspace and its actual removed banks. These counts distinguish subspaces of relations. Different generating bases for the same subspace are identified. + +The paired caller uses two invocations at each of 18 stages. Each occurrence has fresh helper coordinates. The unchanged root, QUERY and idle terms cancel in the signed difference, so multiplication by 36 gives the complete caller envelope. The source recount has 107,352 paid calls, 19,950 productive targets and integer rank surplus 1,506. Whole-call implementation, tape costs and the other framework obligations keep their original scope. [Caller and group counts](RESULT.json) · [Selected application review](../../docs/research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md) + +## 5. Global optimum for the signed BIT invoice + +Let $M(t)=\sum_r(T_r-P_r)r^t$ be the original signed margin. The **supremum of feasible raw BIT price savings over the entire quotient family**, for $0\le\eta\le1$, is exactly the original PR7001 crossing + +$$ +0.0038525393934 < \eta_0 < 0.0038525393935 . +$$ + +More precisely, some allowed tuple gives strictly positive complete margin if and only if $0\le\eta<\eta_0$. This interval was previously reported for the original BIT caller. The new assertion is optimality over all the simultaneous quotients. [PR7001 source proof](../paired-query-only-bit/PROOF.md) + +For $t\ge3/4$ the envelope gives zero maximum gain, since $t_*<3/4$. For $0\le t\le3/4$, grant all original productive credits and omit *every* paid arrival that could disappear under any restrictions. Dependence at a fixed deadline is monotone under enlarging $U$. Taking $U=H$ therefore gives every potentially removable paid position. The forward count by ranks $(1,2,4)$ is $(599,249,5)$, and the transpose count is $(355,230,5)$. Other ranks have zero possible omissions. The coordinatewise maximum across orientations gives the following upper bound even if each invocation chooses its own orientation and subspaces. + +$$ +M_{\rm generous}(t)=M(t)+36\bigl(599+249\cdot2^t+5\cdot4^t\bigr). +$$ + +Both $M(t)/8^t$ and $M_{\rm generous}(t)/8^t$ are strictly increasing on $[0,1]$. To see this, inspect the two signed profiles. Every coefficient below rank 8 is nonpositive, and the rank-one coefficient is strictly negative. Each normalized term there is increasing. At ranks $h=14,21,\ldots,56$, pair a negative coefficient with the matching positive coefficient at $h+1$. The function $((h+1)/8)^t-(h/8)^t$ increases for $t\ge0$, since $y^t\log y$ increases for $y>1$. All remaining terms have nonnegative coefficients at ranks at least 8. The checker verifies these sign and pairing conditions on both actual profiles. + +Exact outward bounds give $-23329\eta_*$, where $6^{1-\eta_*}=1+4^{1-\eta_*}$. For the positive branch in the displayed range, setting helper 341 to zero removes one rank-one and one rank-four paid arrival per invocation and surrenders one rank-six target. [Proof and equality cases](PROOF.md) · [Exact certificate and bank witnesses](RESULT.json) + +### Why the groups have to be checked together + +Ali Romman ruled out restrictions within any one group at a time for $0\le\eta\le0.01$. His work includes the individual rank-six case. An actual bank at forward chart 50 has value $x_{331}+x_{332}+x_{333}$. Imposing $x_{331}=0$ in one group and $x_{332}+x_{333}=0$ in another makes that bank free to reconstruct. Each equation alone still requires the paid arrival. The new upper bound accounts for these interactions at every chronological receiver prefix and matches the rank-six witness. [One-group predecessor, PR #7722](https://github.com/CrocSwap/integer-mult-bounds/pull/7722) · [Single-relation predecessor, PR #7720](https://github.com/CrocSwap/integer-mult-bounds/pull/7720) + +### Reproduce + +From the repository root, use CPython 3.12 and the standard library. + +~~~ +python3.12 -B scripts/research_package.py --package research/bit-simultaneous-helper-relations +~~~ + +The first verifier reconstructs all 437 helper roles and all 2,871 paid arrivals, checks 3,530 receiver prefixes in each orientation, and certifies both the edit threshold and the global raw BIT ceiling with rational bounds. The second verifier solves the orthogonal equations in bank coordinates, checks all 820 price assignments on the largest block across the two orientations, and enumerates 64,882 small-block subspaces across both orientations. Both start from the original word. [Primary verifier](verify.py) · [Column-nullspace cross-check](crosscheck.py) · [Declared inputs](SOURCES.json) + +Local verification used CPython 3.12.2 on Windows and CPython 3.14.7 on Arch Linux. The selected source-binding baseline and PR7001's original paired BIT application check passed. The complete selected PR7000 cold replay, human review, and proof-kernel verification are outside this session. + +The physical domain fixes the paid forms, their order and their charts. Boundary changes stay within each common entrance/exit chart pair. Receiver equations may combine evidence from different groups. Changed paid routes, new chart transports, cross-chart boundary equations and forward/transpose compositions require separate analysis. Native all-column realization, owned erasure, the compiler, precision and tape accounting, and analytic recovery remain the five inherited framework assumptions. The scope of this proof is the exact scalar cost comparison. + +## Open next questions + +Can a **changed delivery after a restriction** beat the combined obstruction? PR #7723 keeps all public inputs independent and proves that each original paid arrival already has minimum rank among single causal nested deliveries. Here the inputs can satisfy joint relations and the paid route stays fixed. A bounded first experiment is to impose the two chart-50 equations, then test a still-required arrival against earlier source banks at a lower-rank nested chart. A candidate needs both productive debits, every new transfer, and a causal implementation at the receiver. [Single-delivery predecessor](https://github.com/CrocSwap/integer-mult-bounds/pull/7723) + +### Sources and credit + +AlephNaN (@alephnan) prepared this proof and both implementations with substantial OpenAI Codex assistance. The two checking methods share authorship. New work is licensed under Apache-2.0. + +Ali Romman supplied the causal-bank model, the single-direction analysis, the one-group common-pivot bound, and the question about simultaneous groups. Jerry Chen / CubeJerry supplied the selected PR7000 construction and its PR7001 BIT dependency. DreamingOfClouds supplied the chain-root caller. zxv and the retained authors supplied the BIT word and earlier proofs. The package reads the two existing source files in place. [PR7001 and retained credits](../../research/paired-query-only-bit/NOTICE) · [Selected contributor map](../../docs/research/community-frontier7000-contributors.md) · [Predecessor proof at its exact head](https://github.com/aliromman/integer-mult-bounds/blob/8a70046cafae35d29627017983d55cec71e06e27/research/bit-joint-relation-bank-obstruction/PROOF.md) diff --git a/research/bit-simultaneous-helper-relations/RESULT.json b/research/bit-simultaneous-helper-relations/RESULT.json new file mode 100644 index 0000000000..0ccad12507 --- /dev/null +++ b/research/bit-simultaneous-helper-relations/RESULT.json @@ -0,0 +1,500 @@ +{ + "pricing": "t=1-eta; delta=paid saved minus targets surrendered", + "price_saving_switch_open_interval": [ + "0.2517782975220009", + "0.2517782975220010" + ], + "source_frames": { + "rational_frames": 636, + "directed_paid_pairs": 2374, + "ordered_helper_boundaries": 9 + }, + "full_caller": { + "native_invocations": 36, + "native_paid": 2871, + "native_helpers": 437, + "paid": { + "1": 50340, + "2": 45108, + "3": 2232, + "4": 1692, + "5": 324, + "6": 3744, + "7": 804, + "14": 444, + "21": 444, + "28": 444, + "35": 444, + "42": 444, + "49": 444, + "56": 444 + }, + "targets": { + "2": 36, + "4": 900, + "6": 36, + "8": 15204, + "15": 444, + "22": 444, + "29": 444, + "36": 444, + "43": 444, + "50": 444, + "57": 444, + "64": 444, + "127": 222 + }, + "rank_surplus": 1506 + }, + "mixed_example": { + "forward_chart": 50, + "clock": 19881, + "separate_equations": [ + [ + 331 + ], + [ + 332, + 333 + ] + ] + }, + "forward": { + "receiver_charts": 636, + "bank_prefixes": 3530, + "mixed_prefix_maximum_by_chart": { + "1": 7, + "49": 1, + "50": 1, + "54": 1, + "66": 1 + }, + "mixed_end_dimension_by_chart": { + "50": 1, + "54": 1, + "66": 1 + }, + "separated_higher_rank_births": 254, + "paid_omittable_with_all_helpers_zero": { + "1": 599, + "2": 249, + "4": 5 + }, + "groups": [ + { + "ordered_profiles_sha256": "05150d8a056d87c88884be0384850b6c2c7fbf35c7873680936bcdd410df3ef7", + "entrance": 0, + "exit": 1, + "dimension": 410, + "target_rank": 8, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 4, + "max_numerator_over_27": 120, + "profile_counts": { + "1,2": 252, + "1,2,2": 3, + "2,2": 153, + "2,4": 2 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "2d0a1551a3f04122b44addfa62cb354ef99d320a1e47dfdedb653b314bde1de8", + "entrance": 506, + "exit": 1, + "dimension": 7, + "target_rank": 4, + "neutral_pivot_indices": [ + 5, + 6 + ], + "nonterminal_dimension_max": 0, + "max_numerator_over_27": 75, + "profile_counts": { + "1": 5, + "4": 2 + }, + "neutral_subspace_count": 1121 + }, + { + "ordered_profiles_sha256": "ae84dc86f55bcd769723ff65fdacf7689908b9662f927becaa05f8e5da52a468", + "entrance": 507, + "exit": 1, + "dimension": 6, + "target_rank": 4, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 0, + "max_numerator_over_27": 27, + "profile_counts": { + "1": 6 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "189f5286a1d4efad375b47ac2e01252fd71434df0ab84a6a2210fddcc77fe51a", + "entrance": 508, + "exit": 1, + "dimension": 5, + "target_rank": 4, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 0, + "max_numerator_over_27": 27, + "profile_counts": { + "1": 5 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "ccce065269620747ca153e9a430d44b175cdc1f7e0958741b567250a1d6b1d95", + "entrance": 509, + "exit": 1, + "dimension": 3, + "target_rank": 4, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 0, + "max_numerator_over_27": 27, + "profile_counts": { + "1": 3 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "25c290afdde0dc056c24d35ed1456e521a5bc11ee008d0aca35a7d9799e8fe8f", + "entrance": 0, + "exit": 506, + "dimension": 2, + "target_rank": 4, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 1, + "max_numerator_over_27": 72, + "profile_counts": { + "1,2": 2 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "ad0fadf63cc7cd779ce475e345bf4063565b63a3c2efef1eebc89790aaa6acba", + "entrance": 520, + "exit": 1, + "dimension": 2, + "target_rank": 4, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 0, + "max_numerator_over_27": 27, + "profile_counts": { + "1": 2 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "e667603fbea2df513c5046c8105de0fa7ec6851b9ead9266f1811abbad7232f9", + "entrance": 0, + "exit": 374, + "dimension": 1, + "target_rank": 6, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 1, + "max_numerator_over_27": null, + "profile_counts": { + "1,4": 1 + } + }, + { + "ordered_profiles_sha256": "53c234e5e8472b6ac51c1ae1cab3fe06fad053beb8ebfd8977b010655bfdd3c3", + "entrance": 374, + "exit": 1, + "dimension": 1, + "target_rank": 2, + "neutral_pivot_indices": [ + 0 + ], + "nonterminal_dimension_max": 0, + "max_numerator_over_27": 45, + "profile_counts": { + "2": 1 + }, + "neutral_subspace_count": 2 + } + ], + "maximizing_subspace_tuples": { + "off_switch": 2242, + "at_switch": 4484 + }, + "rank_six_witness": [ + { + "chart": 53, + "clock": 19929, + "rank": 1, + "earlier_clocks": [ + 19928 + ] + }, + { + "chart": 374, + "clock": 21559, + "rank": 4, + "earlier_clocks": [ + 21547 + ] + } + ] + }, + "transpose": { + "receiver_charts": 636, + "bank_prefixes": 3530, + "mixed_prefix_maximum_by_chart": { + "0": 1, + "510": 1, + "511": 1, + "512": 2, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "525": 2, + "528": 1, + "530": 1, + "531": 1, + "534": 1, + "568": 1, + "571": 1, + "572": 1, + "574": 1, + "575": 2, + "577": 1, + "579": 2, + "581": 1, + "583": 2, + "587": 1, + "588": 1, + "592": 1, + "594": 2, + "597": 1, + "602": 1, + "612": 1, + "617": 1, + "621": 1 + }, + "mixed_end_dimension_by_chart": { + "510": 1, + "511": 1, + "512": 2, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "525": 2, + "530": 1, + "531": 1, + "534": 1, + "568": 1, + "571": 1, + "574": 1, + "575": 2, + "577": 1, + "579": 2, + "581": 1, + "583": 2, + "587": 1, + "588": 1, + "592": 1, + "594": 2, + "597": 1, + "602": 1, + "617": 1 + }, + "separated_higher_rank_births": 235, + "paid_omittable_with_all_helpers_zero": { + "1": 355, + "2": 230, + "4": 5 + }, + "groups": [ + { + "ordered_profiles_sha256": "5fe7d3570b77cad6a589a51ec06cc31dc94557ed9cb36de8f08e4812974880d1", + "entrance": 1, + "exit": 0, + "dimension": 410, + "target_rank": 8, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 2, + "max_numerator_over_27": 117, + "profile_counts": { + "1": 169, + "1,1": 29, + "1,1,1": 9, + "1,1,1,1": 3, + "1,1,2": 18, + "1,2": 20, + "1,2,2": 7, + "1,4": 2, + "2": 152, + "2,2": 1 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "f967c167b2bbb305502618026105cc56d3c12fb2b17518ef5b9f3dcfb86d6a36", + "entrance": 1, + "exit": 506, + "dimension": 7, + "target_rank": 4, + "neutral_pivot_indices": [ + 0, + 1 + ], + "nonterminal_dimension_max": 2, + "max_numerator_over_27": 75, + "profile_counts": { + "1,2": 5, + "4": 2 + }, + "neutral_subspace_count": 5 + }, + { + "ordered_profiles_sha256": "bb82d4b441bde71273e57cb614d6c420d4decdbb97f232733153ba1b3a769463", + "entrance": 1, + "exit": 507, + "dimension": 6, + "target_rank": 4, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 1, + "max_numerator_over_27": 72, + "profile_counts": { + "1,2": 6 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "ee82beb6a268e4fdb09b176b8dc53d6d3a11bd838be94bb44538d482687ea952", + "entrance": 1, + "exit": 508, + "dimension": 5, + "target_rank": 4, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 1, + "max_numerator_over_27": 72, + "profile_counts": { + "1,2": 5 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "0a779fa8fd4433fc3921e64e9f887c30fa6bad5292724e2bb1c2eac9904f5aa7", + "entrance": 1, + "exit": 509, + "dimension": 3, + "target_rank": 4, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 1, + "max_numerator_over_27": 72, + "profile_counts": { + "1,2": 3 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "25c290afdde0dc056c24d35ed1456e521a5bc11ee008d0aca35a7d9799e8fe8f", + "entrance": 1, + "exit": 520, + "dimension": 2, + "target_rank": 4, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 1, + "max_numerator_over_27": 72, + "profile_counts": { + "1,2": 2 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "25c290afdde0dc056c24d35ed1456e521a5bc11ee008d0aca35a7d9799e8fe8f", + "entrance": 506, + "exit": 0, + "dimension": 2, + "target_rank": 4, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 1, + "max_numerator_over_27": 72, + "profile_counts": { + "1,2": 2 + }, + "neutral_subspace_count": 1 + }, + { + "ordered_profiles_sha256": "53c234e5e8472b6ac51c1ae1cab3fe06fad053beb8ebfd8977b010655bfdd3c3", + "entrance": 1, + "exit": 374, + "dimension": 1, + "target_rank": 2, + "neutral_pivot_indices": [ + 0 + ], + "nonterminal_dimension_max": 0, + "max_numerator_over_27": 45, + "profile_counts": { + "2": 1 + }, + "neutral_subspace_count": 2 + }, + { + "ordered_profiles_sha256": "e667603fbea2df513c5046c8105de0fa7ec6851b9ead9266f1811abbad7232f9", + "entrance": 374, + "exit": 0, + "dimension": 1, + "target_rank": 6, + "neutral_pivot_indices": [], + "nonterminal_dimension_max": 1, + "max_numerator_over_27": null, + "profile_counts": { + "1,4": 1 + } + } + ], + "maximizing_subspace_tuples": { + "off_switch": 10, + "at_switch": 20 + }, + "rank_six_witness": [ + { + "chart": 0, + "clock": 14207, + "rank": 1, + "earlier_clocks": [ + 13967 + ] + }, + { + "chart": 177, + "clock": 12577, + "rank": 4, + "earlier_clocks": [] + } + ] + }, + "global_raw_ceiling": { + "optimal_raw_BIT_price_saving_open_interval": [ + "0.0038525393934", + "0.0038525393935" + ], + "maximum_signed_margin_at_eta_0.01_open_interval": [ + "-2355.302", + "-2355.301" + ], + "optimistic_margin_at_t_3_over_4_open_interval": [ + -23329, + -23328 + ], + "optimistic_omissions_per_call_by_rank": { + "1": 599, + "2": 249, + "4": 5 + } + }, + "controls": [ + "dependent source bank", + "swap across unequal prices", + "mixed above-unit birth", + "relation between two small blocks" + ] +} diff --git a/research/bit-simultaneous-helper-relations/SOURCES.json b/research/bit-simultaneous-helper-relations/SOURCES.json new file mode 100644 index 0000000000..37614f71c7 --- /dev/null +++ b/research/bit-simultaneous-helper-relations/SOURCES.json @@ -0,0 +1,30 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "research/paired-query-only-bit/EFREE-CALLER.json.gz", + "usage": "input", + "git_blob": "f022272a8d51ede841778dec76e2bfb24b614d04", + "sha256": "757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b" + }, + { + "path": "research/paired-query-only-bit/retained/inputs/BIT-NATIVE-WORD.json.gz", + "usage": "input", + "git_blob": "b718d6b2848215ad785022106dfa9f871a3d1c0c", + "sha256": "51203e7fc75ba10bd3ac3f8e675759f47e13d262bea66b6600d1e515095cad78" + } + ] +} diff --git a/research/bit-simultaneous-helper-relations/TASK.json b/research/bit-simultaneous-helper-relations/TASK.json new file mode 100644 index 0000000000..d1e4293f75 --- /dev/null +++ b/research/bit-simultaneous-helper-relations/TASK.json @@ -0,0 +1,96 @@ +{ + "schema_version": 1, + "task_id": "bit-helper-contract", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "bit-helper-contract", + "question": "Can a changed G20 helper path or independent-target split improve the complete BIT moment without losing its physical endpoint?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "research/g20-helper-split/README.md", + "research/g20-conjugation-admission/README.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "A full boundary contract and paid profile; unchanged scalar counts alone are insufficient. 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.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "First read #5679/#5708 and their audits as pending component proposals. Choose one uncovered helper group/cut on an exact word; compare arbitrary-input native action, targets, owned storage, both orientations and full signed bill. Stop if the gain is only a scalar count or repaid by lost targets. Do not rerun the frozen #5609 common-frame domain without changing its hypothesis.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "G20", + "helper split", + "5679", + "5708", + "independent target" + ], + "existing_checks": [ + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Allow independent relation subspaces inside all nine PR7001 helper boundary groups simultaneously, checking mixed receiver dependencies at chronological bank prefixes in both orientations separately.", + "scope_change_reason": "The selected BIT source is PR7001. PR7722 treats one boundary group at a time. Several groups may create new clean relations at a receiver, so its individual inequalities cannot simply be added.", + "bottleneck_link": "A successful quotient can retire paid children, but every surrendered productive helper must be charged in the selected 36-call BIT supplier.", + "budget_minutes": 60, + "stop_rule": "Produce a certified global obstruction or a concrete improving quotient. If a prefix decomposition fails, isolate and exactly analyze the interacting spaces within one 60-minute session.", + "outcome": "completed", + "evidence": "PROOF.md proves the exact envelope max(0, 1 + 4^t - 6^t) for log2(5/3) <= t <= 1, the sharp sign threshold over 0 <= t <= 1, and all maximizing subspace tuples. RESULT.json binds 3,530 prefixes per orientation, 874 coordinate prices, the attaining role-341 bank witnesses and the complete 36-call accounting. Independent column nullspaces and 64,882 small-block subspaces check the certificate. A signed-profile monotonicity certificate and the all-helpers-zero omission upper bound prove that the original PR7001 raw BIT crossing is globally optimal on the full unit price interval. At eta=0.01 the best complete margin is between -2355.302 and -2355.301.", + "author": "AlephNaN (@alephnan)", + "ai_assistance": "Substantial OpenAI Codex assistance in mathematical discovery, proof, implementation and writing. Both checking paths share authorship.", + "open_questions": [ + { + "question": "Can a still-required arrival after a block-local quotient be delivered causally at a lower nested rank?", + "why_it_matters": "The chosen restrictions and the changed delivery may interact even though each fixed mechanism has its own obstruction.", + "first_step": "Fix the two source equations witnessed at forward chart 50 and test one surviving arrival against strictly earlier banks at every eligible lower-rank source.", + "blocked_by": "The PR7723 single-delivery proof keeps inputs independent. A combined edit needs a new relation-aware delivery certificate and complete target, transfer and implementation charges." + } + ], + "method": "Clean binary bank-prefix flags and direct-sum quotients on the pinned native word; independently check mixed rank and complete target/paid accounting.", + "predecessors": { + "7722": "8a70046cafae35d29627017983d55cec71e06e27", + "7720": "3e56de8c160f259612f9766e06bf6990c7b5a3ef", + "7001": "d777f3a0aa2878bea0478918923dabcf86b9878b" + }, + "scope_key": "PR7001 simultaneous direct sums in nine common entrance/exit groups; chronological reconstruction; both orientations separately", + "coordination": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19716389", + "startup_orientation": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY on e54523517d0f03e58352e647c403a5af3e525a57. Selected conditional kappa 363005817/100000000000, PR7000 application review with PR7001 BIT. The original PR7001 check reports 36 invocations, 107352 paid jobs and 19950 productive fields.", + "overlap": { + "checked_utc": "2026-11-18T20:01:00Z", + "upstream": "e54523517d0f03e58352e647c403a5af3e525a57", + "priority_revision": 8, + "open_prs_complete": 1031, + "discussion_records_complete": 7680, + "unsearched_sparse_local_note_paths": 10145, + "nearest": "PR7720 treats one line; PR7722 treats arbitrary dimensions in one group; PR7723 treats rerouting a fixed single arrival with independent public inputs. The new result treats simultaneous block-local quotients and computes their exact raw margin envelope.", + "limits": "The full closed-PR pagination timed out. Exact live reference queries and the recent all-state PR list, including all PRs since #7722, supplemented the retained open-PR and Discussion snapshots. Unpublished work is outside coverage." + } +} diff --git a/research/bit-simultaneous-helper-relations/VERIFY.json b/research/bit-simultaneous-helper-relations/VERIFY.json new file mode 100644 index 0000000000..7b98fb6b0a --- /dev/null +++ b/research/bit-simultaneous-helper-relations/VERIFY.json @@ -0,0 +1,37 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/paired-query-only-bit/EFREE-CALLER.json.gz", + "research/paired-query-only-bit/retained/inputs/BIT-NATIVE-WORD.json.gz" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 60, + "checks": "Raw word and 636 rational frames, receiver prefix flags, common-pivot charges, sharp attaining edit and maximizers, exact global BIT crossing, one-percent deficit, and four rejection controls." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-W", + "error", + "-B", + "{package}/crosscheck.py" + ], + "timeout_seconds": 60, + "checks": "Separate set-based replay, column nullspaces at every receiver, all 820 large-block charges and a direct census of every subspace of each of the eight small groups in both orientations." + } + ] +} diff --git a/research/bit-simultaneous-helper-relations/crosscheck.py b/research/bit-simultaneous-helper-relations/crosscheck.py new file mode 100644 index 0000000000..3b9c6c20ca --- /dev/null +++ b/research/bit-simultaneous-helper-relations/crosscheck.py @@ -0,0 +1,310 @@ +"""Column-nullspace cross-check and complete census on the eight small groups. + +This path imports no code from the other verifier. Chronological bank witnesses +are solved in bank coordinates, with one equation per excluded entrance role. +""" +from collections import Counter, defaultdict +from hashlib import sha256 +from pathlib import Path +import gzip +import json + +HERE = Path(__file__).resolve().parent +NATIVE = HERE.parents[1] / "research/paired-query-only-bit/retained/inputs/BIT-NATIVE-WORD.json.gz" + + +def check(condition, message): + if not condition: + raise ValueError(message) + + +def bits(mask): + while mask: + bit = mask & -mask + yield bit.bit_length() - 1 + mask ^= bit + + +def banks_from_sets(word, reverse): + """Interpret a register as a chart and a set of independent entrance names.""" + entrance = word["final" if reverse else "start"] + exit_charts = word["start" if reverse else "final"] + state = {i: (chart, {i}) for i, chart in enumerate(entrance)} + banks = defaultdict(list) + + def append(chart, clock, signal, rank): + banks[chart].append((clock, sum(1 << role for role in signal), rank)) + + for i, chart in enumerate(entrance): + append(chart, ~i, {i}, 0) + dim = {int(c): v["dim"] for c, v in word["frames"].items()} + program = word["program"] + for clock, event in enumerate(reversed(program) if reverse else program): + op, i = event[:2] + if op in ("INIT", "CLEAR"): + if (op == "INIT") != reverse: + check(i not in state, "live owned slot") + state[i] = event[2], set() + else: + chart, _ = state.pop(i) + check(chart == event[2], "retire chart") + elif op == "SWAP": + j = event[2] + state[i], state[j] = state[j], state[i] + elif op == "ADD": + j, chart = event[2:] + check(state[i][0] == state[j][0] == chart, "contact mismatch") + dst, src = (j, i) if reverse else (i, j) + state[dst][1].symmetric_difference_update(state[src][1]) + else: + check(op == "MOVE", "unknown opcode") + a, b = event[2:] + if reverse: + a, b = b, a + chart, signal = state[i] + check(chart == a, "move source") + state[i] = b, signal + append(b, clock, signal, abs(dim[a] - dim[b])) + check(set(state) == set(range(len(entrance))), "surviving fields") + for i, chart in enumerate(exit_charts): + expected = {i} + if reverse and i < 111: + expected.add(i + 111) + elif not reverse and 111 <= i < 222: + expected.add(i - 111) + check(state[i] == (chart, expected), "literal endpoint") + return banks, entrance, exit_charts + + +class Receiver: + def __init__(self, entries): + self.entries = entries + self.columns = defaultdict(int) + for position, (_, value, _) in enumerate(entries): + for role in bits(value): + self.columns[role] |= 1 << position + + def clean(self, allowed): + """Nullspace of the outside columns; free positions are latest bank tokens.""" + equations = {} + for role, coefficients in self.columns.items(): + if role in allowed: + continue + while coefficients: + first = (coefficients & -coefficients).bit_length() - 1 + if first not in equations: + equations[first] = coefficients + break + coefficients ^= equations[first] + back_order = sorted(equations, reverse=True) + flag = {} + for pos in range(len(self.entries)): + if pos in equations: + continue + support = 1 << pos + for j in back_order: + if (support & equations[j]).bit_count() % 2: + support |= 1 << j + check(support.bit_length() - 1 == pos, "chronological nullspace generator") + value = 0 + for j in bits(support): + value ^= self.entries[j][1] + check(value and all(r in allowed for r in bits(value)), "nonzero clean vector") + flag[pos] = value + return flag + + +def span_labels(flag): + """Every nonzero clean signal and the position of its unique latest bank.""" + values = {0: -1} + for pos, value in sorted(flag.items()): + check(value not in values, "linearly dependent birth") + values.update({u ^ value: pos for u in values}) + del values[0] + return values + + +def linear_coordinates(basis): + """Decode by lowest-bit elimination independently of the ordered bank flag.""" + pivots = {} + for i, v in enumerate(basis): + tags = 1 << i + while v: + j = (v & -v).bit_length() - 1 + if j not in pivots: + pivots[j] = v, tags + break + old, previous = pivots[j] + v ^= old + tags ^= previous + else: + raise ValueError("coordinate basis dependence") + + def coordinates(v): + tags = 0 + while v: + j = (v & -v).bit_length() - 1 + if j not in pivots: + raise ValueError("signal outside span") + old, previous = pivots[j] + v ^= old + tags ^= previous + return tags + return coordinates + + +def large_charges(result, roles, receivers, flags, full, mixed, reverse): + a, d = result["entrance"], result["exit"] + terminal = receivers[d].entries + if reverse: + # All but two terminal representatives are unit vectors. Solve each in + # the original terminal bank. The last bank identifies its flag layer. + basis = [1 << r for r in roles if r not in (332, 340)] + basis += [(1 << 340) ^ (1 << 375), (1 << 332) ^ (1 << 333)] + represent = linear_coordinates([signal for _, signal, _ in terminal]) + ordered = sorted((represent(v).bit_length() - 1, v) for v in basis) + check([j for j, _ in ordered] == sorted(flags[d]), "terminal flag layers") + ranks = [terminal[j][2] for j, _ in ordered] + swaps = [(365, 156), (401, 237), (380, 200), (409, 329), (296, 251), (376, 162)] + for left, right in swaps: + check(set(ranks[right:left + 1]) == {1}, "rank-one terminal permutation") + ordered[left], ordered[right] = ordered[right], ordered[left] + basis = [v for _, v in ordered] + else: + basis = [1 << r for r in roles] + ranks = [max(terminal[j][2] for j in flags[d])] * len(roles) + coords = linear_coordinates(basis) + profiles = [[r] for r in ranks] + role_mask = sum(1 << r for r in roles) + for c, receiver in receivers.items(): + if c in (a, d): + continue + values = span_labels(full[c] if c in mixed else flags[c]) + by_lead = {} + for signal, j in values.items(): + if c in mixed: + signal &= role_mask + if not signal: + continue + lead = coords(signal).bit_length() - 1 + by_lead[lead] = max(by_lead.get(lead, 0), receiver.entries[j][2]) + for lead, price in by_lead.items(): + profiles[lead].append(price) + strings = [",".join(map(str, sorted(p))) for p in profiles] + digest = sha256("".join(s + "\n" for s in strings).encode("ascii")).hexdigest() + check(digest == result["ordered_profiles_sha256"], "all large-block coordinate prices in order") + tariff = {1: 27, 2: 45, 4: 75} + maximum = max(sum(tariff[r] for r in row) for row in profiles) + check(maximum == result["max_numerator_over_27"] and maximum < 125, "strict large-block cap") + histogram = Counter(strings) + check(dict(histogram) == result["profile_counts"], "independent large-block prices") + + +def subspaces(n): + """Yield each subspace once by whether it meets the new affine half.""" + spaces = [(0,)] + for i in range(n): + new = [] + for previous in spaces: + remaining = set(range(1 << i)) + while remaining: + first = min(remaining) + coset = tuple(first ^ x for x in previous) + remaining.difference_update(coset) + new.append(previous + tuple((1 << i) | x for x in coset)) + spaces.extend(new) + return spaces + + +def small_census(group, roles, receivers, flags): + a, d = group["entrance"], group["exit"] + rank = group["target_rank"] + possible = defaultdict(int) + by_rank = defaultdict(int) + token_number = 0 + convert = linear_coordinates([1 << r for r in roles]) + for c, receiver in receivers.items(): + if c == a: + continue + positions = {} + for signal, j in span_labels(flags[c]).items(): + if j not in positions: + positions[j] = 1 << token_number + token_number += 1 + by_rank[receiver.entries[j][2]] |= positions[j] + possible[convert(signal)] |= positions[j] + equal = 0 + powers = {1: 27, 2: 45, 4: 75} + spaces = subspaces(len(roles)) + for space in spaces: + k = len(space).bit_length() - 1 + removed = 0 + for value in space: + removed |= possible[value] + counts = {r: (tokens & removed).bit_count() for r, tokens in by_rank.items()} + if rank == 6: + check(counts == {1: k, 4: k}, "exceptional line census") + continue + price = sum(powers[r] * count for r, count in counts.items()) + check(price <= k * powers[rank], "actual small-block overcharge") + if price == k * powers[rank]: + check(counts.get(rank, 0) == k and sum(counts.values()) == k, "neutral tariff changes with power") + equal += 1 + if rank != 6: + check(equal == group["neutral_subspace_count"], "neutral subspace census") + return len(spaces) + + +def check_side(word, receipt, reverse): + banks, start, end = banks_from_sets(word, reverse) + receivers = {c: Receiver(rows) for c, rows in banks.items()} + all_roles = set(range(222, len(start))) + groups = receipt["groups"] + role_sets = [{r for r in all_roles if (start[r], end[r]) == (g["entrance"], g["exit"])} for g in groups] + check(set.union(*role_sets) == all_roles and sum(map(len, role_sets)) == 437, "group partition") + flags = [{c: receiver.clean(group) for c, receiver in receivers.items()} for group in role_sets] + full = {c: receiver.clean(all_roles) for c, receiver in receivers.items()} + big = role_sets[0] + max_defects, mixed_ends = {}, {} + high = 0 + for c, receiver in receivers.items(): + check(not receiver.clean(set()), "independent source tokens") + small = receiver.clean(all_roles - big) + delta = peak = 0 + for j, (_, _, rank) in enumerate(receiver.entries): + before = delta + delta += int(j in full[c]) - sum(j in space[c] for space in flags) + peak = max(peak, delta) + check(delta >= 0 and int(j in small) == sum(j in s[c] for s in flags[1:]), "block dimension") + if not rank: + check(delta == 0, "free decomposition") + if rank > 1 and j in full[c]: + check(before == delta == 0, "higher-price prefix") + high += 1 + if peak: + max_defects[str(c)] = peak + if delta: + mixed_ends[str(c)] = delta + check(all(receiver.entries[j][2] == 1 for j in full[c]), "mixed unit remainder") + check((max_defects, mixed_ends, high) == + (receipt["mixed_prefix_maximum_by_chart"], receipt["mixed_end_dimension_by_chart"], + receipt["separated_higher_rank_births"]), "full nullspace certificate") + check((len(receivers), sum(len(r.entries) for r in receivers.values())) == + (receipt["receiver_charts"], receipt["bank_prefixes"]), "all bank coverage") + possible = Counter(receivers[c].entries[j][2] for c, spans in full.items() for j in spans + if receivers[c].entries[j][2] > 0) + check({str(r): n for r, n in possible.items()} == receipt["paid_omittable_with_all_helpers_zero"], + "all possible paid omissions") + large_charges(groups[0], sorted(big), receivers, flags[0], full, set(map(int, mixed_ends)), reverse) + return sum(small_census(g, sorted(rs), receivers, fs) + for g, rs, fs in zip(groups[1:], role_sets[1:], flags[1:], strict=True)) + + +if __name__ == "__main__": + packed = NATIVE.read_bytes() + check(sha256(packed).hexdigest() == "51203e7fc75ba10bd3ac3f8e675759f47e13d262bea66b6600d1e515095cad78", + "native archive digest") + word = json.loads(gzip.decompress(packed)) + receipt = json.loads((HERE / "RESULT.json").read_bytes()) + total = sum(check_side(word, receipt[side], side == "transpose") for side in ("forward", "transpose")) + print(f"PASS_BIT_SIMULTANEOUS_DUAL_CHECK small_block_subspaces={total} large_pivot_prices=820") diff --git a/research/bit-simultaneous-helper-relations/flags.py b/research/bit-simultaneous-helper-relations/flags.py new file mode 100644 index 0000000000..77aefdbf37 --- /dev/null +++ b/research/bit-simultaneous-helper-relations/flags.py @@ -0,0 +1,218 @@ +"""Certify the full prefix intersections and the prices charged to helper pivots.""" +from collections import Counter +from dataclasses import dataclass +from hashlib import sha256 + +from word import require + +# Zero-based terminal birth positions. Each swap lies inside one equal-price run. +TRANSPOSE_SWAPS = ((365, 156), (401, 237), (380, 200), + (409, 329), (296, 251), (376, 162)) + +# 27 times r^t when 2^t = 5/3. +PRICE = {1: 27, 2: 45, 4: 75, 8: 125} + + +@dataclass(frozen=True) +class Birth: + position: int + signal: int + rank: int + + +def clean_flag(bank, mask): + """A basis of span(bank[:j]) intersect mask, simultaneously for every j.""" + outside = {} + births = [] + for position, bank_row in enumerate(bank): + signal = bank_row.signal + while signal & ~mask: + pivot = (signal & ~mask).bit_length() - 1 + if pivot not in outside: + outside[pivot] = signal + break + signal ^= outside[pivot] + else: + require(signal != 0, "original bank dependence") + births.append(Birth(position, signal, bank_row.rank)) + return births + + +@dataclass +class Flags: + individual: list + all_helpers: list + mixed_end: bool + + +def decompose(banks, masks): + """Check the two sides of every possible above-unit-price birth.""" + total_mask = sum(masks) + largest_mask = masks[0] + result = {} + mixed_prefix_charts = {} + mixed_end_charts = {} + possible_paid = Counter() + high_births = 0 + prefix_count = 0 + for chart, bank in sorted(banks.items()): + require(not clean_flag(bank, 0), "independent complete bank") + whole = clean_flag(bank, total_mask) + small = clean_flag(bank, total_mask ^ largest_mask) + parts = [clean_flag(bank, mask) for mask in masks] + possible_paid.update(row.rank for row in whole if row.rank > 0) + whole_at = {row.position for row in whole} + small_at = {row.position for row in small} + pure_at = Counter(row.position for part in parts for row in part) + small_pure_at = Counter(row.position for part in parts[1:] for row in part) + defect = 0 + maximum = 0 + for j, token in enumerate(bank): + before = defect + defect += int(j in whole_at) - pure_at[j] + require(defect >= 0, "negative mixed dimension") + maximum = max(maximum, defect) + # Increment equality at each prefix implies direct decomposition on the small blocks. + require(int(j in small_at) == small_pure_at[j], "mixed small-block flag") + if token.rank == 0: + require(defect == 0, "mixed free prefix") + elif token.rank > 1 and j in whole_at: + require(before == defect == 0, "mixed flag at a higher-price birth") + high_births += 1 + if maximum: + mixed_prefix_charts[chart] = maximum + if defect: + require(all(row.rank == 1 for row in whole), "mixed final chart has a nonunit birth") + mixed_end_charts[chart] = defect + result[chart] = Flags(parts, whole, bool(defect)) + prefix_count += len(bank) + return result, {"receiver_charts": len(banks), "bank_prefixes": prefix_count, + "mixed_prefix_maximum_by_chart": mixed_prefix_charts, + "mixed_end_dimension_by_chart": mixed_end_charts, + "separated_higher_rank_births": high_births, + "paid_omittable_with_all_helpers_zero": dict(sorted(possible_paid.items()))} + + +def make_decoder(ordered_signals): + """Express an exact helper signal in the ordered basis of its own group.""" + basis = {} + for i, signal in enumerate(ordered_signals): + tag = 1 << i + while signal: + pivot = signal.bit_length() - 1 + if pivot not in basis: + basis[pivot] = (signal, tag) + break + previous, coordinates = basis[pivot] + signal ^= previous + tag ^= coordinates + else: + raise ValueError("dependent helper coordinates") + + def convert(signal): + result = 0 + while signal: + pivot = signal.bit_length() - 1 + require(pivot in basis, "signal outside helper block") + previous, coordinates = basis[pivot] + signal ^= previous + result ^= coordinates + return result + + return convert + + +def group_basis(roles, terminal, physical_coordinates, swaps=()): + require(len(terminal) == len(roles) and all(row.rank > 0 for row in terminal), + "complete paid terminal flag") + if physical_coordinates: + return [1 << i for i in roles], [max(row.rank for row in terminal)] * len(roles) + signals = [row.signal for row in terminal] + ranks = [row.rank for row in terminal] + for i, j in swaps: + require(0 <= min(i, j) <= max(i, j) < len(ranks), "terminal swap bounds") + require(len(set(ranks[min(i, j):max(i, j) + 1])) == 1, "terminal tariff run") + signals[i], signals[j] = signals[j], signals[i] + return signals, ranks + + +def signal_prices(rows, mask=None): + """List every small-space signal and its chronological price. + + On a projected mixed receiver, the entire space has unit price. Projections + can repeat or vanish. Every original clean flag consists of independent births. + """ + values = {0: 0} + for row in rows: + v = row.signal + if mask is not None: + require(row.rank == 1, "projected nonunit bank") + v &= mask + if v in values: + require(mask is not None, "dependent original clean basis") + continue + addition = {x ^ v: row.rank for x in values} + values.update(addition) + del values[0] + return values + + +def charge_group(number, boundary, roles, masks, flags, frames, transpose): + a, d = boundary + target_rank = abs(frames[a] - frames[d]) + largest = number == 0 + physical = largest and not transpose + swaps = TRANSPOSE_SWAPS if largest and transpose else () + basis, terminal_prices = group_basis(roles, flags[d].individual[number], physical, swaps) + convert = make_decoder(basis) + charges = [[r] for r in terminal_prices] + largest_local_dimension = 0 + for chart, receiver in flags.items(): + if chart in (a, d): + require(not receiver.mixed_end, "mixed boundary would require a separate charge") + continue + if largest and receiver.mixed_end: + prices = signal_prices(receiver.all_helpers, masks[0]) + else: + prices = signal_prices(receiver.individual[number]) + largest_local_dimension = max(largest_local_dimension, len(prices).bit_length()) + by_pivot = {} + for signal, price in prices.items(): + require(price > 0, "nonterminal paid rank") + pivot = convert(signal).bit_length() - 1 + by_pivot[pivot] = max(by_pivot.get(pivot, 0), price) + for pivot, price in by_pivot.items(): + charges[pivot].append(price) + + profiles = [tuple(sorted(profile)) for profile in charges] + counts = Counter(profiles) + require(all(0 < r <= target_rank for profile in profiles for r in profile), "normalized price monotonicity") + if target_rank == 6: + require(len(roles) == 1 and counts == {(1, 4): 1}, "unique exceptional rank-six tariff") + max_price = None + else: + max_price = max(sum(PRICE[r] for r in profile) for profile in profiles) + require(max_price <= PRICE[target_rank], "coordinate price exceeds its target") + if largest: + require(max_price < PRICE[target_rank], "strict charge on large helper block") + neutral = [i for i, profile in enumerate(profiles) if profile == (target_rank,)] + if target_rank != 6: + require(all(sum(PRICE[r] for r in profile) < PRICE[target_rank] + for i, profile in enumerate(profiles) if i not in neutral), "strict nonneutral tariff") + ordered = "".join(",".join(map(str, profile)) + "\n" for profile in profiles) + return {"ordered_profiles_sha256": sha256(ordered.encode("ascii")).hexdigest(), + "entrance": a, "exit": d, "dimension": len(roles), "target_rank": target_rank, + "neutral_pivot_indices": neutral, + "nonterminal_dimension_max": largest_local_dimension, + "max_numerator_over_27": max_price, + "profile_counts": {",".join(map(str, p)): n for p, n in sorted(counts.items())}} + + +def charge_orientation(banks, groups, frames, transpose): + masks = [sum(1 << i for i in roles) for roles in groups.values()] + require(sorted(map(len, groups.values())) == [1, 1, 2, 2, 3, 5, 6, 7, 410], + "all 437 helpers in the nine boundary groups") + flags, result = decompose(banks, masks) + result["groups"] = [charge_group(i, boundary, roles, masks, flags, frames, transpose) + for i, (boundary, roles) in enumerate(groups.items())] + return result diff --git a/research/bit-simultaneous-helper-relations/invoice_bound.py b/research/bit-simultaneous-helper-relations/invoice_bound.py new file mode 100644 index 0000000000..07b9a13f9d --- /dev/null +++ b/research/bit-simultaneous-helper-relations/invoice_bound.py @@ -0,0 +1,87 @@ +"""Exact global sign test for the complete 36-call signed BIT invoice.""" +from collections import Counter +from fractions import Fraction +from functools import cache +from math import ceil, floor, isqrt + +from word import require + + +# Outward fixed-point enclosures. Exponents are first bracketed on a dyadic grid. +SCALE = 1 << 128 +EXPONENT_BITS = 80 + + +@cache +def roots(rank): + low = high = rank * SCALE + values = [] + for _ in range(EXPONENT_BITS): + low = isqrt(low * SCALE) + radicand = high * SCALE + high = isqrt(radicand) + if high * high < radicand: + high += 1 + values.append((low, high)) + return values + + +def dyadic_power(rank, numerator): + if numerator == 1 << EXPONENT_BITS: + return rank * SCALE, rank * SCALE + low = high = SCALE + for j, (a, b) in enumerate(roots(rank), 1): + if numerator & (1 << (EXPONENT_BITS - j)): + low = low * a // SCALE + high = (high * b + SCALE - 1) // SCALE + return low, high + + +def margin(profile, exponent): + require(0 <= exponent <= 1, "unit power domain") + point = exponent * (1 << EXPONENT_BITS) + left, right = floor(point), ceil(point) + lower = upper = 0 + for rank, count in profile.items(): + lo = dyadic_power(rank, left)[0] + hi = dyadic_power(rank, right)[1] + lower += count * (lo if count >= 0 else hi) + upper += count * (hi if count >= 0 else lo) + return Fraction(lower, SCALE), Fraction(upper, SCALE) + + +def increasing_after_normalization(profile): + """Verify the coefficient signs in the proof of monotonicity of M(t)/8^t.""" + remaining = Counter(profile) + require(remaining[1] < 0 and all(remaining.pop(r, 0) <= 0 for r in range(1, 8)), + "strictly increasing low-rank terms") + for r in range(14, 57, 7): + weight = remaining.pop(r + 1) + require(weight > 0 and remaining.pop(r) == -weight, "paired high-rank terms") + require(all(r >= 8 and n >= 0 for r, n in remaining.items()), "unpaired high-rank terms") + + +def whole_caller(caller, orientations): + original = Counter(caller["targets"]) + original.subtract(caller["paid"]) + possible = Counter() + for side in orientations: + possible |= Counter(side["paid_omittable_with_all_helpers_zero"]) + favorable = Counter(original) + for rank, count in possible.items(): + favorable[rank] += caller["native_invocations"] * count + increasing_after_normalization(original) + increasing_after_normalization(favorable) + cutoff = margin(favorable, Fraction(3, 4)) + require(-23329 < cutoff[0] <= cutoff[1] < -23328, "optimistic high-saving sign") + + lower_eta, upper_eta = "0.0038525393934", "0.0038525393935" + require(margin(original, 1 - Fraction(lower_eta))[0] > 0 and + margin(original, 1 - Fraction(upper_eta))[1] < 0, "original raw crossing") + goal = margin(original, Fraction(99, 100)) + require(Fraction("-2355.302") < goal[0] <= goal[1] < Fraction("-2355.301"), + "strict deficit at the one-percent target") + return {"optimal_raw_BIT_price_saving_open_interval": [lower_eta, upper_eta], + "maximum_signed_margin_at_eta_0.01_open_interval": ["-2355.302", "-2355.301"], + "optimistic_margin_at_t_3_over_4_open_interval": [-23329, -23328], + "optimistic_omissions_per_call_by_rank": dict(sorted(possible.items()))} diff --git a/research/bit-simultaneous-helper-relations/sharp.py b/research/bit-simultaneous-helper-relations/sharp.py new file mode 100644 index 0000000000..db106b2b13 --- /dev/null +++ b/research/bit-simultaneous-helper-relations/sharp.py @@ -0,0 +1,106 @@ +"""Attaining edit, a mixed-only bank, and rational isolation of the switch.""" +from fractions import Fraction +from math import factorial + +from word import require + + +def quotient_dependencies(bank, equations): + """Chronological elimination modulo the equations, with earlier-bank witnesses.""" + pivots = {} + for v in equations: + while v: + j = v.bit_length() - 1 + if j not in pivots: + pivots[j] = (v, 0) + break + v ^= pivots[j][0] + else: + raise ValueError("dependent quotient equations") + dependencies = [] + for i, token in enumerate(bank): + v = token.signal + tags = 1 << i + while v: + j = v.bit_length() - 1 + if j not in pivots: + pivots[j] = (v, tags) + break + other, witness = pivots[j] + v ^= other + tags ^= witness + else: + earlier = [bank[k].clock for k in range(i) if tags >> k & 1] + dependencies.append((token, earlier)) + return dependencies + + +def attaining_edit(banks, groups, frames): + roles = [r for (a, d), block in groups.items() + if abs(frames[a] - frames[d]) == 6 for r in block] + require(roles == [341], "rank-six target") + result = [] + for chart, bank in sorted(banks.items()): + entries = {token.clock: token for token in bank} + for token, earlier in quotient_dependencies(bank, [1 << roles[0]]): + if token.rank == 0: + continue + difference = token.signal + for clock in earlier: + require(clock < token.clock, "noncausal attaining reconstruction") + difference ^= entries[clock].signal + require(difference == 1 << roles[0], "literal rank-six identity") + result.append({"chart": chart, "clock": token.clock, "rank": token.rank, + "earlier_clocks": earlier}) + require(sorted(row["rank"] for row in result) == [1, 4], "complete attained tariff") + return result + + +def mixed_example(bank): + a = 1 << 331 + b = (1 << 332) | (1 << 333) + token, = [row for row in bank if row.clock == 19881] + require(token.rank == 1 and token.signal == a ^ b, "mixed bank signal") + def removed(equations): + return any(row.clock == token.clock for row, _ in quotient_dependencies(bank, equations)) + require(removed([a, b]) and not removed([a]) and not removed([b]), "genuine cross-group dependence") + return {"forward_chart": 50, "clock": token.clock, "separate_equations": [[331], [332, 333]]} + + +def log_interval(base): + z = Fraction(base - 1, base + 1) + count = 85 + partial = 2 * sum(z ** (2 * j + 1) / (2 * j + 1) for j in range(count)) + tail = 2 * z ** (2 * count + 1) / ((2 * count + 1) * (1 - z * z)) + scale = 10 ** 28 + return Fraction(int(partial * scale), scale), Fraction(int((partial + tail) * scale) + 1, scale) + + +def exp_partial(y): + term = Fraction(1) + total = term + for j in range(1, 45): + term = term * y / j + total += term + return total + + +def power_interval(base, exponent): + low, high = log_interval(base) + require(0 <= exponent * low <= exponent * high < 2, "exponential tail domain") + # From term 45 onwards each ratio is < 2/46, hence the factor two suffices. + return exp_partial(exponent * low), exp_partial(exponent * high) + Fraction(2 ** 46, factorial(45)) + + +def root_interval(): + left = "0.2517782975220009" + right = "0.2517782975220010" + for endpoint, positive in ((left, False), (right, True)): + t = 1 - Fraction(endpoint) + low4, high4 = power_interval(4, t) + low6, high6 = power_interval(6, t) + require(1 + low4 > high6 if positive else 1 + high4 < low6, "outward root isolation") + # log_2(5/3) < 37/50 and 6^(37/50) < 34/9 < 1 + 4^(37/50). + require(2 ** 37 * 3 ** 50 > 5 ** 50 and 6 ** 37 * 9 ** 50 < 34 ** 50, + "switch inside the certified tariff interval") + return [left, right] diff --git a/research/bit-simultaneous-helper-relations/verify.py b/research/bit-simultaneous-helper-relations/verify.py new file mode 100644 index 0000000000..797150a849 --- /dev/null +++ b/research/bit-simultaneous-helper-relations/verify.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python3 +"""Recompute the sharp signed-margin envelope from the two pinned source files.""" +import argparse +import json +from itertools import combinations +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from flags import Birth, charge_orientation, clean_flag, decompose, group_basis +from invoice_bound import whole_caller +from sharp import attaining_edit, mixed_example, root_interval +from word import Bank, CALLER, NATIVE, check_frames, invoice, replay, require, source + + +def negative_controls(): + def rejects(message, function): + try: + function() + except ValueError as error: + require(str(error) == message, "mutation failed at the wrong check") + else: + raise ValueError("accepted control: " + message) + + rejects("original bank dependence", lambda: clean_flag([Bank(1, 1, 1), Bank(2, 1, 1)], 0)) + terminal = [Birth(0, 1, 1), Birth(1, 2, 2), Birth(2, 4, 1)] + rejects("terminal tariff run", lambda: group_basis([0, 1, 2], terminal, False, [(0, 2)])) + + # A mixed rank-two birth cannot be assigned separate unit-price charges. + rejects("mixed flag at a higher-price birth", lambda: decompose({0: [Bank(0, 3, 2)]}, [1, 2])) + # Both small groups are needed here. Projecting all mixing onto the large group would miss it. + rejects("mixed small-block flag", lambda: decompose({0: [Bank(0, 6, 1)]}, [1, 2, 4])) + return ["dependent source bank", "swap across unequal prices", "mixed above-unit birth", + "relation between two small blocks"] + + +def maximizers(groups): + # Each admissible pivot set describes a binary echelon cell. + total = 1 + for group in groups: + if group["target_rank"] == 6: + continue # Its unique relation is forced off/on away from the switch. + allowed = group["neutral_pivot_indices"] + count = 0 + for k in range(len(allowed) + 1): + for pivots in combinations(allowed, k): + count += 1 << sum(p - i for i, p in enumerate(pivots)) + group["neutral_subspace_count"] = count + total *= count + return {"off_switch": total, "at_switch": 2 * total} + + +def calculate(): + word = source(NATIVE) + caller = source(CALLER) + receipt = {"pricing": "t=1-eta; delta=paid saved minus targets surrendered", + "price_saving_switch_open_interval": root_interval(), "source_frames": check_frames(word)} + for transpose, name in ((False, "forward"), (True, "transpose")): + banks, groups, frames = replay(word, transpose) + result = charge_orientation(banks, groups, frames, transpose) + result["maximizing_subspace_tuples"] = maximizers(result["groups"]) + result["rank_six_witness"] = attaining_edit(banks, groups, frames) + if not transpose: + receipt["full_caller"] = invoice(caller, banks, groups, frames) + receipt["mixed_example"] = mixed_example(banks[50]) + else: + require(invoice(caller, banks, groups, frames) == receipt["full_caller"], "orientation invoice") + receipt[name] = result + receipt["global_raw_ceiling"] = whole_caller(receipt["full_caller"], [receipt["forward"], receipt["transpose"]]) + receipt["controls"] = negative_controls() + return receipt + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--emit", action="store_true", help="print the regenerated certificate") + args = parser.parse_args() + result = calculate() + rendered = json.dumps(result, indent=2) + if args.emit: + print(rendered) + else: + require(json.loads(rendered) == json.loads((HERE / "RESULT.json").read_bytes()), "certificate mismatch") + print("PASS_BIT_SIMULTANEOUS_HELPER_ENVELOPE groups=9 helpers=437 orientations=2 calls=36") diff --git a/research/bit-simultaneous-helper-relations/word.py b/research/bit-simultaneous-helper-relations/word.py new file mode 100644 index 0000000000..1bc2405e04 --- /dev/null +++ b/research/bit-simultaneous-helper-relations/word.py @@ -0,0 +1,159 @@ +"""Interpret the pinned binary word and count the selected paired caller.""" +from collections import Counter, defaultdict +from dataclasses import dataclass +import gzip +import hashlib +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +NATIVE = "research/paired-query-only-bit/retained/inputs/BIT-NATIVE-WORD.json.gz" +CALLER = "research/paired-query-only-bit/EFREE-CALLER.json.gz" + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def source(path): + pins = json.loads((HERE / "SOURCES.json").read_bytes())["files"] + pin, = [item for item in pins if item["path"] == path and item["usage"] == "input"] + raw = (ROOT / path).read_bytes() + require(hashlib.sha256(raw).hexdigest() == pin["sha256"], "pinned source digest") + return json.loads(gzip.decompress(raw)) + + +def independent_rows(rows): + """Full row rank over Q by fraction-free elimination on the eight axes.""" + pivots = {} + for source_row in rows: + row = list(source_row) + for j in range(8): + if row[j] == 0: + continue + if j not in pivots: + pivots[j] = row + break + other = pivots[j] + left, right = other[j], row[j] + row = [left * a - right * b for a, b in zip(row, other, strict=True)] + else: + return False + return True + + +def check_frames(word): + frames = {int(c): frame for c, frame in word["frames"].items()} + + def orthogonal(left, right): + return all(sum(a * b for a, b in zip(u, v, strict=True)) == 0 for u in left for v in right) + + for frame in frames.values(): + a, b, dim = frame["A"], frame["B"], frame["dim"] + require(len(b) == dim and len(a) + dim == 8 and all(len(row) == 8 for row in a + b), + "eight-axis frame dimensions") + require(independent_rows(a) and independent_rows(b) and orthogonal(a, b), "rational frame bases") + paid = {(e[2], e[3]) for e in word["program"] if e[0] == "MOVE"} + helpers = set(zip(word["start"][222:], word["final"][222:], strict=True)) + for a, b in paid | helpers: + small, large = sorted((frames[a], frames[b]), key=lambda f: f["dim"]) + require(small["dim"] < large["dim"] and orthogonal(small["B"], large["A"]), "nested rank price") + return {"rational_frames": len(frames), "directed_paid_pairs": len(paid), + "ordered_helper_boundaries": len(helpers)} + + +@dataclass(frozen=True) +class Bank: + clock: int + signal: int + rank: int + + +def replay(word, transpose): + """Banks are in chronological order, after all free entrance fields.""" + n = word["public"] + ingress, egress = word["start"], word["final"] + program = word["program"] + if transpose: + ingress, egress = egress, ingress + program = reversed(program) + frames = {int(c): data["dim"] for c, data in word["frames"].items()} + charts = list(ingress) + [None] * word["owned_fields"] + values = [1 << r for r in range(n)] + [0] * word["owned_fields"] + banks = defaultdict(list) + for role, chart in enumerate(ingress): + banks[chart].append(Bank(~role, values[role], 0)) + + for clock, (op, a, *tail) in enumerate(program): + if transpose and op in ("INIT", "CLEAR"): + op = {"INIT": "CLEAR", "CLEAR": "INIT"}[op] + if op == "INIT": + chart, = tail + require(a >= n and charts[a] is None, "owned introduction") + charts[a], values[a] = chart, 0 + elif op == "CLEAR": + chart, = tail + require(a >= n and charts[a] == chart, "owned retirement") + charts[a], values[a] = None, 0 + elif op == "SWAP": + b, = tail + charts[a], charts[b] = charts[b], charts[a] + values[a], values[b] = values[b], values[a] + elif op == "ADD": + b, chart = tail + require(a != b and charts[a] == charts[b] == chart, "scalar XOR contact") + dst, src = (b, a) if transpose else (a, b) + values[dst] ^= values[src] + else: + require(op == "MOVE", "known operation") + old, new = reversed(tail) if transpose else tail + rank = abs(frames[old] - frames[new]) + require(charts[a] == old and rank > 0, "paid transfer direction") + charts[a] = new + banks[new].append(Bank(clock, values[a], rank)) + + require(charts == list(egress) + [None] * word["owned_fields"], "public charts") + for role, actual in enumerate(values[:n]): + expected = 1 << role + if transpose and role < 111: + expected ^= 1 << (role + 111) + if not transpose and 111 <= role < 222: + expected ^= 1 << (role - 111) + require(actual == expected, "arbitrary public input and helper endpoint") + + groups = defaultdict(list) + for role in range(222, n): + groups[ingress[role], egress[role]].append(role) + keys = sorted(groups, key=lambda pair: (-len(groups[pair]), pair)) + return dict(banks), {pair: groups[pair] for pair in keys}, frames + + +def invoice(caller, banks, groups, frames): + native = Counter(row.rank for bank in banks.values() for row in bank if row.rank) + helper = Counter() + for (a, d), roles in groups.items(): + helper[abs(frames[a] - frames[d])] += len(roles) + ports = caller["ports"] + calls = Counter(event[1] for event in caller["events"] if event[0] == "LOCAL") + require(ports == 111 and caller["stages"] == 18 and + calls == Counter({s: 2 for s in range(1, 19)}), "paired caller stages") + uses = sum(calls.values()) + paid = Counter({r: uses * count for r, count in native.items()}) + targets = Counter({r: uses * count for r, count in helper.items()}) + for event in caller["events"]: + if event[0] == "QUERY": + paid[1] += ports + if event[0] == "IDLE_ONE": + paid[7 * len(event[2])] += ports + for job in caller["diagonal"]: + stages = job["stages"] + require(job["q"] == 1 and stages and len(set(stages)) == len(stages), "positive root job") + targets[1 + 7 * len(stages)] += ports + require((sum(paid.values()), sum(targets.values())) == (107352, 19950), "whole caller counts") + return {"native_invocations": uses, "native_paid": sum(native.values()), + "native_helpers": sum(helper.values()), "paid": dict(sorted(paid.items())), + "targets": dict(sorted(targets.items())), + "rank_surplus": sum(r * n for r, n in targets.items()) + - sum(r * n for r, n in paid.items())} From f2efcb571858c18f5f0392379c7d08f0675d0eaa Mon Sep 17 00:00:00 2001 From: AlephNaN <206279168+alephnan@users.noreply.github.com> Date: Wed, 18 Nov 2026 14:09:36 -0600 Subject: [PATCH 2/2] Correct reference separators in the proof and research note --- research/bit-simultaneous-helper-relations/PROOF.md | 4 ++-- research/bit-simultaneous-helper-relations/README.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/research/bit-simultaneous-helper-relations/PROOF.md b/research/bit-simultaneous-helper-relations/PROOF.md index a01800d30d..40d18894c2 100644 --- a/research/bit-simultaneous-helper-relations/PROOF.md +++ b/research/bit-simultaneous-helper-relations/PROOF.md @@ -69,7 +69,7 @@ At its terminal the clean flag spans the full group. Use the basis vectors intro (365,156) (401,237) (380,200) (409,329) (296,251) (376,162) ~~~ -These are choices of proof coordinates. Independently, the initial 410 chronological basis vectors can be recovered by taking all original unit roles except 332 and 340, adding $e_{332}+e_{333}$ and $e_{340}+e_{375}$, and sorting by each vector's latest terminal bank. All 410 latest banks are distinct. [Primary charge computation](flags.py) · [Independent terminal reconstruction](crosscheck.py) +These are choices of proof coordinates. Independently, the initial 410 chronological basis vectors can be recovered by taking all original unit roles except 332 and 340, adding $e_{332}+e_{333}$ and $e_{340}+e_{375}$, and sorting by each vector's latest terminal bank. All 410 latest banks are distinct. [Primary charge computation](flags.py) · [Independent terminal reconstruction](crosscheck.py) At $t=q$, multiply prices by 27. The integer prices of ranks 1, 2, 4 and 8 become 27, 45, 75 and 125. Add each terminal charge to the nonterminal maxima on the same coordinate. The table gives the maximum resulting numerator per coordinate. Boundary pairs are named in the forward direction on both sides. @@ -117,7 +117,7 @@ For $q\le t\le1$, every maximizing tuple has zero large-group component. On the Thus, away from the switch in the envelope's range, **2,242 forward tuples and 10 transposed tuples** attain the maximum. At the switch these counts double. Direct enumeration checks every small-block subspace and its actual removed banks. These counts distinguish subspaces of relations. Different generating bases for the same subspace are identified. -The paired caller uses two invocations at each of 18 stages. Each occurrence has fresh helper coordinates. The unchanged root, QUERY and idle terms cancel in the signed difference, so multiplication by 36 gives the complete caller envelope. The source recount has 107,352 paid calls, 19,950 productive targets and integer rank surplus 1,506. Whole-call implementation, tape costs and the other framework obligations keep their original scope. [Caller and group counts](RESULT.json) · [Selected application review](../../docs/research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md) +The paired caller uses two invocations at each of 18 stages. Each occurrence has fresh helper coordinates. The unchanged root, QUERY and idle terms cancel in the signed difference, so multiplication by 36 gives the complete caller envelope. The source recount has 107,352 paid calls, 19,950 productive targets and integer rank surplus 1,506. Whole-call implementation, tape costs and the other framework obligations keep their original scope. [Caller and group counts](RESULT.json) · [Selected application review](../../docs/research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md) ## 5. Global optimum for the signed BIT invoice diff --git a/research/bit-simultaneous-helper-relations/README.md b/research/bit-simultaneous-helper-relations/README.md index 85d85c1173..7987150fef 100644 --- a/research/bit-simultaneous-helper-relations/README.md +++ b/research/bit-simultaneous-helper-relations/README.md @@ -11,11 +11,11 @@ $$ =\max\{0,\ 1+4^t-6^t\}. $$ -The complete paired caller uses 36 native invocations. Its maximum change in signed margin is 36 times this expression. Over the full interval $0\le\eta\le1$, an edit improves the original invoice exactly when $\eta>\eta_*$, where $6^{1-\eta_*}=1+4^{1-\eta_*}$. For the positive branch in the displayed range, setting helper 341 to zero removes one rank-one and one rank-four paid arrival per invocation and surrenders one rank-six target. [Proof and equality cases](PROOF.md) · [Exact certificate and bank witnesses](RESULT.json) +The complete paired caller uses 36 native invocations. Its maximum change in signed margin is 36 times this expression. Over the full interval $0\le\eta\le1$, an edit improves the original invoice exactly when $\eta>\eta_*$, where $6^{1-\eta_*}=1+4^{1-\eta_*}$. For the positive branch in the displayed range, setting helper 341 to zero removes one rank-one and one rank-four paid arrival per invocation and surrenders one rank-six target. [Proof and equality cases](PROOF.md) · [Exact certificate and bank witnesses](RESULT.json) ### Why the groups have to be checked together -Ali Romman ruled out restrictions within any one group at a time for $0\le\eta\le0.01$. His work includes the individual rank-six case. An actual bank at forward chart 50 has value $x_{331}+x_{332}+x_{333}$. Imposing $x_{331}=0$ in one group and $x_{332}+x_{333}=0$ in another makes that bank free to reconstruct. Each equation alone still requires the paid arrival. The new upper bound accounts for these interactions at every chronological receiver prefix and matches the rank-six witness. [One-group predecessor, PR #7722](https://github.com/CrocSwap/integer-mult-bounds/pull/7722) · [Single-relation predecessor, PR #7720](https://github.com/CrocSwap/integer-mult-bounds/pull/7720) +Ali Romman ruled out restrictions within any one group at a time for $0\le\eta\le0.01$. His work includes the individual rank-six case. An actual bank at forward chart 50 has value $x_{331}+x_{332}+x_{333}$. Imposing $x_{331}=0$ in one group and $x_{332}+x_{333}=0$ in another makes that bank free to reconstruct. Each equation alone still requires the paid arrival. The new upper bound accounts for these interactions at every chronological receiver prefix and matches the rank-six witness. [One-group predecessor, PR #7722](https://github.com/CrocSwap/integer-mult-bounds/pull/7722) · [Single-relation predecessor, PR #7720](https://github.com/CrocSwap/integer-mult-bounds/pull/7720) ### Reproduce @@ -25,7 +25,7 @@ From the repository root, use CPython 3.12 and the standard library. python3.12 -B scripts/research_package.py --package research/bit-simultaneous-helper-relations ~~~ -The first verifier reconstructs all 437 helper roles and all 2,871 paid arrivals, checks 3,530 receiver prefixes in each orientation, and certifies both the edit threshold and the global raw BIT ceiling with rational bounds. The second verifier solves the orthogonal equations in bank coordinates, checks all 820 price assignments on the largest block across the two orientations, and enumerates 64,882 small-block subspaces across both orientations. Both start from the original word. [Primary verifier](verify.py) · [Column-nullspace cross-check](crosscheck.py) · [Declared inputs](SOURCES.json) +The first verifier reconstructs all 437 helper roles and all 2,871 paid arrivals, checks 3,530 receiver prefixes in each orientation, and certifies both the edit threshold and the global raw BIT ceiling with rational bounds. The second verifier solves the orthogonal equations in bank coordinates, checks all 820 price assignments on the largest block across the two orientations, and enumerates 64,882 small-block subspaces across both orientations. Both start from the original word. [Primary verifier](verify.py) · [Column-nullspace cross-check](crosscheck.py) · [Declared inputs](SOURCES.json) Local verification used CPython 3.12.2 on Windows and CPython 3.14.7 on Arch Linux. The selected source-binding baseline and PR7001's original paired BIT application check passed. The complete selected PR7000 cold replay, human review, and proof-kernel verification are outside this session. @@ -39,4 +39,4 @@ Can a **changed delivery after a restriction** beat the combined obstruction? PR AlephNaN (@alephnan) prepared this proof and both implementations with substantial OpenAI Codex assistance. The two checking methods share authorship. New work is licensed under Apache-2.0. -Ali Romman supplied the causal-bank model, the single-direction analysis, the one-group common-pivot bound, and the question about simultaneous groups. Jerry Chen / CubeJerry supplied the selected PR7000 construction and its PR7001 BIT dependency. DreamingOfClouds supplied the chain-root caller. zxv and the retained authors supplied the BIT word and earlier proofs. The package reads the two existing source files in place. [PR7001 and retained credits](../../research/paired-query-only-bit/NOTICE) · [Selected contributor map](../../docs/research/community-frontier7000-contributors.md) · [Predecessor proof at its exact head](https://github.com/aliromman/integer-mult-bounds/blob/8a70046cafae35d29627017983d55cec71e06e27/research/bit-joint-relation-bank-obstruction/PROOF.md) +Ali Romman supplied the causal-bank model, the single-direction analysis, the one-group common-pivot bound, and the question about simultaneous groups. Jerry Chen / CubeJerry supplied the selected PR7000 construction and its PR7001 BIT dependency. DreamingOfClouds supplied the chain-root caller. zxv and the retained authors supplied the BIT word and earlier proofs. The package reads the two existing source files in place. [PR7001 and retained credits](../../research/paired-query-only-bit/NOTICE) · [Selected contributor map](../../docs/research/community-frontier7000-contributors.md) · [Predecessor proof at its exact head](https://github.com/aliromman/integer-mult-bounds/blob/8a70046cafae35d29627017983d55cec71e06e27/research/bit-joint-relation-bank-obstruction/PROOF.md)