chars int64 40 24k | content_type stringclasses 9
values | id stringlengths 13 64 | source stringclasses 5
values | subset stringclasses 31
values | text stringlengths 40 24k |
|---|---|---|---|---|---|
255 | leanexplore_declaration | leanexplore:378909 | leanexplore_sqlite | leanexplore_declarations | /-- We fix a simp-normal form that, for HermitianMat, we always work in terms
of the real spectrum. -/
@[simp]
theorem spectrum_rcLike (A : HermitianMat n 𝕜) :
spectrum 𝕜 A.mat = RCLike.ofReal '' spectrum ℝ A.mat := by
exact A.H.spectrum_rcLike.symm |
582 | leanexplore_declaration | leanexplore:378910 | leanexplore_sqlite | leanexplore_declarations | theorem ne_zero_iff_ne_zero_spectrum (A : HermitianMat n 𝕜) :
A ≠ 0 ↔ ∃ x ∈ spectrum ℝ A.mat, x ≠ 0 := by
constructor;
· intro h_nonzero
contrapose! h_nonzero
simp only [HermitianMat.ext_iff, mat_zero]
rw [A.H.spectral_theorem]
ext i j
simp [Matrix.mul_apply, Matrix.diagonal]
refine Fin... |
171 | leanexplore_declaration | leanexplore:378911 | leanexplore_sqlite | leanexplore_declarations | theorem spectrum_prod
{A : HermitianMat m 𝕜} {B : HermitianMat n 𝕜} :
spectrum ℝ (A ⊗ₖ B).mat = spectrum ℝ A.mat * spectrum ℝ B.mat :=
Matrix.spectrum_prod A.H B.H |
76 | leanexplore_declaration | leanexplore:378912 | leanexplore_sqlite | leanexplore_declarations | noncomputable instance : AddCommMonoid (HermitianMat d ℂ) :=
inferInstance |
111 | leanexplore_declaration | leanexplore:378913 | leanexplore_sqlite | leanexplore_declarations | @[aesop safe apply (rule_sets := [CStarAlgebra])]
theorem isSelfAdjoint : IsSelfAdjoint A.mat := by
exact A.H |
254 | leanexplore_declaration | leanexplore:378914 | leanexplore_sqlite | leanexplore_declarations | @[fun_prop]
theorem continuousOn_finite {α β : Type*} (f : α → β) (S : Set α)
[TopologicalSpace α] [TopologicalSpace β] [T1Space α] [Finite S] : ContinuousOn f S := by
rw [continuousOn_iff_continuous_restrict]
exact continuous_of_discreteTopology |
113 | leanexplore_declaration | leanexplore:378915 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem conjTranspose_cfc : (cfc f A.mat).conjTranspose = cfc f A.mat := by
exact cfc_predicate f A.mat |
74 | leanexplore_declaration | leanexplore:378916 | leanexplore_sqlite | leanexplore_declarations | protected def cfc : HermitianMat d 𝕜 :=
⟨cfc f A.mat, cfc_predicate _ _⟩ |
75 | leanexplore_declaration | leanexplore:378917 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_eq : A.cfc f = ⟨cfc f A.mat, cfc_predicate f A.mat⟩ := by
rfl |
72 | leanexplore_declaration | leanexplore:378918 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem mat_cfc : (A.cfc f).mat = _root_.cfc f A.mat := by
rfl |
190 | leanexplore_declaration | leanexplore:378919 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_eq_cfc_iff_eqOn (f g : ℝ → ℝ) :
A.cfc f = A.cfc g ↔ Set.EqOn f g (spectrum ℝ A.mat) := by
rw [HermitianMat.ext_iff, mat_cfc, mat_cfc]
exact _root_.cfc_eq_cfc_iff_eqOn A.H |
133 | leanexplore_declaration | leanexplore:378920 | leanexplore_sqlite | leanexplore_declarations | @[gcongr]
nonrec theorem cfc_congr (hfg : Set.EqOn f g (spectrum ℝ A.mat)) :
A.cfc f = A.cfc g := by
ext1
exact cfc_congr hfg |
274 | leanexplore_declaration | leanexplore:378921 | leanexplore_sqlite | leanexplore_declarations | /-- Version of `cfc_congr` specialized to PSD matrices. -/
nonrec theorem cfc_congr_of_nonneg (hA : 0 ≤ A) (hfg : Set.EqOn f g (Set.Ici 0)) :
A.cfc f = A.cfc g := by
refine cfc_congr (hfg.mono ?_)
open MatrixOrder in
exact spectrum_nonneg_of_nonneg (a := A.mat) hA |
318 | leanexplore_declaration | leanexplore:378922 | leanexplore_sqlite | leanexplore_declarations | /-- Version of `cfc_congr` specialized to positive definite matrices. -/
nonrec theorem cfc_congr_of_posDef (hA : A.mat.PosDef) (hfg : Set.EqOn f g (Set.Ioi 0)) :
A.cfc f = A.cfc g := by
refine cfc_congr (hfg.mono ?_)
rw [A.H.spectrum_real_eq_range_eigenvalues]
rintro _ ⟨i, rfl⟩
exact hA.eigenvalues_pos i |
174 | leanexplore_declaration | leanexplore:378923 | leanexplore_sqlite | leanexplore_declarations | @[aesop unsafe apply 50% (rule_sets := [Commutes])]
theorem _root_.Commute.cfc_left (hAB : Commute A.mat B.mat) :
Commute (A.cfc f).mat B.mat := by
exact hAB.cfc_real f |
178 | leanexplore_declaration | leanexplore:378924 | leanexplore_sqlite | leanexplore_declarations | @[aesop unsafe apply 50% (rule_sets := [Commutes])]
theorem _root_.Commute.cfc_right (hAB : Commute A.mat B.mat) :
Commute A.mat (B.cfc f).mat :=
(hAB.symm.cfc_left f).symm |
146 | leanexplore_declaration | leanexplore:378925 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_commute (f g : ℝ → ℝ) (hAB : Commute A.mat B.mat) :
Commute (A.cfc f).mat (B.cfc g).mat := by
exact (hAB.cfc_right g).cfc_left f |
166 | leanexplore_declaration | leanexplore:378926 | leanexplore_sqlite | leanexplore_declarations | @[aesop safe apply (rule_sets := [Commutes])]
theorem cfc_self_commute (A : HermitianMat d 𝕜) (f g : ℝ → ℝ) :
Commute (A.cfc f).mat (A.cfc g).mat := by
commutes |
243 | leanexplore_declaration | leanexplore:378927 | leanexplore_sqlite | leanexplore_declarations | /-- Reindexing a matrix commutes with applying the CFC. -/
@[simp]
theorem cfc_reindex (e : d ≃ d₂) : (A.reindex e).cfc f = (A.cfc f).reindex e := by
rw [HermitianMat.ext_iff]
simp only [mat_cfc, mat_reindex]
exact Matrix.cfc_reindex f e |
160 | leanexplore_declaration | leanexplore:378928 | leanexplore_sqlite | leanexplore_declarations | theorem spectrum_cfc_eq_image (A : HermitianMat d 𝕜) (f : ℝ → ℝ) :
spectrum ℝ (A.cfc f).mat = f '' (spectrum ℝ A.mat) := by
exact cfc_map_spectrum f A.mat |
841 | leanexplore_declaration | leanexplore:378929 | leanexplore_sqlite | leanexplore_declarations | /--
Spectral decomposition of `A.cfc f` as a sum of scaled projections (matrix version).
-/
theorem cfc_toMat_eq_sum_smul_proj : (A.cfc f).mat =
∑ i, f (A.H.eigenvalues i) • (A.H.eigenvectorUnitary.val * (Matrix.single i i 1) * A.H.eigenvectorUnitary.val.conjTranspose) := by
rw [A.mat_cfc, A.H.cfc_eq, Matrix.IsHe... |
144 | leanexplore_declaration | leanexplore:378930 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_eigenvalues (A : HermitianMat d 𝕜) :
∃ (e : d ≃ d), (A.cfc f).H.eigenvalues = f ∘ A.H.eigenvalues ∘ e :=
A.H.cfc_eigenvalues f |
102 | leanexplore_declaration | leanexplore:378931 | leanexplore_sqlite | leanexplore_declarations | @[simp]
nonrec theorem cfc_id : A.cfc id = A := by
simpa [HermitianMat.ext_iff] using cfc_id ℝ A.mat |
60 | leanexplore_declaration | leanexplore:378932 | leanexplore_sqlite | leanexplore_declarations | @[simp]
nonrec theorem cfc_id' : A.cfc (·) = A :=
cfc_id A |
89 | leanexplore_declaration | leanexplore:378933 | leanexplore_sqlite | leanexplore_declarations | nonrec theorem cfc_add : A.cfc (f + g) = A.cfc f + A.cfc g := by
ext1; exact cfc_add .. |
88 | leanexplore_declaration | leanexplore:378934 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_add_apply : A.cfc (fun x ↦ f x + g x) = A.cfc f + A.cfc g :=
cfc_add A f g |
89 | leanexplore_declaration | leanexplore:378935 | leanexplore_sqlite | leanexplore_declarations | nonrec theorem cfc_sub : A.cfc (f - g) = A.cfc f - A.cfc g := by
ext1; exact cfc_sub .. |
88 | leanexplore_declaration | leanexplore:378936 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_sub_apply : A.cfc (fun x ↦ f x - g x) = A.cfc f - A.cfc g :=
cfc_sub A f g |
77 | leanexplore_declaration | leanexplore:378937 | leanexplore_sqlite | leanexplore_declarations | nonrec theorem cfc_neg : A.cfc (-f) = -A.cfc f := by
ext1; exact cfc_neg .. |
72 | leanexplore_declaration | leanexplore:378938 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_neg_apply : A.cfc (fun x ↦ -f x) = -A.cfc f :=
cfc_neg A f |
390 | leanexplore_declaration | leanexplore:378939 | leanexplore_sqlite | leanexplore_declarations | /-- We don't have a direct analog of `cfc_mul`, since we can't generally multiply
to HermitianMat's to get another one, so the theorem statement wouldn't be well-typed.
But, we can say that the matrices are always equal. See `cfc_conj` for the coe-free
analog to multiplication. -/
theorem mat_cfc_mul : (A.cfc (f * g)).... |
108 | leanexplore_declaration | leanexplore:378940 | leanexplore_sqlite | leanexplore_declarations | theorem mat_cfc_mul_apply : (A.cfc (fun x ↦ f x * g x)).mat = A.cfc f * A.cfc g := by
exact mat_cfc_mul .. |
89 | leanexplore_declaration | leanexplore:378941 | leanexplore_sqlite | leanexplore_declarations | nonrec theorem cfc_comp : A.cfc (g ∘ f) = (A.cfc f).cfc g := by
ext1; exact cfc_comp .. |
86 | leanexplore_declaration | leanexplore:378942 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_comp_apply : A.cfc (fun x ↦ g (f x)) = (A.cfc f).cfc g :=
cfc_comp A f g |
207 | leanexplore_declaration | leanexplore:378943 | leanexplore_sqlite | leanexplore_declarations | nonrec theorem cfc_conj : (A.cfc f).conj (A.cfc g) = A.cfc (f * g^2) := by
ext1
simp only [conj_apply, mat_cfc, mat_mk, conjTranspose_cfc]
rw [← cfc_mul, ← cfc_mul, Pi.mul_def, Pi.pow_def]
grind only |
129 | leanexplore_declaration | leanexplore:378944 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem cfc_diagonal (g : d → ℝ) : (diagonal 𝕜 g).cfc f = diagonal 𝕜 (f ∘ g) := by
ext1
exact Matrix.cfc_diagonal g f |
149 | leanexplore_declaration | leanexplore:378945 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_conj_unitary (U : Matrix.unitaryGroup d 𝕜) :
(A.conj U.val).cfc f = (A.cfc f).conj U := by
ext1
exact Matrix.cfc_conj_unitary f U |
182 | leanexplore_declaration | leanexplore:378946 | leanexplore_sqlite | leanexplore_declarations | @[simp]
nonrec theorem cfc_const : (A.cfc (fun _ ↦ r)) = r • 1 := by
ext1
simp only [mat_cfc, mat_smul, mat_one]
rw [cfc_const r A.mat]
exact Algebra.algebraMap_eq_smul_one r |
135 | leanexplore_declaration | leanexplore:378947 | leanexplore_sqlite | leanexplore_declarations | @[simp]
nonrec theorem cfc_const_mul_id : A.cfc (fun x ↦ r * x) = r • A := by
ext1
rw [mat_cfc, mat_smul, cfc_const_mul_id r A.mat] |
126 | leanexplore_declaration | leanexplore:378948 | leanexplore_sqlite | leanexplore_declarations | @[simp]
nonrec theorem cfc_const_mul : A.cfc (fun x ↦ r * f x) = r • A.cfc f := by
rw [← cfc_const_mul_id, ← cfc_comp]
rfl |
146 | leanexplore_declaration | leanexplore:378949 | leanexplore_sqlite | leanexplore_declarations | @[simp]
nonrec theorem cfc_apply_zero : (0 : HermitianMat d 𝕜).cfc f = f 0 • 1 := by
simp [HermitianMat.ext_iff, Algebra.algebraMap_eq_smul_one] |
145 | leanexplore_declaration | leanexplore:378950 | leanexplore_sqlite | leanexplore_declarations | @[simp]
nonrec theorem cfc_apply_one : (1 : HermitianMat d 𝕜).cfc f = f 1 • 1 := by
simp [HermitianMat.ext_iff, Algebra.algebraMap_eq_smul_one] |
163 | leanexplore_declaration | leanexplore:378951 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_pow {n : ℕ} : A.cfc (· ^ n) = A ^ n := by
ext1
induction n
· simp
· simp_rw [pow_succ, mat_pow, mat_cfc_mul_apply, pow_succ, cfc_id']
congr |
241 | leanexplore_declaration | leanexplore:378952 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_nonneg_iff : 0 ≤ A.cfc f ↔ ∀ i, 0 ≤ f (A.H.eigenvalues i) := by
open MatrixOrder in
rw [cfc_eq, ← Subtype.coe_le_coe, ZeroMemClass.coe_zero]
rw [_root_.cfc_nonneg_iff f A.mat, A.H.spectrum_real_eq_range_eigenvalues]
grind |
246 | leanexplore_declaration | leanexplore:378953 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_posDef : (A.cfc f).mat.PosDef ↔ ∀ i, 0 < f (A.H.eigenvalues i) := by
rw [(A.cfc f).H.posDef_iff_eigenvalues_pos]
obtain ⟨e, he⟩ := A.cfc_eigenvalues f
rw [he]
refine ⟨fun h i ↦ ?_, fun h i ↦ h (e i)⟩
simpa using h (e.symm i) |
281 | leanexplore_declaration | leanexplore:378954 | leanexplore_sqlite | leanexplore_declarations | /-- If a rael function preserves nonnegativity, the CFC preserves PSDness. -/
theorem cfc_nonneg_of_nonneg (hA : 0 ≤ A) (hf : ∀ i ≥ 0, 0 ≤ f i) :
0 ≤ A.cfc f := by
rw [cfc_nonneg_iff]
rw [zero_le_iff, A.H.posSemidef_iff_eigenvalues_nonneg] at hA
exact fun i ↦ hf _ (hA i) |
209 | leanexplore_declaration | leanexplore:378955 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_nonSingular (hf : ∀ i, f (A.H.eigenvalues i) ≠ 0) : NonSingular (A.cfc f) := by
rw [nonSingular_iff_eigenvalue_ne_zero]
obtain ⟨e, he⟩ := cfc_eigenvalues f A
simpa [he] using fun i ↦ hf (e i) |
352 | leanexplore_declaration | leanexplore:378956 | leanexplore_sqlite | leanexplore_declarations | theorem trace_mul_cfc (A : HermitianMat d 𝕜) (f : ℝ → ℝ) :
(A.mat * (A.cfc f).mat).trace = ∑ i, A.H.eigenvalues i * f (A.H.eigenvalues i) := by
conv_lhs => rw [A.eq_conj_diagonal]
rw [cfc_conj_unitary]
simp [conj, Matrix.mul_assoc, A.H.eigenvectorUnitary.val.trace_mul_comm]
simp [← Matrix.mul_assoc, Matrix... |
470 | leanexplore_declaration | leanexplore:378957 | leanexplore_sqlite | leanexplore_declarations | theorem norm_eq_sum_eigenvalues_sq (A : HermitianMat d 𝕜) :
‖A‖ ^ 2 = ∑ i, (A.H.eigenvalues i)^2 := by
rw [← RCLike.ofReal_inj (K := 𝕜), RCLike.ofReal_pow, norm_eq_trace_sq]
conv_lhs => change (A ^ 2).mat.trace; rw [(A ^ 2).H.trace_eq_sum_eigenvalues]
simp only [map_sum, map_pow]
rw [← cfc_pow]
obtain ⟨... |
766 | leanexplore_declaration | leanexplore:378958 | leanexplore_sqlite | leanexplore_declarations | theorem lt_smul_of_norm_lt {r : ℝ} (h : ‖A‖ ≤ r) : A ≤ r • 1 := by
rcases lt_or_ge r 0 with _ | hr
· have := norm_nonneg A
order
rcases isEmpty_or_nonempty d
· exact le_of_subsingleton
have h' := (sq_le_sq₀ (by positivity) (by positivity)).mpr h
rw [norm_eq_sum_eigenvalues_sq] at h'
nth_rw 1 [← cfc_co... |
306 | leanexplore_declaration | leanexplore:378959 | leanexplore_sqlite | leanexplore_declarations | theorem ball_subset_Icc : Metric.ball A r ⊆ Set.Icc (A - r • 1) (A + r • 1) := by
intro x
simp only [Metric.mem_ball, dist_eq_norm, Set.mem_Icc, tsub_le_iff_right]
intro h
constructor
· rw [← norm_neg] at h
grw [← lt_smul_of_norm_lt h.le]
simp
· grw [← lt_smul_of_norm_lt h.le]
simp |
252 | leanexplore_declaration | leanexplore:378960 | leanexplore_sqlite | leanexplore_declarations | theorem spectrum_subset_of_mem_Icc (A B : HermitianMat d 𝕜) :
∃ a b, ∀ x, A ≤ x ∧ x ≤ B → spectrum ℝ x.mat ⊆ Set.Icc a b := by
use ⨅ i, A.H.eigenvalues i, ⨆ i, B.H.eigenvalues i
rintro x ⟨hl, hr⟩
exact A.H.spectrum_subset_of_mem_Icc B.H hl hr |
1,060 | leanexplore_declaration | leanexplore:378961 | leanexplore_sqlite | leanexplore_declarations | @[fun_prop]
protected theorem cfc_continuous {f : ℝ → ℝ} (hf : Continuous f) :
Continuous (HermitianMat.cfc · f : HermitianMat d ℂ → HermitianMat d ℂ) := by
unfold HermitianMat.cfc
suffices Continuous (fun A : HermitianMat d ℂ ↦ _root_.cfc f A.mat) by
fun_prop
have h_compact_cover := LocallyCompactSpace.l... |
506 | leanexplore_declaration | leanexplore:378962 | leanexplore_sqlite | leanexplore_declarations | theorem Matrix.PosDef.spectrum_subset_Ioi {d 𝕜 : Type*} [Fintype d] [DecidableEq d] [RCLike 𝕜]
{A : Matrix d d 𝕜} (hA : A.PosDef) : spectrum ℝ A ⊆ Set.Ioi 0 := by
intro x hx;
-- Since $A$ is positive definite, all its eigenvalues are positive.
have h_eigenvalues_pos : ∀ i : d, 0 < hA.1.eigenvalues i := by
... |
352 | leanexplore_declaration | leanexplore:378963 | leanexplore_sqlite | leanexplore_declarations | /--
If f is a continuous family of functions parameterized by x, then (fun x => A.cfc (f x)) is also continuous.
-/
@[fun_prop]
theorem continuous_cfc_fun {f : X → ℝ → ℝ} (hf : ∀ i, Continuous (f · i)) :
Continuous (fun x ↦ A.cfc (f x)) := by
apply Continuous.subtype_mk
conv => enter [1, x]; apply A.cfc_toMat_e... |
621 | leanexplore_declaration | leanexplore:378964 | leanexplore_sqlite | leanexplore_declarations | /--
ContinuousOn variant for when all the matrices (A x) have a spectrum in a set T, and f is continuous on a set S.
-/
@[fun_prop]
theorem continuousOn_cfc_fun {T : Set ℝ}
(hf : ∀ i ∈ T, ContinuousOn (f · i) S) (hA : spectrum ℝ A.mat ⊆ T) :
ContinuousOn (fun x ↦ A.cfc (f x)) S := by
simp_rw [continuousOn_iff_c... |
1,469 | leanexplore_declaration | leanexplore:378965 | leanexplore_sqlite | leanexplore_declarations | /--
Bound the Frobenius norm of a functional calculus application.
-/
lemma norm_cfc_le_sqrt_card_mul_bound {A : HermitianMat d ℂ} {f : ℝ → ℝ} {C : ℝ}
(hC : 0 ≤ C) (hf : ∀ x ∈ spectrum ℝ A.mat, ‖f x‖ ≤ C) :
‖A.cfc f‖ ≤ Real.sqrt (Fintype.card d) * C := by
rw [ ← Real.sqrt_sq ( norm_nonneg _ ) ];
-- Recall t... |
992 | leanexplore_declaration | leanexplore:378966 | leanexplore_sqlite | leanexplore_declarations | lemma norm_cfc_sub_cfc_le_sqrt_card {A : HermitianMat d ℂ} {f g : ℝ → ℝ} :
‖A.cfc f - A.cfc g‖ ≤ Real.sqrt (Fintype.card d) * ⨆ x ∈ spectrum ℝ A.mat, ‖f x - g x‖ := by
rw [ ← HermitianMat.cfc_sub ];
refine' le_trans ( norm_cfc_le_sqrt_card_mul_bound _ _ ) _;
exact ⨆ x ∈ spectrum ℝ A.mat, ‖f x - g x‖;
· exac... |
380 | leanexplore_declaration | leanexplore:378967 | leanexplore_sqlite | leanexplore_declarations | lemma norm_cfc_sub_le_of_sup_le {A : HermitianMat d ℂ} {f g : ℝ → ℝ} {T : Set ℝ} {ε : ℝ}
(hT : spectrum ℝ A.mat ⊆ T) (hε : 0 ≤ ε) (h_sup : ∀ x ∈ T, ‖f x - g x‖ ≤ ε) :
‖A.cfc f - A.cfc g‖ ≤ Real.sqrt (Fintype.card d) * ε := by
refine' le_trans ( norm_cfc_sub_cfc_le_sqrt_card ) _;
gcongr;
refine' ciSup_le f... |
2,291 | leanexplore_declaration | leanexplore:378968 | leanexplore_sqlite | leanexplore_declarations | /--
If $f$ is jointly continuous on $S \times T$ and $T$ is compact, then $x \mapsto f(x, \cdot)$ is continuous into the space of bounded functions on $T$ with the uniform norm.
-/
lemma dist_lt_of_continuous' {X : Type*} [TopologicalSpace X]
{f : X → ℝ → ℝ} {S : Set X} {T : Set ℝ}
(hT : IsCompact T)
(hf : ... |
4,710 | leanexplore_declaration | leanexplore:378969 | leanexplore_sqlite | leanexplore_declarations | /--
The functional calculus is continuous on matrices with spectrum in a compact set.
-/
lemma continuousOn_cfc_of_compact {K : Set ℝ} {g : ℝ → ℝ} (hK : IsCompact K) (hg : ContinuousOn g K) :
ContinuousOn (fun (A : HermitianMat d ℂ) ↦ A.cfc g) {A | spectrum ℝ A.mat ⊆ K} := by
by_contra! h_contra;
-- By Stone-We... |
1,924 | leanexplore_declaration | leanexplore:378970 | leanexplore_sqlite | leanexplore_declarations | theorem continuous_cfc_joint_compact {X d : Type*} [TopologicalSpace X] [Fintype d] [DecidableEq d]
{f : X → ℝ → ℝ} {A : X → HermitianMat d ℂ} {S : Set X} {T : Set ℝ}
(hT : IsCompact T)
(hf : ContinuousOn (fun (p : X × ℝ) ↦ f p.1 p.2) (S ×ˢ T))
(hA₁ : ∀ x ∈ S, spectrum ℝ (A x).mat ⊆ T)
(hA₂ : ContinuousOn (fu... |
359 | leanexplore_declaration | leanexplore:378971 | leanexplore_sqlite | leanexplore_declarations | lemma eigenvalue_norm_le (A : HermitianMat d ℂ) (i : d) :
|A.H.eigenvalues i| ≤ ‖A‖ := by
have h_eigenvalue_bound : |A.H.eigenvalues i| ^ 2 ≤ ‖A‖ ^ 2 := by
rw [ norm_eq_sum_eigenvalues_sq A ];
simp [pow_two];
exact Finset.single_le_sum ( fun i _ => mul_self_nonneg ( A.H.eigenvalues i ) ) ( Finset.mem_... |
348 | leanexplore_declaration | leanexplore:378972 | leanexplore_sqlite | leanexplore_declarations | /--
The spectrum of a `HermitianMat` is contained in the closed ball of radius `‖A‖` around 0.
-/
lemma spectrum_subset_closedBall (A : HermitianMat d ℂ) :
spectrum ℝ A.mat ⊆ Metric.closedBall (0 : ℝ) ‖A‖ := by
rw [A.H.spectrum_real_eq_range_eigenvalues]
rintro _ ⟨i, rfl⟩
simp [Metric.mem_closedBall, dist_zer... |
4,976 | leanexplore_declaration | leanexplore:378973 | leanexplore_sqlite | leanexplore_declarations | lemma spectrum_subset_of_isOpen (A₀ : HermitianMat d ℂ) (U : Set ℝ)
(hU : IsOpen U) (hAU : spectrum ℝ A₀.mat ⊆ U) :
∀ᶠ B in nhds A₀, spectrum ℝ B.mat ⊆ U := by
-- Let $M = \|A₀\| + 1$. For $B$ in a ball of radius $1$ around $A₀$, $\|B\| \leq M$, so $\sigma(B) \subseteq \overline{B(0, M)}$.
obtain ⟨M, hM⟩ : ... |
5,501 | leanexplore_declaration | leanexplore:378974 | leanexplore_sqlite | leanexplore_declarations | lemma continuousWithinAt_cfc_of_continuousOn {T : Set ℝ} {g : ℝ → ℝ}
{A₀ : HermitianMat d ℂ}
(hg : ContinuousOn g T) (hA₀ : spectrum ℝ A₀.mat ⊆ T) :
ContinuousWithinAt (fun B ↦ B.cfc g) {B | spectrum ℝ B.mat ⊆ T} A₀ := by
have h_ext : ∃ h : ℝ → ℝ, Continuous h ∧ ∀ x ∈ spectrum ℝ A₀.mat, h x = g x := by
... |
5,250 | leanexplore_declaration | leanexplore:378975 | leanexplore_sqlite | leanexplore_declarations | lemma dist_lt_of_continuous_spectrum {X : Type*} [TopologicalSpace X]
{f : X → ℝ → ℝ} {A : X → HermitianMat d ℂ} {S : Set X} {T : Set ℝ}
(hf : ContinuousOn (fun (p : X × ℝ) ↦ f p.1 p.2) (S ×ˢ T))
(hA₁ : ∀ x ∈ S, spectrum ℝ (A x).mat ⊆ T)
(hA₂ : ContinuousOn (fun x ↦ A x) S)
{x₀ : X} (hx₀ : x₀ ∈ S) {... |
3,551 | leanexplore_declaration | leanexplore:378976 | leanexplore_sqlite | leanexplore_declarations | @[fun_prop]
theorem continuous_cfc_joint {X d : Type*} [TopologicalSpace X] [Fintype d] [DecidableEq d]
{f : X → ℝ → ℝ} {A : X → HermitianMat d ℂ} {S : Set X} {T : Set ℝ}
(hf : ContinuousOn (fun (p : X × ℝ) ↦ f p.1 p.2) (S ×ˢ T))
(hA₁ : ∀ x ∈ S, spectrum ℝ (A x).mat ⊆ T)
(hA₂ : ContinuousOn (fun x ↦ A x) S) :
... |
359 | leanexplore_declaration | leanexplore:378977 | leanexplore_sqlite | leanexplore_declarations | /-- Specialization of `continuousOn_cfc_fun` for nonsingular matrices. -/
@[fun_prop]
theorem continuousOn_cfc_fun_nonsingular {f : X → ℝ → ℝ} {S : Set X}
(hf : ∀ i ≠ 0, ContinuousOn (f · i) S) [NonSingular A] :
ContinuousOn (fun x ↦ A.cfc (f x)) S := by
apply continuousOn_cfc_fun (T := {0}ᶜ)
· exact hf
· g... |
381 | leanexplore_declaration | leanexplore:378978 | leanexplore_sqlite | leanexplore_declarations | /-- Specialization of `continuousOn_cfc_fun` for positive semidefinite matrices. -/
@[fun_prop]
theorem continuousOn_cfc_fun_nonneg {f : X → ℝ → ℝ} {S : Set X}
(hf : ∀ i ≥ 0, ContinuousOn (f · i) S) (hA : 0 ≤ A) :
ContinuousOn (fun x ↦ A.cfc (f x)) S := by
apply continuousOn_cfc_fun (T := Set.Ici 0)
· exact h... |
371 | leanexplore_declaration | leanexplore:378979 | leanexplore_sqlite | leanexplore_declarations | /-- Specialization of `continuousOn_cfc_fun` for positive definite matrices. -/
@[fun_prop]
theorem continuousOn_cfc_fun_posDef {f : X → ℝ → ℝ} {S : Set X}
(hf : ∀ i > 0, ContinuousOn (f · i) S) (hA : A.mat.PosDef) :
ContinuousOn (fun x ↦ A.cfc (f x)) S := by
apply continuousOn_cfc_fun (T := Set.Ioi 0)
· exac... |
2,121 | leanexplore_declaration | leanexplore:378980 | leanexplore_sqlite | leanexplore_declarations | /--
The inverse of the CFC is the CFC of the inverse function.
-/
lemma inv_cfc_eq_cfc_inv (hf : ∀ i, f (A.H.eigenvalues i) ≠ 0) :
(A.cfc f)⁻¹ = A.cfc (fun u ↦ (f u)⁻¹) := by
suffices (A.cfc f).mat⁻¹ = (A.cfc (fun u ↦ 1 / f u)).mat by
ext1
simpa using this
have h_def : (A.cfc f).mat = ∑ i, f (A.H.eigenv... |
139 | leanexplore_declaration | leanexplore:378981 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_inv [NonSingular A] : A.cfc (fun u ↦ u⁻¹) = A⁻¹ := by
simpa using (inv_cfc_eq_cfc_inv id nonSingular_eigenvalue_ne_zero).symm |
318 | leanexplore_declaration | leanexplore:378982 | leanexplore_sqlite | leanexplore_declarations | /--
The integral of a Hermitian matrix function commutes with `toMat`.
-/
lemma integral_toMat (A : ℝ → HermitianMat d 𝕜) (T₁ T₂ : ℝ) {μ : Measure ℝ}
(hA : IntervalIntegrable A μ T₁ T₂) :
(∫ t in T₁..T₂, A t ∂μ).mat = ∫ t in T₁..T₂, (A t).mat ∂μ := by
exact ((matₗ (R := ℝ)).intervalIntegral_comp_comm hA).symm |
435 | leanexplore_declaration | leanexplore:378983 | leanexplore_sqlite | leanexplore_declarations | /--
A sum of scaled constant matrices is integrable if the scalar functions are integrable.
-/
lemma intervalIntegrable_sum_smul_const (T₁ T₂ : ℝ) {μ : Measure ℝ} (g : ℝ → d → ℝ)
(P : d → Matrix d d 𝕜) (hg : ∀ i, IntervalIntegrable (fun t ↦ g t i) μ T₁ T₂) :
IntervalIntegrable (fun t ↦ ∑ i, g t i • P i) μ T₁ T... |
2,015 | leanexplore_declaration | leanexplore:378984 | leanexplore_sqlite | leanexplore_declarations | /--
A function to Hermitian matrices is integrable iff its matrix values are integrable.
-/
lemma intervalIntegrable_toMat_iff (A : ℝ → HermitianMat d 𝕜) (T₁ T₂ : ℝ) {μ : Measure ℝ} :
IntervalIntegrable (fun t ↦ (A t).mat) μ T₁ T₂ ↔ IntervalIntegrable A μ T₁ T₂ := by
--TODO Cleanup
simp [ intervalIntegrable_if... |
615 | leanexplore_declaration | leanexplore:378985 | leanexplore_sqlite | leanexplore_declarations | /--
The CFC of an integrable function family is integrable.
-/
lemma integrable_cfc (T₁ T₂ : ℝ) (f : ℝ → ℝ → ℝ) {μ : Measure ℝ}
(hf : ∀ i, IntervalIntegrable (fun t ↦ f t (A.H.eigenvalues i)) μ T₁ T₂) :
IntervalIntegrable (fun t ↦ A.cfc (f t)) μ T₁ T₂ := by
have h_expand : ∀ t, (A.cfc (f t)).mat = ∑ i, f t (A... |
770 | leanexplore_declaration | leanexplore:378986 | leanexplore_sqlite | leanexplore_declarations | /--
The integral of the CFC is the CFC of the integral.
-/
lemma integral_cfc_eq_cfc_integral (T₁ T₂ : ℝ) {μ : Measure ℝ} (f : ℝ → ℝ → ℝ)
(hf : ∀ i, IntervalIntegrable (fun t ↦ f t (A.H.eigenvalues i)) μ T₁ T₂) :
∫ t in T₁..T₂, A.cfc (f t) ∂μ = A.cfc (fun u ↦ ∫ t in T₁..T₂, f t u ∂μ) := by
ext1
rw [ integra... |
1,042 | leanexplore_declaration | leanexplore:378987 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_pos_of_pos {A : HermitianMat d 𝕜} {f : ℝ → ℝ} (hA : 0 < A)
(hf : ∀ i > 0, 0 < f i) (hf₂ : 0 ≤ f 0) : 0 < A.cfc f := by
have h_pos := (posSemidef_iff_spectrum_nonneg A).mp hA.le
have h_f_pos : ∃ x ∈ spectrum ℝ (A.cfc f).mat, x ≠ 0 := by
obtain ⟨ x, hx₁, hx₂ ⟩ := ne_zero_iff_ne_zero_spectrum A |>... |
822 | leanexplore_declaration | leanexplore:378988 | leanexplore_sqlite | leanexplore_declarations | /-- If two matrices A and B commute, then they is a common matrix with which they are both CFCs of.
This is a variant of the common theorem that "commuting matrices can be simultaneously diagonalized." -/
theorem _root_.Commute.exists_HermitianMat_cfc (hAB : Commute A.mat B.mat) :
∃ C : HermitianMat d 𝕜, (∃ f : ℝ ... |
278 | leanexplore_declaration | leanexplore:378989 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_le_cfc_of_PosDef (hfg : ∀ i, 0 < i → f i ≤ g i) (hA : A.mat.PosDef) :
A.cfc f ≤ A.cfc g := by
rw [← sub_nonneg, ← HermitianMat.cfc_sub, cfc_nonneg_iff]
intro i
rw [Pi.sub_apply, sub_nonneg]
rw [A.H.posDef_iff_eigenvalues_pos] at hA
apply hfg
apply hA |
577 | leanexplore_declaration | leanexplore:378990 | leanexplore_sqlite | leanexplore_declarations | theorem cfc_le_cfc_of_commute_monoOn (hf : MonotoneOn f (Set.Ioi 0))
(hAB₁ : Commute A.mat B.mat) (hAB₂ : A ≤ B) (hA : A.mat.PosDef) (hB : B.mat.PosDef) :
A.cfc f ≤ B.cfc f := by
obtain ⟨C, ⟨g₁, rfl⟩, ⟨g₂, rfl⟩⟩ := hAB₁.exists_HermitianMat_cfc
-- Need to show that g₁ ≤ g₂ on spectrum ℝ C
rw [← C.cfc_comp, ←... |
453 | leanexplore_declaration | leanexplore:378991 | leanexplore_sqlite | leanexplore_declarations | /-- TODO: See above -/
theorem cfc_le_cfc_of_commute (hf : Monotone f) (hAB₁ : Commute A.mat B.mat) (hAB₂ : A ≤ B) :
A.cfc f ≤ B.cfc f := by
obtain ⟨C, ⟨g₁, rfl⟩, ⟨g₂, rfl⟩⟩ := hAB₁.exists_HermitianMat_cfc
-- Need to show that g₁ ≤ g₂ on spectrum ℝ C
rw [← C.cfc_comp, ← C.cfc_comp]
rw [← sub_nonneg, ← C.cfc... |
2,598 | leanexplore_declaration | leanexplore:378992 | leanexplore_sqlite | leanexplore_declarations | theorem inv_ge_one_of_le_one (hA : A.mat.PosDef) (h : A ≤ 1) : 1 ≤ A⁻¹ := by
-- Since $A$ is positive definite and $A \leq 1$, we have $A.cfc (fun x => x⁻¹ - 1) \geq 0$.
have h_cfc_nonneg : 0 ≤ A.cfc (fun x => x⁻¹ - 1) := by
have h_cfc_nonneg : ∀ i, 0 ≤ (A.H.eigenvalues i)⁻¹ - 1 := by
have h_pos : ∀ i, 0 ... |
675 | leanexplore_declaration | leanexplore:378993 | leanexplore_sqlite | leanexplore_declarations | /-- The trace of cfc(f, A) equals the sum of f applied to eigenvalues. -/
lemma trace_cfc_eq (A : HermitianMat d ℂ) (f : ℝ → ℝ) :
(A.cfc f).trace = ∑ i, f (A.H.eigenvalues i) := by
have h1 := HermitianMat.trace_eq_trace (A.cfc f)
obtain ⟨e, he⟩ := HermitianMat.cfc_eigenvalues f A
have h2 := (A.cfc f).H.trace_... |
2,380 | leanexplore_declaration | leanexplore:378994 | leanexplore_sqlite | leanexplore_declarations | lemma mulVec_eq_zero_iff_inner_eigenvector_zero
(A : HermitianMat d ℂ) (x : EuclideanSpace ℂ d) :
A.mat.mulVec x = 0 ↔ ∀ i, A.H.eigenvalues i ≠ 0 → inner ℂ (A.H.eigenvectorBasis i) x = 0 := by
-- Since the eigenvectors form an orthonormal basis, we can express x as a linear combination of these eigenvectors.
... |
1,588 | leanexplore_declaration | leanexplore:378995 | leanexplore_sqlite | leanexplore_declarations | lemma cfc_mulVec_expansion (A : HermitianMat d ℂ) (f : ℝ → ℝ) (x : EuclideanSpace ℂ d) :
(A.cfc f).mat.mulVec x = ∑ i, (f (A.H.eigenvalues i) : ℂ) • inner ℂ (A.H.eigenvectorBasis i) x • A.H.eigenvectorBasis i := by
ext i; simp [ Matrix.mulVec, dotProduct ] ; ring_nf
-- By definition of $cfc$, we know that $(A.c... |
2,129 | leanexplore_declaration | leanexplore:378996 | leanexplore_sqlite | leanexplore_declarations | lemma ker_cfc_le_ker_on_set
(hs : spectrum ℝ A.mat ⊆ s)
(h : ∀ i ∈ s, f i = 0 → i = 0) :
(A.cfc f).ker ≤ A.ker := by
intro x hx
have h_inner : ∀ i, A.H.eigenvalues i ≠ 0 → inner ℂ (A.H.eigenvectorBasis i) x = 0 := by
have h_inner_zero : (A.cfc f).mat.mulVec x = 0 := by
exact (mem_ker_iff_mulVe... |
150 | leanexplore_declaration | leanexplore:378997 | leanexplore_sqlite | leanexplore_declarations | lemma ker_cfc_le_ker (h : ∀ i, f i = 0 → i = 0) :
(A.cfc f).ker ≤ A.ker := by
exact ker_cfc_le_ker_on_set (Set.subset_univ _) (by simpa using h) |
181 | leanexplore_declaration | leanexplore:378998 | leanexplore_sqlite | leanexplore_declarations | lemma ker_cfc_le_ker_nonneg (hA : 0 ≤ A) (h : ∀ i ≥ 0, f i = 0 → i = 0) :
(A.cfc f).ker ≤ A.ker := by
rw [posSemidef_iff_spectrum_Ici] at hA
exact ker_cfc_le_ker_on_set hA h |
922 | leanexplore_declaration | leanexplore:378999 | leanexplore_sqlite | leanexplore_declarations | lemma ker_le_ker_cfc_on_set (hs : spectrum ℝ A.mat ⊆ s) (h : ∀ i ∈ s, i = 0 → f i = 0) :
A.ker ≤ (A.cfc f).ker := by
intro x hx
have h_inner_zero : ∀ i, A.H.eigenvalues i ≠ 0 → inner ℂ (A.H.eigenvectorBasis i) x = 0 := by
intro i hi
have h_inner_zero : A.mat.mulVec x = 0 := by
exact (mem_ker_iff_m... |
150 | leanexplore_declaration | leanexplore:379000 | leanexplore_sqlite | leanexplore_declarations | lemma ker_le_ker_cfc (h : ∀ i, i = 0 → f i = 0) :
A.ker ≤ (A.cfc f).ker := by
exact ker_le_ker_cfc_on_set (Set.subset_univ _) (by simpa using h) |
181 | leanexplore_declaration | leanexplore:379001 | leanexplore_sqlite | leanexplore_declarations | lemma ker_le_ker_cfc_nonneg (hA : 0 ≤ A) (h : ∀ i ≥ 0, i = 0 → f i = 0) :
A.ker ≤ (A.cfc f).ker := by
rw [posSemidef_iff_spectrum_Ici] at hA
exact ker_le_ker_cfc_on_set hA h |
161 | leanexplore_declaration | leanexplore:379002 | leanexplore_sqlite | leanexplore_declarations | theorem ker_cfc_eq_ker (h : ∀ i, f i = 0 ↔ i = 0) :
(A.cfc f).ker = A.ker := by
refine le_antisymm (ker_cfc_le_ker ?_) (ker_le_ker_cfc ?_)
<;> grind only |
205 | leanexplore_declaration | leanexplore:379003 | leanexplore_sqlite | leanexplore_declarations | theorem ker_cfc_eq_ker_nonneg (hA : 0 ≤ A) (h : ∀ i ≥ 0, f i = 0 ↔ i = 0) :
(A.cfc f).ker = A.ker := by
refine le_antisymm (ker_cfc_le_ker_nonneg hA ?_) (ker_le_ker_cfc_nonneg hA ?_)
<;> grind only |
263 | leanexplore_declaration | leanexplore:379004 | leanexplore_sqlite | leanexplore_declarations | /-- The Hermitian inner product, `Tr[AB]`. This is equal to `Matrix.trace (A * B)`, but gives real
values when the matrices are complex, using `IsMaximalSelfAdjoint`. -/
instance : Inner R (HermitianMat n α) where
inner A B := selfadjMap (A.mat * B.mat).trace |
104 | leanexplore_declaration | leanexplore:379005 | leanexplore_sqlite | leanexplore_declarations | theorem inner_def (A B : HermitianMat n α) :
⟪A, B⟫_R = selfadjMap (A.mat * B.mat).trace := by
rfl |
109 | leanexplore_declaration | leanexplore:379006 | leanexplore_sqlite | leanexplore_declarations | protected theorem inner_add_right : ⟪A, B + C⟫_R = ⟪A, B⟫_R + ⟪A, C⟫_R := by
simp [inner_def, left_distrib] |
109 | leanexplore_declaration | leanexplore:379007 | leanexplore_sqlite | leanexplore_declarations | protected theorem inner_add_left : ⟪A + B, C⟫_R = ⟪A, C⟫_R + ⟪B, C⟫_R := by
simp [inner_def, right_distrib] |
82 | leanexplore_declaration | leanexplore:379008 | leanexplore_sqlite | leanexplore_declarations | @[simp]
protected theorem inner_zero_right : ⟪A, 0⟫_R = 0 := by
simp [inner_def] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.