AFTD Auto-Formalizing Theoretical Domains

three_hadamard_clean_return_phase_sq

theoremverified

Under clean return of the three-Hadamard chain, its returning amplitude (1+u+v-u*v)/(2*sqrt(2)) has square u.

Statement

theorem three_hadamard_clean_return_phase_sq (u v : ℂ)
    (hu : Complex.normSq u = 1) (hv : Complex.normSq v = 1)
    (hreturn : 1 - u + v + u * v = 0) :
    ((1 + u + v - u * v) / (2 * (Real.sqrt 2 : ℂ))) ^ 2 = u
Source
Supporting algebra for OP-3, arXiv:2610.01024, Section E.1; developed in deep session IN-184. These helpers do not establish a lower bound for arbitrary circuit gate lists.
Verified
25 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • three_hadamard_clean_return_phasesFor unit complex phases u and v, vanishing of the unwanted numerator 1-u+v+u*v of an alternating three-Hadamard chain forces u=v and v=i…

The proof, explained

The clean return condition and unit norm constraints restrict the phase parameters $u$ and $v$ via `three_hadamard_clean_return_phases` to $u = v$ with $u \in \{i, -i\}$. The theorem then reduces to verifying the algebraic identity for these two explicit values. In each case, substituting $u = \pm i$ and simplifying powers using $(\sqrt{2})^2 = 2$ and $i^2 = -1$ shows that the returning amplitude squared equals $u$.

  1. $(\sqrt{2})^2 = 2$ in $\mathbb{C}$.

    We evaluate the square of the real square root of 2 using `Real.sq_sqrt` (with $0 \le 2$ verified by `norm_num`) and cast the result from $\mathbb{R}$ to $\mathbb{C}$.

    lines 5–6

    uses Real.sq_sqrt

      have hs : (Real.sqrt 2 : ℂ) ^ 2 = 2 := by
        exact_mod_cast Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)
  2. $\sqrt{2} \neq 0$ in $\mathbb{C}$.

    By contradiction: if $\sqrt{2} = 0$, substituting this into $(\sqrt{2})^2 = 2$ yields $0^2 = 2$, which arithmetic evaluation (`norm_num`) refutes.

    lines 7–10

      have hne : (Real.sqrt 2 : ℂ) ≠ 0 := by
        intro h
        rw [h] at hs
        norm_num at hs
  3. The phases satisfy $u = v$ and $u \in \{i, -i\}$.

    By `three_hadamard_clean_return_phases`, the clean return condition $1 - u + v + uv = 0$ together with $|u|^2 = 1$ and $|v|^2 = 1$ forces $u = v$ and $v \in \{i, -i\}$. We substitute $v = u$ and split into two cases: $u = i$ and $u = -i$.

    line 11

    uses three_hadamard_clean_return_phases

      rcases three_hadamard_clean_return_phases u v hu hv hreturn with ⟨rfl, h | h⟩
  4. The identity $((1 + u + v - uv)/(2\sqrt{2}))^2 = u$ holds in both cases.

    In each case, we substitute the value of $u$ ($i$ or $-i$), distribute the square over the fraction and multiplication using `div_pow` and `mul_pow`, and substitute $(\sqrt{2})^2 = 2$. Simplifying powers of $i$ with $i^2 = -1$ (`Complex.I_sq`) and normalizing algebraic expressions (`ring_nf`, `norm_num`) directly closes the case $u = i$, and reduces the case $u = -i$ to $1/2 - i - 1/2 = -i$, which is closed by ring arithmetic (`ring`).

    lines 12–18

    uses div_pow, mul_pow, Complex.I_sq

      all_goals
        rw [h]
        rw [div_pow, mul_pow, hs]
        norm_num [Complex.I_sq]
        ring_nf
        norm_num [Complex.I_sq]
      all_goals ring
Real.sq_sqrt
For any nonnegative real number $x$, $(\sqrt{x})^2 = x$.
three_hadamard_clean_return_phases
If unit-norm complex numbers $u$ and $v$ satisfy the clean return condition $1 - u + v + uv = 0$, then $u = v$ and $v \in \{i, -i\}$.
div_pow
In a division monoid, $(a / b)^n = a^n / b^n$.
mul_pow
In a commutative monoid, $(a \cdot b)^n = a^n \cdot b^n$.
Complex.I_sq
The imaginary unit satisfies $i^2 = -1$.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem three_hadamard_clean_return_phase_sq (u v : ℂ)    (hu : Complex.normSq u = 1) (hv : Complex.normSq v = 1)    (hreturn : 1 - u + v + u * v = 0) :    ((1 + u + v - u * v) / (2 * (Real.sqrt 2 : ℂ))) ^ 2 = u := by  have hs : (Real.sqrt 2 : ℂ) ^ 2 = 2 := by    exact_mod_cast Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)  have hne : (Real.sqrt 2 : ℂ) ≠ 0 := by    intro h    rw [h] at hs    norm_num at hs  rcases three_hadamard_clean_return_phases u v hu hv hreturn with ⟨rfl, h | h⟩  all_goals    rw [h]    rw [div_pow, mul_pow, hs]    norm_num [Complex.I_sq]    ring_nf    norm_num [Complex.I_sq]  all_goals ring
See it in the graphDiscuss this resultChallenge it