Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Five-prime witness and residue-pair enumeration

Definition
Couret_OptimalFive_2f3f11b1b6a3

by alexcour · Nov 8, 2026 · Mathlib c5ea003 (Lean v4.30.0)

couret-programmecouret-unification-20261108

The witness word is the labeled prime-occurrence list (7,7,7,11,17)(7,7,7,11,17)(7,7,7,11,17), with product 64141. Given a total residue rrr and a natural mask mmm, the pair enumerator scans the fixed Python residue order and returns residue pairs (a,b)(a,b)(a,b) in bit-index order whose two bits are present and whose product code equals rrr.

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

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me