Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

§3, p. 6 — iteration i of MITM-factor tests depth 2i − 1, then depth 2i

Proved
QCircMITM.Search.iteration_tests

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

algorithm-correctnesscircuit-depthmeet-in-the-middlep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-circuit-synthesis

Let V⊆U(2n)V \subseteq U(2^n)V⊆U(2n) be a finite set of unitaries (standing for Vn,G\mathcal V_{n,\mathcal G}Vn,G​), UUU a unitary and i≥1i \ge 1i≥1. Consider iteration iii of MITM-factor, which tests Si−1†U∩Si≠∅S_{i-1}^\dagger U \cap S_i \neq \emptysetSi−1†​U∩Si​=∅ and then Si†U∩Si≠∅S_i^\dagger U \cap S_i \neq \emptysetSi†​U∩Si​=∅.

  1. The iteration returns nothing if and only if U∉S2i−1U \notin S_{2i-1}U∈/S2i−1​ and U∉S2iU \notin S_{2i}U∈/S2i​.
  2. If it returns a circuit ccc, then every layer of ccc lies in VVV, ccc implements UUU, and
∣c∣={2i−1if U∈S2i−1,2iif U∉S2i−1.|c| = \begin{cases} 2i-1 & \text{if } U \in S_{2i-1},\\ 2i & \text{if } U \notin S_{2i-1}.\end{cases}∣c∣={2i−12i​if U∈S2i−1​,if U∈/S2i−1​.​

In words: the first test succeeds exactly when UUU has a circuit of depth 2i−12i-12i−1, the second exactly when it has one of depth 2i2i2i, and the returned circuit has that depth.

Formalization Note. ∣c∣|c|∣c∣ is the length of the list ccc of layers. The statement holds for every finite set of unitaries VVV.

Preamble
import Mathlib
import Definitions.Def_QCircMITM_Search_Algorithm
Formal statement
namespace QCircMITM.Search

theorem iteration_tests {n : ℕ} (V : Finset (Unitary n)) (U : Unitary n) (i : ℕ) (hi : 1 ≤ i) :
    (mitmStep V U i = none ↔ U ∉ S V (2 * i - 1) ∧ U ∉ S V (2 * i)) ∧
    ∀ c, mitmStep V U i = some c →
      (∀ W ∈ c, W ∈ V) ∧ c.prod = U ∧
      (U ∈ S V (2 * i - 1) → c.length = 2 * i - 1) ∧
      (U ∉ S V (2 * i - 1) → c.length = 2 * i) := by sorry

end QCircMITM.Search
Source
Amy, Maslov, Mosca, Roetteler, A meet-in-the-middle algorithm for fast synthesis of depth-optimal quantum circuits, arXiv:1206.0758v3, p. 6, §3 (paragraph after the MITM-factor pseudocode)
Human review
  • Endorsed by Shuze Chen · Oct 21, 2026

    Confirmed by the moderator at approval.

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