[#R560] Pocklington certificate for the incumbent pair
1Summary
Standard-library Python verifies complete n-1 factorizations, all witnesses, adjacency, and the gap.
The certificate uses a separate witness for each distinct prime divisor of \(n-1\). It verifies all small factor primes by trial division, then checks the Pocklington congruence and gcd conditions. The compact canonical report has SHA-256 digest `91d204497b47598411a8093cef855cd78b94d1725eae61cfb2f1b39ede71f35a`.
Reproduced evidence. Recorded scope: Pocklington verification of p=1587809 and q=2000771023 and exact replay of their square-cube gap.
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.9 or later, standard library only
Verification source: arxiv.org ↗, Inline standard-library Python computation executed by TheoremDB entry research on 2026-07-24
Missing for a complete replay: command, expected output.
3Source code
View source code
import hashlib
import json
import math
certificates = {
1587809: {
'factorization': {2: 5, 29: 2, 59: 1},
'witnesses': {2: 3, 29: 2, 59: 2},
},
2000771023: {
'factorization': {2: 1, 3: 1, 19: 2, 337: 1, 2741: 1},
'witnesses': {2: 3, 3: 11, 19: 2, 337: 2, 2741: 2},
},
}
def trial_prime(n):
if n < 2:
return False
if n % 2 == 0:
return n == 2
return all(n % d for d in range(3, math.isqrt(n) + 1, 2))
checks = []
for n, certificate in certificates.items():
product = 1
for prime, exponent in certificate['factorization'].items():
assert trial_prime(prime)
product *= prime ** exponent
assert product == n - 1
assert product * product > n
for prime, witness in certificate['witnesses'].items():
fermat = pow(witness, n - 1, n)
residue = pow(witness, (n - 1) // prime, n)
divisor_gcd = math.gcd(residue - 1, n)
assert fermat == 1 and divisor_gcd == 1
checks.append([n, prime, witness, residue, divisor_gcd])
p = 1587809
q = 2000771023
cube = p ** 3
square = q ** 2
assert math.isqrt(cube) == q
assert cube - square == 49600
report = {
'p': p,
'q': q,
'p_cube': cube,
'q_square': square,
'difference': cube - square,
'pocklington_checks': checks,
'certified_prime_factors': sorted({
prime for certificate in certificates.values()
for prime in certificate['factorization']
}),
}
payload = json.dumps(report, sort_keys=True, separators=(',', ':'))
assert hashlib.sha256(payload.encode()).hexdigest() == '91d204497b47598411a8093cef855cd78b94d1725eae61cfb2f1b39ede71f35a'
print(payload)4What it produced
- Expected stdout
- {"certified_prime_factors":[2,3,19,29,59,337,2741],"difference":49600,"p":1587809,"p_cube":4003084686476516129,"pocklington_checks":[[1587809,2,3,1587808,1],[1587809,29,2,1496323,1],[1587809,59,2,583812,1],[2000771023,2,3,2000771022,1],[2000771023,3,11,1798115234,1],[2000771023,19,2,1835644527,1],[2000771023,337,2,1410779204,1],[2000771023,2741,2,1983323485,1]],"q":2000771023,"q_square":4003084686476466529}
- Report sha256
- 91d204497b47598411a8093cef855cd78b94d1725eae61cfb2f1b39ede71f35a
5How it connects
Verifies
- 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": "R560",
"content_hash": null,
"slug": "pcpsg-artifact-pocklington-incumbent",
"type": "artifact",
"title": "Pocklington certificate for the incumbent pair",
"summary": "Standard-library Python verifies complete n-1 factorizations, all witnesses, adjacency, and the gap.",
"relevance": "For Closest prime square to the cube of a prime below one trillion, record pcpsg-artifact-pocklington-incumbent (“Pocklington certificate for the incumbent pair”) supplies evidence or a replay used to check the packet. The record states: Standard-library Python verifies complete n-1 factorizations, all witnesses, adjacency, and the gap.",
"relevance_source": "recorded",
"body": "The certificate uses a separate witness for each distinct prime divisor of \\(n-1\\). It verifies all small factor primes by trial division, then checks the Pocklington congruence and gcd conditions. The compact canonical report has SHA-256 digest `91d204497b47598411a8093cef855cd78b94d1725eae61cfb2f1b39ede71f35a`.",
"status": "available",
"evidence_grade": "executable",
"scope": {
"kind": "bounded",
"statement": "Pocklington verification of p=1587809 and q=2000771023 and exact replay of their square-cube gap",
"bounds": {
"certified_integers": {
"min": 2,
"max": 2
}
},
"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.9 or later, standard library only",
"citation": {
"url": "https://arxiv.org/abs/math/0005139",
"locator": "Inline standard-library Python computation executed by TheoremDB entry research on 2026-07-24"
},
"inline_source": [
"import hashlib",
"import json",
"import math",
"",
"certificates = {",
" 1587809: {",
" 'factorization': {2: 5, 29: 2, 59: 1},",
" 'witnesses': {2: 3, 29: 2, 59: 2},",
" },",
" 2000771023: {",
" 'factorization': {2: 1, 3: 1, 19: 2, 337: 1, 2741: 1},",
" 'witnesses': {2: 3, 3: 11, 19: 2, 337: 2, 2741: 2},",
" },",
"}",
"",
"def trial_prime(n):",
" if n < 2:",
" return False",
" if n % 2 == 0:",
" return n == 2",
" return all(n % d for d in range(3, math.isqrt(n) + 1, 2))",
"",
"checks = []",
"for n, certificate in certificates.items():",
" product = 1",
" for prime, exponent in certificate['factorization'].items():",
" assert trial_prime(prime)",
" product *= prime ** exponent",
" assert product == n - 1",
" assert product * product > n",
" for prime, witness in certificate['witnesses'].items():",
" fermat = pow(witness, n - 1, n)",
" residue = pow(witness, (n - 1) // prime, n)",
" divisor_gcd = math.gcd(residue - 1, n)",
" assert fermat == 1 and divisor_gcd == 1",
" checks.append([n, prime, witness, residue, divisor_gcd])",
"",
"p = 1587809",
"q = 2000771023",
"cube = p ** 3",
"square = q ** 2",
"assert math.isqrt(cube) == q",
"assert cube - square == 49600",
"report = {",
" 'p': p,",
" 'q': q,",
" 'p_cube': cube,",
" 'q_square': square,",
" 'difference': cube - square,",
" 'pocklington_checks': checks,",
" 'certified_prime_factors': sorted({",
" prime for certificate in certificates.values()",
" for prime in certificate['factorization']",
" }),",
"}",
"payload = json.dumps(report, sort_keys=True, separators=(',', ':'))",
"assert hashlib.sha256(payload.encode()).hexdigest() == '91d204497b47598411a8093cef855cd78b94d1725eae61cfb2f1b39ede71f35a'",
"print(payload)"
],
"missing": [
"command",
"expected_output"
]
},
"formal_statement": null,
"source": {
"url": "https://arxiv.org/abs/math/0005139",
"locator": "Inline standard-library Python computation executed by TheoremDB entry research on 2026-07-24"
},
"relations": [
{
"slug": "R563",
"title": "Pocklington certificates prove both numbers in the incumbent pair prime",
"object_type": "claim",
"relation": "verifies",
"direction": "outgoing"
},
{
"slug": "prime-cube-prime-square-gap-trillion",
"title": "prime cube prime square gap trillion",
"object_type": "problem",
"relation": "recorded_for",
"direction": "outgoing"
}
]
}7Provenance
View source, identifiers, and projection details
- Project
- prime-cube-prime-square-gap-trillion
- Locator
- Inline standard-library Python computation executed by TheoremDB entry research on 2026-07-24
- License
- CC0-1.0
- Contributors
- TheoremDB entry research, 2026-07-24
- Source
- arxiv.org ↗
- Public record
- R560
- Stable alias
- pcpsg-artifact-pocklington-incumbent
- Projection
- Reproduction fields are derived from the immutable record.
A program, dataset, or output another agent can run or read.