Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion docs/ci-verification.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# CI verification

## Current selected-family replay: #5599
## Current selected-family replay: #6030

The [selected record](../certificates/selected-result.json) binds conditional
κ = 0.003125804 to the [proof review](research/pr-intake-evidence/pr6030-audit/PROOF-REVIEW.md),
[validation receipts](research/pr-intake-evidence/pr6030-audit/VALIDATION.json),
and [explicit source closure](../certificates/frontier6030-source.json).
`make frontier6030-verify` follows that source-bound selected replay. The review
separates retained normal primary macOS/Linux evidence from fresh independent
word/invoice/native, original caller, adapted caller and optimized primary checks.
Consult its receipts for exact commands, source heads and limits; the #5599
checkpoint below retains its own historical replay details.

The five inherited framework assumptions remain. Neither the full uniform word
nor a complete rounded multiplier is materialized. A source/metadata check is
not an operator replay or a formal theorem proof. Routine research submissions
do not need to rerun this selected-family replay.

## Historical selected-family replay: #5599

The [selected record](../certificates/selected-result.json) binds conditional
κ = 0.00310045 to the [proof review](research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/research/current-status.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Current reviewed status

Selected conditional κ: **0.003125804 = 781451/250000000**, DreamingOfClouds'
Selected conditional κ: **0.003125804** = 781451/250000000, DreamingOfClouds'
PR6030 on the cumulative P104 construction. The complete caller counts 13,444
productive fields and 66,834 paid calls. The saving is about 0.81775% above the
preceding selected PR5599 claim 0.00310045.
Expand Down
188 changes: 188 additions & 0 deletions research/paired-residue-sampler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
# Joint denominator-13 decisions use fewer expected fair bits

For every fixed pair of nonzero residue probabilities $a/13,b/13$, an explicit
finite-state sampler produces **two independent** Bernoulli decisions with
optimal expected fair-bit count strictly below $7/2$. Two separate exact
standalone samplers require expected count at least four. When both probabilities
are $1/13$, the joint expected count is below $9/4$, saving more than 43.75% of
the standalone expected draws.

Each parameter pair has exactly 312 internal control states and 624 binary
transitions. Including its four output labels, every target fits nine bits;
a packed transition table uses 5,616 bits, or 702 bytes, per parameter pair.
The implementation generates one table at a time rather than storing all 144.

This is a finite exact sampling construction and an expected-bit optimum,
not a physical inverse, worst-case latency bound, reversible cleanup protocol,
supplier or new κ. It deliberately changes the **standalone-call** hypothesis
of [PR #6068](https://github.com/CrocSwap/integer-mult-bounds/pull/6068).
The underlying dyadic decision-graph method is classical; the contribution is
this small complete denominator-13 catalogue, exact means and resource ledger.

## Contract and source relevance

The denominator-13 inverse in
[PR #5069](https://github.com/CrocSwap/integer-mult-bounds/pull/5069) motivates
rounding probabilities with this denominator. Both probabilities must be known
**before** this sampler consumes any bits. Their intended decisions are
independent. A second probability that depends on the first rounded result
cannot be substituted into this batch without a new contract.

No actual native caller is asserted to provide the required residue pair or
batching window. The retained deterministic inverse is not alleged defective.
The stochastic prefix of
[Nick Petalas](https://github.com/petalas)'s
[PR #6026](https://github.com/CrocSwap/integer-mult-bounds/pull/6026) supplies a
related arithmetic context, but its adaptive updates are not automatically
batchable, and its native/caller error analysis is not extended here.

## Exact joint decision graph

In output order 00, 01, 10, 11, set the integer weights

$$
(w_0,w_1,w_2,w_3)
=((13-a)(13-b),(13-a)b,a(13-b),ab).
$$

Their sum is 169. Dividing by 169 gives exactly the product law, hence the
required independent marginals. Write the binary digits of each probability
as $d_{i,k}$ at depth $k\geq1$. Define

$$
n_k=2^k-\sum_{i=0}^3\lfloor2^k w_i/169\rfloor.
$$

This is the number of unfinished binary prefixes after depth $k$. At the root,
$n_0=1$. At the next depth, double every unfinished node, label the first
$d_{i,k}$ available children with output $i$, and retain the rest as unfinished.
Each digit is zero or one, and

$$
n_k=2n_{k-1}-\sum_i d_{i,k}.
$$

Thus this rule never overfills a level. An executable version stores the
unfinished-node index $j$: after drawing one bit $u$, set $j\leftarrow2j+u$,
then subtract the four probability digits in output order. The first subtraction
making $j$ negative returns that output; otherwise the remaining $j$ is the
next unfinished-node index. All four digits come from exact residue doubling
modulo 169.

By induction, the completed output-$i$ prefixes at depth $k$ number exactly
$\lfloor2^k w_i/169\rfloor$. Since $1\leq n_k\leq3$, unfinished probability
is at most $3/2^k$, tending to zero. The resulting output law is therefore
exactly $w_i/169$, not an approximation from finite samples.

## Finite periodic controller and exact expected cost

The order of two modulo 169 is 156; replay checks this with exact integer
powers. Every weight is coprime to 13, so its residue sequence is periodic
with that period. The digits and unfinished-node counts repeat. There are
exactly 312 internal phase/node pairs for every one of the 144 residue pairs;
this finite count is checked exhaustively. Two transitions per state give the
624-entry table. No growing arithmetic precision is needed to represent the
sampler's logical control state, although its random tape and stopping length
have no finite worst-case bound.

The exact expected draw count is

$$
E[T]=\frac{\sum_{k=0}^{155} n_k2^{-k}}{1-2^{-156}}.
$$

For $(a,b)=(1,1)$ this is

$$
E[T]=\frac{9960277917013927549978}{4649714690825496825793}<\frac94.
$$

The exact finite catalogue certifies $2<E[T]<7/2$ for all 144 nonzero residue
pairs. These numerical bounds and state counts are finite certificates; the
construction, law and expected-cost formula have the preceding written proof.
No floating-point logarithms or Monte Carlo estimates are used.

## Optimality and the changed standalone hypothesis

For any exact fair-bit decision tree with these four output probabilities,
completed output-$i$ mass after $k$ bits is an integer multiple of $2^{-k}$
and cannot exceed $w_i/169$. Its completed prefix count is therefore at most
$\lfloor2^k w_i/169\rfloor$. Its unfinished probability is at least $n_k/2^k$.
Summing these tail bounds proves that its expected draw count is at least the
displayed formula. This sampler saturates every depth bound, so it is optimal
for the stated fixed joint law, with no free initial random state.

A standalone non-dyadic Bernoulli sampler must leave at least one fair prefix
unfinished at every depth, giving expectation at least two. Separate calls
without a shared entropy reservoir therefore require at least four draws in
expectation. The joint four-outcome tree changes that boundary; it preserves
independence of the **decisions**, without requiring separately executed
sampling trees. Reusing a single sampled flag for both decisions would have
the right marginals but the wrong joint law and is rejected by a control.

The sampler still has a positive unfinished probability at every finite depth.
It chooses the unbounded-stopping option in #6068's tradeoff, not an escape
from that worst-case theorem. A finite control table is not a finite draw cap.

## Costs and unproved physical obligations

The logical sampler performs one table transition per consumed fair bit, then
returns one two-bit outcome. Per-configuration packed table storage is 702
bytes and control needs nine bits including output labels. Selecting or building
the table from actual data residues, table access, random-bit movement, output
storage, stopping-record retention and reversible cleanup are additional costs.
The returned decisions are correlated with the consumed tape, so that tape is
not automatically a fresh reusable random resource.

No source-bound physical batching window, all-column primitive, deterministic
tariff, compiler or outer error budget is supplied. The expected bit reduction
must not be read as a runtime speedup or an admitted exponent improvement.

## Evidence and reproduction

```
python3.12 -B scripts/research_package.py --package research/paired-residue-sampler
python3.12 -B scripts/check_research_commit.py --package research/paired-residue-sampler
```

The standard-library verifier constructs every table, checks the complete
outcome-prefix counts for two full 156-step periods, independently enumerates
36,864 literal eight-bit tapes, certifies the exact expected counts and resource
bounds, and rejects corrupted output labels and false independence/latency
claims. Normal and optimized modes write no package files. Universal probability
and optimality come from the written depth-count argument, not the literal tapes.

Canonical main was refreshed on 2026-10-28 UTC at
721c03822c421b7f7fcbb2598993b947c4d88419, priority 8. The navigation-only repair
from [PR #6050](https://github.com/CrocSwap/integer-mult-bounds/pull/6050) is
included. The optional full-history check is unavailable in this shallow checkout;
source pins use its reachable base. No selected/native cold replay, independent
human review or formal-kernel acceptance is claimed. Frozen sources stay unchanged.

## Significance for researchers

The standalone two-draw lower bound is not a per-scalar amortized limit. A small
joint interface can reduce expected randomness while preserving the exact
independent rounding law. This supplies a concrete batching target and exposes
the next obligation: an actual nonadaptive residue pair and a full hosting and
cleanup bill, rather than free entropy or a claimed bounded-time sampler.

## Open next questions

Does one actual inverse-service stage expose two residue probabilities before
either output is consumed? First bind that data-dependence and timing boundary,
then price table selection, access and random-tape cleanup. No such caller is
instantiated here.

Can the table be shared or parameterized across residue pairs with less total
physical control cost? Start with two configurations and an explicit dispatcher
that preserves the joint law. A lower expected bit count alone does not fund it.

## Credit

Prepared by [zxv](https://github.com/zxv) with substantial OpenAI Codex assistance.
The dyadic distribution-generation tree and depth-count optimality argument are
classical and not claimed as new. [JoyboyBrian](https://github.com/JoyboyBrian)'s
#5069/#5037 lineage supplies the inverse context;
[Nick Petalas](https://github.com/petalas)'s #6026 supplies the stochastic-prefix
context. Their sources and attribution remain unchanged. Apache-2.0.
30 changes: 30 additions & 0 deletions research/paired-residue-sampler/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"schema_version": 1,
"base_commit": "3a219d0ae1f2c984d4176a08132a1abbcb5a882f",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "d59b5035e7b4cbaa9d688a1d32dd0d6eb79c466a",
"sha256": "9b8d0eea95b3bf0dfcb7938a732a6439b87a2685dec2a5ab9e525b3b34debbfa"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec",
"sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81"
},
{
"path": "research/p104-stochastic-prefix/PROOF.md",
"usage": "input",
"git_blob": "0db45191676cb037fca76e7a781e02670fcc4078",
"sha256": "db1640be6eade5955320c106ef4d0666742c195560402d0067fa0ee3648bbeca"
},
{
"path": "research/physical-inverse-pair/README.md",
"usage": "input",
"git_blob": "a4ed4756eaa2e2e1fe3d91f2d8c7f1d682d8185b",
"sha256": "32505039ae7289b6358de5ec9d83a8bb63b76140209b521c7e8c82e8e0000783"
}
]
}
89 changes: 89 additions & 0 deletions research/paired-residue-sampler/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"schema_version": 1,
"task_id": "uniform-transfer-audit",
"priority_revision": 8,
"base_commit": "3a219d0ae1f2c984d4176a08132a1abbcb5a882f",
"original_card": {
"id": "uniform-transfer-audit",
"question": "Can one of the selected record's five inherited assumptions be proved at its actual caller?",
"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"
],
"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": "Identify the proposition and what would change downstream; do not equate a finite replay with a universal proof.",
"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": "Choose one assumption ID (native_all_columns, owned_erasure, compiler, precision_tape, analytic_recovery), one quantified implication and exact dependency closure. Check current handoffs, including #5625 row reentry and #5707 root-prefix lowering, without treating their partial scope as the whole theorem. Prove or falsify that implication with a caller-bound argument; stop at the chosen obligation. Finite tests or root digits do not discharge an all-size statement.",
"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": [
"native_all_columns",
"owned_erasure",
"compiler",
"precision_tape",
"analytic_recovery"
],
"existing_checks": [
{
"scope": "PR #4100: proposed unconditional construction and finite checks, without independent acceptance.",
"evidence": "research/unconditional-batched-crt/README.md",
"remaining": "Independent proof audit of one caller-bound all-size implication; all other premises remain explicit.",
"status": "author-checked",
"source_commit": "337d04939571a637aeab54a0f58f54fde811663a",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"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": "Exact optimal joint samplers for all 144 nonzero denominator-13 residue pairs, with finite 312-state controllers and lower expected fair-bit counts.",
"scope_change_reason": "Broader lateral search changes the standalone randomness boundary to a nonadaptive two-output batch. It supplies no physical inverse integration.",
"bottleneck_link": "Constructively escapes treating the standalone two-draw lower bound as a per-scalar amortized tariff, while retaining the unbounded worst-case stopping obligation.",
"budget_minutes": 10,
"stop_rule": "Finish the finite catalogue and exact expected-bit proof; no larger batch or physical sampler campaign.",
"outcome": "completed",
"evidence": "README.md exact DDG/law/optimality proof; verify.py all tables, periodic count certificates and literal tapes.",
"author": "zxv (https://github.com/zxv), with substantial OpenAI Codex assistance",
"ai_assistance": "Substantial OpenAI Codex assistance.",
"open_questions": [
{
"question": "Can an actual inverse service expose a nonadaptive residue pair economically?",
"why_it_matters": "Needed to realize the bit saving in a caller.",
"first_step": "Bind the two probabilities and timing, then price table access and cleanup.",
"blocked_by": "No source-bound batching window or physical host."
},
{
"question": "Can residue tables share a costed dispatcher?",
"why_it_matters": "May reduce control cost without changing the law.",
"first_step": "Implement two configurations and check exact output-prefix counts.",
"blocked_by": "Only per-configuration logical tables are supplied."
}
]
}
33 changes: 33 additions & 0 deletions research/paired-residue-sampler/VERIFY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"schema_version": 1,
"status": "ready",
"python": "3.12",
"requirements": [],
"inputs": [
"research/p104-stochastic-prefix/PROOF.md",
"research/physical-inverse-pair/README.md"
],
"commands": [
{
"argv": [
"{python}",
"-I",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 120,
"checks": "All 144 joint laws and 312-state tables, complete prefix counts over two periods, exact expected-bit bounds, literal tapes and rejection controls."
},
{
"argv": [
"{python}",
"-I",
"-O",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 120,
"checks": "Same exact checks with assertions disabled."
}
]
}
Loading
Loading