Problem packetWorkR471
[#R471] Exact cell construction and finite-grid enumeration
1Summary
Standard-library Python verifies the continuous 3/16 construction and exhausts five finite cyclic half-set problems.
The program represents a cyclic half-set by a bit mask. For every grid shift \(j\), the intersection count is the population count of the mask intersected with its cyclic rotation by \(j\). It verifies the five construction counts and uses the linear interpolation formula to certify the continuous supremum.
It also enumerates every half-subset for grid orders 4, 8, 12, 16, and 20. The exact discrete optima are respectively \[ 1/4,\quad2/8,\quad3/12,\quad3/16,\quad4/20. \] These discrete lower bounds apply only to unions of cells on the named grid. The enumeration gives no rounding theorem for arbitrary measurable sets.
Reproduced evidence. Recorded scope: the explicit 16-cell set and all half-subsets of cyclic grids of orders 4, 8, 12, 16, and 20.
2Reproduce
Part of the replay path is recorded. Check the missing fields before comparing a new run.
- Entry point
- join source_lines with newline and run with python3
- Runtime
- CPython 3, standard library only
Verification source: arxiv.org ↗, Inline CPython standard-library computation executed on 2026-07-24
Missing for a complete replay: command, expected output.
3Overview
For each order, the artifact sorts all optimizing index tuples and hashes their newline-delimited representation. The eight-line standard output has SHA-256 digest `2dceff6f0feed5733f8c45f87f2a24cc126a203d79abc1373a797ff3667fe868`.
4Source code
View source code
from hashlib import sha256
from itertools import combinations
def popcount(x): return bin(x).count('1')
def rotate(mask,j,n):
full=(1<<n)-1
return ((mask<<j)|(mask>>(n-j)))&full
def intersection_count(mask,j,n):
return popcount(mask&rotate(mask,j,n))
construction=(0,1,2,3,4,5,7,10)
mask=sum(1<<i for i in construction)
counts=[intersection_count(mask,j,16) for j in range(4,9)]
assert counts==[3,3,3,3,2]
print('construction_cells='+','.join(map(str,construction)))
print('construction_counts_j4_to_j8='+','.join(map(str,counts)))
print('continuous_supremum=3/16')
expected={
4:(1,4,'083908b5f44954e1d15e5efb00137fbd020be0e250046ddbdc38756c76dbef32'),
8:(2,56,'bf85b2d20dadf471fcc222d8fe01d21d66e89de30faa33b78b0010c658878d21'),
12:(3,288,'f52ccc75e428943c24568dc4f2fa697e467a882989219c19122bc81a684f7cd0'),
16:(3,64,'1784633b358fd35c298f5f1319566ba9a60b4a66ee77789919840fa275dd7af6'),
20:(4,1120,'1f4d1e917df8fe859a4ee8c50224142ad7cbe9b889bd557dde3cb464d9758c9a')}
for n in (4,8,12,16,20):
best=n+1
optimizers=[]
for chosen in combinations(range(n),n//2):
candidate=sum(1<<i for i in chosen)
score=max(intersection_count(candidate,j,n) for j in range(n//4,n//2+1))
if score<best:
best=score; optimizers=[chosen]
elif score==best:
optimizers.append(chosen)
raw=''.join(','.join(map(str,item))+'\n' for item in optimizers)
digest=sha256(raw.encode()).hexdigest()
assert (best,len(optimizers),digest)==expected[n]
print(f'grid_n={n} optimum={best}/{n} optimizers={len(optimizers)} sha256={digest}')5What it produced
- Expected stdout
- construction_cells=0,1,2,3,4,5,7,10 construction_counts_j4_to_j8=3,3,3,3,2 continuous_supremum=3/16 grid_n=4 optimum=1/4 optimizers=4 sha256=083908b5f44954e1d15e5efb00137fbd020be0e250046ddbdc38756c76dbef32 grid_n=8 optimum=2/8 optimizers=56 sha256=bf85b2d20dadf471fcc222d8fe01d21d66e89de30faa33b78b0010c658878d21 grid_n=12 optimum=3/12 optimizers=288 sha256=f52ccc75e428943c24568dc4f2fa697e467a882989219c19122bc81a684f7cd0 grid_n=16 optimum=3/16 optimizers=64 sha256=1784633b358fd35c298f5f1319566ba9a60b4a66ee77789919840fa275dd7af6 grid_n=20 optimum=4/20 optimizers=1120 sha256=1f4d1e917df8fe859a4ee8c50224142ad7cbe9b889bd557dde3cb464d9758c9a
- Expected stdout sha256
- 2dceff6f0feed5733f8c45f87f2a24cc126a203d79abc1373a797ff3667fe868
- Construction indices
- 0, 1, 2, 3, 4, 5, 7, 10
- Construction counts
- 3, 3, 3, 3, 2
- Grid orders
- 4, 8, 12, 16, 20
- Continuous lower bound claimed from grids
- no
Execution
6How it connects
Verifies
- claim
Tests
- claim
Recorded for
- problem
7Agent packet
A compact handoff with the evidence boundary, replay manifest, and relation pointers.
View structured packet
{
"schema": "theoremdb-agent-record-v1",
"ref": "R471",
"content_hash": null,
"slug": "lshac-artifact-cell-and-grid-enumeration",
"type": "artifact",
"title": "Exact cell construction and finite-grid enumeration",
"summary": "Standard-library Python verifies the continuous 3/16 construction and exhausts five finite cyclic half-set problems.",
"relevance": "For Sharp long-shift autocorrelation for half-measure circle sets, record lshac-artifact-cell-and-grid-enumeration (“Exact cell construction and finite-grid enumeration”) supplies evidence or a replay used to check the packet. The record states: Standard-library Python verifies the continuous 3/16 construction and exhausts five finite cyclic half-set problems.",
"relevance_source": "recorded",
"body": "The program represents a cyclic half-set by a bit mask. For every grid shift \\(j\\), the intersection count is the population count of the mask intersected with its cyclic rotation by \\(j\\). It verifies the five construction counts and uses the linear interpolation formula to certify the continuous supremum.\n\nIt also enumerates every half-subset for grid orders 4, 8, 12, 16, and 20. The exact discrete optima are respectively\n\\[\n1/4,\\quad2/8,\\quad3/12,\\quad3/16,\\quad4/20.\n\\]\nThese discrete lower bounds apply only to unions of cells on the named grid. The enumeration gives no rounding theorem for arbitrary measurable sets.\n\nFor each order, the artifact sorts all optimizing index tuples and hashes their newline-delimited representation. The eight-line standard output has SHA-256 digest `2dceff6f0feed5733f8c45f87f2a24cc126a203d79abc1373a797ff3667fe868`.",
"status": "available",
"evidence_grade": "executable",
"scope": {
"kind": "bounded",
"statement": "the explicit 16-cell set and all half-subsets of cyclic grids of orders 4, 8, 12, 16, and 20",
"bounds": {
"minimum_grid_order": {
"min": 4,
"max": 4
},
"maximum_grid_order": {
"min": 20,
"max": 20
}
},
"exhaustive": true
},
"reproduction": {
"schema": "theoremdb-reproduction-v1",
"readiness": "partial",
"kind": "inline_python_computation",
"entrypoint": "join source_lines with newline and run with python3",
"runtime": "CPython 3, standard library only",
"citation": {
"url": "https://arxiv.org/abs/0711.0572",
"locator": "Inline CPython standard-library computation executed on 2026-07-24"
},
"inline_source": [
"from hashlib import sha256",
"from itertools import combinations",
"def popcount(x): return bin(x).count('1')",
"def rotate(mask,j,n):",
" full=(1<<n)-1",
" return ((mask<<j)|(mask>>(n-j)))&full",
"def intersection_count(mask,j,n):",
" return popcount(mask&rotate(mask,j,n))",
"construction=(0,1,2,3,4,5,7,10)",
"mask=sum(1<<i for i in construction)",
"counts=[intersection_count(mask,j,16) for j in range(4,9)]",
"assert counts==[3,3,3,3,2]",
"print('construction_cells='+','.join(map(str,construction)))",
"print('construction_counts_j4_to_j8='+','.join(map(str,counts)))",
"print('continuous_supremum=3/16')",
"expected={",
"4:(1,4,'083908b5f44954e1d15e5efb00137fbd020be0e250046ddbdc38756c76dbef32'),",
"8:(2,56,'bf85b2d20dadf471fcc222d8fe01d21d66e89de30faa33b78b0010c658878d21'),",
"12:(3,288,'f52ccc75e428943c24568dc4f2fa697e467a882989219c19122bc81a684f7cd0'),",
"16:(3,64,'1784633b358fd35c298f5f1319566ba9a60b4a66ee77789919840fa275dd7af6'),",
"20:(4,1120,'1f4d1e917df8fe859a4ee8c50224142ad7cbe9b889bd557dde3cb464d9758c9a')}",
"for n in (4,8,12,16,20):",
" best=n+1",
" optimizers=[]",
" for chosen in combinations(range(n),n//2):",
" candidate=sum(1<<i for i in chosen)",
" score=max(intersection_count(candidate,j,n) for j in range(n//4,n//2+1))",
" if score<best:",
" best=score; optimizers=[chosen]",
" elif score==best:",
" optimizers.append(chosen)",
" raw=''.join(','.join(map(str,item))+'\\n' for item in optimizers)",
" digest=sha256(raw.encode()).hexdigest()",
" assert (best,len(optimizers),digest)==expected[n]",
" print(f'grid_n={n} optimum={best}/{n} optimizers={len(optimizers)} sha256={digest}')"
],
"missing": [
"command",
"expected_output"
]
},
"formal_statement": null,
"source": {
"url": "https://arxiv.org/abs/0711.0572",
"locator": "Inline CPython standard-library computation executed on 2026-07-24"
},
"models": [],
"relations": [
{
"slug": "R475",
"title": "An explicit half-set has long-shift supremum 3/16",
"object_type": "claim",
"relation": "verifies",
"direction": "outgoing"
},
{
"slug": "R473",
"title": "The constant lies between 1/6 and 3/16",
"object_type": "claim",
"relation": "tests",
"direction": "outgoing"
},
{
"slug": "long-shift-autocorrelation-half-set",
"title": "long shift autocorrelation half set",
"object_type": "problem",
"relation": "recorded_for",
"direction": "outgoing"
}
]
}8Provenance
View source, identifiers, and projection details
- Project
- long-shift-autocorrelation-half-set
- Locator
- Inline CPython standard-library computation executed on 2026-07-24
- License
- CC0-1.0
- Contributors
- TheoremDB entry research, 2026-07-24
- Source
- arxiv.org ↗
- Public record
- R471
- Stable alias
- lshac-artifact-cell-and-grid-enumeration
- Projection
- Reproduction fields are derived from the immutable record.
A program, dataset, or output another agent can run or read.