Skip to content

Research: independent replay of the PR2972 stock margin table with tie-out and sensitivity facts (no new kappa) - #4094

Open
petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w3-1019q-stock-margin-tieout
Open

petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w3-1019q-stock-margin-tieout

Conversation

@petalas

@petalas petalas commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds research/stock-margin-tieout-independent/: an independently implemented replay of the stopped-range margin table published in PR #2972 (research/stock-margin-chain), plus structural facts that #2972 does not assert. 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 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}), native and conservative branches, stages 2–7) from the frozen receipt research/selected-bootstrap-stock-audit/RESULT.json, SHA-256-pinned to f0bd4f22… (the same bytes #2972 audits).

Arithmetic scope, stated up front: no kappa, supplier, tariff, certificate, frozen-input or selected-frontier change. The stock coefficient remains unresolved (counted: 14/14 null actual_stock_coefficient fields). This is a finite independent certificate of recorded arithmetic plus receipt tie-outs, not a producer replay or a multiplication theorem.

What is established (exact evidence)

python3 -B research/stock-margin-tieout-independent/verify.py prints one line:

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
  1. Independent reproduction of all 24 published integers and the two native positive controls (2851485324488315, 1015784602045963452130).
  2. Structural facts (measured, new relative to Audit: stock-margin chain closes for the remaining cutoff pairs (no new kappa) #2972): margins and rooms strictly increase across stages 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 (valid range {0,1}); recorded stock_headroom_log2 strictly increases per stage with minimum 6562783 in both branches; the guard ceil(log2(8*8194)) = 17, recomputed by integer search without floats, covers the minimum.
  3. Receipt tie-out: common_saving == 1 - gaps/stock exactly (unreduced rational) in both branches, verified directly on the frozen bytes. Audit: stock-margin chain closes for the remaining cutoff pairs (no new kappa) #2972 reads only gaps/stock; the earlier stock audit enforces this only via full regeneration from producer sources.
  4. Sensitivity envelope (measured): 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/stage-7 margins (+6,864 and +2,444,877,300). The published integers pin the branch saving to the floor granularity of the receipt — the exact rational, not the printed table, is the object to bind.
  5. Controls: stale-cutoff substitution (stage 7 := stage 6), one-unit stock-gap perturbation, and cross-branch saving swap are all rejected; the sensitivity envelope is asserted as the positive movement control.

Not established

Reproduction

From the repository root with CPython 3.12 (-B):

python3 -B research/stock-margin-tieout-independent/verify.py
python3 -B research/stock-margin-chain/verify.py            # predecessor cross-check, same bytes
python3 -B scripts/research_package.py --package research/stock-margin-tieout-independent
python3 -B scripts/check_research_commit.py --package research/stock-margin-tieout-independent --check-source-history

All four commands were run locally with CPython 3.12 before submission and pass; the registered VERIFY check runs in well under a second. scripts/research_baseline.py was not run locally: this submission was prepared in a cone-mode sparse checkout and the baseline script requires the selected record's package roots to be materialized; it checks the environment's selected-record bindings, not this package, whose own checks all ran. No mathematical obligation of this package is left unrun.

Related open work

Produced by Nick Petalas with AI assistance. Independent human and formal proof-kernel review are unclaimed. Predecessor attribution follows PR #2972 and the retained stock-audit lineage.

CI status

CI certifies the registered replay on this head: plan pass (1m59s) and replay (research/stock-margin-tieout-independent) pass (1m3s), Actions run 39300698715, head fd58efb. Interpreter in CI is the repository-configured 3.12. No failing jobs on this PR.

…-out and sensitivity facts

Separate integer-arithmetic implementation (no fractions module, no import of
the audited code) reproduces all 24 published margin/room integers for both
bootstrap branches from the pinned receipt, adds stage-ordering, cross-branch
dominance, floor-split residual, headroom/guard and null-coefficient facts, an
exact common_saving == 1 - gaps/stock tie-out on the frozen bytes, and a
measured sensitivity envelope (stable at one denominator unit, later-stage
margins move at 1e10 units). Stock coefficient stays unresolved; no kappa,
supplier or frontier change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant