Five-prime witness and residue-pair enumeration
DefinitionCouret_OptimalFive_2f3f11b1b6a3couret-programmecouret-unification-20261108
The witness word is the labeled prime-occurrence list , with product 64141. Given a total residue and a natural mask , the pair enumerator scans the fixed Python residue order and returns residue pairs in bit-index order whose two bits are present and whose product code equals .
This packages the concrete optimality witness and its finite residue-pair output interface.
Definition code
import Std
import Definitions.Def_Couret_DavenportThreshold_ac37b2f8de8c
set_option maxRecDepth 100000
set_option maxHeartbeats 4000000
namespace Couret
namespace S5
def fivePrimes : Word Nat := .snoc (.snoc (.snoc (.snoc (.snoc .empty 7) 7) 7) 11) 17
def pairList (r : Code30) (mask : Nat) : List (Nat × Nat) :=
pythonAlphabet.flatMap (fun a =>
(pythonAlphabet.filter (fun b => decide (bitIndex30 a ≤ bitIndex30 b ∧
maskSupport mask a ∧ maskSupport mask b ∧ mul30 a b = r))).map
(fun b => (residue30 a,residue30 b)))
end S5
end Couret
Source
Alexandre Couret, Certified minimal memory for a divisor-residue presence observable modulo 30, https://zenodo.org/records/23989640; archive Couret_BC_MOD30_Companion_20261105.zip, SHA-256 9bb2678164c63a9e47c192093f5ce9deb1b7b74a1f1c8fecc77f305a408266a2; file source/S5/OptimalFive.lean; source file SHA-256 10e4872f2ae446d57ad6e2c526d92085da7cdb70df9bb99e2641c0da1b7e7c1f