anticommuting_hermitian_expectation_sq_le_one
If continuous linear operators P and Q on a complex Hilbert space are self-adjoint, have operator norm at most one, and anticommute (P * Q + Q * P = 0), then for any unit vector psi, the sum of the squares of the real expectation values satisfies (re <psi, P psi>)^2 + (re <psi, Q psi>)^2 <= 1.
Statement
theorem anticommuting_hermitian_expectation_sq_le_one {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] (P Q : E →L[ℂ] E) (hP : IsSelfAdjoint P) (hQ : IsSelfAdjoint Q) (hP_norm : ‖P‖ ≤ 1) (hQ_norm : ‖Q‖ ≤ 1) (h_anticomm : P * Q + Q * P = 0) (ψ : E) (hψ : ‖ψ‖ = 1) : (RCLike.re (inner ℂ ψ (P ψ))) ^ 2 + (RCLike.re (inner ℂ ψ (Q ψ))) ^ 2 ≤ 1
- Formalizes
- arXiv:2610.35838 Appendix E, Fact 1
- Verified
- 01 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext
Read back from the Lean
Let $E$ be a complex Hilbert space (a complete normed additive commutative group with an inner product space structure over $\mathbb{C}$). Let $P, Q : E \toL[\mathbb{C}] E$ be continuous linear operators such that:
1. $P$ is self-adjoint (IsSelfAdjoint P),
2. $Q$ is self-adjoint (IsSelfAdjoint Q),
3. The operator norm of $P$ satisfies $\|P\| \le 1$,
4. The operator norm of $Q$ satisfies $\|Q\| \le 1$, and
5. $P$ and $Q$ anticommute, i.e., $P \circ Q + Q \circ P = 0$.
Then for any unit vector $\psi \in E$ (satisfying $\|\psi\| = 1$), the sum of the squares of the real parts of the expectation values of $P$ and $Q$ on $\psi$ is at most $1$:
$$(\operatorname{Re} \langle \psi, P\psi \rangle)^2 + (\operatorname{Re} \langle \psi, Q\psi \rangle)^2 \le 1.$$
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
To prove $(\operatorname{Re}\langle\psi, P\psi\rangle)^2 + (\operatorname{Re}\langle\psi, Q\psi\rangle)^2 \le 1$, we set $a = \operatorname{Re}\langle\psi, P\psi\rangle$, $b = \operatorname{Re}\langle\psi, Q\psi\rangle$, and define the test vector $v = a P\psi + b Q\psi$. Using self-adjointness and the anticommutation relation $PQ + QP = 0$, the real cross term $\operatorname{Re}\langle P\psi, Q\psi\rangle$ vanishes, which implies $\|v\|^2 \le a^2 + b^2$ because $\|P\|, \|Q\| \le 1$ and $\|\psi\| = 1$. Meanwhile, computing $\operatorname{Re}\langle \psi, v\rangle = a^2 + b^2$ and applying Cauchy-Schwarz gives $a^2 + b^2 \le \|v\|$. Squaring this bound gives $(a^2 + b^2)^2 \le \|v\|^2 \le a^2 + b^2$, which immediately implies $a^2 + b^2 \le 1$.
Define the real expectation values $a = \operatorname{Re}\langle \psi, P\psi\rangle$ and $b = \operatorname{Re}\langle \psi, Q\psi\rangle$, and form the test vector $v = a P\psi + b Q\psi$.
We introduce real shorthands $a$ and $b$ for the real expectation values of $P$ and $Q$ in the quantum state $\psi$, and construct the linear combination $v = a P\psi + b Q\psi \in E$.
set a := RCLike.re (inner ℂ ψ (P ψ)) set b := RCLike.re (inner ℂ ψ (Q ψ)) set v := (a : ℂ) • (P ψ) + (b : ℂ) • (Q ψ)
The vectors $P\psi$ and $Q\psi$ are orthogonal with respect to the real part of the inner product: $\operatorname{Re}\langle P\psi, Q\psi\rangle = 0$.
Using the self-adjointness of $P$ and $Q$, we have $\langle P\psi, Q\psi\rangle = \langle \psi, P Q\psi\rangle$ and $\langle Q\psi, P\psi\rangle = \langle \psi, Q P\psi\rangle$. By conjugate symmetry, $\langle P\psi, Q\psi\rangle + \overline{\langle P\psi, Q\psi\rangle} = \langle \psi, (PQ + QP)\psi\rangle$. Since $P$ and $Q$ anticommute ($PQ + QP = 0$), this sum is zero. Using the identity $z + \bar{z} = 2\operatorname{Re}(z)$, we get $2\operatorname{Re}\langle P\psi, Q\psi\rangle = 0$, which implies $\operatorname{Re}\langle P\psi, Q\psi\rangle = 0$.
uses
ContinuousLinearMap.adjoint_inner_right,ContinuousLinearMap.star_eq_adjoint,inner_conj_symm,inner_add_right,inner_zero_right,RCLike.add_conj,mul_eq_zero.mp,Complex.ofReal_eq_zero.mphave h_ortho : RCLike.re (inner ℂ (P ψ) (Q ψ)) = 0 := by have h1 : inner ℂ (P ψ) (Q ψ) = inner ℂ ψ (P (Q ψ)) := by have h := ContinuousLinearMap.adjoint_inner_right P ψ (Q ψ) rw [← ContinuousLinearMap.star_eq_adjoint, hP] at h exact h.symm have h2 : inner ℂ (Q ψ) (P ψ) = inner ℂ ψ (Q (P ψ)) := by have h := ContinuousLinearMap.adjoint_inner_right Q ψ (P ψ) rw [← ContinuousLinearMap.star_eq_adjoint, hQ] at h exact h.symm have h3 : starRingEnd ℂ (inner ℂ (P ψ) (Q ψ)) = inner ℂ (Q ψ) (P ψ) := inner_conj_symm (Q ψ) (P ψ) have h4 : inner ℂ (P ψ) (Q ψ) + starRingEnd ℂ (inner ℂ (P ψ) (Q ψ)) = 0 := by rw [h3, h1, h2, ← inner_add_right] change inner ℂ ψ ((P * Q + Q * P) ψ) = 0 rw [h_anticomm] exact inner_zero_right ψ have h5 := (RCLike.add_conj (inner ℂ (P ψ) (Q ψ))).symm.trans h4 have h6 : (RCLike.re (inner ℂ (P ψ) (Q ψ)) : ℂ) = 0 := by cases mul_eq_zero.mp h5 with | inl h7 => norm_num at h7 | inr h7 => exact h7 exact Complex.ofReal_eq_zero.mp h6
The squared norm of the test vector satisfies $\|v\|^2 \le a^2 + b^2$.
Expanding $\|v\|^2 = \|a P\psi + b Q\psi\|^2$ gives $\|a P\psi\|^2 + 2ab\operatorname{Re}\langle P\psi, Q\psi\rangle + \|b Q\psi\|^2$. The cross term vanishes because $\operatorname{Re}\langle P\psi, Q\psi\rangle = 0$. Since $P$ and $Q$ have operator norm at most 1 and $\|\psi\| = 1$, we have $\|P\psi\| \le 1$ and $\|Q\psi\| \le 1$. Therefore $\|a P\psi\|^2 = a^2 \|P\psi\|^2 \le a^2$ and $\|b Q\psi\|^2 = b^2 \|Q\psi\|^2 \le b^2$, which yields $\|v\|^2 \le a^2 + b^2$.
uses
norm_add_sq,mul_zero,mul_le_mul_of_nonneg_right,zero_le_one,norm_smul,Complex.norm_real,Real.norm_eq_abs,mul_pow,sq_abs,norm_nonneghave h_norm_sq : ‖v‖ ^ 2 ≤ a ^ 2 + b ^ 2 := by rw [norm_add_sq (𝕜 := ℂ)] have h_cross : RCLike.re (inner ℂ ((a : ℂ) • (P ψ)) ((b : ℂ) • (Q ψ))) = 0 := by calc RCLike.re (inner ℂ ((a : ℂ) • (P ψ)) ((b : ℂ) • (Q ψ))) _ = a * b * RCLike.re (inner ℂ (P ψ) (Q ψ)) := by simp; ring _ = 0 := by rw [h_ortho, mul_zero] have hP_le : ‖P ψ‖ ≤ 1 := by have h := P.le_opNorm ψ have : ‖P‖ * ‖ψ‖ ≤ 1 * 1 := by rw [hψ]; exact mul_le_mul_of_nonneg_right hP_norm zero_le_one linarith have hQ_le : ‖Q ψ‖ ≤ 1 := by have h := Q.le_opNorm ψ have : ‖Q‖ * ‖ψ‖ ≤ 1 * 1 := by rw [hψ]; exact mul_le_mul_of_nonneg_right hQ_norm zero_le_one linarith have hP_sq : ‖(a : ℂ) • (P ψ)‖ ^ 2 ≤ a ^ 2 := by rw [norm_smul, Complex.norm_real, Real.norm_eq_abs, mul_pow, sq_abs] have : ‖P ψ‖ ^ 2 ≤ 1 := by have : 0 ≤ ‖P ψ‖ := norm_nonneg _ nlinarith nlinarith have hQ_sq : ‖(b : ℂ) • (Q ψ)‖ ^ 2 ≤ b ^ 2 := by rw [norm_smul, Complex.norm_real, Real.norm_eq_abs, mul_pow, sq_abs] have : ‖Q ψ‖ ^ 2 ≤ 1 := by have : 0 ≤ ‖Q ψ‖ := norm_nonneg _ nlinarith nlinarith linarith
The real inner product of $\psi$ with $v$ equals $a^2 + b^2$: $\operatorname{Re}\langle \psi, v\rangle = a^2 + b^2$.
Expanding $v = a P\psi + b Q\psi$ inside $\langle \psi, v\rangle$ by linearity in the second argument yields $\operatorname{Re}(a\langle\psi, P\psi\rangle + b\langle\psi, Q\psi\rangle)$. Pulling the real scalars $a$ and $b$ out of the real part and using the definitions of $a = \operatorname{Re}\langle\psi, P\psi\rangle$ and $b = \operatorname{Re}\langle\psi, Q\psi\rangle$, this evaluates to $a \cdot a + b \cdot b = a^2 + b^2$.
uses
inner_add_right,inner_smul_right,map_add,sqhave h_inner : RCLike.re (inner ℂ ψ v) = a ^ 2 + b ^ 2 := by simp only [v, inner_add_right, inner_smul_right, map_add] have ha : RCLike.re ((a : ℂ) * inner ℂ ψ (P ψ)) = a ^ 2 := by have h : RCLike.re ((a : ℂ) * inner ℂ ψ (P ψ)) = a * RCLike.re (inner ℂ ψ (P ψ)) := by simp rw [h, sq] have hb : RCLike.re ((b : ℂ) * inner ℂ ψ (Q ψ)) = b ^ 2 := by have h : RCLike.re ((b : ℂ) * inner ℂ ψ (Q ψ)) = b * RCLike.re (inner ℂ ψ (Q ψ)) := by simp rw [h, sq] rw [ha, hb]
By the Cauchy-Schwarz inequality, $a^2 + b^2 \le \|v\|$.
We bound $\operatorname{Re}\langle \psi, v\rangle \le |\langle \psi, v\rangle|$. By Cauchy-Schwarz, $|\langle \psi, v\rangle| \le \|\psi\| \cdot \|v\|$. Since $\psi$ is a unit vector ($\|\psi\| = 1$), this gives $\operatorname{Re}\langle \psi, v\rangle \le \|v\|$, which translates to $a^2 + b^2 \le \|v\|$.
uses
RCLike.re_le_norm,norm_inner_le_norm,one_mulhave h_cs : a ^ 2 + b ^ 2 ≤ ‖v‖ := by rw [← h_inner] calc RCLike.re (inner ℂ ψ v) _ ≤ ‖inner ℂ ψ v‖ := RCLike.re_le_norm _ _ ≤ ‖ψ‖ * ‖v‖ := norm_inner_le_norm _ _ _ = ‖v‖ := by rw [hψ, one_mul]
Squaring the inequality and combining it with the norm bound yields $a^2 + b^2 \le 1$.
Since $a^2 + b^2 \ge 0$, squaring $a^2 + b^2 \le \|v\|$ gives $(a^2 + b^2)^2 \le \|v\|^2$. Combining this with the upper bound $\|v\|^2 \le a^2 + b^2$ gives $(a^2 + b^2)^2 \le a^2 + b^2$. For any non-negative real number $x$, $x^2 \le x$ implies $x \le 1$; applying this to $x = a^2 + b^2$ concludes that $a^2 + b^2 \le 1$.
have h_sq_le : (a ^ 2 + b ^ 2) ^ 2 ≤ a ^ 2 + b ^ 2 := by have hpos : 0 ≤ a ^ 2 + b ^ 2 := by positivity have h1 : (a ^ 2 + b ^ 2) ^ 2 ≤ ‖v‖ ^ 2 := by nlinarith linarith have h_final : a ^ 2 + b ^ 2 ≤ 1 := by nlinarith exact h_final
ContinuousLinearMap.adjoint_inner_right- For a continuous linear map $A$, the inner product $\langle x, A^* y\rangle$ equals $\langle A x, y\rangle$.
ContinuousLinearMap.star_eq_adjoint- The involution $A \mapsto \mathrm{star}(A)$ on continuous linear maps equals the Hilbert space adjoint operator $A \mapsto A^*$.
inner_conj_symm- The inner product has conjugate symmetry: $\overline{\langle y, x\rangle} = \langle x, y\rangle$.
inner_add_right- The inner product is additive in its right argument: $\langle x, y + z\rangle = \langle x, y\rangle + \langle x, z\rangle$.
inner_zero_right- The inner product of any vector with zero on the right is zero: $\langle x, 0\rangle = 0$.
RCLike.add_conj- A complex number plus its complex conjugate equals twice its real part: $z + \bar{z} = 2 \operatorname{Re}(z)$.
mul_eq_zero.mp- If a product equals zero, at least one factor equals zero.
Complex.ofReal_eq_zero.mp- If the complex embedding of a real number is zero, the real number is zero.
norm_add_sq- The expansion of the squared norm of a sum: $\|x + y\|^2 = \|x\|^2 + 2\operatorname{Re}\langle x, y\rangle + \|y\|^2$.
mul_zero- Multiplying any number by zero gives zero: $a \cdot 0 = 0$.
mul_le_mul_of_nonneg_right- If $b \le c$ and $0 \le a$, then $b \cdot a \le c \cdot a$.
zero_le_one- Zero is less than or equal to one: $0 \le 1$.
norm_smul- The norm of a scalar multiple is the product of norms: $\|r \cdot x\| = \|r\| \cdot \|x\|$.
Complex.norm_real- The complex modulus of a real number embedded into $\mathbb{C}$ equals its real absolute value.
Real.norm_eq_abs- The real norm of a real number is its absolute value: $\|r\| = |r|$.
mul_pow- Powers distribute over multiplication: $(ab)^n = a^n b^n$.
sq_abs- The square of an absolute value is the square of the number: $|a|^2 = a^2$.
norm_nonneg- The norm of any vector is non-negative: $0 \le \|a\|$.
inner_smul_right- The inner product is linear in its right argument under scalar multiplication: $\langle x, r \cdot y\rangle = r \langle x, y\rangle$.
map_add- An additive homomorphism preserves addition: $f(x + y) = f(x) + f(y)$.
sq- The square of an element is the element multiplied by itself: $a^2 = a \cdot a$.
RCLike.re_le_norm- The real part of a complex number is bounded by its modulus: $\operatorname{Re}(z) \le |z|$.
norm_inner_le_norm- The Cauchy-Schwarz inequality for the inner product: $|\langle x, y\rangle| \le \|x\| \cdot \|y\|$.
one_mul- Multiplying on the left by one is the identity: $1 \cdot a = a$.
- In Lean, self-adjointness `IsSelfAdjoint P` is defined via the `star` ring operation on continuous linear maps, which is identified with the Hilbert space adjoint operator using `ContinuousLinearMap.star_eq_adjoint`.
- Real coefficients $a, b$ are explicitly coerced to complex numbers $(\uparrow a, \uparrow b)$ to act on vectors via complex scalar multiplication.
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.
/-- Fact 1: Anticommuting Hermitian operators with norm <= 1 satisfy <P>^2 + <Q>^2 <= 1 in any quantum state. -/theorem anticommuting_hermitian_expectation_sq_le_one {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] (P Q : E →L[ℂ] E) (hP : IsSelfAdjoint P) (hQ : IsSelfAdjoint Q) (hP_norm : ‖P‖ ≤ 1) (hQ_norm : ‖Q‖ ≤ 1) (h_anticomm : P * Q + Q * P = 0) (ψ : E) (hψ : ‖ψ‖ = 1) : (RCLike.re (inner ℂ ψ (P ψ))) ^ 2 + (RCLike.re (inner ℂ ψ (Q ψ))) ^ 2 ≤ 1 := by set a := RCLike.re (inner ℂ ψ (P ψ)) set b := RCLike.re (inner ℂ ψ (Q ψ)) set v := (a : ℂ) • (P ψ) + (b : ℂ) • (Q ψ) have h_ortho : RCLike.re (inner ℂ (P ψ) (Q ψ)) = 0 := by have h1 : inner ℂ (P ψ) (Q ψ) = inner ℂ ψ (P (Q ψ)) := by have h := ContinuousLinearMap.adjoint_inner_right P ψ (Q ψ) rw [← ContinuousLinearMap.star_eq_adjoint, hP] at h exact h.symm have h2 : inner ℂ (Q ψ) (P ψ) = inner ℂ ψ (Q (P ψ)) := by have h := ContinuousLinearMap.adjoint_inner_right Q ψ (P ψ) rw [← ContinuousLinearMap.star_eq_adjoint, hQ] at h exact h.symm have h3 : starRingEnd ℂ (inner ℂ (P ψ) (Q ψ)) = inner ℂ (Q ψ) (P ψ) := inner_conj_symm (Q ψ) (P ψ) have h4 : inner ℂ (P ψ) (Q ψ) + starRingEnd ℂ (inner ℂ (P ψ) (Q ψ)) = 0 := by rw [h3, h1, h2, ← inner_add_right] change inner ℂ ψ ((P * Q + Q * P) ψ) = 0 rw [h_anticomm] exact inner_zero_right ψ have h5 := (RCLike.add_conj (inner ℂ (P ψ) (Q ψ))).symm.trans h4 have h6 : (RCLike.re (inner ℂ (P ψ) (Q ψ)) : ℂ) = 0 := by cases mul_eq_zero.mp h5 with | inl h7 => norm_num at h7 | inr h7 => exact h7 exact Complex.ofReal_eq_zero.mp h6 have h_norm_sq : ‖v‖ ^ 2 ≤ a ^ 2 + b ^ 2 := by rw [norm_add_sq (𝕜 := ℂ)] have h_cross : RCLike.re (inner ℂ ((a : ℂ) • (P ψ)) ((b : ℂ) • (Q ψ))) = 0 := by calc RCLike.re (inner ℂ ((a : ℂ) • (P ψ)) ((b : ℂ) • (Q ψ))) _ = a * b * RCLike.re (inner ℂ (P ψ) (Q ψ)) := by simp; ring _ = 0 := by rw [h_ortho, mul_zero] have hP_le : ‖P ψ‖ ≤ 1 := by have h := P.le_opNorm ψ have : ‖P‖ * ‖ψ‖ ≤ 1 * 1 := by rw [hψ]; exact mul_le_mul_of_nonneg_right hP_norm zero_le_one linarith have hQ_le : ‖Q ψ‖ ≤ 1 := by have h := Q.le_opNorm ψ have : ‖Q‖ * ‖ψ‖ ≤ 1 * 1 := by rw [hψ]; exact mul_le_mul_of_nonneg_right hQ_norm zero_le_one linarith have hP_sq : ‖(a : ℂ) • (P ψ)‖ ^ 2 ≤ a ^ 2 := by rw [norm_smul, Complex.norm_real, Real.norm_eq_abs, mul_pow, sq_abs] have : ‖P ψ‖ ^ 2 ≤ 1 := by have : 0 ≤ ‖P ψ‖ := norm_nonneg _ nlinarith nlinarith have hQ_sq : ‖(b : ℂ) • (Q ψ)‖ ^ 2 ≤ b ^ 2 := by rw [norm_smul, Complex.norm_real, Real.norm_eq_abs, mul_pow, sq_abs] have : ‖Q ψ‖ ^ 2 ≤ 1 := by have : 0 ≤ ‖Q ψ‖ := norm_nonneg _ nlinarith nlinarith linarith have h_inner : RCLike.re (inner ℂ ψ v) = a ^ 2 + b ^ 2 := by simp only [v, inner_add_right, inner_smul_right, map_add] have ha : RCLike.re ((a : ℂ) * inner ℂ ψ (P ψ)) = a ^ 2 := by have h : RCLike.re ((a : ℂ) * inner ℂ ψ (P ψ)) = a * RCLike.re (inner ℂ ψ (P ψ)) := by simp rw [h, sq] have hb : RCLike.re ((b : ℂ) * inner ℂ ψ (Q ψ)) = b ^ 2 := by have h : RCLike.re ((b : ℂ) * inner ℂ ψ (Q ψ)) = b * RCLike.re (inner ℂ ψ (Q ψ)) := by simp rw [h, sq] rw [ha, hb] have h_cs : a ^ 2 + b ^ 2 ≤ ‖v‖ := by rw [← h_inner] calc RCLike.re (inner ℂ ψ v) _ ≤ ‖inner ℂ ψ v‖ := RCLike.re_le_norm _ _ ≤ ‖ψ‖ * ‖v‖ := norm_inner_le_norm _ _ _ = ‖v‖ := by rw [hψ, one_mul] have h_sq_le : (a ^ 2 + b ^ 2) ^ 2 ≤ a ^ 2 + b ^ 2 := by have hpos : 0 ≤ a ^ 2 + b ^ 2 := by positivity have h1 : (a ^ 2 + b ^ 2) ^ 2 ≤ ‖v‖ ^ 2 := by nlinarith linarith have h_final : a ^ 2 + b ^ 2 ≤ 1 := by nlinarith exact h_final