Matrix.IsHermitian.cfc_eigenvalues
theoremverifiedformalizationimported Lean
Matrix.IsHermitian.cfc_eigenvalues
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Matrix in open BigOperators in variable {n π : Type*} in variable [RCLike π] [DecidableEq n] in open scoped ComplexOrder MatrixOrder in open ComplexOrder in variable {d π : Type*} [Fintype d] [DecidableEq d] [RCLike π] in theorem Matrix.IsHermitian.cfc_eigenvalues {M : Matrix d d π} (hM : M.IsHermitian) (f : β β β) : β (e : d β d), Matrix.IsHermitian.eigenvalues (cfc_predicate f M) = f β hM.eigenvalues β e
- Formalizes
- QuantumInfo, `Matrix.IsHermitian.cfc_eigenvalues`
- Lean proof
- By Alex Meiburg, from github.com/leanprover-community/physlib at
e411c6e89692(Copyright (c) 2025 Alex Meiburg. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.Matrix.IsHermitian.cfc_eigenvalues← Matrix.IsHermitian.cfc_eigenvalues (QuantumInfo/ForMathlib/Matrix.lean:752): verbatim
- Verified
- 17 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- Multiset.map_univ_eq_iffIf two functions from finite types have the same multiset of values, there exists a bijection between the domains that commutes with theβ¦
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Matrix in open BigOperators in variable {n π : Type*} in variable [RCLike π] [DecidableEq n] in open scoped ComplexOrder MatrixOrder in open ComplexOrder in variable {d π : Type*} [Fintype d] [DecidableEq d] [RCLike π] in theorem Matrix.IsHermitian.cfc_eigenvalues {M : Matrix d d π} (hM : M.IsHermitian) (f : β β β) : β (e : d β d), Matrix.IsHermitian.eigenvalues (cfc_predicate f M) = f β hM.eigenvalues β e := by have h_eigenvalues : Multiset.map hM.eigenvalues Finset.univ.val = Multiset.map (fun i => hM.eigenvalues i) Finset.univ.val := by rfl generalize_proofs at *; have h_eigenvalues_cfc : (IsHermitian.cfc hM f).charpoly.roots = Multiset.map (fun i => (f (hM.eigenvalues i) : π)) Finset.univ.val := by rw [ Matrix.IsHermitian.cfc, Matrix.charpoly ]; -- Since $U$ is unitary, we have $U^* U = I$, and thus the characteristic polynomial of $U D U^*$ is the same as the characteristic polynomial of $D$. have h_charpoly : Matrix.det ((hM.eigenvectorUnitary : Matrix d d π) * Matrix.diagonal (RCLike.ofReal β f β hM.eigenvalues) * Star.star (hM.eigenvectorUnitary : Matrix d d π)).charmatrix = Matrix.det (Matrix.diagonal (RCLike.ofReal β f β hM.eigenvalues)).charmatrix := by -- Since $U$ is unitary, we have $U^* U = I$, and thus the characteristic polynomial of $U D U^*$ is the same as the characteristic polynomial of $D$ by the properties of determinants. have h_char_poly : β (t : π), Matrix.det (t β’ 1 - (hM.eigenvectorUnitary : Matrix d d π) * Matrix.diagonal (RCLike.ofReal β f β hM.eigenvalues) * star (hM.eigenvectorUnitary : Matrix d d π)) = Matrix.det (t β’ 1 - Matrix.diagonal (RCLike.ofReal β f β hM.eigenvalues)) := by intro t; -- Since $U$ is unitary, we have $U^* U = I$, and thus the determinant of $tI - UDU^*$ is the same as the determinant of $tI - D$. have h_det : Matrix.det (t β’ 1 - (hM.eigenvectorUnitary : Matrix d d π) * Matrix.diagonal (RCLike.ofReal β f β hM.eigenvalues) * star (hM.eigenvectorUnitary : Matrix d d π)) = Matrix.det ((hM.eigenvectorUnitary : Matrix d d π) * (t β’ 1 - Matrix.diagonal (RCLike.ofReal β f β hM.eigenvalues)) * star (hM.eigenvectorUnitary : Matrix d d π)) := by simp [ mul_sub, sub_mul, mul_assoc ]; rw [ h_det, Matrix.det_mul, Matrix.det_mul ]; rw [ mul_right_comm, β Matrix.det_mul, mul_comm ]; norm_num +zetaDelta at *; refine' Polynomial.funext fun t => _; convert h_char_poly t using 1; Β· simp [ Matrix.det_apply', Polynomial.eval_finsetSum ]; simp [ Matrix.one_apply, Polynomial.eval_prod ]; congr! 3; aesop; Β· simp [ Matrix.det_apply', Polynomial.eval_finsetSum ]; simp [ Matrix.one_apply, Polynomial.eval_prod ]; exact Finset.sum_congr rfl fun _ _ => by congr; ext; aesop; simp_all [ Matrix.charmatrix, Matrix.det_diagonal ]; rw [ Polynomial.roots_prod ]; Β· bound; Β· exact Finset.prod_ne_zero_iff.mpr fun i _ => Polynomial.X_sub_C_ne_zero _; have := Matrix.IsHermitian.roots_charpoly_eq_eigenvalues (cfc_predicate f M); rw [β Matrix.IsHermitian.cfc_eq] at h_eigenvalues_cfc rw [ h_eigenvalues_cfc ] at this; simp [ Function.comp ] at this; rw [ Multiset.map_univ_eq_iff ] at this; obtain β¨ e, he β© := this; use e.symm ext x have := congr_fun he ( e.symm x ); simp_all only [Function.comp_apply, Equiv.apply_symm_apply, algebraMap.coe_inj]