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
84 changes: 84 additions & 0 deletions research/adaptive-witness-retune/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Sharper witnesses for #4483: p16 rank `2^1587000000`, native4453 `2^713000000`, p7 `2^2253000000`

**Claim type:** a compiler improvement with certified finite witnesses. **No new κ.** It uses zxv's
[#4483](https://github.com/CrocSwap/integer-mult-bounds/pull/4483) theorem unchanged: the adaptive-height
direct compiler with its shifted-logarithmic majorant. It keeps each profile's raw native invoice,
uniform saving and κ, and changes only the free geometry of the witness: `p`, `c`, the height base `M`,
`ℓ₀`, `s`, `λ` and the rational guards.

## Results

| profile | κ (unchanged) | #4483 H | **new H** | exponent ratio |
| --- | ---: | ---: | ---: | ---: |
| p16 (#4470) | 0.00302015 | 2,800,000,000 | **1,587,000,000** | **1.764×** |
| p7 | 0.00268647 | 3,040,000,000 | **2,253,000,000** | 1.349× |
| native4453 (#4453) | 0.00300120 | 1,300,000,000 | **713,000,000** | **1.823×** |
| native4453, matched uniform | 0.00300120 | 4,300,000,000 | **2,580,000,000** | 1.667× |

Here the sufficient uniform rank is `N = 2^H`. Against p16's pre-#4483 rank `2^558100005581`, the new
exponent is about 352× smaller.

The witnesses are `WITNESS-p16.json`, `WITNESS-p7.json`, `WITNESS-native4453.json` and
`WITNESS-native4453-matched-uniform.json`:

| | t₀ | p | c | M | ℓ₀ | s | λ | t_hi | U | V | Q | d | β | η_min |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| p16 | .99697984 | 3/5 | 400 | 768 | 140 | 3/100 | 3/25 | .9974293 | .9848 | .9609 | 1.0017 | 1.04 | .5632 | .982 |
| p7 | .99731352 | 1/10 | 40 | 288 | 44 | 3/25 | 2/5 | .9976537 | .9436 | .7921 | 1.0012 | 1.72 | .321 | .9845 |
| native4453 (both) | 29909963/30000000 | 2/5 | 200 | 768 | 140 | 1/20 | 3/20 | .9973512 | .9817 | .9417 | 1.0013 | 1.02 | .5743 | .982 |

**Why H drops.** The final funding (17) pays `ln A0 = (1−t₀) ln n₀ − p ln(c + ln n₀)` against
`(z − t₀) H ln 2`. A much smaller ordinary base `n₀ = m·M^{ℓ₀}` shrinks `A0`. Here `n₀` is `145·768^{140}`
instead of `145·1024^{650}` for p16, and `121·288^{44}` instead of `121·256^{100}` for p7. Larger `p`
and `c`, a smaller `s` and a larger `λ` keep the recurrence inequality (20) satisfied at that smaller `ℓ₀`.

## Certification (`verify.py`, two registered commands, about 6 minutes each)

For each witness, separately written code re-certifies every finite gate of #4483's PROOF.md with its own
certified interval arithmetic (from my #4529):

- the guards (18);
- the mirror guard (4) on every window and each of 20 t-slices;
- the recurrence inequality (20);
- the final funding (17).

| | D (lower) | required | worst mirror ratio | τ(n₀) ≤ t_hi | final margin |
| --- | ---: | ---: | ---: | --- | ---: |
| p16 | 0.05144604 | 0.04297994 | 0.56312 | 0.9974292421 ≤ .9974293 | 0.00297292 |
| p7 | 0.02373829 | 0.02336096 | 0.32098 | 0.9976536953 ≤ .9976537 | 0.00011386 |
| native4453 | 0.04714719 | 20/453 ≈ 0.04415 | 0.57424 | 0.9973511396 ≤ .9973512 | 0.00134278 |
| native4453, matched | 0.04714719 | 20/453 | 0.57424 | same | 0.00116679 |

At `H − 10⁶` each witness fails only the final funding, so each H is least at million granularity. Each
witness is also accepted by **#4483's own `compiler.certify`** on main.

## Not covered

- #4483's theorem itself, and its native and outer premises. The consumer points are unchanged because the
uniform saving is unchanged.
- Global optimality of the geometry. These are scan results, not optima.

## Reproduce

```sh
python3.12 -B scripts/research_package.py --package research/adaptive-witness-retune --check-only
python3.12 -B scripts/research_package.py --package research/adaptive-witness-retune
python3.12 -B research/rank-convergence/compiler.py <profile.json> research/adaptive-witness-retune/WITNESS-p16.json
```

## Open next questions

1. **How far can `H` fall?**
- *Why it matters:* the exponent of the explicit rank for κ = 0.00302015.
- *First step:* include `a, b > 1` and non-power-of-two `M`, and optimize `ℓ₀` jointly with the guards.
The binding constraint is (20) at small `ℓ₀`.
2. **Allowing layer splits `a, b > 1` gives only about 3% more for p16 in a float scan.** The gain comes
from `n₀`, not from the layer split.

## Credit

- The theorem, the compiler and the baseline witnesses are zxv's (#4483).
- The profiles come from #4470 / #4479 (p16) and the p7 lineage.

Prepared by Ryanson Jonathan with substantial Claude Code (Claude Opus 5.5) assistance.
Apache-2.0.
48 changes: 48 additions & 0 deletions research/adaptive-witness-retune/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"schema_version": 1,
"base_commit": "f9f85c1e4fa1e955ff39f10fca447e3e2a4e4adc",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "ed33caef5c5827693e9572d252a66f99cbb73d40",
"sha256": "5732707cc1e460b090b53f2463162749ad860de878a18f7408938671d295a9d9"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "64bfc5af6709ed9811171e0a2108f05e1219cb65",
"sha256": "352a6184713b8843d96fd2c2071eb7aeaa655906b7c51d45ad444912666c8a96"
},
{
"path": "research/compact-joint-compiler/arithmetic/RESULT.json",
"usage": "input",
"git_blob": "514d12ce4d2d824a4e0a418022bba610c8aed8ff",
"sha256": "a6caaa2a6d6460a8c1ef7e48c4853bb27976be33a52b96a4216dfa90d96c9091"
},
{
"path": "research/higher-moment-strictification/RESULT.json",
"usage": "input",
"git_blob": "e66b39c674028adfd22f0de3170555dccda52f6a",
"sha256": "ad79e3c0459e7b495a0ca34010553b12147779a007389e1695cc1336f123c156"
},
{
"path": "research/rank-convergence/BENCHMARKS.json",
"usage": "input",
"git_blob": "bc58c96abda014c28de91eca3ff10a7d4ec30b32",
"sha256": "513efe2fe74af82891c1918e462ba8338b1bbd06403cbfcec284bcf3b4f8f850"
},
{
"path": "research/rank-convergence/compiler.py",
"usage": "input",
"git_blob": "2a3bfcb3b3700a3e7b4f339084ba5a5a1a1996da",
"sha256": "71e8fc45ee3a22f8197fdb023c538f1f55730e389c982b8cab3586ddc8217b5f"
},
{
"path": "research/rank-convergence/intervals.py",
"usage": "input",
"git_blob": "f3d990ab639ee49424226c202c92b9e1f390dcff",
"sha256": "91d079f43a082c3c23b76b8eb482066d0aeffe73de9fde0137ee033cf3b32250"
}
]
}
100 changes: 100 additions & 0 deletions research/adaptive-witness-retune/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"schema_version": 1,
"task_id": "independent-moment",
"priority_revision": 7,
"base_commit": "f9f85c1e4fa1e955ff39f10fca447e3e2a4e4adc",
"original_card": {
"id": "independent-moment",
"question": "Does a new paid-profile or mixture-ceiling claim have independent source-bound coverage of its actual changed ledger?",
"starting_points": [
"docs/research/research-family-status.md",
"certificates/selected-result.json",
"research/staged544-mixed-fourth-entry/README.md",
"research/staged-fourth-mixture-ceiling/README.md",
"research/r437-two-window-carrier/README.md"
],
"methods": [
"Independently reconstruct one changed paid ledger or pooled dual with exact source and model binding.",
"Check a genuinely uncovered moment implication with a different enclosure method and semantic controls."
],
"acceptance_gate": "Demonstrate independence, source binding, positive cases and semantic failure controls. Name the existing checks and the missing coverage. More digits or another equivalent evaluation of an unchanged root is not by itself new verification coverage.",
"first_step": {
"command": [
"python3",
"-B",
"scripts/research_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Choose one uncovered implication in #4088 literal mixed fill, #4091 pooled dual/model binding or #4067 changed frame/host bill. #4091 pins an earlier #4088 head: validate word, capacity and stock equivalence before applying that ceiling to the later fill.",
"scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately."
},
"first_experiment": "Independently reconstruct one changed ledger or pooled certificate with a positive case and a semantic failure control. Compare exact sources and name what existing checks miss. Keep this separate from supplier-boundary-audit (ordinary/outer dispatch) and uniform-transfer-audit (all-size proof). Stop after the chosen implication; more digits of an unchanged root are not additional mechanism coverage.",
"bottleneck_link": "Independent pricing prevents unsupported frontier claims and can reveal genuine accounting slack.",
"allowed_variations": [
"Reconstruct either a source ledger or a numeric enclosure with a different method."
],
"scope_change_triggers": [
"Importing the primary function and calling its output independent verification.",
"Calling an aggregate histogram or source archive an independently accepted physical supplier."
],
"overlap_terms": [
"independent moment",
"rank histogram",
"exact enclosure",
"2979",
"rank7 joint endframes",
"paired extraction",
"joint lowering",
"4088",
"4091",
"4067",
"staged544-mixed-fourth-entry",
"staged-fourth-mixture-ceiling",
"r437-two-window-carrier"
],
"existing_checks": [
{
"scope": "PR #4088: mixed local/owner/phase ledger and moment reported.",
"evidence": "research/staged544-mixed-fourth-entry/README.md",
"remaining": "Independent binding of changed construction to paid histogram, distinct from full admission.",
"status": "author-checked",
"source_commit": "72d7efc181edb21806a878f174847c96dd410ab0",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"scope": "PR #4091: sharp pooled ceiling proposed for fixed THREE/FOUR words and inventory.",
"evidence": "research/staged-fourth-mixture-ceiling/README.md",
"remaining": "Validate dual, exhaustive pattern scope and exact source equivalence before applying to newer fills.",
"status": "author-checked",
"source_commit": "a29bdd8f56cd18b805917775cdec09ff935eddc4",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"scope": "PR #4067: paid (2,2) to (1,3) exchange and fixed OQ4 host reported.",
"evidence": "research/r437-two-window-carrier/README.md",
"remaining": "Independent full cost delta; remaining caller/precision/stock obligations are separate.",
"status": "author-checked",
"source_commit": "a95f11c52e3ca1e4c5171b3c20d8f4b0815aee2e",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
}
]
},
"scope_status": "refined",
"actual_scope": "Sharper certified witnesses for #4483's adaptive-height compiler (p16, p7, native4453 x2) at unchanged uniform saving and kappa.",
"scope_change_reason": "Follow-up to my certified check of #4483 (#4529).",
"bottleneck_link": "Smaller explicit sufficient rank for the kappa 0.00302015 construction under review.",
"budget_minutes": 60,
"stop_rule": "Stop at certified witnesses from a parameter scan.",
"outcome": "completed",
"evidence": "p16 H 2.8e9 -> 1.587e9 (1.764x); native4453 1.3e9 -> 7.13e8 (1.823x); native4453 matched 4.3e9 -> 2.58e9 (1.667x); p7 3.04e9 -> 2.253e9 (1.349x); certified by own interval checker and by #4483's compiler.certify; H-1e6 fails.",
"author": "Ryanson Jonathan, with Claude Code (Claude Opus 5.5) assistance",
"ai_assistance": "Substantial Claude Code (Claude Opus 5.5) assistance; no independent human review.",
"open_questions": [
{
"question": "How far can H fall?",
"why_it_matters": "Explicit rank exponent for kappa 0.00302015.",
"first_step": "Allow a,b>1 and other M; optimize ell0 with guards.",
"blocked_by": "None."
}
]
}
37 changes: 37 additions & 0 deletions research/adaptive-witness-retune/VERIFY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"schema_version": 1,
"status": "ready",
"python": "3.12",
"requirements": [],
"inputs": [
"research/compact-joint-compiler/arithmetic/RESULT.json",
"research/higher-moment-strictification/RESULT.json",
"research/rank-convergence/BENCHMARKS.json",
"research/rank-convergence/compiler.py",
"research/rank-convergence/intervals.py"
],
"commands": [
{
"argv": [
"{python}",
"-B",
"{package}/verify.py",
"p16",
"p7"
],
"timeout_seconds": 600,
"checks": "Retuned #4483 witnesses at unchanged uniform saving and kappa (p16 1,587,000,000; p7 2,253,000,000; native4453 713,000,000; native4453 matched 2,580,000,000): certified guards (18), mirror (4), recurrence (20), funding (17); H-1e6 fails; #4483 compiler.certify accepts."
},
{
"argv": [
"{python}",
"-B",
"{package}/verify.py",
"native4453",
"native4453-matched-uniform"
],
"timeout_seconds": 600,
"checks": "Retuned #4483 witnesses at unchanged uniform saving and kappa (p16 1,587,000,000; p7 2,253,000,000; native4453 713,000,000; native4453 matched 2,580,000,000): certified guards (18), mirror (4), recurrence (20), funding (17); H-1e6 fails; #4483 compiler.certify accepts."
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"a": 1,
"b": 1,
"lambda": "3/20",
"mirror_slices": 20,
"t0": "29909963/30000000",
"t_upper": ".9973512",
"p": "2/5",
"c": "200",
"s": "1/20",
"height_base": 768,
"ell0": 140,
"guards": {
"U": ".9817",
"V": ".9417",
"Q": "1.0013",
"d": "1.02",
"beta": ".5743",
"eta": ".982"
},
"uniform_saving": "105043/35000000",
"kappa": ".00300120",
"H": 2580000000
}
24 changes: 24 additions & 0 deletions research/adaptive-witness-retune/WITNESS-native4453.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"a": 1,
"b": 1,
"lambda": "3/20",
"mirror_slices": 20,
"t0": "29909963/30000000",
"t_upper": ".9973512",
"p": "2/5",
"c": "200",
"s": "1/20",
"height_base": 768,
"ell0": 140,
"guards": {
"U": ".9817",
"V": ".9417",
"Q": "1.0013",
"d": "1.02",
"beta": ".5743",
"eta": ".982"
},
"uniform_saving": "525213/175000000",
"kappa": ".00300120",
"H": 713000000
}
24 changes: 24 additions & 0 deletions research/adaptive-witness-retune/WITNESS-p16.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"a": 1,
"b": 1,
"lambda": "3/25",
"mirror_slices": 20,
"t0": ".99697984",
"t_upper": ".9974293",
"p": "3/5",
"c": "400",
"s": "3/100",
"height_base": 768,
"ell0": 140,
"guards": {
"U": ".9848",
"V": ".9609",
"Q": "1.0017",
"d": "1.04",
"beta": ".5632",
"eta": ".982"
},
"uniform_saving": "471898442219/156250001562500",
"kappa": ".00302015",
"H": 1587000000
}
24 changes: 24 additions & 0 deletions research/adaptive-witness-retune/WITNESS-p7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"a": 1,
"b": 1,
"lambda": "2/5",
"mirror_slices": 20,
"t0": ".99731352",
"t_upper": ".9976537",
"p": "1/10",
"c": "40",
"s": "3/25",
"height_base": 288,
"ell0": 44,
"guards": {
"U": ".9436",
"V": ".7921",
"Q": "1.0012",
"d": "1.72",
"beta": ".321",
"eta": ".9845"
},
"uniform_saving": "376107/140000000",
"kappa": ".00268647",
"H": 2253000000
}
Loading
Loading