Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Fact (1), p. A:41 — nnn-compatibility with MMM is decidable with oracle access to ⟨M⟩\langle M\rangle⟨M⟩

Proved
ObfImpossibility.RiceSimulator.fact_1_compatibility_decidable

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

computabilityoracle-machinesp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1rice-theorem

Let MMM and NNN be machines and n∈Nn\in\mathbb Nn∈N, and recall that NNN is nnn-compatible with MMM when ⟨N⟩(1t,x)=⟨M⟩(1t,x)\langle N\rangle(1^t,x)=\langle M\rangle(1^t,x)⟨N⟩(1t,x)=⟨M⟩(1t,x) for all t≤nt\le nt≤n and all inputs xxx with ∣x∣≤n|x|\le n∣x∣≤n.

There is a single oracle machine CCC that decides nnn-compatibility with MMM using only oracle access to ⟨M⟩\langle M\rangle⟨M⟩: for all machines MMM, NNN and all nnn,

C⟨M⟩(n,⌜N⌝)={1if N is n-compatible with M,0otherwise.C^{\langle M\rangle}(n,\ulcorner N\urcorner)=\begin{cases}1 & \text{if } N \text{ is } n\text{-compatible with } M,\\ 0 & \text{otherwise.}\end{cases}C⟨M⟩(n,┌N┐)={10​if N is n-compatible with M,otherwise.​

In particular CCC halts on every input.

This is fact (1) in the proof of Theorem A.2: the simulator built there recomputes the set SnS_nSn​ of machines of size ∣M∣|M|∣M∣ that are nnn-compatible with MMM at every stage, and this is the uniform procedure that does it.

Formalization Note The pair (n,⌜N⌝)(n,\ulcorner N\urcorner)(n,┌N┐) is passed as Nat.pair n (encode N). The same program CCC must work for every MMM, NNN, nnn (the existential quantifier precedes them), so the statement asserts uniform computability relative to the oracle, not a per-instance property.

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

/-- Fact (1), p. A:41: `n`-compatibility with `M` can be decided using oracle access to `⟨M⟩`,
by one oracle machine `C` that works for every `M`, on input the pair `(n, N)`. -/
theorem fact_1_compatibility_decidable :
    ∃ C : FriedbergMuchnik.Program, ∀ (M N : Machine) (n : ℕ),
      (Compatible n N M → simRun C M (Nat.pair n (Encodable.encode N)) = Part.some 1) ∧
      (¬ Compatible n N M → simRun C M (Nat.pair n (Encodable.encode N)) = Part.some 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, p. A:41, proof of Theorem A.2, fact (1)
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