Skip to content

Commit 17d3cb5

Browse files
committed
feat(Analysis/InnerProductSpace): multiplicity of LinearMap.IsSymmetric.eigenvalues (leanprover-community#34660)
If `T` is a symmetric linear map and `μ : 𝕜`, then `μ` appears somewhere in the list `LinearMap.IsSymmetric.eigenvalues` a number of times equal to the dimension of the eigenspace of `μ`. Discussion for this PR and the related PR leanprover-community#34362 can be found here: https://leanprover.zulipchat.com/#narrow/channel/217875-Is-there-code-for-X.3F/topic/LinearMap.2EIsSymmetric.2Eeigenvalues.20has.20all.20the.20eigenvalues/with/571092190
1 parent f4d59b3 commit 17d3cb5

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

Mathlib/Analysis/InnerProductSpace/PiL2.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,22 @@ theorem DirectSum.IsInternal.subordinateOrthonormalBasis_subordinate (a : Fin n)
10831083
hV.collectedOrthonormalBasis_mem hV' (fun i => stdOrthonormalBasis 𝕜 (V i))
10841084
((hV.sigmaOrthonormalBasisIndexEquiv hn hV').symm a)
10851085

1086+
private def DirectSum.IsInternal.subordinateOrthonormalBasisIndexFiberEquiv
1087+
(hV' : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) (i : ι) :
1088+
{a : Fin n // hV.subordinateOrthonormalBasisIndex hn a hV' = i} ≃ Fin (finrank 𝕜 (V i)) where
1089+
toFun a := Fin.cast (by rw [← subordinateOrthonormalBasisIndex_def, a.property])
1090+
((hV.sigmaOrthonormalBasisIndexEquiv hn hV').symm a).snd
1091+
invFun b := ⟨hV.sigmaOrthonormalBasisIndexEquiv hn hV' ⟨i, b⟩,
1092+
by simp [subordinateOrthonormalBasisIndex_def]⟩
1093+
left_inv := by grind [subordinateOrthonormalBasisIndex_def, Fin.cast_eq_self]
1094+
right_inv := by grind
1095+
1096+
theorem DirectSum.IsInternal.card_filter_subordinateOrthonormalBasisIndex_eq
1097+
(hV' : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) (i : ι) :
1098+
Finset.card {a | hV.subordinateOrthonormalBasisIndex hn a hV' = i} = finrank 𝕜 (V i) := by
1099+
apply Finset.card_eq_of_equiv_fin
1100+
simpa using hV.subordinateOrthonormalBasisIndexFiberEquiv hn hV' i
1101+
10861102
end SubordinateOrthonormalBasis
10871103

10881104
end FiniteDimensional

Mathlib/Analysis/InnerProductSpace/Spectrum.lean

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,17 @@ private noncomputable def unsortedEigenvalues (hT : T.IsSymmetric) (hn : Module.
205205
@RCLike.re 𝕜 _ <| (hT.direct_sum_isInternal.subordinateOrthonormalBasisIndex hn i
206206
hT.orthogonalFamily_eigenspaces').val
207207

208+
private theorem card_filter_unsortedEigenvalues_eq (hT : T.IsSymmetric)
209+
(hn : Module.finrank 𝕜 E = n) {μ : 𝕜} (hμ : HasEigenvalue T μ) :
210+
Finset.card {i | hT.unsortedEigenvalues hn i = μ} = Module.finrank 𝕜 (eigenspace T μ) := by
211+
convert hT.direct_sum_isInternal.card_filter_subordinateOrthonormalBasisIndex_eq hn
212+
hT.orthogonalFamily_eigenspaces' ⟨μ, hμ⟩ with i
213+
rw [unsortedEigenvalues]
214+
set x := hT.direct_sum_isInternal.subordinateOrthonormalBasisIndex hn i
215+
hT.orthogonalFamily_eigenspaces'
216+
rw [RCLike.conj_eq_iff_re.mp (hT.conj_eigenvalue_eq_self (μ := x.val) x.property)]
217+
aesop
218+
208219
private noncomputable def unsortedEigenvectorBasis (hT : T.IsSymmetric)
209220
(hn : Module.finrank 𝕜 E = n) : OrthonormalBasis (Fin n) 𝕜 E :=
210221
hT.direct_sum_isInternal.subordinateOrthonormalBasis hn hT.orthogonalFamily_eigenspaces'
@@ -239,6 +250,13 @@ noncomputable irreducible_def eigenvalues (hT : T.IsSymmetric) (hn : Module.finr
239250
Fin n → ℝ :=
240251
(hT.unsortedEigenvalues hn) ∘ Tuple.sort (hT.unsortedEigenvalues hn) ∘ @Fin.revPerm n
241252

253+
theorem card_filter_eigenvalues_eq (hT : T.IsSymmetric) (hn : Module.finrank 𝕜 E = n) {μ : 𝕜}
254+
(hμ : HasEigenvalue T μ) :
255+
Finset.card {i | hT.eigenvalues hn i = μ} = Module.finrank 𝕜 (eigenspace T μ) := by
256+
rw [← hT.card_filter_unsortedEigenvalues_eq hn hμ, eigenvalues_def]
257+
apply Finset.card_equiv (Fin.revPerm.trans (Tuple.sort (hT.unsortedEigenvalues hn)))
258+
simp
259+
242260
set_option backward.privateInPublic true in
243261
set_option backward.privateInPublic.warn false in
244262
/-- A choice of orthonormal basis of eigenvectors for self-adjoint operator `T` on a

0 commit comments

Comments
 (0)