Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Deferred decisions at a reveal-machine step

Proved
CountingLLL.RevealMachine.fresh_query_probability

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

algorithmsprobability

For a deterministic reveal machine running on an independent countable-valued array, consider an observable program-state event RRR at a fixed step where a query is present. If, on that event, the queried coordinate has not previously been read and its designated coordinate event has probability ppp, then the probability of RRR together with that coordinate event is ppp times the probability of RRR. Coordinate laws may differ. This is a generic machine theorem; instantiating it for ReciprocalTest remains separate.

Preamble
import Definitions.Def_CountingLLL_RevealMachine
open MeasureTheory ProbabilityTheory CountingLLL.RevealMachine
open scoped ENNReal
Formal statement
theorem CountingLLL.RevealMachine.fresh_query_probability {σ ι α : Type*} [Countable ι] [DecidableEq ι]
    [MeasurableSpace α] [Countable α] [MeasurableSingletonClass α]
    (P : Program σ ι α) (initial : σ) (n : ℕ) (default : ι) (R : Set σ)
    (κ : ι → Measure α) [∀ i, IsProbabilityMeasure (κ i)]
    (A : ι → Set α) (hA : ∀ i, MeasurableSet (A i)) (p : ℝ≥0∞)
    (hfresh : ∀ ω, (run P ω initial n).1 ∈ R → (P.query (run P ω initial n).1).isSome →
      (P.query (run P ω initial n).1).getD default ∉ (run P ω initial n).2)
    (hsame : ∀ ω, (run P ω initial n).1 ∈ R → (P.query (run P ω initial n).1).isSome →
      κ ((P.query (run P ω initial n).1).getD default) (A ((P.query (run P ω initial n).1).getD default)) = p) :
    (Measure.infinitePi κ) {ω | (run P ω initial n).1 ∈ R ∧ (P.query (run P ω initial n).1).isSome ∧
      ω ((P.query (run P ω initial n).1).getD default) ∈ A ((P.query (run P ω initial n).1).getD default)} =
    (Measure.infinitePi κ) {ω | (run P ω initial n).1 ∈ R ∧ (P.query (run P ω initial n).1).isSome} * p := 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