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
102 changes: 102 additions & 0 deletions research/stock-margin-tieout-independent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Independent replay of the PR #2972 stopped-range margin table (no new kappa)

An independently implemented check of the fourteen-stage bootstrap receipt's
cutoff-pair arithmetic published in [PR #2972](https://github.com/CrocSwap/integer-mult-bounds/pull/2972)
(`research/stock-margin-chain`). The replay uses a separate integer-arithmetic
path — its own exact-rational parser and floor division, no `fractions` module
and no import of the audited package's code — and recomputes all 24 published
integers (12 margins `floor(s*L_j - L_{j-1})` and 12 routing rooms
`floor((1-s)*L_{j-1})`) for both recorded branches from the frozen receipt
`research/selected-bootstrap-stock-audit/RESULT.json`, SHA-256-pinned to
`f0bd4f2270826de7b935323e9b4d2e034f69b46205be9535488c4429e95f7917`
(the same bytes #2972 audits).

```sh
python3 -B research/stock-margin-tieout-independent/verify.py
```

Expected (one line):

```text
PASS_STOCK_MARGIN_TIEOUT published_pairs_checked=24 published_controls=2 min_margin_native=2851485324488315 margin_ordering=strictly_increasing_both_branches room_ordering=strictly_increasing_both_branches conservative_dominates_native=all_12_values common_saving_tieout=exact_both_branches floor_split_residual_ones=7/12 s_sensitivity=stable_at_1_unit_moves_at_1e10_units(stage6,7) headroom_minimum={bootstrap:6562783, conservative_bootstrap:6562783} guard=17 null_coefficient_stages=14/14 coefficient=unresolved
```

Python 3.10+. The only input is the pinned receipt. The replay of #2972's own
verifier (`python3 -B research/stock-margin-chain/verify.py`) passes on the
same bytes and reproduces the same table; this package does not reuse its code.

## What this adds beyond #2972

1. **Independence.** #2972 is an author-checked source archive (priority
revision 6). This package reproduces its entire published table through a
different implementation path, supplying the independent-arithmetic coverage
that the archive status did not claim.
2. **Structural facts not asserted by #2972** (all measured on the pinned
receipt): margins and routing rooms strictly increase across stages
`j = 2..7` in both branches; the conservative branch strictly exceeds the
native branch at all twelve values; the floor-split residual
`r_j = floor(s*(L_j - L_{j-1})) - (margin_j + room_j)` equals 1 at 7 of
12 stages (the universally valid range is `{0,1}`); the recorded
`stock_headroom_log2` is strictly increasing per stage with minimum
`6562783` in both branches, and the guard
`ceil(log2(8*8194)) = 17` (recomputed by integer search, not floats)
covers that minimum.
3. **A receipt tie-out.** `common_saving` equals `1 - gaps/stock` exactly
(as an unreduced rational) in both branches. #2972 reads only
`gaps/stock`; the earlier stock audit (#2931) enforces this only through
full regeneration from its producer sources. Here it is verified directly on
the frozen bytes, strengthening the binding between the receipt's headline
saving field and the gap that drives the margin chain.
4. **A sensitivity envelope.** Shifting the saving numerator by one
denominator unit (relative ~2.5e-47) leaves all twelve native margins
unchanged; a shift of 10^10 units moves exactly the stage-6 and stage-7
margins (+6,864 and +2,444,877,300). The published integers pin the
branch saving only to the floor granularity of the receipt, so the exact
rational, not the printed table, is the right object to bind.

Controls (all rejected as required): a stale-cutoff substitution (stage 7 :=
stage 6), a one-unit perturbation of one stage's stock gap (breaks the
uniformity requirement), a cross-branch saving swap, plus the two positive
published native integers reproduced independently of the table loop.

## What this does not establish

- It does not choose a stock coefficient: all fourteen
`actual_stock_coefficient` fields remain null (counted: 14/14), exactly as
#2972 states. No reserve recurrence or routing-width source sentence is
supplied.
- It is arithmetic on a recorded receipt, not a producer replay: the cutoffs
are not re-derived from the frozen PR1087 assembler, and the complex `m=73`
supplier is untouched.
- No kappa, supplier, tariff, certificate, frozen-input or selected-frontier
change. The selected conditional result remains kappa =
0.001672660197076918.

## Sources and reproduction

- Input: `research/selected-bootstrap-stock-audit/RESULT.json` (bytes as
above; this file is the audited revision retained on main).
- Audited predecessor: `research/stock-margin-chain/` (PR #2972, author
Kumagi @kumagi; its README table supplies the 24 cross-check integers).
- Replay command: the `python3 -B` line above; expect the single
`PASS_STOCK_MARGIN_TIEOUT` line. Interpreter used: CPython 3.12.
- Cross-evidence: the predecessor's own `verify.py` passes on the same bytes.

## Open next questions

- Which source sentence bounds the width of a stage-j routing call to the
previous stopped algorithm (the `c_R` bound #2972 names as missing)? Without
it the stock coefficient stays unresolved even though every cutoff pair lands
in the previous stopped range. First step: match the retained PR185/PR387
cover-row text against the smallest routing room 4777557234646 (native).
- Does the conservative-exceeds-native ordering at all twelve published values
have a structural explanation (larger branch saving at near-equal cutoffs),
and would it predict signs for a complex-supplier per-stage sequence if one
were ever recorded? The measured ordering here is finite evidence for the two
recorded BIT branches only.

## Credit

Predecessor attribution follows PR #2972 and the retained stock-audit lineage.
Produced by Nick Petalas with AI assistance. Independent human and formal
proof-kernel review are unclaimed.
24 changes: 24 additions & 0 deletions research/stock-margin-tieout-independent/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schema_version": 1,
"base_commit": "bb4bccbf42844d2801487450727c2f63e10d1d0f",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81",
"sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5",
"sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0"
},
{
"path": "research/selected-bootstrap-stock-audit/RESULT.json",
"usage": "input",
"git_blob": "2826e072d4644b61b55ffbf322447513ed66f45d",
"sha256": "f0bd4f2270826de7b935323e9b4d2e034f69b46205be9535488c4429e95f7917"
}
]
}
88 changes: 88 additions & 0 deletions research/stock-margin-tieout-independent/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"schema_version": 1,
"task_id": "selected-stock-envelope",
"priority_revision": 6,
"base_commit": "bb4bccbf42844d2801487450727c2f63e10d1d0f",
"original_card": {
"id": "selected-stock-envelope",
"question": "What explicit uniform stock envelope does the actual selected stopped producer supply at one bootstrap stage?",
"starting_points": [
"research/selected-bootstrap-stock-audit/README.md",
"research/bootstrap-cutoff-time-space-split/README.md",
"certificates/selected-result.json",
"docs/research/community-efficient1000-review.md",
"research/stock-margin-chain/README.md"
],
"methods": [
"Derive a source-bound reserve recurrence at the actual selected atom widths, separating parent stock from completed inner borrowing.",
"Find an exact missing implication or counterexample to a proposed selected-stage stock envelope."
],
"acceptance_gate": "Bind every coefficient and depth factor to the selected producer and state the width domain. Compare a proved envelope with the sufficient cutoff guard; a large numerical headroom or a historical m=120 coefficient is not a selected m=73 proof.",
"first_step": {
"command": [
"python3",
"-B",
"scripts/research_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Read #2972 stock-margin chain and the selected stock audit. The new source archive reports the remaining cutoff comparisons, but leaves every actual stock coefficient unresolved; it is not an independently validated reserve envelope.",
"scope": "Source-bound orientation only. Read the named package and review before relying on its local evidence; this command is not its replay or supplier admission."
},
"first_experiment": "Choose one actual selected producer/stage and derive its parent reserve and depth coefficient from source. Check whether newer handoffs already cover that exact obligation. Stop with the missing implementation lemma if it cannot be bounded; do not rerun #2972 cutoff/headroom arithmetic as a new contribution.",
"bottleneck_link": "This reduces a concrete inherited implementation obligation without confusing unchanged kappa arithmetic with a completed theorem.",
"allowed_variations": [
"One stage or one explicit reserve/depth implication.",
"An independently checked same-domain proof repair, retaining all remaining assumptions."
],
"scope_change_triggers": [
"Importing the historical 57604 or 252 allowance without a selected-producer binding.",
"Calling a conditional fit lemma a full outer-proof adoption.",
"Replacing an actual selected stock coefficient with cutoff comparisons or a conditional fit inequality."
],
"overlap_terms": [
"selected stock",
"stock envelope",
"bootstrap cutoff",
"1956",
"1965",
"1990",
"2972",
"stock-margin-chain",
"actual_stock_coefficient"
],
"existing_checks": [
{
"scope": "Retained stock audit identifies missing actual selected-stage coefficients; later cutoff-chain arithmetic does not supply them.",
"evidence": "docs/research/research-family-status.md#revision-6-handoffs-source-archives-awaiting-independent-validation",
"remaining": "Derive one actual reserve/depth coefficient from the selected producer.",
"status": "reviewed",
"source_commit": "836b19bfa309ceafbc8ee32a15e8c4b10dde7e11",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
}
]
},
"scope_status": "refined",
"actual_scope": "Independently replay the stopped-range margin table published in PR #2972 for both recorded bootstrap branches from the frozen receipt via a separate integer-arithmetic implementation, and add structural facts (stage ordering, cross-branch dominance, floor-split residual census, headroom minimum and guard, null-coefficient count), a common_saving/gaps-stock tie-out, and a measured sensitivity envelope of the published integers.",
"scope_change_reason": "The card asks for the actual stock coefficient; that remains unresolved and is not attempted. Priority revision 6 lists the author-checked #2972 archive as awaiting independent validation, so the useful near-term coverage is an independent arithmetic replay plus facts that strengthen the receipt binding, delivered as a scoped independent-verification contribution.",
"bottleneck_link": "The selected stock obligation's pending dependency (#2972) was author-checked only; independent reproduction of its table, plus the exact common_saving tie-out and the sensitivity envelope, tells the director which parts of the cutoff chain are now corroborated by two separate implementations and which stay open (the coefficient itself).",
"budget_minutes": 60,
"stop_rule": "Stop after the 24 published integers, the two positive controls, the structural facts, the tie-out, the sensitivity envelope, and the four mutation controls. Do not assign a stock coefficient, do not re-derive cutoffs from the frozen assembler, do not touch the complex supplier.",
"outcome": "partial",
"evidence": "python3 -B research/stock-margin-tieout-independent/verify.py prints PASS_STOCK_MARGIN_TIEOUT with published_pairs_checked=24, published_controls=2, min_margin_native=2851485324488315, strictly increasing margins and rooms in both branches, conservative dominance at all 12 values, exact common_saving == 1 - gaps/stock in both branches, floor-split residual equal to 1 at 7 of 12 stages, sensitivity stable at one denominator unit and moving exactly stages 6-7 (+6,864, +2,444,877,300) at 1e10 units, headroom minimum 6562783 both branches with integer-computed guard 17, and 14/14 null actual_stock_coefficient fields. The predecessor research/stock-margin-chain/verify.py passes on the same pinned bytes.",
"author": "Nick Petalas",
"ai_assistance": "Independent human and formal proof-kernel review are unclaimed.",
"open_questions": [
{
"question": "Which source sentence bounds the width of a stage-j routing call to the previous stopped algorithm (the c_R bound #2972 names as missing)?",
"why_it_matters": "Without it the stock coefficient stays unresolved even though every cutoff pair lands in the previous stopped range; the independent replay corroborates the arithmetic but cannot supply the binding.",
"first_step": "Match the retained PR185/PR387 cover-row text against the smallest routing room 4777557234646 (native).",
"blocked_by": "The recorded receipt contains the cutoff arithmetic, not that sentence."
},
{
"question": "Does the conservative-exceeds-native ordering at all twelve published values have a structural explanation (s_conservative > s_native at equal cutoffs), and does it persist for the complex supplier's envelope if one is ever recorded?",
"why_it_matters": "A measured ordering across 12 stages is finite evidence; a structural account would let the director predict the sign for unrecorded stages instead of waiting for receipts.",
"first_step": "Compare the two branch savings and cutoff sequences symbolically where they differ only in the second branch's atom gap.",
"blocked_by": "Only the two recorded BIT branches exist; the complex m=73 per-stage sequence is not recorded."
}
]
}
20 changes: 20 additions & 0 deletions research/stock-margin-tieout-independent/VERIFY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"schema_version": 1,
"status": "ready",
"python": "3.12",
"requirements": [],
"inputs": [
"research/selected-bootstrap-stock-audit/RESULT.json"
],
"commands": [
{
"argv": [
"{python}",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 60,
"checks": "Receipt SHA-256 binding; uniform stock gap per branch; all 24 published margin/room integers of PR #2972 reproduced by an independent integer-arithmetic path; two published native positive controls; strict stage ordering of margins and rooms in both branches; conservative-branch dominance at all 12 values; floor-split residual in {0,1} with census; integer-computed 8194 guard against the recorded headroom minimum; exact common_saving tie-out; stale-cutoff, gap-perturbation, cross-branch-saving and sensitivity controls; null stock-coefficient count."
}
]
}
7 changes: 7 additions & 0 deletions research/stock-margin-tieout-independent/decisions.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
timestamp phase decision reason evidence result
2026-10-19T17:55Z task-select pin revision-6 audit object #2972 (selected-stock-envelope family) picker drew p104/coverage-law cards but both exceed session budget or overlap live claims; #2972 is author-checked and awaits independent validation priority revision 6 tables; find_overlap showed stock-margin replay not yet delivered by peers selected
2026-10-19T18:02Z design separate integer-arithmetic replay, no fractions module, no author-code import independence is the missing coverage; reusing verify.py would be repetition receipt gaps/stock uniform in both branches planned
2026-10-19T18:05Z fact-check drop "headroom constant" claim; recorded headroom strictly increases, minimum 6562783 stage-1 sample misled; corrected after printing all 14 values stock_headroom_log2 sequences measured-corrected
2026-10-19T18:08Z fact-check drop "common_saving is new theorem" framing; it follows from #2931 regeneration; keep as direct-on-bytes tie-out audit verify.py enforces committed RESULT equality incl. common_saving grep of selected-bootstrap-stock-audit/verify.py line ~298 label-narrowed
2026-10-19T18:10Z controls replace guessed sensitivity control with measured envelope (1 unit stable; 1e10 moves exactly stages 6-7) first guesses failed both directions; measured drift from the receipt itself k=1 all-stable, k=1e10 {6:+6864,7:+2444877300} measured
2026-10-19T18:12Z prove PASS_STOCK_MARGIN_TIEOUT with 24/24 published pairs; predecessor verify.py passes same bytes two implementations agree on pinned receipt f0bd4f22... verifier stdout captured
Loading