Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Residue encoding and symbol decoding compose to the identity

Proved
Couret.Certificate.symbol_code

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

couret-programmecouret-unification-20261108

Write C=Z/2Z×Z/4ZC=\mathbb Z/2\mathbb Z\times\mathbb Z/4\mathbb ZC=Z/2Z×Z/4Z, with residue map ρ\rhoρ taking (0,0),(0,1),(0,2),(0,3),(1,0),(1,1),(1,2),(1,3)(0,0),(0,1),(0,2),(0,3),(1,0),(1,1),(1,2),(1,3)(0,0),(0,1),(0,2),(0,3),(1,0),(1,1),(1,2),(1,3) to 1,7,19,13,11,17,29,231,7,19,13,11,17,29,231,7,19,13,11,17,29,23, respectively. If s:C→{0,…,7}s:C\to\{0,\ldots,7\}s:C→{0,…,7} is the symbol encoder and ccc the symbol-to-code map in the specified residue ordering, then

c(s(g))=g(g∈C).c(s(g))=g\qquad(g\in C).c(s(g))=g(g∈C).

This fixes one direction of the equivalence between residue coordinates and eight symbols.

Preamble
import Definitions.Def_Couret_BCS4MaskSemantics_c230b02349ef
import Std
import Definitions.Def_Couret_ModularDivisorBridge_2d9305253316

/-! Explicit decoding of the historical Python bit positions.
Bit positions follow [1,7,11,13,17,19,23,29], not lexicographic C2 x C4.
All finite facts below are checked by kernel `decide`.
-/
set_option maxRecDepth 16384
set_option maxHeartbeats 8000000

namespace Couret
namespace Certificate
















Formal statement
theorem symbol_code : ∀ g : Code30, symbolCode (codeSymbol g) = g := by sorry


































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/MaskSemantics.lean, lines 58–58; source file SHA-256 e62d6e7eba64af2437560f86dbb440160326ed6ca55e9e3151a62894e53af0c5; import module renamed from MaskSemantics to BCS4MaskSemantics to disambiguate source modules; theorem Couret.Certificate.symbol_code

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