Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eqs. (1)–(2), (15), (21)–(22) — the Solovay-Kitaev recursion returns ε_n-approximations of length ≤ 5ⁿ l₀

Proved
SKAlgorithm.Qudit.recursion_invariant

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

p2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-compilingsolovay-kitaev

Fix ddd and constants cgc′,cgc′′>0c_{gc'}, c_{gc''} > 0cgc′​,cgc′′​>0. There are constants c>0c > 0c>0 and ϵ∗>0\epsilon^\ast > 0ϵ∗>0 with the following property. Let G⊆SU(d)\mathcal G \subseteq SU(d)G⊆SU(d) be finite and closed under g↦g†g \mapsto g^\daggerg↦g†, let 0<ϵ0≤ϵ∗0 < \epsilon_0 \le \epsilon^\ast0<ϵ0​≤ϵ∗ and l0∈Nl_0 \in \mathbb Nl0​∈N, and let ϵn\epsilon_nϵn​ be defined by ϵn=c ϵn−13/2\epsilon_n = c\, \epsilon_{n-1}^{3/2}ϵn​=cϵn−13/2​ (Eq. (1)). Suppose

  1. the lookup routine returns, for every U∈SU(d)U \in SU(d)U∈SU(d), a sequence basic(U)\mathrm{basic}(U)basic(U) of gates from G\mathcal GG of length at most l0l_0l0​ with d(U,basic(U))<ϵ0d(U, \mathrm{basic}(U)) < \epsilon_0d(U,basic(U))<ϵ0​;
  2. the decomposition routine, at every level kkk, returns for every Δ∈SU(d)\Delta \in SU(d)Δ∈SU(d) with d(I,Δ)<ϵkd(I, \Delta) < \epsilon_kd(I,Δ)<ϵk​ a pair (V,W)=gck(Δ)(V, W) = \mathrm{gc}_k(\Delta)(V,W)=gck​(Δ) in SU(d)SU(d)SU(d) with
d(VWV†W†,Δ)<cgc′ ϵk3/2,d(I,V), d(I,W)<cgc′′ϵk.d(VWV^\dagger W^\dagger, \Delta) < c_{gc'}\, \epsilon_k^{3/2}, \qquad d(I, V),\ d(I, W) < c_{gc''} \sqrt{\epsilon_k} .d(VWV†W†,Δ)<cgc′​ϵk3/2​,d(I,V), d(I,W)<cgc′′​ϵk​​.

Then for every nnn and every U∈SU(d)U \in SU(d)U∈SU(d) the sequence Un=SK(U,n)U_n = \mathrm{SK}(U, n)Un​=SK(U,n) consists of gates from G\mathcal GG, has length at most 5nl05^n l_05nl0​ (Eq. (2), ln=5ln−1l_n = 5 l_{n-1}ln​=5ln−1​), and

d(U,Un)<ϵn.d(U, U_n) < \epsilon_n .d(U,Un​)<ϵn​.

This is the accuracy and length analysis of the qudit algorithm: Lemma 1 bounds the error of the approximate commutator (Eq. (15)) and the triangle inequality (Eqs. (21)–(22)) gives ϵn=(cgc′+capprox)ϵn−13/2\epsilon_n = (c_{gc'} + c_{\mathrm{approx}})\epsilon_{n-1}^{3/2}ϵn​=(cgc′​+capprox​)ϵn−13/2​.

Formalization Note. The constant ccc plays the role of cgc′+capproxc_{gc'} + c_{\mathrm{approx}}cgc′​+capprox​ and is existential (the paper estimates capprox≈8cgc′′c_{\mathrm{approx}} \approx 8c_{gc''}capprox​≈8cgc′′​ only approximately); ccc and ϵ∗\epsilon^\astϵ∗ depend on cgc′,cgc′′c_{gc'}, c_{gc''}cgc′​,cgc′′​ (and possibly ddd) only, and are chosen before G\mathcal GG, ϵ0\epsilon_0ϵ0​, l0l_0l0​ and the routines. The threshold ϵ0≤ϵ∗\epsilon_0 \le \epsilon^\astϵ0​≤ϵ∗ is the paper's requirement ϵ0<1/capprox2\epsilon_0 < 1/c_{\mathrm{approx}}^2ϵ0​<1/capprox2​ (p. 6) that makes the accuracies decrease. The length bound is Eq. (2) unrolled. The decomposition routine is indexed by the level (see the definition file).

Preamble
import Mathlib
import Definitions.Def_SKAlgorithm_Qudit_Model

open scoped Matrix
open QAlgorithms
Formal statement
namespace SKAlgorithm.Qudit

theorem recursion_invariant (d : ℕ) (c' c'' : ℝ) (hc' : 0 < c') (hc'' : 0 < c'') :
    ∃ c εs : ℝ, 0 < c ∧ 0 < εs ∧
      ∀ (G : Finset (SU d)), (∀ g ∈ G, g⁻¹ ∈ G) →
      ∀ (ε₀ : ℝ) (l₀ : ℕ), 0 < ε₀ → ε₀ ≤ εs →
      ∀ (basic : SU d → List (SU d)) (gc : ℕ → SU d → SU d × SU d),
        (∀ U : SU d, (∀ g ∈ basic U, g ∈ G) ∧ (basic U).length ≤ l₀ ∧
          opDist U (seqUnitary (basic U)) < ε₀) →
        (∀ (k : ℕ) (Δ : SU d), opDist 1 Δ < epsSeq c ε₀ k →
          opDist ((gc k Δ).1 * (gc k Δ).2 * (gc k Δ).1⁻¹ * (gc k Δ).2⁻¹) Δ <
              c' * epsSeq c ε₀ k ^ ((3 : ℝ) / 2) ∧
            opDist 1 (gc k Δ).1 < c'' * Real.sqrt (epsSeq c ε₀ k) ∧
            opDist 1 (gc k Δ).2 < c'' * Real.sqrt (epsSeq c ε₀ k)) →
        ∀ (n : ℕ) (U : SU d),
          (∀ g ∈ solovayKitaev basic gc n U, g ∈ G) ∧
          (solovayKitaev basic gc n U).length ≤ 5 ^ n * l₀ ∧
          opDist U (seqUnitary (solovayKitaev basic gc n U)) < epsSeq c ε₀ n := by sorry

end SKAlgorithm.Qudit
Source
Dawson and Nielsen, The Solovay-Kitaev algorithm, arXiv:quant-ph/0505030v2, p. 6, Eqs. (1)–(2) and 'we must have ǫ0 < 1/c²approx'; p. 9, Eq. (15); p. 11, Eqs. (21)–(22)
Human review
  • Endorsed by Shuze Chen · Oct 22, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 22, 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