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
36 changes: 36 additions & 0 deletions research/kernel-grid-erasure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Erasure of one unweighted tensor kernel

## Question

On the family `p = 2^(10a)`, `m = 2^(4a)`, `X = 2^(3a)`, does toward-zero rounding of the unweighted tensor coefficient on the `P = 32768p` grid return zero while the weighted entry stays larger than one `p` unit?

## Result

For every integer `a` from 26 through 64, set `d = u = m`, `D = d - 1`, `w = 4X + 2` and `k = X/2048`. Then `m^5 = p^2`, `u d <= p`, `u` meets `ceil(log2(8p))`, `(w-2)^2 u = 16p`, and `d - 2 > 2w + k + 3`.

The unweighted exponent `D(3mk - 1)` is strictly larger than `P`. Its ratio to `p` is at least `3·2^a/4096 - 1/(2X^2)`, and that lower bound more than doubles at each larger `a`. The weighted exponent `16Dk(2w+k+3) + D + 1` is strictly below both `p/8` and

```
(8 + 1/2048 + 7/128)/128 + 1/128^2,
```

which is itself below `1/8`. There are 39 such scales. The selected κ is unchanged.

## Boundary

This checks the rational comparison on this family. It does not build the tensor or run the Gaussian core. The stop rule is to record this erasure.

## Reproduce

```bash
python3.12 -B research/kernel-grid-erasure/verify.py
python3.12 -B research/kernel-grid-erasure/test_verify.py
```

## Open next questions

None. The rational comparison settles this family. Building the tensor would leave this package.

## Credit

Chafik Boukhalfa recorded the kernel-grid failure in PR #489. The checker recomputes the exponents. Substantial assistance from the Cursor coding agent contributed to the execution, checker and writeup.
4 changes: 4 additions & 0 deletions research/kernel-grid-erasure/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"rows": 39,
"no_new_kappa": true
}
18 changes: 18 additions & 0 deletions research/kernel-grid-erasure/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"schema_version": 1,
"base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90",
"files": [
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5",
"sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0"
},
{
"path": "certificates/selected-result.json",
"usage": "input",
"git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81",
"sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
}
]
}
54 changes: 54 additions & 0 deletions research/kernel-grid-erasure/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"schema_version": 1,
"task_id": "uniform-transfer-audit",
"priority_revision": 6,
"base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90",
"original_card": {
"id": "uniform-transfer-audit",
"question": "Can one exact all-size/compiler, precision, hosting or restoration implication be proved or falsified?",
"starting_points": [
"certificates/selected-result.json",
"docs/audit.md"
],
"methods": [
"Prove one missing implication with explicit quantified hypotheses.",
"Find an exact counterexample at the claimed interface boundary."
],
"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_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Read the selected review scope and choose one exact all-size or precision implication.",
"scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay."
},
"first_experiment": "Write its quantified inputs and conclusion; find a missing hypothesis or construct a minimal exact adversarial instance.",
"bottleneck_link": "Finite supplier improvements are useful only under the retained transfer obligations.",
"allowed_variations": [
"Choose one tape, precision, hosting or restoration lemma."
],
"scope_change_triggers": [
"Replacing a quantified obligation with another finite smoke test."
],
"overlap_terms": [
"uniform transfer",
"all-size",
"precision"
]
},
"scope_status": "refined",
"actual_scope": "Show that the stated unweighted tensor-kernel coefficient rounds to zero on the P-grid while the weighted entry stays above one p unit.",
"scope_change_reason": "The online storage budget is a different question. This package checks the kernel-grid erasure. It does not build the tensor or run the Gaussian core.",
"bottleneck_link": "The unweighted coefficient is below one P unit and the weighted entry is above one p unit, and the selected kappa is unchanged.",
"budget_minutes": 60,
"stop_rule": "Record this erasure. Do not build the tensor or run the Gaussian core.",
"outcome": "partial",
"evidence": "For every integer a from 26 through 64, the family p=2^(10a), m=2^(4a), X=2^(3a) meets the scalar conditions, the zero exponent exceeds P, and the weighted exponent is below p/8.",
"author": "jwr",
"ai_assistance": "Substantial assistance from the Cursor coding agent in the execution, checker and writeup.",
"open_questions": [],
"no_open_questions_reason": "The rational comparison settles this family. Building the tensor would leave this package."
}
29 changes: 29 additions & 0 deletions research/kernel-grid-erasure/VERIFY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"schema_version": 1,
"status": "ready",
"python": "3.12",
"requirements": [],
"inputs": [
"certificates/selected-result.json"
],
"commands": [
{
"argv": [
"{python}",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 60,
"checks": "Compare the unweighted kernel exponent with the weighted entry."
},
{
"argv": [
"{python}",
"-B",
"{package}/test_verify.py"
],
"timeout_seconds": 30,
"checks": "Recompute the a=26 scale identity independently."
}
]
}
23 changes: 23 additions & 0 deletions research/kernel-grid-erasure/test_verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""Recompute the a=26 scale identity."""

from __future__ import annotations

import unittest
from fractions import Fraction


class ErasureTest(unittest.TestCase):
def test_scale_26(self) -> None:
scale = 26
precision = 1 << (10 * scale)
width = 1 << (4 * scale)
box = 1 << (3 * scale)
band = 4 * box + 2
self.assertEqual((band - 2) * (band - 2) * width, 16 * precision)
lower = Fraction(3 * (1 << scale), 4096) - Fraction(1, 2 * box * box)
self.assertGreater(lower, 32768)
self.assertEqual(width ** 5, precision ** 2)


if __name__ == "__main__":
unittest.main()
81 changes: 81 additions & 0 deletions research/kernel-grid-erasure/verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
"""Erasure of one unweighted tensor kernel on the P-grid.

For an integer a >= 26 the family p=2^(10a), m=2^(4a), X=2^(3a), d=u=m,
D=d-1, P=32768p, w=4X+2 and k=X/2048 meets the scalar band conditions.
The unweighted coefficient exponent exceeds P, so toward-zero rounding
on the P-grid is zero. The weighted exponent is strictly below p/8.
"""

from __future__ import annotations

import json
from fractions import Fraction
from pathlib import Path

ROOT = Path(__file__).resolve().parents[2]
PACKAGE = Path(__file__).resolve().parent
KAPPA = "836330098538459/500000000000000000"
FIRST = 26
LAST = 64


def load() -> dict:
selected = json.loads(
(ROOT / "certificates" / "selected-result.json").read_text(encoding="utf-8")
)
if selected["kappa"] != KAPPA:
raise SystemExit("FAIL_KERNEL_GRID_ERASURE selected kappa moved")
return json.loads((PACKAGE / "RESULT.json").read_text(encoding="utf-8"))


def family(scale: int) -> tuple[int, int, int, int, int, int, int]:
precision = 1 << (10 * scale)
width = 1 << (4 * scale)
box = 1 << (3 * scale)
spacing = width
degree = spacing - 1
places = 32768 * precision
band = 4 * box + 2
step = box // 2048
return precision, width, box, degree, places, band, step


def main() -> None:
pinned = load()
cap = Fraction(8 + Fraction(1, 2048) + Fraction(7, 128), 128) + Fraction(1, 128 * 128)
if cap >= Fraction(1, 8):
raise SystemExit("FAIL_KERNEL_GRID_ERASURE cap moved")
base_precision, base_width, base_box, _, _, _, _ = family(FIRST)
base_lower = Fraction(3 * (1 << FIRST), 4096) - Fraction(1, 2 * base_box * base_box)
if base_lower <= 32768 or base_width * base_width * base_width * base_width * base_width != base_precision * base_precision:
raise SystemExit("FAIL_KERNEL_GRID_ERASURE base comparison moved")
rows = 0
previous = base_lower
for scale in range(FIRST, LAST + 1):
precision, width, box, degree, places, band, step = family(scale)
if box % 2048 or width * width > precision:
raise SystemExit("FAIL_KERNEL_GRID_ERASURE scale moved")
if width < (8 * precision - 1).bit_length():
raise SystemExit("FAIL_KERNEL_GRID_ERASURE logarithm moved")
if (band - 2) * (band - 2) * width != 16 * precision:
raise SystemExit("FAIL_KERNEL_GRID_ERASURE band identity moved")
if width - 2 <= 2 * band + step + 3:
raise SystemExit("FAIL_KERNEL_GRID_ERASURE cell inequality moved")
zero_exponent = degree * (3 * width * step - 1)
weighted_exponent = 16 * degree * step * (2 * band + step + 3) + degree + 1
lower = Fraction(3 * (1 << scale), 4096) - Fraction(1, 2 * box * box)
if scale > FIRST and lower <= 2 * previous:
raise SystemExit("FAIL_KERNEL_GRID_ERASURE doubling moved")
previous = lower
if zero_exponent <= places or Fraction(zero_exponent, precision) < lower:
raise SystemExit("FAIL_KERNEL_GRID_ERASURE zero exponent moved")
if Fraction(weighted_exponent, precision) >= cap or 8 * weighted_exponent >= precision:
raise SystemExit("FAIL_KERNEL_GRID_ERASURE weighted exponent moved")
rows += 1
if pinned["rows"] != rows or pinned["no_new_kappa"] is not True:
raise SystemExit("FAIL_KERNEL_GRID_ERASURE pinned result moved")
print(f"PASS_KERNEL_GRID_ERASURE rows={rows} no_new_kappa")


if __name__ == "__main__":
main()