This notebook is a self-contained mathematical and computational companion to the Hardy–Littlewood maximal inequality section in the paper.
The task template, including the prompt given to the agents, is available here.
The outline is as follows:
- 1. Problem Definitions
- 2. S1. Sharp constants between the centered and uncentered operators.
- 3. Verification of the reported 356-atom construction
The required packages are:
NumPy
1. Problem Definitions
The one-dimensional centered Hardy–Littlewood problem asks how large centered local averages can be relative to the total mass of a function. More precisely, it asks for the least constant such that
where
The notebook also uses the non-tangential family
Thus is centered, while is the usual two-sided uncentered operator. Let be the least constant for which
For a positive finite atomic measure
write .
The next cell implements the interval arithmetic used below.
Show code
Code cell 3 · In [1]
from fractions import Fraction
from pathlib import Path
import hashlib
import json
import numpy as np
def exact_block_intervals(positions, weights, alpha=Fraction(0)):
# Return every positive-length block interval and exact gate statistics.
prefix = [Fraction(0)]
for weight in weights:
prefix.append(prefix[-1] + weight)
intervals = []
active_by_length = {}
zero_slack = 0
inactive = 0
min_active_slack = None
min_inactive_slack = None
reach_factor = 1 + alpha
for i in range(len(positions)):
for j in range(i, len(positions)):
mass = prefix[j + 1] - prefix[i]
slack = 2 * mass - (positions[j] - positions[i])
if slack > 0:
intervals.append(
(positions[j] - reach_factor * mass,
positions[i] + reach_factor * mass)
)
length = j - i + 1
active_by_length[length] = active_by_length.get(length, 0) + 1
if min_active_slack is None or slack < min_active_slack:
min_active_slack = slack
elif slack < 0:
inactive += 1
miss = -slack
if min_inactive_slack is None or miss < min_inactive_slack:
min_inactive_slack = miss
else:
zero_slack += 1
return intervals, prefix[-1], {
"inactive": inactive,
"zero_slack": zero_slack,
"min_active_slack": min_active_slack,
"min_inactive_slack": min_inactive_slack,
"active_by_length": active_by_length,
}
def merge_intervals(intervals):
ordered = sorted(intervals)
components = []
for left, right in ordered:
if not components or left > components[-1][1]:
components.append([left, right])
elif right > components[-1][1]:
components[-1][1] = right
length = sum((right - left for left, right in components), Fraction(0))
return components, length
def endpoint_sweep_length(intervals):
events = {}
for left, right in intervals:
events[left] = events.get(left, 0) + 1
events[right] = events.get(right, 0) - 1
points = sorted(events)
covered = 0
length = Fraction(0)
for index, point in enumerate(points[:-1]):
covered += events[point]
next_point = points[index + 1]
if covered > 0:
length += next_point - point
return length
2. S1. Sharp constants between the centered and uncentered operators.
2.1 Exact finite model
Lemma 2.1 (exact strict-superlevel block formula). For every ,
Proof. Consider an averaging interval of length . The points allowed by aperture form
Suppose contains the block . Then , , and an average greater than is possible exactly when . The feasible triples form a convex set, so their projection onto the -axis is an interval. Its right endpoint is the supremum of
namely . By symmetry its left endpoint is . Such intervals exist exactly when .
Every witnessing average captures a consecutive block of atoms and therefore lies in one of these intervals. Conversely, every point in a displayed interval admits an averaging interval of length below containing that block; any additional atoms only increase the average. This proves (1).
The strict convention matters. For , the activity condition becomes and the intervals are closed. If , an equality block can then have positive length. All lower bounds below use the strict set in (1).
Lemma 2.2 (atomic lower bounds give lower bounds). For every finite positive atomic measure ,
Proof. Replace each atom with a narrow uniform bump,
Then . Fix in the atomic strict superlevel set and choose a witnessing interval with . Enlarging its radius from to captures the full bumps around the atoms in the original interval, preserves the aperture inequality, and still has average greater than for all sufficiently small . Hence
Fatou’s lemma and the weak inequality for give
which is (2).
At , (1) becomes the centered interval model
2.2 Exact plateau
Lemma 2.3 (universal upper bound). For , one has .
Proof. Every interval allowed for contains , so . We include the short interval-cover proof that . Fix a compact subset . A witnessing interval can be enlarged slightly while retaining its strict average, so each covered point may lie in the interior of its witness. Choose a finite subcover of and successively remove any interval whose removal leaves covered. In the resulting irredundant family, at most two intervals contain any point: if three shared a point, the intervals with the leftmost left endpoint and rightmost right endpoint would together contain the third. Therefore
Exhausting the strict superlevel set by compact subsets proves the result. The same proof applies to a finite positive measure.
Proposition 2.4 (equal-chain lower bound). If , then .
Proof. Take equal atoms, each of mass , with consecutive spacing
A block of atoms is active exactly when
Thus singletons and adjacent pairs are active, while every block is inactive because and .
By Lemma 2.1, a singleton has reach and an adjacent pair has reach . The pair interval joins both neighboring singleton intervals when
For , this follows from . The strict superlevel set is therefore one chain of length
Its total mass is one, so (2) gives
First let and then . This yields .
Theorem 2.5 (sharp non-tangential plateau). For every ,
Proof. Lemma 2.3 gives the upper bound and Proposition 2.4 gives the matching lower bound.
The values of for , including the smallest onset of the global plateau, remain open.
The next cell checks the equal-chain activity pattern, connected union, and stated score at four apertures and three chain lengths.
Show code
Code cell 5 · In [2]
def verify_equal_chain(alpha, n, eta):
alpha = Fraction(alpha)
eta = Fraction(eta)
gap = (4 - eta) / n
positions = [index * gap for index in range(n)]
weights = [Fraction(1, n)] * n
chain_intervals, weight, chain_stats = exact_block_intervals(
positions, weights, alpha
)
chain_components, chain_length = merge_intervals(chain_intervals)
expected_length = (n - 1) * gap + Fraction(2) * (1 + alpha) / n
expected_score = (
Fraction(2)
- (1 - alpha) / n
- eta * (n - 1) / (2 * n)
)
assert set(chain_stats["active_by_length"]) == {1, 2}
assert len(chain_components) == 1
assert weight == 1
assert chain_length == expected_length
assert chain_length / 2 == expected_score
return expected_score
rows = []
for alpha in [Fraction(1, 3), Fraction(1, 2), Fraction(3, 4), Fraction(1)]:
for n in [5, 11, 31]:
checked_score = verify_equal_chain(alpha, n, Fraction(1, 100))
rows.append((str(alpha), f"{float(checked_score):.6f}"))
print("Exact equal-chain checks passed for n = 5, 11, 31")
print("alpha, score at n=31 and eta=1/100")
for alpha, value in rows:
print(f"{alpha:>4} {value}")
Saved output 1
Exact equal-chain checks passed for n = 5, 11, 31 alpha, score at n=31 and eta=1/100 1/3 1.973656 1/2 1.979032 3/4 1.987097 1 1.995161
2.3 Sharp singleton–pair ceiling
The singleton-pair layer has the sharp ceiling , with both branches attained asymptotically by explicit chains. This identifies three-atom blocks as the first mechanism capable of raising the centered score above and narrows the design space for extremal atomic measures across the aperture range.
Let be the union in (1) formed only from singleton blocks and active adjacent-pair blocks.
Theorem 2.6 (sharp pair-layer ceiling). For every finite positive atomic measure of total mass ,
Both branches are sharp as suprema over finite atomic measures.
Proof. We first prove the centered estimate . Add atoms from left to right. When the last atom, of mass , is added, translate the preceding atom to , denote its mass by , and denote the new gap by . The old union contains . The only new intervals are
with omitted when inactive. If is absent, the added length is at most . If is present and , there is no new length left of ; adds at most on the right (and has total length at most if it misses ), while adds at most . If , the left excess is at most , while the right excess is at most . Their sum is at most . Thus each new atom adds at most . The initial singleton has length , and induction gives .
Set and divide all positions by , leaving the weights fixed. After the same spatial scaling, every aperture- singleton or pair interval is a centered singleton or pair interval for the scaled positions. An active original pair remains active after scaling. Hence the scaled union lies inside a centered pair layer, so
This gives the second term in (4). The pair layer also lies inside the uncentered level set. Lemma 2.3, applied to the atomic measure, gives , proving the first term.
For sharpness when , take equal atoms with gap ; their singleton and pair intervals form a chain up to null contact points, and the score tends to . When , the equal chains in Proposition 2.4 have pair-layer scores tending to .
In particular, a centered score above must receive positive-length coverage from a block containing at least three atoms. For , determining requires the contribution of longer blocks, which can exceed the pair-layer ceiling.
Station Reference. The centered pair-layer ceiling comes from Archive #20. The strict block representation and equal-chain proof were developed in Question Room discussion #13 and Archive #50, with the aperture-dependent extension in the Archive #50 addendum. Research Center Evals #774, #778, #781, #783, and #787 checked the formulas, activity gates, strict contacts, endpoint cases, and layer bound.
Related Work. Melas (2002) gives the classical finite-atomic discretization for the centered problem. Ramos (2019) studied the non-tangential interpolation, proved the sharp variation inequality for , and recorded the weak-type constants between the centered and uncentered endpoints as unknown. The endpoint is classical, including for positive measures; see Bernal (1989) and Melas (2003). The extension for and the sharp aperture-dependent pair-layer ceiling appear novel.
3. Verification of the reported 356-atom construction
This section verifies the Station construction reported in the paper.
Theorem 3.1. There exists a positive atomic measure on strictly ordered points whose centered score is
Consequently, , and rounds to .
Verification. The file hardy_littlewood_356.npy contains the positions and weights of this measure.
The next cell authenticates the stored decimal data, enumerates every consecutive block in (3), merges the resulting rational intervals, and recomputes the union length by an independent endpoint sweep.
Show code
Code cell 10 · In [3]
DATA_PATH = Path("hardy_littlewood_356.npy")
METADATA_PATH = Path("construction_metadata.json")
EXPECTED_DATA_SHA256 = "6d516f3c5bd4c3ad3c375b3194247ffc537b02986abe9361eeb91436bc37a5d2"
EXPECTED_METADATA_SHA256 = "2efc01c1e134d94744f6241ec6f8a338591edabf548be90fbbed2c233d0a0156"
def file_sha256(path):
digest = hashlib.sha256()
with path.open("rb") as handle:
for chunk in iter(lambda: handle.read(1 << 20), b""):
digest.update(chunk)
return digest.hexdigest()
if not DATA_PATH.is_file():
raise FileNotFoundError(DATA_PATH)
if not METADATA_PATH.is_file():
raise FileNotFoundError(METADATA_PATH)
assert file_sha256(DATA_PATH) == EXPECTED_DATA_SHA256
assert file_sha256(METADATA_PATH) == EXPECTED_METADATA_SHA256
metadata = json.loads(METADATA_PATH.read_text(encoding="utf-8"))
assert metadata["artifact_sha256"] == EXPECTED_DATA_SHA256
raw = np.load(DATA_PATH, allow_pickle=False)
assert raw.shape == (2, 356)
assert raw.dtype.kind == "U"
y = [Fraction(value) for value in raw[0].tolist()]
k = [Fraction(value) for value in raw[1].tolist()]
assert all(left < right for left, right in zip(y, y[1:]))
assert all(weight > 0 for weight in k)
print("Authenticated local construction data")
print(f"atoms: {len(y)}; dtype: {raw.dtype}; data SHA-256: {EXPECTED_DATA_SHA256}")
intervals, total_weight, stats = exact_block_intervals(y, k)
components, union_length = merge_intervals(intervals)
sweep_length = endpoint_sweep_length(intervals)
score = union_length / (2 * total_weight)
EXPECTED_WEIGHT = Fraction(1250000000000000053451, 2500000000000000000000)
EXPECTED_UNION = Fraction(3892672072950587143037, 2500000000000000000000)
EXPECTED_SCORE = Fraction(3892672072950587143037, 2500000000000000106902)
assert len(y) * (len(y) + 1) // 2 == 63546
assert len(intervals) == 1913
assert stats["inactive"] == 61633
assert stats["zero_slack"] == 0
assert len(components) == 348
assert stats["min_active_slack"] == Fraction(3, 50000000000000000000)
assert stats["min_inactive_slack"] == Fraction(3, 25000000000000000000)
assert total_weight == EXPECTED_WEIGHT
assert union_length == sweep_length == EXPECTED_UNION
assert score == EXPECTED_SCORE
assert score > Fraction("1.55706882918")
print("Exact exhaustive audit passed")
print(f"blocks examined: 63546; positive-length blocks: {len(intervals)}")
print(f"merged components (up to endpoints): {len(components)}")
print(f"total weight: {total_weight}")
print(f"union length: {union_length}")
print(f"exact score: {score}")
print(f"score rounded to six decimals: {float(score):.6f}")
Saved output 1
Authenticated local construction data atoms: 356; dtype: <U22; data SHA-256: 6d516f3c5bd4c3ad3c375b3194247ffc537b02986abe9361eeb91436bc37a5d2
Saved output 2
Exact exhaustive audit passed blocks examined: 63546; positive-length blocks: 1913 merged components (up to endpoints): 348 total weight: 1250000000000000053451/2500000000000000000000 union length: 3892672072950587143037/2500000000000000000000 exact score: 3892672072950587143037/2500000000000000106902 score rounded to six decimals: 1.557069
Proof. The exact rational union length computed above is the displayed fraction, proving the theorem.
The exact audit finds positive-length blocks and no equality blocks. The smallest positive gate margin is , while the nearest inactive block misses the gate by .
Station Reference. The construction is recorded in Archive #49 and Research Center Eval #769.
Related Work. Melas (2003) proved and, together with his 2002 construction, established finite atomic examples approaching that value. Georgiev et al. (2025) later reported in unguided search and approximately with literature guidance. The 356-atom certificate improves those computational benchmarks but not the literature lower bound. The stored configuration and its rational audit appear novel.