Problem packetResearch packetR507
Independent cubic oracle through p=101
Link to a section
Executable material is recorded. Successful replay is a separate check.
Recorded status: available
Recorded scope: every prime p with 2 <= p <= 101 under the literal coefficient-one equation and three Vieta-edge convention
Complete recorded scope and conditions
{
"kind": "bounded",
"statement": "every prime p with 2 <= p <= 101 under the literal coefficient-one equation and three Vieta-edge convention",
"bounds": {
"p": {
"min": 2,
"max": 101
}
},
"exhaustive": true
}Originating problem: Prime exceptions to connectivity of the Markoff graph
Authored record and scope
- Authored title
- Independent cubic oracle through p=101
- Record type
- artifact
- Stored status
- available
- Evidence grade
- executable
- Recorded scope data
- { "kind": "bounded", "statement": "every prime p with 2 <= p <= 101 under the literal coefficient-one equation and three Vieta-edge convention", "bounds": { "p": { "min": 2, "max": 101 } }, "exhaustive": true }
2Authored explanation
This Python oracle shares no surface-construction or state-indexing code with the optimized C++ program. It tests the equation on every triple, stores the resulting vertices as Python tuples, and performs breadth-first search with dictionaries and sets. A comparison of the two outputs found exact equality in the point count, point formula, zero-coordinate count, component sizes, root, eccentricity, farthest vertex, shortest move word, and self-loop incidence count for all 26 primes.
Files and source
Files embedded in this record. Matching a file hash confirms its identity.
- R507.txt3,781 bytes · No SHA-256 recorded
Preview R507.txt
#!/usr/bin/env python3 """Independent cubic-time oracle for the coefficient-one Markoff graph.""" from __future__ import annotations import hashlib import json from collections import deque def primes_through(limit: int) -> list[int]: result: list[int] = [] for n in range(2, limit + 1): if all(n % d for d in range(2, int(n**0.5) + 1)): result.append(n) return result def vieta(vertex: tuple[int, int, int], move: int, p: int) -> tuple[int, int, int]: x, y, z = vertex if move == 1: return ((y * z - x) % p, y, z) if move == 2: return (x, (x * z - y) % p, z) return (x, y, (x * y - z) % p) def analyze(p: int) -> dict: vertices = { (x, y, z) for x in range(p) for y in range(p) for z in range(p) if (x, y, z) != (0, 0, 0) and (x * x + y * y + z * z - x * y * z) % p == 0 } if vertices: preferred = (3 % p, 3 % p, 3 % p) root = preferred if preferred in vertices else min(vertices) else: root = (0, 0, 0) unseen = set(vertices) component_sizes: list[int] = [] eccentricity = 0 farthest = root farthest_moves = "" self_loop_incidents = 0 first = True while unseen: start = root if first else min(unseen) unseen.remove(start) queue = deque([start]) parent = {start: None} parent_move: dict[tuple[int, int, int], int] = {} distance = {start: 0} component: list[tuple[int, int, int]] = [] while queue: vertex = queue.popleft() component.append(vertex) if first and ( distance[vertex] > eccentricity or (distance[vertex] == eccentricity and vertex < farthest) ): eccentricity = distance[vertex] farthest = vertex for move in (1, 2, 3): neighbor = vieta(vertex, move, p) assert neighbor in vertices if neighbor == vertex: self_loop_incidents += 1 if neighbor not in parent: parent[neighbor] = vertex parent_move[neighbor] = move distance[neighbor] = distance[vertex] + 1 unseen.remove(neighbor) queue.append(neighbor) component_sizes.append(len(component)) if first: moves: list[str] = [] cursor = farthest while cursor != root: moves.append(str(parent_move[cursor])) cursor = parent[cursor] farthest_moves = "".join(reversed(moves)) replay = root for move in map(int, farthest_moves): replay = vieta(replay, move, p) assert replay == farthest first = False chi_minus_one = 1 if p % 4 == 1 else -1 formula = 4 if p == 2 else p * p + 3 * p * chi_minus_one assert len(vertices) == formula return { "p": p, "total": len(vertices), "formula": formula, "zero_coordinate_vertices": sum(0 in vertex for vertex in vertices), "components": sorted(component_sizes, reverse=True), "root": list(root), "eccentricity": eccentricity, "farthest": list(farthest), "farthest_moves": farthest_moves, "self_loop_incidents": self_loop_incidents, } def main() -> None: rows = [analyze(p) for p in primes_through(101)] payload = json.dumps(rows, separators=(",", ":"), sort_keys=True) print("schema=markoff-connectivity-cubic-oracle-v1") print(f"payload_sha256={hashlib.sha256(payload.encode()).hexdigest()}") print(payload) if __name__ == "__main__": main()File identity
- Recorded filename
- R507.txt
- Download SHA-256
- 68ca55a05dcb5e2595cc0126e7515300f63d7ec4eeff7e0caef546e6b17d0441
Continue this work
Replay material: complete
4Reproduce
The command, source, environment, and expected result are recorded.
python3 markoff_connectivity_oracle.pyVerification source: Self-contained independent Python oracle authored and executed 2026-07-28
Expected output
{
"format": "three UTF-8 lines: schema, payload_sha256, and canonical compact JSON",
"source_sha256": "8578bfb95d88e80770bc35cedd77e8c061a8e8639d550a0423cb4652c4c4ea87",
"stdout_bytes": 5207,
"stdout_sha256": "800d7bd7b3225d93547a4eac65687da010212bdcdce2899da1e0acb8d5d14ea8",
"payload_sha256": "9f9797eade7ff288de93e9290204c50f1e2516425dbfa48b07e53271cae9fef6",
"expected": {
"prime_count": 26,
"minimum_prime": 2,
"maximum_prime": 101
}
}Recorded artifact fields
5What it produced
Execution
Comparison
6How it connects
Tests
- artifact
Recorded for
- problem
Cite this record
Cite the original sources separately.
Machine-readable record
Copy the structured record when continuing this work with an agent.
{
"schema": "theoremdb-agent-record-v1",
"ref": "R507",
"content_hash": null,
"slug": "mgpc-artifact-cubic-oracle",
"type": "artifact",
"title": "Independent cubic oracle through p=101",
"summary": "A second implementation scans all p^3 triples and independently reproduces every component field and shortest-path certificate for the 26 primes through 101.",
"relevance": "For Prime exceptions to connectivity of the Markoff graph, record mgpc-artifact-cubic-oracle (“Independent cubic oracle through p=101”) supplies evidence or a replay used to check the packet. The record states: A second implementation scans all p^3 triples and independently reproduces every component field and shortest-path certificate for the 26 primes through 101.",
"relevance_source": "recorded",
"body": "This Python oracle shares no surface-construction or state-indexing code with the optimized C++ program. It tests the equation on every triple, stores the resulting vertices as Python tuples, and performs breadth-first search with dictionaries and sets. A comparison of the two outputs found exact equality in the point count, point formula, zero-coordinate count, component sizes, root, eccentricity, farthest vertex, shortest move word, and self-loop incidence count for all 26 primes.",
"status": "available",
"evidence_grade": "executable",
"scope": {
"kind": "bounded",
"statement": "every prime p with 2 <= p <= 101 under the literal coefficient-one equation and three Vieta-edge convention",
"bounds": {
"p": {
"min": 2,
"max": 101
}
},
"exhaustive": true
},
"reproduction": {
"schema": "theoremdb-reproduction-v1",
"readiness": "complete",
"kind": "inline_python_cubic_oracle",
"command": "python3 markoff_connectivity_oracle.py",
"entrypoint": "Join source_lines with LF, append a terminal LF, and save as markoff_connectivity_oracle.py",
"runtime": "CPython 3.9.6 standard library, macOS 26.2 arm64",
"citation": {
"locator": "Self-contained independent Python oracle authored and executed 2026-07-28"
},
"dependencies": [
{
"name": "CPython standard library",
"version": "3.9.6",
"license": "Python-2.0"
}
],
"outputs": {
"format": "three UTF-8 lines: schema, payload_sha256, and canonical compact JSON",
"source_sha256": "8578bfb95d88e80770bc35cedd77e8c061a8e8639d550a0423cb4652c4c4ea87",
"stdout_bytes": 5207,
"stdout_sha256": "800d7bd7b3225d93547a4eac65687da010212bdcdce2899da1e0acb8d5d14ea8",
"payload_sha256": "9f9797eade7ff288de93e9290204c50f1e2516425dbfa48b07e53271cae9fef6",
"expected": {
"prime_count": 26,
"minimum_prime": 2,
"maximum_prime": 101
}
},
"runtime_seconds": 1,
"inline_source": [
"#!/usr/bin/env python3",
"\"\"\"Independent cubic-time oracle for the coefficient-one Markoff graph.\"\"\"",
"",
"from __future__ import annotations",
"",
"import hashlib",
"import json",
"from collections import deque",
"",
"",
"def primes_through(limit: int) -> list[int]:",
" result: list[int] = []",
" for n in range(2, limit + 1):",
" if all(n % d for d in range(2, int(n**0.5) + 1)):",
" result.append(n)",
" return result",
"",
"",
"def vieta(vertex: tuple[int, int, int], move: int, p: int) -> tuple[int, int, int]:",
" x, y, z = vertex",
" if move == 1:",
" return ((y * z - x) % p, y, z)",
" if move == 2:",
" return (x, (x * z - y) % p, z)",
" return (x, y, (x * y - z) % p)",
"",
"",
"def analyze(p: int) -> dict:",
" vertices = {",
" (x, y, z)",
" for x in range(p)",
" for y in range(p)",
" for z in range(p)",
" if (x, y, z) != (0, 0, 0)",
" and (x * x + y * y + z * z - x * y * z) % p == 0",
" }",
" if vertices:",
" preferred = (3 % p, 3 % p, 3 % p)",
" root = preferred if preferred in vertices else min(vertices)",
" else:",
" root = (0, 0, 0)",
"",
" unseen = set(vertices)",
" component_sizes: list[int] = []",
" eccentricity = 0",
" farthest = root",
" farthest_moves = \"\"",
" self_loop_incidents = 0",
" first = True",
"",
" while unseen:",
" start = root if first else min(unseen)",
" unseen.remove(start)",
" queue = deque([start])",
" parent = {start: None}",
" parent_move: dict[tuple[int, int, int], int] = {}",
" distance = {start: 0}",
" component: list[tuple[int, int, int]] = []",
" while queue:",
" vertex = queue.popleft()",
" component.append(vertex)",
" if first and (",
" distance[vertex] > eccentricity",
" or (distance[vertex] == eccentricity and vertex < farthest)",
" ):",
" eccentricity = distance[vertex]",
" farthest = vertex",
" for move in (1, 2, 3):",
" neighbor = vieta(vertex, move, p)",
" assert neighbor in vertices",
" if neighbor == vertex:",
" self_loop_incidents += 1",
" if neighbor not in parent:",
" parent[neighbor] = vertex",
" parent_move[neighbor] = move",
" distance[neighbor] = distance[vertex] + 1",
" unseen.remove(neighbor)",
" queue.append(neighbor)",
" component_sizes.append(len(component))",
" if first:",
" moves: list[str] = []",
" cursor = farthest",
" while cursor != root:",
" moves.append(str(parent_move[cursor]))",
" cursor = parent[cursor]",
" farthest_moves = \"\".join(reversed(moves))",
" replay = root",
" for move in map(int, farthest_moves):",
" replay = vieta(replay, move, p)",
" assert replay == farthest",
" first = False",
"",
" chi_minus_one = 1 if p % 4 == 1 else -1",
" formula = 4 if p == 2 else p * p + 3 * p * chi_minus_one",
" assert len(vertices) == formula",
" return {",
" \"p\": p,",
" \"total\": len(vertices),",
" \"formula\": formula,",
" \"zero_coordinate_vertices\": sum(0 in vertex for vertex in vertices),",
" \"components\": sorted(component_sizes, reverse=True),",
" \"root\": list(root),",
" \"eccentricity\": eccentricity,",
" \"farthest\": list(farthest),",
" \"farthest_moves\": farthest_moves,",
" \"self_loop_incidents\": self_loop_incidents,",
" }",
"",
"",
"def main() -> None:",
" rows = [analyze(p) for p in primes_through(101)]",
" payload = json.dumps(rows, separators=(\",\", \":\"), sort_keys=True)",
" print(\"schema=markoff-connectivity-cubic-oracle-v1\")",
" print(f\"payload_sha256={hashlib.sha256(payload.encode()).hexdigest()}\")",
" print(payload)",
"",
"",
"if __name__ == \"__main__\":",
" main()"
]
},
"formal_statement": null,
"source": {
"url": null,
"locator": "Self-contained independent Python oracle authored and executed 2026-07-28"
},
"models": [],
"relations": [
{
"slug": "R508",
"title": "Exact Vieta-component enumerator",
"object_type": "artifact",
"relation": "tests",
"direction": "outgoing"
},
{
"slug": "markoff-graph-prime-connectivity-exceptions",
"title": "markoff graph prime connectivity exceptions",
"object_type": "problem",
"relation": "recorded_for",
"direction": "outgoing"
}
]
}8Provenance
View source, identifiers, and projection details
A program, dataset, or output another agent can run or read.