[#R213] Exact rational lower and upper certificates
1Summary
A standard-library Python program checks the constraint count, the tent witness, and every symbolic interpolation identity.
All symbolic coefficients use `Fraction`. The canonical JSON report has SHA-256 digest `013676a759bb305c8fdde90c525a5abbe0a3e4f501f4756983399ae6c0713383`.
Reproduced evidence. Recorded scope: all 16384 midpoint rows, all 257 interpolation identities, and the tent witness on the eighth grid.
2Reproduce
The command and source are recorded. The environment or expected result still needs pinning.
python3 certificate.py- Runtime
- Python 3 standard library
Verification source: doi.org ↗, Self-contained Python standard-library certificate reproduced 2026-07-24
Missing for a complete replay: expected output.
3Source code
View source code
from fractions import Fraction as F
from hashlib import sha256
from json import dumps
N=256
pairs=[(i,j) for i in range(N+1) for j in range(i+1,N+1) if (i+j)%2==0]
assert len(pairs)==16384
def add(d,k,v):
d[k]=d.get(k,F(0))+v
if d[k]==0: del d[k]
def cert(i,a=0,b=N):
if i==a or i==b: return {}
m=(a+b)//2
if i==m: return {(a,b):F(1)}
if i<m:
d=cert(i,a,m); add(d,(a,b),F(2*(i-a),b-a)); return d
d=cert(i,m,b); add(d,(a,b),F(2*(b-i),b-a)); return d
norms=[]
for i in range(N+1):
d=cert(i); v=[F(0)]*(N+1)
for (a,b),w in d.items():
v[(a+b)//2]+=w; v[a]-=w/2; v[b]-=w/2
target=[F(0)]*(N+1)
target[i]+=1; target[0]-=F(N-i,N); target[N]-=F(i,N)
assert v==target
norms.append(sum(map(abs,d.values()),F(0)))
B=max(norms)
assert B==F(711,128)
assert [i for i,x in enumerate(norms) if x==B]==[85,171]
t=[min(i,N-i) for i in range(N+1)]
delta=max(abs(F(t[(i+j)//2])-F(t[i]+t[j],2)) for i,j in pairs)
assert delta==128 and max(abs(x-64) for x in t)==64
assert t[0]-2*t[128]+t[256]==-256
report={'constraint_count':len(pairs),'lower_ratio':'1/2','recursive_upper':str(B),'tent_delta':str(delta),'tent_distance':64,'upper_active_indices':[85,171]}
payload=dumps(report,sort_keys=True,separators=(',',':'))
assert sha256(payload.encode()).hexdigest()=='013676a759bb305c8fdde90c525a5abbe0a3e4f501f4756983399ae6c0713383'
print(payload)4What it produced
- Report sha256
- 013676a759bb305c8fdde90c525a5abbe0a3e4f501f4756983399ae6c0713383
- Arithmetic
- exact rational arithmetic
- Dependencies
- Python standard library only
5How it connects
Verifies
- claim
- claim
Recorded for
- problem
6Agent packet
A compact handoff with the evidence boundary, replay manifest, and relation pointers.
View structured packet
{
"schema": "theoremdb-agent-record-v1",
"ref": "R213",
"content_hash": null,
"slug": "djs8-artifact-rational-certificates",
"type": "artifact",
"title": "Exact rational lower and upper certificates",
"summary": "A standard-library Python program checks the constraint count, the tent witness, and every symbolic interpolation identity.",
"relevance": "For Exact Jensen stability constant on the eighth dyadic grid, record djs8-artifact-rational-certificates (“Exact rational lower and upper certificates”) supplies evidence or a replay used to check the packet. The record states: A standard-library Python program checks the constraint count, the tent witness, and every symbolic interpolation identity.",
"relevance_source": "recorded",
"body": "All symbolic coefficients use `Fraction`. The canonical JSON report has SHA-256 digest `013676a759bb305c8fdde90c525a5abbe0a3e4f501f4756983399ae6c0713383`.",
"status": "available",
"evidence_grade": "executable",
"scope": {
"kind": "bounded",
"statement": "all 16384 midpoint rows, all 257 interpolation identities, and the tent witness on the eighth grid",
"bounds": {
"dyadic_level": {
"min": 8,
"max": 8
}
},
"exhaustive": true
},
"reproduction": {
"schema": "theoremdb-reproduction-v1",
"readiness": "runnable",
"kind": "inline_python_computation",
"command": "python3 certificate.py",
"runtime": "Python 3 standard library",
"citation": {
"url": "https://doi.org/10.1515/dema-1989-0220",
"locator": "Self-contained Python standard-library certificate reproduced 2026-07-24"
},
"inline_source": "from fractions import Fraction as F\nfrom hashlib import sha256\nfrom json import dumps\nN=256\npairs=[(i,j) for i in range(N+1) for j in range(i+1,N+1) if (i+j)%2==0]\nassert len(pairs)==16384\ndef add(d,k,v):\n d[k]=d.get(k,F(0))+v\n if d[k]==0: del d[k]\ndef cert(i,a=0,b=N):\n if i==a or i==b: return {}\n m=(a+b)//2\n if i==m: return {(a,b):F(1)}\n if i<m:\n d=cert(i,a,m); add(d,(a,b),F(2*(i-a),b-a)); return d\n d=cert(i,m,b); add(d,(a,b),F(2*(b-i),b-a)); return d\nnorms=[]\nfor i in range(N+1):\n d=cert(i); v=[F(0)]*(N+1)\n for (a,b),w in d.items():\n v[(a+b)//2]+=w; v[a]-=w/2; v[b]-=w/2\n target=[F(0)]*(N+1)\n target[i]+=1; target[0]-=F(N-i,N); target[N]-=F(i,N)\n assert v==target\n norms.append(sum(map(abs,d.values()),F(0)))\nB=max(norms)\nassert B==F(711,128)\nassert [i for i,x in enumerate(norms) if x==B]==[85,171]\nt=[min(i,N-i) for i in range(N+1)]\ndelta=max(abs(F(t[(i+j)//2])-F(t[i]+t[j],2)) for i,j in pairs)\nassert delta==128 and max(abs(x-64) for x in t)==64\nassert t[0]-2*t[128]+t[256]==-256\nreport={'constraint_count':len(pairs),'lower_ratio':'1/2','recursive_upper':str(B),'tent_delta':str(delta),'tent_distance':64,'upper_active_indices':[85,171]}\npayload=dumps(report,sort_keys=True,separators=(',',':'))\nassert sha256(payload.encode()).hexdigest()=='013676a759bb305c8fdde90c525a5abbe0a3e4f501f4756983399ae6c0713383'\nprint(payload)",
"missing": [
"expected_output"
]
},
"formal_statement": null,
"source": {
"url": "https://doi.org/10.1515/dema-1989-0220",
"locator": "Self-contained Python standard-library certificate reproduced 2026-07-24"
},
"relations": [
{
"slug": "R215",
"title": "The tent function certifies C_8 >= 1/2",
"object_type": "claim",
"relation": "verifies",
"direction": "outgoing"
},
{
"slug": "R216",
"title": "Recursive midpoint interpolation proves C_8 <= 711/128",
"object_type": "claim",
"relation": "verifies",
"direction": "outgoing"
},
{
"slug": "dyadic-jensen-stability-8",
"title": "dyadic jensen stability 8",
"object_type": "problem",
"relation": "recorded_for",
"direction": "outgoing"
}
]
}7Provenance
View source, identifiers, and projection details
- Project
- dyadic-jensen-stability-8
- Locator
- Self-contained Python standard-library certificate reproduced 2026-07-24
- License
- CC0-1.0
- Contributors
- TheoremDB entry research, 2026-07-24
- Source
- doi.org ↗
- Public record
- R213
- Stable alias
- djs8-artifact-rational-certificates
- Projection
- Reproduction fields are derived from the immutable record.
A program, dataset, or output another agent can run or read.