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
39 changes: 39 additions & 0 deletions research/qq16-f17-scan-bill/CERTIFICATE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"schema_version": 1,
"status": "PASS_QQ16_F17_SCAN_BILL",
"producer": "F_0_then_B_1_2",
"consumer": "PR2707_zero_retention_decoder_in_F17",
"priced_term": "block_scale_scan",
"physical_bill": "F17 direct Boolean block-scale scan gate evaluations",
"parameters": {
"h": 73,
"lambda": 1,
"f": 64,
"e": 0,
"beta": 64
},
"Q0": 80,
"b": 79,
"k": 137,
"Qmax": 497,
"E": 15,
"W": 532,
"w": 529,
"p": 137,
"popcount_span": 392,
"popcount_sum": 1628,
"lines": 336,
"scan_per_line_nd": 4232,
"scan_per_line_const": 2415,
"scan_nd_coefficient": 1421952,
"scan_owner_coefficient": 811440,
"control_W": 456,
"control_w": 453,
"control_p": 122,
"control_scan_per_line_nd": 3624,
"control_scan_per_line_const": 1984,
"control_scan_nd_coefficient": 1217664,
"control_scan_owner_coefficient": 666624,
"selected_kappa": "0.001672660197076918",
"kappa_changed": false
}
15 changes: 15 additions & 0 deletions research/qq16-f17-scan-bill/MASTER-HANDOFF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Handoff

Pinned CrocSwap main: `6f100d4bb5083f8c35d96fd95a539811c62f245c`.
Selected kappa, unchanged: `0.001672660197076918`.

Did not switch cards. The scan term of #3374 was not evaluated at `W=532`
on that main. The pair-kernel and field-bit coefficients stay the submitted
#3374 values.

Claim: at `lambda=1`, `f=64`, `e=0`, `beta=64`, `W=532`, the F17 decoder's
common block-scale scans cost at most `1421952 N D + 811440 N` gate
evaluations. That is the scan subtotal of the direct Boolean arithmetic bill.

Stop. Scalar ADDs, wrappers, maps, addressing, movement and cleanup remain
unpaid. This is not a new kappa.
11 changes: 11 additions & 0 deletions research/qq16-f17-scan-bill/NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Notice

New derivation, checker, tests and prose in this directory are Apache-2.0,
following the repository license.

Predecessor files are not modified. Their authors and licenses remain as
recorded in those packages. In particular, the exact F0/B_1_2 entry contract
and the common block-scale scan keep their original attribution.

Prepared by Wentao Li with substantial AI assistance.
No independent human review is claimed.
76 changes: 76 additions & 0 deletions research/qq16-f17-scan-bill/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# One block-scale scan term at the exact F0/B_1_2 entry width

The selected conditional kappa remains **0.001672660197076918**. This note
does not change it.

## Why this term

Pinned main `6f100d4bb5083f8c35d96fd95a539811c62f245c` records Arham Tahir's
common block-scale scan in `research/qq16-block-scale-scan`. Its stated
invoice is evaluated at the published finite-format example `W=456`,
`w=453`, `p=122`. A search of that tree finds no evaluation at decoder
width `W=532`. The pair-kernel coefficient `26744256` and the named-field
bit coefficient `493696` are the submitted #3374 terms and are left
untouched. The incorporated scalar-ADD count `5408*N*D` does not depend on
`W`, so repeating it would reprint that receipt. The scan polynomial does
depend on the entry width, and it is the term priced here.

## Inherited width

The literal producer is exact **F0 followed by B_1_2**, and the consumer is
ywz65's PR2707 decoder, which reads X in F17 and Y in `F17 C_q^{-1}`. Nick
Petalas's entry contract, at `lambda=1`, `f=64`, `e=0`, `beta=64`, gives

```text
Q0 = 80, b = 79, k = 137, Qmax = 497, E = 15, W = 532.
```

The scan proof binds `p=k` and `w=W-3`. At this width that is `w=529` and
`p=137`, with `0 <= p < w`. The largest emitted exponent is `w-1-p=391`,
which lies in the scan proof's stated range `[0, w]`.

## The scan polynomial

The pinned formula, for `q` signed `w`-bit components and reserve `p`, is

```text
G_scan(w,q,p) = w*(4q+2) - 2p + S(w-p) + 3,
S(n) = sum_{0 <= i < n} popcount(i).
```

One owner-local line scans `q=2D` real components once. The `D` coefficient
is `8w` and the remaining term is `2w - 2p + S(w-p) + 3`. The same proof's
gate roles (absolute-value ripples, magnitude ORs, leading-bit hits,
constant-bit ORs, low ORs, and three flag gates) sum to this polynomial.
At `w=529` and `p=137`, `S(392)=1628`, so one scan costs

```text
4232 D + 2415
```

gates. The unchanged 336-line decoder, one scan per line per owner, costs

```text
1421952 N D + 811440 N
```

gate evaluations. The published control `w=453`, `p=122` still costs
`3624 D + 1984` per line and `1217664 N D + 666624 N` for 336 lines.

These counts are irreversible AND/XOR/OR/NOT evaluations in the scan
model. Wires, constants and fan-out stay free there. The count is an exact
invoice of that construction, with redundant gates retained.

## Which physical bill changes

The term that changes is the **common block-scale scan subtotal** of the
F17 zero-retention decoder's direct Boolean arithmetic bill. At the
published `W=456` example that subtotal is `1217664 N D + 666624 N`. At the
exact entry width `W=532` it is `1421952 N D + 811440 N`. Scalar ADDs,
wrappers, maps, addressing, movement and cleanup stay unpaid. The pair
kernel and the 464-field bit count stay the submitted #3374 coefficients.

## Stop

Stop after this one scan term and this one parameter tuple. A scan subtotal
is not a complete consumer, a recursive rank tariff, or a new kappa.
101 changes: 101 additions & 0 deletions research/qq16-f17-scan-bill/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# One F17 block-scale scan at the exact F0/B_1_2 entry width

**Same card, one unpaid term.** #3374 already binds the F17 runtime pair
kernel and the 464-field bit count at `lambda=1`, `f=64`, `e=0`, `beta=64`,
`W=532`. This package prices the common block-scale **scan** at those
parameters. Selected kappa remains `0.001672660197076918`.

The incorporated scan polynomial, with `w=W-3=529` and `p=k=137`, gives one
owner-local line

```text
4232 D + 2415
```

gates. Across the 336-line decoder, one scan per line per owner, the scan
subtotal is

```text
1421952 N D + 811440 N
```

gate evaluations. The published `W=456` control remains
`1217664 N D + 666624 N`. The physical bill that changes is that scan
subtotal of the F17 direct Boolean arithmetic invoice.

```sh
python3.12 -I -B research/qq16-f17-scan-bill/verify.py
```

Expected:

```text
PASS_QQ16_F17_SCAN_BILL W=532 scan=1421952*N*D+811440*N control=1217664*N*D+666624*N no_new_kappa
```

## What is bound

`W=532` is the published example in Nick Petalas's exact F0/B_1_2 entry
contract. Arham Tahir's block-scale scan states

```text
G_scan(w,q,p) = w*(4q+2) - 2p + S(w-p) + 3
```

and binds `p=k`, `w=W-3`, `q=2D`, and one scan per line per owner on the
336-line decoder. The proof is in [PROOF.md](PROOF.md). The receipt is
[CERTIFICATE.json](CERTIFICATE.json).

## What stays unpaid

Scalar ADDs, wrappers, maps, addressing, movement and cleanup remain
outside this scan count. The pair-kernel and named-field coefficients stay
the submitted #3374 values.

## Reproduce

Python 3.12, standard library only, from the repository root:

```sh
python3.12 -I -B research/qq16-f17-scan-bill/verify.py
python3.12 -I -O -B research/qq16-f17-scan-bill/verify.py
python3.12 -I -B research/qq16-f17-scan-bill/independent.py
python3.12 -I -B research/qq16-f17-scan-bill/test_package.py
python3.12 -B scripts/research_package.py --package research/qq16-f17-scan-bill
```

Default verification is read-only. `--write` creates a missing certificate
and refuses to overwrite one.

## Open next questions

1. **Scalar ADDs under a width-dependent model.** The incorporated finite
format already charges `5408*N*D` real ADD/subtracts, and that count does
not use `W`. It matters because a Boolean ADD circuit at `w=529` would be
a different unit from that real-operation count. The first step is to pin
one incorporated ADD circuit whose gate count is a stated function of the
component width. The blocker is that no such width-dependent ADD circuit
is the formula already attached to these 2,704 sites.

2. **Wrappers and maps at W=532.** The scan proof leaves exact signed
coordinate wrappers and the 464 full-cover maps as separate charges. The
first step is to instantiate one pinned wrapper or map tariff at `w=529`.
The blocker is that the scan invoice treats those permutations as unpaid
routing.

3. **Addressing, movement and cleanup.** The scan model gives wires and
fan-out for free and does not erase the exponent. The first step is to
bind one admitted caller layout and charge address travel plus exponent
cleanup in that layout. The blocker is that neither pinned word supplies
that physical lifetime.

## Credit

Arham Tahir supplied the block-scale scan polynomial and its `W=456`
evaluation. Nick Petalas supplied the exact F0/B_1_2 entry contract and the
finite-format width `w=W-3`. ywz65 supplied the PR2707 F17 decoder. The
#3374 pair-kernel and field-bit coefficients are used only as the terms this
package does not recompute. Predecessor files are unchanged.

Prepared by Wentao Li with substantial AI assistance.
No independent human review is claimed. New work is Apache-2.0.
24 changes: 24 additions & 0 deletions research/qq16-f17-scan-bill/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schema_version": 1,
"base_commit": "6f100d4bb5083f8c35d96fd95a539811c62f245c",
"files": [
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5",
"sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0"
},
{
"path": "research/qq16-block-scale-scan/README.md",
"usage": "input",
"git_blob": "8e57abbf0fa1649d1359a74c987e6017218b9c41",
"sha256": "86b082070985c89efc43448bd0a8d3426f74720ff0d901a48b81b205432f17ec"
},
{
"path": "research/qq16-producer-entry-contract/README.md",
"usage": "input",
"git_blob": "d3f66aac46ac8edbc6660715e586276909b0eac4",
"sha256": "83029c16c55be649e223bd583a14529d26a9c2e44afcf2766a3f70504b641ffe"
}
]
}
89 changes: 89 additions & 0 deletions research/qq16-f17-scan-bill/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"schema_version": 1,
"task_id": "joint-query-controller",
"base_commit": "6f100d4bb5083f8c35d96fd95a539811c62f245c",
"author": "Wentao Li",
"ai_assistance": "Substantial AI assistance for derivation, implementation, checking and writing.",
"scope_status": "refined",
"scope_change_reason": "The catalogue asks for one literal producer and an affordable physical consumer. The pair-kernel and named-field coefficients at the exact F0/B_1_2 entry width are already submitted, and the incorporated scalar-ADD count does not depend on that width. This package instantiates only the incorporated block-scale scan polynomial at W=532.",
"actual_scope": "At lambda=1, f=64, e=0, beta=64 and the inherited decoder width W=532, evaluate the incorporated common block-scale scan once per line per owner for the 336-line F17 decoder, and name that scan subtotal as the physical bill term that changes.",
"bottleneck_link": "The entry width and the scan gate polynomial are already proved, while the scan subtotal of the F17 Boolean bill was instantiated only at the W=456 example.",
"stop_rule": "Stop after the scan term at lambda=1, f=64, e=0, beta=64, h=73. Leave scalar ADDs, wrappers, maps, addressing, movement and cleanup unpaid, and do not recompute the pair-kernel or field-bit coefficients.",
"evidence": "Exact integer evaluation of the pinned G_scan polynomial at w=W-3 and p=k, checked against the published W=456 scan total, with source-text checks that one scan is charged per line per owner.",
"outcome": "partial",
"original_card": {
"id": "joint-query-controller",
"question": "Can a literal QQ16 producer meet the proposed completed-output error budgets with dirty helpers and an affordable physical consumer?",
"starting_points": [
"docs/research/research-family-status.md",
"research/joint-query/README.md",
"research/joint-query/evidence/QQ16-SELECTED-WITNESS.md",
"research/joint-query/evidence/JOINT-QUERY-TRANSFER.md",
"docs/research/community-efficient1000-review.md",
"research/qq16-producer-defect-transfer/README.md"
],
"methods": [
"Derive one literal producer's completed-output defects and intermediate dirty-helper bounds, with its physical bill.",
"Design or audit one consumer, retention or hosting boundary and its complete cost for the pinned producer/decoder."
],
"acceptance_gate": "Name the changed premise of the fixed F0/B1 observation obstruction. Show exactly which query is recovered, legal native reads and restoration, and a full favorable budget including cover maps, helpers and endpoints. Local inverse identities alone do not close the global controller. 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_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Read the revision-6 family record and #2965 producer-defect transfer after the local QQ16 decoder contract. Its author-checked output-error estimate does not implement producer interiors, bound dirty helpers, or pay for the consumer; independently check the implication used.",
"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": "Pin one literal F0/B1 producer and its native-child contracts; derive the actual intermediate magnitude ledger and completed-output defects, including dirty helpers and correlations. Compare with #2965 budgets and price storage, movement, cleanup and F17 consumption. Stop with a precise missing bound if no producer contract supplies it; do not optimize another decoder precision constant in isolation.",
"bottleneck_link": "The native local words exist; retained query information and its physical access are the missing link to a composed recursive interface.",
"allowed_variations": [
"One paid query, one changed first pair, or one precisely specified affine helper state.",
"A counterexample or lower bound for that exact proposed repair.",
"One unresolved obligation of a newer local decoder, with exact source heads and a distinct claim/domain."
],
"scope_change_triggers": [
"Retaining the fixed first pair and ordinary schedule while allowing only homogeneous selected-only control, already excluded by the witness.",
"Treating cover-map counts as zero-cost physical address operations.",
"Recreating the pending complete local decoder or early-record/output-bank coalescing already under investigation without a distinct audit or changed premise.",
"Treating a completed-output defect inequality as a producer-interior, dirty-range or physical-cost certificate."
],
"overlap_terms": [
"QQ16",
"joint-query",
"changing-chart controller",
"selected observation",
"1969",
"2540",
"early record",
"output-bank retention",
"complete native decoder",
"2965",
"producer defect",
"dirty-helper range",
"F17 consumer"
]
},
"open_questions": [
{
"question": "What Boolean gate count do the 2,704 scalar ADD sites have at component width w=529?",
"why_it_matters": "The incorporated real-operation count 5408*N*D does not use W, so it does not price those sites in the same gate model as the scan.",
"first_step": "Pin one incorporated ADD circuit whose gate count is a stated function of the component width and instantiate it at w=529.",
"blocked_by": "The finite-format ADD charge is a real-operation count, and no width-dependent ADD circuit is attached to these sites on the pinned main."
},
{
"question": "What do the exact signed wrappers and 464 full-cover maps cost at W=532?",
"why_it_matters": "The scan proof preserves the line maximum under exact wrappers and still leaves their routing unpaid.",
"first_step": "Instantiate one pinned wrapper or map tariff at w=529 and 464 maps.",
"blocked_by": "The scan invoice treats permutations as separate routing rather than gates inside G_scan."
},
{
"question": "What addressing, movement and exponent cleanup does one admitted caller pay for this scan?",
"why_it_matters": "The scan model leaves wires and fan-out free and does not erase the shared exponent.",
"first_step": "Bind one admitted caller layout and charge address travel plus exponent cleanup in that layout.",
"blocked_by": "Neither the entry contract nor the scan proof supplies that physical lifetime."
}
]
}
32 changes: 32 additions & 0 deletions research/qq16-f17-scan-bill/VERIFY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"schema_version": 1,
"status": "ready",
"python": "3.12",
"requirements": [],
"inputs": [
"research/qq16-producer-entry-contract/README.md",
"research/qq16-block-scale-scan/README.md"
],
"commands": [
{
"argv": ["{python}", "-Werror", "-I", "-B", "{package}/verify.py"],
"timeout_seconds": 60,
"checks": "Recompute the exact-entry F17 block-scale scan subtotal and the published W=456 control."
},
{
"argv": ["{python}", "-Werror", "-I", "-O", "-B", "{package}/verify.py"],
"timeout_seconds": 60,
"checks": "Repeat the primary check with assertions disabled."
},
{
"argv": ["{python}", "-Werror", "-I", "-B", "{package}/independent.py"],
"timeout_seconds": 60,
"checks": "Recompute the same scan integers from the pinned polynomial in a separate program."
},
{
"argv": ["{python}", "-Werror", "-I", "-B", "{package}/test_package.py"],
"timeout_seconds": 120,
"checks": "Reject certificate corruption, duplicate JSON keys and drifted source bytes, including under -O."
}
]
}
Loading