three_hadamard_clean_return_phases
For 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 or v=-i.
Statement
theorem three_hadamard_clean_return_phases (u v : ℂ)
(hu : Complex.normSq u = 1) (hv : Complex.normSq v = 1)
(hreturn : 1 - u + v + u * v = 0) :
u = v ∧ (v = Complex.I ∨ v = -Complex.I)- 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- Used by 1
- three_hadamard_clean_return_phase_sqUnder clean return of the three-Hadamard chain, its returning amplitude (1+u+v-u*v)/(2*sqrt(2)) has square u.
The proof, explained
The equation 1 - u + v + u * v = 0 rearranges to 1 + v = u * (1 - v). Taking the squared complex norm of both sides and using |u|² = 1 shows |1 + v|² = |1 - v|², which expands to reveal Re(v) = 0. Since |v|² = 1, this forces Im(v) = ±1, meaning v = Complex.I or v = -Complex.I. Finally, using v² = -1 and 1 - v ≠ 0, cancelling 1 - v from u * (1 - v) = 1 + v = v * (1 - v) yields u = v.
|1 + v|² = |1 - v|²
The given relation 1 - u + v + u * v = 0 rearranges algebraically to 1 + v = u * (1 - v). Applying the squared complex norm Complex.normSq to both sides via congrArg, and simplifying the right-hand side using multiplicativity (map_mul), the unit modulus assumption |u|² = 1 (hu), and identity multiplication (one_mul), yields |1 + v|² = |1 - v|².
uses
congrArg,map_mul,one_mulhave he : 1 + v = u * (1 - v) := by linear_combination hreturn have hn := congrArg Complex.normSq he rw [map_mul, hu, one_mul] at hn
Re(v) = 0
Expanding |1 + v|² and |1 - v|² with Complex.normSq_add and Complex.normSq_sub, and substituting |v|² = 1 (hv), |1|² = 1 (map_one), and Re(v̄) = Re(v) (Complex.conj_re), simplifies |1 + v|² = |1 - v|² to 2 + 2 Re(v) = 2 - 2 Re(v). Linear arithmetic then forces Re(v) = 0.
uses
Complex.normSq_add,Complex.normSq_sub,map_one,Complex.conj_re,one_mulhave hr : v.re = 0 := by simp only [Complex.normSq_add, Complex.normSq_sub, hv, map_one, Complex.conj_re, one_mul] at hn linarith
Im(v) = 1 ∨ Im(v) = -1
Rewriting the hypothesis |v|² = 1 in terms of real and imaginary parts using Complex.normSq_apply and substituting Re(v) = 0 yields Im(v)² = 1, which factors as (Im(v) - 1) * (Im(v) + 1) = 0. By mul_eq_zero.mp, at least one factor must be zero, so Im(v) = 1 or Im(v) = -1.
uses
Complex.normSq_apply,mul_eq_zero.mphave hi : v.im = 1 ∨ v.im = -1 := by rw [Complex.normSq_apply, hr] at hv have hmul : (v.im - 1) * (v.im + 1) = 0 := by nlinarith [hv] rcases mul_eq_zero.mp hmul with h | h · left; linarith · right; linarith
v = Complex.I ∨ v = -Complex.I
In either case for Im(v), the real part is 0 and the imaginary part is 1 or -1, which match the real and imaginary parts of Complex.I and -Complex.I respectively. By Complex.ext, comparing components establishes that v = Complex.I or v = -Complex.I.
uses
Complex.exthave hvv : v = Complex.I ∨ v = -Complex.I := by rcases hi with hi | hi · left; apply Complex.ext <;> simp [hr, hi] · right; apply Complex.ext <;> simp [hr, hi]
u = v
Since v = ±Complex.I, squaring gives v² = -1. Moreover, 1 - v ≠ 0, since 1 - v = 0 would imply v = 1 and thus Re(v) = 1, contradicting Re(v) = 0. Calculating v * (1 - v) = v - v² = v - (-1) = 1 + v, and recalling 1 + v = u * (1 - v), we obtain u * (1 - v) = v * (1 - v). Cancelling the non-zero factor 1 - v via mul_right_cancel₀ yields u = v.
uses
mul_right_cancel₀have huv : u = v := by have hsq : v * v = -1 := by rcases hvv with h | h <;> rw [h] <;> simp have hne : 1 - v ≠ 0 := by intro h have : v = 1 := by linear_combination -h rw [this] at hr norm_num at hr apply mul_right_cancel₀ hne calc u * (1 - v) = 1 + v := he.symm _ = v * (1 - v) := by linear_combination hsq
u = v ∧ (v = Complex.I ∨ v = -Complex.I)
Pairing the equality u = v with the disjunction v = Complex.I ∨ v = -Complex.I concludes the proof.
exact ⟨huv, hvv⟩
congrArg- Applying a function to both sides of an equality preserves the equality: if a = b then f(a) = f(b).
map_mul- A multiplicative map preserves multiplication: f(x * y) = f(x) * f(y).
one_mul- Multiplying by 1 on the left is the identity: 1 * a = a.
Complex.normSq_add- The squared complex norm of a sum satisfies |z + w|² = |z|² + |w|² + 2 Re(z * w̄).
Complex.normSq_sub- The squared complex norm of a difference satisfies |z - w|² = |z|² + |w|² - 2 Re(z * w̄).
map_one- A unital map sends 1 to 1: f(1) = 1.
Complex.conj_re- The real part of the complex conjugate equals the real part: Re(z̄) = Re(z).
Complex.normSq_apply- The squared norm of a complex number is the sum of the squares of its real and imaginary parts: |z|² = Re(z)² + Im(z)².
mul_eq_zero.mp- If a product is zero, then at least one factor is zero: a * b = 0 implies a = 0 or b = 0.
Complex.ext- Two complex numbers are equal if their real parts and imaginary parts are respectively equal.
mul_right_cancel₀- In a structure with cancellation, if a * c = b * c and c ≠ 0, then a = b.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem three_hadamard_clean_return_phases (u v : ℂ) (hu : Complex.normSq u = 1) (hv : Complex.normSq v = 1) (hreturn : 1 - u + v + u * v = 0) : u = v ∧ (v = Complex.I ∨ v = -Complex.I) := by have he : 1 + v = u * (1 - v) := by linear_combination hreturn have hn := congrArg Complex.normSq he rw [map_mul, hu, one_mul] at hn have hr : v.re = 0 := by simp only [Complex.normSq_add, Complex.normSq_sub, hv, map_one, Complex.conj_re, one_mul] at hn linarith have hi : v.im = 1 ∨ v.im = -1 := by rw [Complex.normSq_apply, hr] at hv have hmul : (v.im - 1) * (v.im + 1) = 0 := by nlinarith [hv] rcases mul_eq_zero.mp hmul with h | h · left; linarith · right; linarith have hvv : v = Complex.I ∨ v = -Complex.I := by rcases hi with hi | hi · left; apply Complex.ext <;> simp [hr, hi] · right; apply Complex.ext <;> simp [hr, hi] have huv : u = v := by have hsq : v * v = -1 := by rcases hvv with h | h <;> rw [h] <;> simp have hne : 1 - v ≠ 0 := by intro h have : v = 1 := by linear_combination -h rw [this] at hr norm_num at hr apply mul_right_cancel₀ hne calc u * (1 - v) = 1 + v := he.symm _ = v * (1 - v) := by linear_combination hsq exact ⟨huv, hvv⟩