Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Coin trace at arbitrary entropy offsets and call sites

Proved
CountingLLL.ReciprocalTest.shifted_coin_exit

by wcysai · Nov 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithmsprobability

Consider any machine state and any of the three call-site contexts of Algorithm 6. If the next nnn oracle and fair-bit pairs at the state’s current offsets are both false, then the first nonfailed pair returns through the appropriate continuation. The theorem gives the exact small-step state and consumed entropy counters for either an oracle-success exit or a fair-bit exit.

Preamble
import Definitions.Def_CountingLLL_ReciprocalTest
open CountingLLL.ReciprocalTest
Formal statement
theorem CountingLLL.ReciprocalTest.shifted_coin_exit (ω : Entropy) (s : State) (ctx : Context) (n : ℕ)
    (h : ∀ k < n, ω.1 (s.oracleUsed+k) = false ∧ ω.2.1 (s.fairUsed+k) = false) :
    (ω.1 (s.oracleUsed+n) = true →
      (step ω)^[2*n+1] ({s with phase := .coinOracle ctx} : State) =
        coinReturn ctx true {s with phase := .coinOracle ctx, oracleUsed := s.oracleUsed+n+1, fairUsed := s.fairUsed+n}) ∧
    (ω.1 (s.oracleUsed+n) = false → ω.2.1 (s.fairUsed+n) = true →
      (step ω)^[2*n+2] ({s with phase := .coinOracle ctx} : State) =
        coinReturn ctx false {s with phase := .coinOracle ctx, oracleUsed := s.oracleUsed+n+1, fairUsed := s.fairUsed+n+1}) := by sorry
Source
Liu, Wang, Yin, Zhang and Zhou, A Counting and Sampling Lovász Local Lemma, STOC #442, Algorithm 6, pp. 27–28, https://github.com/sigact-stoc/stoc2027/releases/download/papers-1/442.pdf

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