Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

pp. A:41–A:42 — the simulator halts on every instance of the promise

Proved
ObfImpossibility.RiceSimulator.stage_answer_exists

by mikedeng1 · Oct 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

computabilityp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1promise-problemsrice-theorem

Let Π=(ΠY,ΠN)\Pi=(\Pi_Y,\Pi_N)Π=(ΠY​,ΠN​) be a promise problem closed under [⋅][\cdot][⋅] and let TTT be a machine that decides Π\PiΠ. Then:

  1. for every M∈ΠYM\in\Pi_YM∈ΠY​ there is a stage nnn at which TTT, run for nnn steps, halts on every machine of SnS_nSn​ with output 111;
  2. for every M∈ΠNM\in\Pi_NM∈ΠN​ there is a stage nnn at which TTT, run for nnn steps, halts on every machine of SnS_nSn​ with output 000.

Here SnS_nSn​ is the set of machines of size ∣M∣|M|∣M∣ that are nnn-compatible with MMM. In other words, the simulator of Theorem A.2 halts on every promise instance, with the answer T(⌜M⌝)T(\ulcorner M\urcorner)T(┌M┐). This is the termination half of the proof of Theorem A.2.

Formalization Note The paper says "S always halts"; its argument (and the statement here) covers only M∈ΠY∪ΠNM\in\Pi_Y\cup\Pi_NM∈ΠY​∪ΠN​, where TTT is guaranteed to halt. Outside the promise TTT, and hence the simulator, may diverge.

Preamble
import Mathlib
import Definitions.Def_ObfImpossibility_RiceSimulator_Setting
Formal statement
namespace ObfImpossibility.RiceSimulator

/-- pp. A:41–A:42: the simulator halts on every instance of the promise: for `M ∈ Π_Y`
(resp. `Π_N`) some stage `n` stops with answer `1` (resp. `0`), the answer of `T(M)`. -/
theorem stage_answer_exists (P : PromiseProblem) (hclosed : P.ClosedUnderFn)
    (T : Machine) (hT : Decides T P) :
    (∀ M ∈ P.yes, ∃ n : ℕ, StageAnswer T M n 1) ∧
    (∀ M ∈ P.no, ∃ n : ℕ, StageAnswer T M n 0) := by sorry

end ObfImpossibility.RiceSimulator
Source
Barak et al., On the (Im)possibility of Obfuscating Programs, J. ACM 59(2) (2012), author's copy, pp. A:41–A:42, proof of Theorem A.2
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 2026

    Confirmed by the mission captain (proposal self-audit).

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me