Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Semantic and arithmetic interfaces for finite certificates

Definition
Couret_CertificateProofs_3244eb90a0e1

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

couret-programmecouret-unification-20261108

Defines the decoded state at a table index and the 146 noninitial decoded states. Defines strict-divisor residues, sorted arithmetic residue pairs, genuine factor pairs, concatenation of symbol words, observation machines and their runs, and the 101-class quotient observation machine. Strict divisors satisfy d∣nd\mid nd∣n and 1<d<n1<d<n1<d<n.

Definition code
import Std
import Definitions.Def_Couret_CertificateData_653c7a96c17c

/-! Universal consequences of the finite certificate checks. -/
set_option maxRecDepth 16384
set_option maxHeartbeats 8000000

namespace Couret
namespace Certificate

def decoded (i : StateId) : State Code30 := decode (entry i)





















def noninitialDecoded (i : Fin 146) : State Code30 := decoded i.succ









def strictDivisorResidue (n : Nat) (u : Code30) : Prop :=
  ∃ d : Nat, d ∣ n ∧ 1 < d ∧ d < n ∧ d % 30 = residue30 u

def arithmeticPair (n : Nat) (a b : Symbol) : Prop :=
  strictDivisorResidue n (symbolCode a) ∧ strictDivisorResidue n (symbolCode b) ∧
  a.val ≤ b.val ∧ (residue30 (symbolCode a) * residue30 (symbolCode b)) % 30 = n % 30



def factorPair (n : Nat) (a b : Symbol) : Prop :=
  ∃ d e : Nat, 1 < d ∧ 1 < e ∧ d * e = n ∧
    d % 30 = residue30 (symbolCode a) ∧ e % 30 = residue30 (symbolCode b) ∧ a.val ≤ b.val



















def appendWord (u : Word Symbol) : Word Symbol → Word Symbol
  | .empty => u
  | .snoc v g => .snoc (appendWord u v) g



structure ObservationMachine (β : Type) where
  initial : β
  next : β → Symbol → β
  output : β → Nat

def machineRun {β : Type} (M : ObservationMachine β) (b : β) : Word Symbol → β
  | .empty => b
  | .snoc w g => M.next (machineRun M b w) g







def quotientMachine : ObservationMachine ClassId where
  initial := 0
  next := quotientNext
  output := quotientOutput





end Certificate
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/S4/CertificateProofs.lean; source file SHA-256 34105504de63d99f05e7d3427ba82853380bac1d8c053b618776cd7d98da83b2

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