/- Route 308, machine-checked: the prefix-308 covering certificate of the 83# ascent. Convention (identical to the corpus verifier `witness.py`): a configuration at level n chooses one residue `a_p` per prime p in {5, …, p_n}; its covered set is the union of the pairs {a_p, a_p + c_p} (mod p) with `c_p = 2 * 6⁻¹ mod p`; its prefix is the least j ≥ 0 that is in no pair. The certificate filed for R = 308 has the 21 residues below and prefix exactly 308. What this file machine-checks: the FINITE statement — every j < 308 is covered, and j = 308 is not — plus the certificate's own `c_p` values. The step from "every j < 308 is covered" to `A144311(23) ≥ 6·308 + 5 = 1853` is Lemma 1 of the corpus's derivation (definitional) and is cited there, not re-proved here. -/ namespace Route308 /-- the 21 primes of the 83# rung -/ def primes : List Nat := [5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83] /-- the residues of the filed certificate, in the same order -/ def residues : List Nat := [2, 3, 10, 1, 5, 13, 10, 6, 30, 3, 5, 14, 32, 10, 55, 36, 57, 68, 38, 63, 34] /-- the least s with 6s ≡ 1 (mod p), as `witness.py` computes it -/ def inv6 (p : Nat) : Nat := ((List.range p).find? (fun s => (6 * s) % p == 1)).getD 0 /-- c_p = 2 · 6⁻¹ mod p -/ def cp (p : Nat) : Nat := (2 * inv6 p) % p /-- is j covered by the prime p with residue a? -/ def killed (p a j : Nat) : Bool := j % p == a % p || j % p == (a + cp p) % p /-- the (prime, residue) pairs of the certificate -/ def pairs : List (Nat × Nat) := primes.zip residues /-- is j covered by some pair? -/ def covered (j : Nat) : Bool := pairs.any (fun pa => killed pa.1 pa.2 j) theorem prime_count : primes.length = 21 := by native_decide /-- the certificate's c_p values, as `witness.py` prints them -/ theorem c_values_match : primes.map cp = [2, 5, 4, 9, 6, 13, 8, 10, 21, 25, 14, 29, 16, 18, 20, 41, 45, 24, 49, 53, 28] := by native_decide /-- the covering: every j < 308 lies in some pair -/ theorem prefix_308_covered : (List.range 308).all covered = true := by native_decide /-- and it stops there: 308 itself is uncovered, so the prefix is exactly 308 -/ theorem prefix_is_exactly_308 : covered 308 = false := by native_decide /-- control: the machinery can fail — "every j < 309 is covered" is false, because 308 is not -/ theorem extra_index_is_not_covered : (List.range 309).all covered = false := by native_decide /-- the arithmetic of the certified bound -/ theorem certified_bound : 6 * 308 + 5 = 1853 ∧ 6 * 308 + 6 = 1854 := by decide end Route308