Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§3: exact recovery of a permutation eigenphase

Open
QAlgorithms.Papers.Independent.Intakethird100.P03.rational_phase_reconstruction

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let 0≤ϕ<10\le\phi<10≤ϕ<1 be rational with denominator at most 2n2^n2n, and suppose a measurement returns the dyadic code ϕ′=u/22n+1\phi'=u/2^{2n+1}ϕ′=u/22n+1 with 0≤u<22n+10\le u<2^{2n+1}0≤u<22n+1. If its circular distance from ϕ\phiϕ satisfies

dR/Z(ϕ′,ϕ)≤2−2n−1,d_{\mathbb R/\mathbb Z}(\phi',\phi)\le 2^{-2n-1},dR/Z​(ϕ′,ϕ)≤2−2n−1,

then ϕ\phiϕ is the unique normalized rational phase of denominator at most 2n2^n2n within that distance. One classical polynomial-time procedure, chosen before n,u,ϕn,u,\phin,u,ϕ, maps the full 2n+12n+12n+1-bit dyadic word to the exact numerator/denominator encoding of ϕ\phiϕ.

The zero phase is included, and the dyadic numerator need not be coprime to its denominator. The fixed-width input has length O(n+1)O(n+1)O(n+1), so polynomial-time reconstruction has the source's bit-cost meaning.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P03
Formal statement
noncomputable section

open scoped Matrix ComplexConjugate Kronecker

namespace QAlgorithms.Papers.Independent.Intakethird100.P03

open QAlgorithms.Papers.Independent.Renew46.P01 (cleanVector)

attribute [local instance] Classical.propDecidable

/-- PDF p.18: unique exact rational recovery from a 2n+1-bit dyadic measurement within
2^(-2n-1) on the phase circle, in polynomial time. The zero phase is included. -/
theorem rational_phase_reconstruction :
    ∃ recover : List Bool → List Bool, QAlgorithms.Complexity.PolyTimeComputable recover ∧
      ∀ (n numerator : ℕ), numerator < 2 ^ (2 * n + 1) →
      ∀ phi : ℚ, 0 ≤ phi → phi < 1 → phi.den ≤ 2 ^ n →
      phaseDistance ((numerator : ℝ) / (2 : ℝ) ^ (2 * n + 1)) (phi : ℝ) ≤
        1 / (2 : ℝ) ^ (2 * n + 1) →
      recover (rationalRecoveryInput n numerator) = encodeRational phi ∧
      ∀ psi : ℚ, 0 ≤ psi → psi < 1 → psi.den ≤ 2 ^ n →
        phaseDistance ((numerator : ℝ) / (2 : ℝ) ^ (2 * n + 1)) (psi : ℝ) ≤
          1 / (2 : ℝ) ^ (2 * n + 1) → psi = phi := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P03

end
Source
Quantum measurements and the Abelian Stabilizer Problem, arXiv:quant-ph/9511026v1, PDF p. 18, §3: exact recovery of a permutation eigenphase
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

There exists a function RRR from finite Boolean strings to finite Boolean strings that is computable in polynomial time by a Turing machine and has the following property. For every pair of natural numbers n,an,an,a with a<22n+1a<2^{2n+1}a<22n+1, and every rational number ϕ\phiϕ satisfying 0≤ϕ<10\le\phi<10≤ϕ<1, whose positive reduced denominator is at most 2n2^n2n, if

d ⁣(a22n+1,ϕ)≤2−(2n+1),d(x,y)=min⁡({x−y}, 1−{x−y}),d\!\left(\frac{a}{2^{2n+1}},\phi\right)\le 2^{-(2n+1)}, \qquad d(x,y)=\min\bigl(\{x-y\},\,1-\{x-y\}\bigr),d(22n+1a​,ϕ)≤2−(2n+1),d(x,y)=min({x−y},1−{x−y}),

where {t}=t−⌊t⌋\{t\}=t-\lfloor t\rfloor{t}=t−⌊t⌋, then RRR, applied to nnn true bits followed by one false bit and the 2n+12n+12n+1-bit, most-significant-bit-first representation of aaa, returns the prescribed encoding of ϕ\phiϕ. Moreover, every rational ψ\psiψ satisfying 0≤ψ<10\le\psi<10≤ψ<1, reduced denominator at most 2n2^n2n, and the same non-strict distance bound equals ϕ\phiϕ. The prescribed rational encoding concatenates the encoding of the signed reduced numerator with that of the positive reduced denominator: a signed integer is encoded by its negativity bit followed by the natural-number encoding of its absolute value, and a natural number ttt is encoded by taking the least-significant-bit-first binary digits of t+1t+1t+1, prefixing as many true bits as there are digits, and then one false bit. The statement includes n=0n=0n=0 and equality in the distance bound. It imposes no output requirement when no qualifying rational exists or on strings outside the specified inputs.

Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me