Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 6 — explicit bound adv⁡b′(MOD12b)≤min⁡{1/2,B12(b′)}\operatorname{adv}_{b'}(\mathsf{MOD12}_b)\le\min\{1/2,B_{12}(b')\}advb′​(MOD12b​)≤min{1/2,B12​(b′)}

Open
GoldreichAffine.Exponential.Supplement.mod12_advantage_bound

by mikedeng1 · Nov 15, 2026 · Mathlib 0df444a (Lean v4.33.1)

boolean-functionscryptographyp2o-batch-stoc27sp2o-gran-per-chapterp2o-plan-paperp2o-v1

For integers b≥1b\ge1b≥1 and 1≤b′≤b1\le b'\le b1≤b′≤b, let

B12(b′)=26[(cos⁡π12)b′+(sin⁡π12)b′+2−b′/2]+13(32)b′.B_{12}(b')=\frac{\sqrt2}{6}\Big[\Big(\cos\frac\pi{12}\Big)^{b'}+\Big(\sin\frac\pi{12}\Big)^{b'}+2^{-b'/2}\Big]+\frac1{\sqrt3}\Big(\frac{\sqrt3}2\Big)^{b'} .B12​(b′)=62​​[(cos12π​)b′+(sin12π​)b′+2−b′/2]+3​1​(23​​)b′.

Then the bit-fixing affine advantage of MOD12b\mathsf{MOD12}_bMOD12b​ at b′b'b′ remaining inputs satisfies

adv⁡b′(MOD12b)≤min⁡{12, B12(b′)}.(7)\operatorname{adv}_{b'}(\mathsf{MOD12}_b)\le\min\Big\{\frac12,\ B_{12}(b')\Big\}. \tag{7}advb′​(MOD12b​)≤min{21​, B12​(b′)}.(7)

This companion theorem gives an explicit exponentially decaying bound, uniform over all partial input fixings, on how well any residual of MOD12 is approximated by an affine function.

Differences from the source:

  • encoding: b ≥ 1 and 1 ≤ b′ ≤ b → 1 ≤ b′ and b′ ≤ b; reason: b ≥ 1 follows from 1 ≤ b′ ≤ b
  • encoding: 2^{−b′/2} → (2:ℝ) ^ (−(b′:ℝ)/2), a real power; reason: b′ may be odd
Preamble
import Definitions.Def_GoldreichAffine_Exponential_Supplement_Modular
open MatousekLP.Codes (Word weight)
set_option autoImplicit false
Formal statement
namespace GoldreichAffine.Exponential.Supplement

/-- Theorem 6, printed pp.10–11 / PDF pp.11–12, Eq. (7): adv_{b'}(MOD12_b) ≤ min{1/2, B12(b')},
    1 ≤ b' ≤ b (so b ≥ 1). -/
theorem mod12_advantage_bound (b b' : ℕ) (hb' : 1 ≤ b') (hbb : b' ≤ b) :
    advantage (mod12 b) b' ≤ min (1 / 2) (B12 b') := by sorry

end GoldreichAffine.Exponential.Supplement
Source
Ximing Fu, Mo Li, Shihan Lyu, Affine Advantage in Guess-type Attacks on Goldreich’s PRGs: Generalization, Characterization and Countermeasures, STOC 2027 submission #579 (October 2026), PDF SHA-256 c6e5f1bfbc08adde62b9863b4417adb47a894635ef9e887e40be2e7fcd8c0594, pp. 10–11 (PDF pp. 11–12), Theorem 6, Eq. (7); proof App. B.2, pp. 29–30 (PDF pp. 30–31)

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