Skip to content

Commit 4e9eb46

Browse files
author
Grace Lee Rui Yue
committed
benchmarks: add complete totient preimage certificate
1 parent 5c179ea commit 4e9eb46

16 files changed

Lines changed: 1110 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
schema_version="2"
2+
task_id="totient-preimage-completeness-certificate"
3+
task_name="jacobian/totient-preimage-completeness-certificate"
4+
evaluation_kind="regression"
5+
domain="mathematical-sciences"
6+
primary_domain="number-theory"
7+
field="multiplicative-functions"
8+
provenance_class="authored-conjecture-probe"
9+
provenance_ref="spreadsheet:unresolved-conjecture/C-027@2026-08-07"
10+
assurance_ceiling="CHECKED"
11+
required_provider="core"
12+
environment_profile="core-python-minimal-verifier"
13+
verifier_contract_version="1"
14+
evaluation_owner="jacobian/conjecture-probes-v1"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Totient-preimage completeness certificate
2+
3+
This public Regression benchmark converts retained conjecture row C-027 into a
4+
closed finite classification problem: determine the complete preimage of 48
5+
under Euler's totient function without assuming a numerical search bound.
6+
7+
Its single primary objective is exact number-theoretic completeness reasoning.
8+
The key finite reduction is independently replayed: every prime divisor must
9+
satisfy `p-1 | 48`, and each prime-power totient contribution must divide 48.
10+
The verifier derives all option branches and compares the accepted set rather
11+
than trusting a submitted cutoff or answer list.
12+
13+
Provisional difficulty is Hard because the response must coordinate the prime
14+
restriction, exponent bounds, a complete 288-branch product, exact
15+
factorizations, and duplicate-free output. The shortcut audit rejects bounded
16+
brute force, answer-only public lists, incomplete prime options, and false
17+
global Carmichael claims. Full reward is only `CHECKED` for `phi(n)=48`.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM python:3.12-slim@sha256:57cd7c3a7a273101a6485ba99423ee568157882804b1124b4dd04266317710de
2+
COPY input.json submission_schema.json /app/
3+
WORKDIR /app
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"task_id":"jacobian/totient-preimage-completeness-certificate","conjecture_id":"C-027","target_totient":48,"scope":"phi-48-complete-preimage-classification-v1"}
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
{
2+
"$defs": {
3+
"factor": {
4+
"items": {
5+
"minimum": 1,
6+
"type": "integer"
7+
},
8+
"maxItems": 2,
9+
"minItems": 2,
10+
"type": "array"
11+
},
12+
"option": {
13+
"additionalProperties": false,
14+
"properties": {
15+
"exponents": {
16+
"items": {
17+
"minimum": 0,
18+
"type": "integer"
19+
},
20+
"maxItems": 6,
21+
"minItems": 2,
22+
"type": "array"
23+
},
24+
"prime": {
25+
"type": "integer"
26+
}
27+
},
28+
"required": [
29+
"prime",
30+
"exponents"
31+
],
32+
"type": "object"
33+
},
34+
"solution": {
35+
"additionalProperties": false,
36+
"properties": {
37+
"factorization": {
38+
"items": {
39+
"$ref": "#/$defs/factor"
40+
},
41+
"maxItems": 6,
42+
"minItems": 1,
43+
"type": "array"
44+
},
45+
"n": {
46+
"minimum": 1,
47+
"type": "integer"
48+
},
49+
"totient": {
50+
"const": 48
51+
}
52+
},
53+
"required": [
54+
"n",
55+
"factorization",
56+
"totient"
57+
],
58+
"type": "object"
59+
}
60+
},
61+
"$schema": "https://json-schema.org/draft/2020-12/schema",
62+
"additionalProperties": false,
63+
"properties": {
64+
"claimed_assurance": {
65+
"enum": [
66+
"UNVERIFIED",
67+
"COMPUTED",
68+
"CHECKED",
69+
"VERIFIED"
70+
]
71+
},
72+
"completeness": {
73+
"const": "COMPLETE"
74+
},
75+
"conclusion": {
76+
"const": "PHI_48_COMPLETE_PREIMAGE_CLASSIFICATION"
77+
},
78+
"evidence": {
79+
"items": {
80+
"additionalProperties": false,
81+
"properties": {
82+
"path": {
83+
"const": "evidence/answer.txt"
84+
},
85+
"sha256": {
86+
"pattern": "^sha256:[0-9a-f]{64}$",
87+
"type": "string"
88+
}
89+
},
90+
"required": [
91+
"path",
92+
"sha256"
93+
],
94+
"type": "object"
95+
},
96+
"maxItems": 1,
97+
"minItems": 1,
98+
"type": "array"
99+
},
100+
"limitations": {
101+
"const": [
102+
"ONE_TARGET_TOTIENT_VALUE_48",
103+
"EXACT_PRIME_POWER_BRANCH_ENUMERATION",
104+
"NO_GLOBAL_CARMICHAEL_CONCLUSION"
105+
]
106+
},
107+
"result": {
108+
"additionalProperties": false,
109+
"properties": {
110+
"accepted_count": {
111+
"const": 11
112+
},
113+
"candidate_primes": {
114+
"items": {
115+
"type": "integer"
116+
},
117+
"maxItems": 6,
118+
"minItems": 6,
119+
"type": "array",
120+
"uniqueItems": true
121+
},
122+
"enumerated_branch_count": {
123+
"const": 288
124+
},
125+
"prime_power_options": {
126+
"items": {
127+
"$ref": "#/$defs/option"
128+
},
129+
"maxItems": 6,
130+
"minItems": 6,
131+
"type": "array"
132+
},
133+
"solutions": {
134+
"items": {
135+
"$ref": "#/$defs/solution"
136+
},
137+
"maxItems": 11,
138+
"minItems": 11,
139+
"type": "array"
140+
}
141+
},
142+
"required": [
143+
"candidate_primes",
144+
"prime_power_options",
145+
"enumerated_branch_count",
146+
"solutions",
147+
"accepted_count"
148+
],
149+
"type": "object"
150+
},
151+
"scope": {
152+
"const": "phi-48-complete-preimage-classification-v1",
153+
"type": "string"
154+
},
155+
"task_id": {
156+
"const": "jacobian/totient-preimage-completeness-certificate"
157+
}
158+
},
159+
"required": [
160+
"task_id",
161+
"conclusion",
162+
"result",
163+
"claimed_assurance",
164+
"scope",
165+
"completeness",
166+
"evidence",
167+
"limitations"
168+
],
169+
"type": "object"
170+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Classify every integer with Euler totient 48
2+
3+
Submit a complete, duplicate-free classification of all positive integers
4+
`n` satisfying `phi(n)=48`. The certificate must not rely on an arbitrary
5+
search cutoff. Derive the complete candidate-prime set from `p-1 | 48` for
6+
every prime divisor `p | n`, list every admissible prime-power exponent whose
7+
totient contribution divides 48, enumerate the full Cartesian product of those
8+
options, and provide the factorization and exact totient contribution for every
9+
accepted integer.
10+
11+
The verifier independently tests primality, reconstructs the candidate primes,
12+
derives exponent options, enumerates all 288 branches, recomputes every totient,
13+
and checks exact equality with the submitted classification. This is a closed
14+
finite preimage audit and makes no claim about whether infinitely many totient
15+
values have a unique preimage.
16+
17+
<!-- BEGIN PUBLIC CONTRACT SUBMISSION BLOCK -->
18+
## Submission
19+
20+
Exact preimage classification for phi(n)=48 only; no global Carmichael conclusion.
21+
22+
Write `/app/submission.json` to the exact schema in `environment/submission_schema.json`. The submission envelope requires `task_id`, `conclusion`, `result`, `claimed_assurance`, `scope`, `completeness`, `evidence`, and `limitations`.
23+
24+
- **Conclusion:** exactly `PHI_48_COMPLETE_PREIMAGE_CLASSIFICATION`
25+
- **Assurance:** scoreable values are `UNVERIFIED`, `COMPUTED`, `CHECKED` (ceiling `CHECKED`); the submission schema accepts any of `UNVERIFIED`, `COMPUTED`, `CHECKED`, `VERIFIED` but only scoreable assurances receive credit.
26+
- **Scope:** the exact value declared in `submission_schema.json`
27+
- **Completeness:** `COMPLETE`.
28+
- **Evidence:** 1-1 item(s); allowed path(s): `evidence/answer.txt`; digest must match `^sha256:[0-9a-f]{64}$`.
29+
- **Evidence media types:** `text/plain`.
30+
- **Required artifact filenames:** `evidence/answer.txt`.
31+
<!-- END PUBLIC CONTRACT SUBMISSION BLOCK -->
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
from __future__ import annotations
2+
3+
import argparse
4+
import hashlib
5+
import itertools
6+
import json
7+
from pathlib import Path
8+
9+
TASK_ID = "jacobian/totient-preimage-completeness-certificate"
10+
PRIMES = [2, 3, 5, 7, 13, 17]
11+
OPTIONS = [[0, 1, 2, 3, 4, 5], [0, 1, 2], [0, 1], [0, 1], [0, 1], [0, 1]]
12+
LIMITATIONS = [
13+
"ONE_TARGET_TOTIENT_VALUE_48",
14+
"EXACT_PRIME_POWER_BRANCH_ENUMERATION",
15+
"NO_GLOBAL_CARMICHAEL_CONCLUSION",
16+
]
17+
18+
19+
def contribution(p: int, exponent: int) -> int:
20+
return 1 if exponent == 0 else (p - 1) * p ** (exponent - 1)
21+
22+
23+
def main() -> None:
24+
parser = argparse.ArgumentParser()
25+
parser.add_argument("--root", type=Path, default=Path("/app"))
26+
root = parser.parse_args().root
27+
solutions = []
28+
for exponents in itertools.product(*OPTIONS):
29+
if (
30+
__import__("math").prod(
31+
contribution(p, a) for p, a in zip(PRIMES, exponents, strict=True)
32+
)
33+
!= 48
34+
):
35+
continue
36+
factors = [[p, a] for p, a in zip(PRIMES, exponents, strict=True) if a]
37+
n = __import__("math").prod(p**a for p, a in factors)
38+
solutions.append({"n": n, "factorization": factors, "totient": 48})
39+
result = {
40+
"candidate_primes": PRIMES,
41+
"prime_power_options": [
42+
{"prime": p, "exponents": options}
43+
for p, options in zip(PRIMES, OPTIONS, strict=True)
44+
],
45+
"enumerated_branch_count": 288,
46+
"solutions": sorted(solutions, key=lambda row: row["n"]),
47+
"accepted_count": len(solutions),
48+
}
49+
payload = {
50+
"schema_version": "1",
51+
"task_id": TASK_ID,
52+
"result": result,
53+
"limitations": LIMITATIONS,
54+
}
55+
evidence = root / "evidence/answer.txt"
56+
evidence.parent.mkdir(parents=True, exist_ok=True)
57+
evidence.write_text(
58+
json.dumps(payload, sort_keys=True, separators=(",", ":")) + "\n"
59+
)
60+
submission = {
61+
"task_id": TASK_ID,
62+
"conclusion": "PHI_48_COMPLETE_PREIMAGE_CLASSIFICATION",
63+
"result": result,
64+
"claimed_assurance": "CHECKED",
65+
"scope": "phi-48-complete-preimage-classification-v1",
66+
"completeness": "COMPLETE",
67+
"evidence": [
68+
{
69+
"path": "evidence/answer.txt",
70+
"sha256": "sha256:" + hashlib.sha256(evidence.read_bytes()).hexdigest(),
71+
}
72+
],
73+
"limitations": LIMITATIONS,
74+
}
75+
(root / "submission.json").write_text(json.dumps(submission, sort_keys=True) + "\n")
76+
77+
78+
if __name__ == "__main__":
79+
main()
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
set -eu
3+
python /solution/solve.py
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
schema_version="1.4"
2+
artifacts=["/app/submission.json","/app/evidence"]
3+
[task]
4+
name="jacobian/totient-preimage-completeness-certificate"
5+
version="1.0.0"
6+
description="Classify the complete preimage of 48 under Euler's totient without a search cutoff."
7+
keywords=["totient","inverse-image","prime-factorization","completeness"]
8+
[metadata]
9+
evaluation_kind="regression"
10+
domain="mathematical-sciences"
11+
primary_domain="number-theory"
12+
field="multiplicative-functions"
13+
assurance_ceiling="CHECKED"
14+
answer_visibility="public"
15+
provenance_class="authored-conjecture-probe"
16+
fixture_digest="sha256:4ac36dc738ce4050d312f9b301be0ed7adcf3b03db56c380c37812e11ed4e555"
17+
required_provider="core"
18+
author_name="Jacobian contributors"
19+
difficulty="hard"
20+
category="mathematics"
21+
tags=["difficulty-provisional","totient","complete-enumeration","exact-verification","offline"]
22+
case_version="conjecture-probes-v1"
23+
contamination_class="authored-finite-conjecture-probe"
24+
derivation="Derived from retained spreadsheet row C-027 as a closed exact preimage-completeness slice."
25+
[agent]
26+
timeout_sec=600.0
27+
[verifier]
28+
timeout_sec=120.0
29+
environment_mode="separate"
30+
[environment]
31+
network_mode="no-network"
32+
cpus=1
33+
memory_mb=1024
34+
storage_mb=4096
35+
[verifier.environment]
36+
network_mode="no-network"
37+
cpus=1
38+
memory_mb=1024
39+
storage_mb=4096
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM python:3.12-slim@sha256:57cd7c3a7a273101a6485ba99423ee568157882804b1124b4dd04266317710de
2+
LABEL jacobian.task="jacobian/totient-preimage-completeness-certificate" \
3+
jacobian.checksum="54abdb651882967ad796da6f2e551c41793e9dc3a8bc51f57311747b0b259ff7"
4+
RUN python -m pip install --no-cache-dir attrs==26.1.0 jsonschema==4.26.0 jsonschema-specifications==2025.9.1 referencing==0.37.0 rpds-py==2026.6.3 typing-extensions==4.16.0
5+
COPY input.json public_contract.json test.sh verifier.py verifier_support.py /tests/
6+
COPY input.json /app/input.json
7+
RUN chmod +x /tests/test.sh && python -c 'import json; assert json.load(open("/tests/input.json"))["task_id"] == "jacobian/totient-preimage-completeness-certificate"'

0 commit comments

Comments
 (0)