/-- **Eigenvectors for different eigenvalues are orthogonal.** Hint: rewrite `hA v w` with `hv`,
`hw`, `inner_smul_left`, `inner_smul_right` and `Complex.conj_ofReal` to get
`lv * ⟪v, w⟫ = lw * ⟪v, w⟫`, then use `mul_eq_zero` on `(lv - lw) * ⟪v, w⟫ = 0`. -/
theorem eigenvectors_orthogonal {A : E →ₗ[ℂ] E} (hA : A.IsSymmetric) {v w : E} {lv lw : ℝ}
(hv : A v = (lv : ℂ) • v) (hw : A w = (lw : ℂ) • w) (hne : lv ≠ lw) : ⟪v, w⟫_ℂ = 0 := by
sorryShow the compiled solution
/-- **Eigenvectors of an observable for different eigenvalues are orthogonal.** If `A v = λ v`
and `A w = μ w` with real `λ ≠ μ`, then `⟪v, w⟫ = 0`. Proof:
`λ ⟪v, w⟫ = ⟪A v, w⟫ = ⟪v, A w⟫ = μ ⟪v, w⟫`, so `(λ − μ) ⟪v, w⟫ = 0`. Distinct measurement
outcomes are perfectly distinguishable states. -/
theorem eigenvectors_orthogonal {A : E →ₗ[ℂ] E} (hA : A.IsSymmetric) {v w : E} {lv lw : ℝ}
(hv : A v = (lv : ℂ) • v) (hw : A w = (lw : ℂ) • w) (hne : lv ≠ lw) : ⟪v, w⟫_ℂ = 0 := by
have h := hA v w
rw [hv, hw, inner_smul_left, inner_smul_right, Complex.conj_ofReal] at h
have h' : ((lv : ℂ) - lw) * ⟪v, w⟫_ℂ = 0 := by rw [sub_mul, h, sub_self]
rcases mul_eq_zero.mp h' with h0 | h0
· exact absurd (by exact_mod_cast sub_eq_zero.mp h0) hne
· exact h0Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/QuantumMechanics.leanTry it in the Lean web editor