From f09671efdb3c19c69606d6c836880c059e634e20 Mon Sep 17 00:00:00 2001 From: yuanyi-350 Date: Mon, 29 Dec 2025 21:20:12 +0800 Subject: [PATCH] Update Rayleigh.lean --- .../Analysis/InnerProductSpace/Rayleigh.lean | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Mathlib/Analysis/InnerProductSpace/Rayleigh.lean b/Mathlib/Analysis/InnerProductSpace/Rayleigh.lean index ef6a9ec900896c..df59401da348df 100644 --- a/Mathlib/Analysis/InnerProductSpace/Rayleigh.lean +++ b/Mathlib/Analysis/InnerProductSpace/Rayleigh.lean @@ -63,12 +63,16 @@ theorem rayleigh_smul (x : E) {c : ๐•œ} (hc : c โ‰  0) : ยท simp [hx] simp [field, norm_smul, T.reApplyInnerSelf_smul] +theorem rayleighQuotient_add (S : E โ†’L[๐•œ] E) {x : E} : + (T + S).rayleighQuotient x = T.rayleighQuotient x + S.rayleighQuotient x := by + simp [rayleighQuotient, reApplyInnerSelf_apply, inner_add_left, add_div] + theorem image_rayleigh_eq_image_rayleigh_sphere {r : โ„} (hr : 0 < r) : rayleighQuotient T '' {0}แถœ = rayleighQuotient T '' sphere 0 r := by ext a constructor ยท rintro โŸจx, hx : x โ‰  0, hxTโŸฉ - let c : ๐•œ := โ†‘โ€–xโ€–โปยน * r + let c : ๐•œ := โ€–xโ€–โปยน * r have : c โ‰  0 := by simp [c, hx, hr.ne'] refine โŸจc โ€ข x, ?_, ?_โŸฉ ยท simp [field, c, norm_smul, abs_of_pos hr] @@ -131,8 +135,6 @@ theorem linearly_dependent_of_isLocalExtrOn (hT : IsSelfAdjoint T) {xโ‚€ : F} apply smul_right_injective (F โ†’L[โ„] โ„) (two_ne_zero : (2 : โ„) โ‰  0) simpa only [two_smul, smul_add, add_smul, add_zero] using hโ‚‚ --- Non-terminal simp, used to be field_simp -set_option linter.flexible false in open scoped InnerProductSpace in theorem eq_smul_self_of_isLocalExtrOn_real (hT : IsSelfAdjoint T) {xโ‚€ : F} (hextr : IsLocalExtrOn T.reApplyInnerSelf (sphere (0 : F) โ€–xโ‚€โ€–) xโ‚€) : @@ -149,9 +151,7 @@ theorem eq_smul_self_of_isLocalExtrOn_real (hT : IsSelfAdjoint T) {xโ‚€ : F} linear_combination (norm := match_scalars <;> field) bโปยน โ€ข hโ‚‚ set c : โ„ := -bโปยน * a convert hc - have := congr_arg (fun x => โŸชx, xโ‚€โŸซ_โ„) hc - simp [field, inner_smul_left, mul_comm a] at this โŠข - exact this + simpa [field, inner_smul_left, mul_comm a] using congr_arg (fun x => โŸชx, xโ‚€โŸซ_โ„) hc end Real @@ -161,7 +161,7 @@ variable [CompleteSpace E] {T : E โ†’L[๐•œ] E} theorem eq_smul_self_of_isLocalExtrOn (hT : IsSelfAdjoint T) {xโ‚€ : E} (hextr : IsLocalExtrOn T.reApplyInnerSelf (sphere (0 : E) โ€–xโ‚€โ€–) xโ‚€) : - T xโ‚€ = (โ†‘(T.rayleighQuotient xโ‚€) : ๐•œ) โ€ข xโ‚€ := by + T xโ‚€ = (T.rayleighQuotient xโ‚€ : ๐•œ) โ€ข xโ‚€ := by letI := InnerProductSpace.rclikeToReal ๐•œ E let hSA := hT.isSymmetric.restrictScalars.toSelfAdjoint.prop exact hSA.eq_smul_self_of_isLocalExtrOn_real hextr @@ -170,7 +170,7 @@ theorem eq_smul_self_of_isLocalExtrOn (hT : IsSelfAdjoint T) {xโ‚€ : E} centred at the origin is an eigenvector of `T`. -/ theorem hasEigenvector_of_isLocalExtrOn (hT : IsSelfAdjoint T) {xโ‚€ : E} (hxโ‚€ : xโ‚€ โ‰  0) (hextr : IsLocalExtrOn T.reApplyInnerSelf (sphere (0 : E) โ€–xโ‚€โ€–) xโ‚€) : - HasEigenvector (T : E โ†’โ‚—[๐•œ] E) (โ†‘(T.rayleighQuotient xโ‚€)) xโ‚€ := by + HasEigenvector (T : E โ†’โ‚—[๐•œ] E) (T.rayleighQuotient xโ‚€) xโ‚€ := by refine โŸจ?_, hxโ‚€โŸฉ rw [Module.End.mem_eigenspace_iff] exact hT.eq_smul_self_of_isLocalExtrOn hextr @@ -180,7 +180,7 @@ at the origin is an eigenvector of `T`, with eigenvalue the global supremum of t quotient. -/ theorem hasEigenvector_of_isMaxOn (hT : IsSelfAdjoint T) {xโ‚€ : E} (hxโ‚€ : xโ‚€ โ‰  0) (hextr : IsMaxOn T.reApplyInnerSelf (sphere (0 : E) โ€–xโ‚€โ€–) xโ‚€) : - HasEigenvector (T : E โ†’โ‚—[๐•œ] E) (โ†‘(โจ† x : { x : E // x โ‰  0 }, T.rayleighQuotient x)) xโ‚€ := by + HasEigenvector (T : E โ†’โ‚—[๐•œ] E) (โจ† x : { x : E // x โ‰  0 }, T.rayleighQuotient x : โ„) xโ‚€ := by convert hT.hasEigenvector_of_isLocalExtrOn hxโ‚€ (Or.inr hextr.localize) have hxโ‚€' : 0 < โ€–xโ‚€โ€– := by simp [hxโ‚€] have hxโ‚€'' : xโ‚€ โˆˆ sphere (0 : E) โ€–xโ‚€โ€– := by simp @@ -199,7 +199,7 @@ at the origin is an eigenvector of `T`, with eigenvalue the global infimum of th quotient. -/ theorem hasEigenvector_of_isMinOn (hT : IsSelfAdjoint T) {xโ‚€ : E} (hxโ‚€ : xโ‚€ โ‰  0) (hextr : IsMinOn T.reApplyInnerSelf (sphere (0 : E) โ€–xโ‚€โ€–) xโ‚€) : - HasEigenvector (T : E โ†’โ‚—[๐•œ] E) (โ†‘(โจ… x : { x : E // x โ‰  0 }, T.rayleighQuotient x)) xโ‚€ := by + HasEigenvector (T : E โ†’โ‚—[๐•œ] E) (โจ… x : { x : E // x โ‰  0 }, T.rayleighQuotient x : โ„) xโ‚€ := by convert hT.hasEigenvector_of_isLocalExtrOn hxโ‚€ (Or.inl hextr.localize) have hxโ‚€' : 0 < โ€–xโ‚€โ€– := by simp [hxโ‚€] have hxโ‚€'' : xโ‚€ โˆˆ sphere (0 : E) โ€–xโ‚€โ€– := by simp @@ -228,7 +228,7 @@ namespace IsSymmetric /-- The supremum of the Rayleigh quotient of a symmetric operator `T` on a nontrivial finite-dimensional vector space is an eigenvalue for that operator. -/ theorem hasEigenvalue_iSup_of_finiteDimensional [Nontrivial E] (hT : T.IsSymmetric) : - HasEigenvalue T โ†‘(โจ† x : { x : E // x โ‰  0 }, RCLike.re โŸชT x, xโŸซ / โ€–(x : E)โ€– ^ 2 : โ„) := by + HasEigenvalue T (โจ† x : { x : E // x โ‰  0 }, RCLike.re โŸชT x, xโŸซ / โ€–(x : E)โ€– ^ 2 : โ„) := by haveI := FiniteDimensional.proper_rclike ๐•œ E let T' := hT.toSelfAdjoint obtain โŸจx, hxโŸฉ : โˆƒ x : E, x โ‰  0 := exists_ne 0 @@ -247,7 +247,7 @@ theorem hasEigenvalue_iSup_of_finiteDimensional [Nontrivial E] (hT : T.IsSymmetr /-- The infimum of the Rayleigh quotient of a symmetric operator `T` on a nontrivial finite-dimensional vector space is an eigenvalue for that operator. -/ theorem hasEigenvalue_iInf_of_finiteDimensional [Nontrivial E] (hT : T.IsSymmetric) : - HasEigenvalue T โ†‘(โจ… x : { x : E // x โ‰  0 }, RCLike.re โŸชT x, xโŸซ / โ€–(x : E)โ€– ^ 2 : โ„) := by + HasEigenvalue T (โจ… x : { x : E // x โ‰  0 }, RCLike.re โŸชT x, xโŸซ / โ€–(x : E)โ€– ^ 2 : โ„) := by haveI := FiniteDimensional.proper_rclike ๐•œ E let T' := hT.toSelfAdjoint obtain โŸจx, hxโŸฉ : โˆƒ x : E, x โ‰  0 := exists_ne 0