Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Proof of Thm A.4, p. A:42 — a machine Nn,rN_{n,r}Nn,r​ computing Nn,rN_{n,r}Nn,r​ and running like ZZZ on ∣x∣≤n|x|\le n∣x∣≤n

Proved
ObfImpossibility.RiceNoSize.exists_N

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

computabilityp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1turing-machines

For all n,r∈Nn,r\in\mathbb Nn,r∈N there is a machine NNN that computes the function

Nn,r(x)={0∣x∣≤n,1∣x∣=n+1,r∣x∣≥n+2,N_{n,r}(x)=\begin{cases}0 & |x|\le n,\\ 1 & |x|=n+1,\\ r & |x|\ge n+2,\end{cases}Nn,r​(x)=⎩⎨⎧​01r​∣x∣≤n,∣x∣=n+1,∣x∣≥n+2,​

and runs in time ∣x∣|x|∣x∣ with output 000 on inputs with ∣x∣≤n|x|\le n∣x∣≤n, exactly as ZZZ does: for all xxx with ∣x∣≤n|x|\le n∣x∣≤n and all ttt,

⟨N⟩(1t,x)=⟨Z⟩(1t,x).\langle N\rangle(1^t,x)=\langle Z\rangle(1^t,x).⟨N⟩(1t,x)=⟨Z⟩(1t,x).

In particular ⟨Z⟩(1t,x)=⟨N⟩(1t,x)\langle Z\rangle(1^t,x)=\langle N\rangle(1^t,x)⟨Z⟩(1t,x)=⟨N⟩(1t,x) for all t,∣x∣≤nt,|x|\le nt,∣x∣≤n.

Together with the previous milestone this gives S⟨N⟩()=S⟨Z⟩()=0S^{\langle N\rangle}()=S^{\langle Z\rangle}()=0S⟨N⟩()=S⟨Z⟩()=0 once nnn bounds the queries of S⟨Z⟩()S^{\langle Z\rangle}()S⟨Z⟩().

Formalization Note Inputs are unary (∣x∣=x|x|=x∣x∣=x) and the output rrr is a natural number.

Preamble
import Mathlib
import Definitions.Def_ObfImpossibility_RiceNoSize_ProofObjects
Formal statement
namespace ObfImpossibility.RiceNoSize

/-- p. A:42: for all `n` and `r` there is a machine `N_{n,r}` computing the function
`N_{n,r}` that runs like `Z` (in time `|x|`, output `0`) on every input `x` with `|x| ≤ n`;
in particular `⟨Z⟩(1^t, x) = ⟨N_{n,r}⟩(1^t, x)` for all `t` and all `|x| ≤ n`. -/
theorem exists_N (n r : ℕ) :
    ∃ N : Machine, fn N = Nfun n r ∧
      ∀ x : ℕ, x ≤ n → ∀ t : ℕ, bounded N t x = bounded Z t x := by sorry

end ObfImpossibility.RiceNoSize
Source
Barak et al., On the (Im)possibility of Obfuscating Programs, J. ACM 59(2) (2012), author's copy, p. A:42, proof of Theorem A.4 (the machine N_{n,r} and "For any t, |x| ≤ n, ⟨Z⟩(1^t, x) = ⟨N_{n,r}⟩(1^t, x).")
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