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 |
|---|---|---|---|---|---|
172 | leanexplore_declaration | leanexplore:379209 | leanexplore_sqlite | leanexplore_declarations | /--
The `HermitianMat.projector` for the `HermitianMat.support` submodule.
-/
noncomputable def supportProj (A : HermitianMat n 𝕜) : HermitianMat n 𝕜 := projector A.support |
160 | leanexplore_declaration | leanexplore:379210 | leanexplore_sqlite | leanexplore_declarations | /--
The `HermitianMat.projector` for the `HermitianMat.ker` submodule.
-/
noncomputable def kerProj (A : HermitianMat n 𝕜) : HermitianMat n 𝕜 := projector A.ker |
166 | leanexplore_declaration | leanexplore:379211 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem kerProj_add_supportProj : A.kerProj + A.supportProj = 1 := by
rw [← projector_add_orthogonal A.ker, ker_orthogonal_eq_support, kerProj, supportProj] |
160 | leanexplore_declaration | leanexplore:379212 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem kerProj_of_nonSingular [NonSingular A] : A.kerProj = 0 := by
simp only [kerProj, nonSingular_ker_bot, HermitianMat.ext_iff]
simp [projector] |
124 | leanexplore_declaration | leanexplore:379213 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem supportProj_of_nonSingular [NonSingular A] : A.supportProj = 1 := by
simpa using A.kerProj_add_supportProj |
1,102 | leanexplore_declaration | leanexplore:379214 | leanexplore_sqlite | leanexplore_declarations | /--
The projector onto a submodule S is the sum of the outer products of the vectors in an orthonormal basis of S.
-/
theorem projector_eq_sum_rankOne (b : OrthonormalBasis ι 𝕜 S) :
(projector S).mat = ∑ i, Matrix.vecMulVec (S.subtype (b i)) (star (S.subtype (b i))) := by
unfold projector;
ext i j;
field_sim... |
3,465 | leanexplore_declaration | leanexplore:379215 | leanexplore_sqlite | leanexplore_declarations | /--
The projector onto the support of A is the sum of the projections onto the eigenvectors with non-zero eigenvalues.
-/
lemma projector_support_eq_sum : A.supportProj.mat =
∑ i, (if A.H.eigenvalues i = 0 then 0 else 1) •
Matrix.vecMulVec (A.H.eigenvectorBasis i) (star (A.H.eigenvectorBasis i)) := by
have ... |
436 | leanexplore_declaration | leanexplore:379216 | leanexplore_sqlite | leanexplore_declarations | theorem supportProj_eq_cfc : A.supportProj = A.cfc (if · = 0 then 0 else 1) := by
apply HermitianMat.ext;
rw [HermitianMat.cfc_toMat_eq_sum_smul_proj];
convert projector_support_eq_sum A using 1;
refine' Finset.sum_congr rfl fun i _ => _;
ext x y
simp [ Matrix.vecMulVec, Matrix.mul_apply ] ;
simp [ Matrix... |
350 | leanexplore_declaration | leanexplore:379217 | leanexplore_sqlite | leanexplore_declarations | /-- Projector onto the non-negative eigenspace of `B - A`. Accessible by the notation
`{A ≤ₚ B}`, which is scoped to `HermitianMat`. This is the unique maximum operator `P`
such that `P^2 = P` and `P * A * P ≤ P * B * P` in the Loewner order. -/
def projLE (A B : HermitianMat n 𝕜) : HermitianMat n 𝕜 :=
(B - A).cfc ... |
274 | leanexplore_declaration | leanexplore:379218 | leanexplore_sqlite | leanexplore_declarations | /-- Projector onto the positive eigenspace of `B - A`. Accessible by the notation
`{A <ₚ B}`, which is scoped to `HermitianMat`. Compare with `proj_le`. -/
noncomputable def projLT (A B : HermitianMat n 𝕜) : HermitianMat n 𝕜 :=
(B - A).cfc (fun x ↦ if 0 < x then 1 else 0) |
48 | leanexplore_declaration | leanexplore:379219 | leanexplore_sqlite | leanexplore_declarations | scoped notation "{" A " ≥ₚ " B "}" => projLE B A |
48 | leanexplore_declaration | leanexplore:379220 | leanexplore_sqlite | leanexplore_declarations | scoped notation "{" A " ≤ₚ " B "}" => projLE A B |
48 | leanexplore_declaration | leanexplore:379221 | leanexplore_sqlite | leanexplore_declarations | scoped notation "{" A " >ₚ " B "}" => projLT B A |
48 | leanexplore_declaration | leanexplore:379222 | leanexplore_sqlite | leanexplore_declarations | scoped notation "{" A " <ₚ " B "}" => projLT A B |
88 | leanexplore_declaration | leanexplore:379223 | leanexplore_sqlite | leanexplore_declarations | theorem projLE_def : {A ≤ₚ B} = (B - A).cfc (fun x ↦ if 0 ≤ x then 1 else 0) := by
rfl |
88 | leanexplore_declaration | leanexplore:379224 | leanexplore_sqlite | leanexplore_declarations | theorem projLT_def : {A <ₚ B} = (B - A).cfc (fun x ↦ if 0 < x then 1 else 0) := by
rfl |
113 | leanexplore_declaration | leanexplore:379225 | leanexplore_sqlite | leanexplore_declarations | theorem projLE_sq : {A ≤ₚ B}^2 = {A ≤ₚ B} := by
rw [projLE_def, ← cfc_pow, ← cfc_comp]
congr! 2 with x
simp |
113 | leanexplore_declaration | leanexplore:379226 | leanexplore_sqlite | leanexplore_declarations | theorem projLT_sq : {A <ₚ B}^2 = {A <ₚ B} := by
rw [projLT_def, ← cfc_pow, ← cfc_comp]
congr! 2 with x
simp |
116 | leanexplore_declaration | leanexplore:379227 | leanexplore_sqlite | leanexplore_declarations | theorem projLE_zero_cfc : {0 ≤ₚ A} = A.cfc (fun x ↦ if 0 ≤ x then 1 else 0) := by
simp only [projLE_def, sub_zero] |
116 | leanexplore_declaration | leanexplore:379228 | leanexplore_sqlite | leanexplore_declarations | theorem projLT_zero_cfc : {0 <ₚ A} = A.cfc (fun x ↦ if 0 < x then 1 else 0) := by
simp only [projLT_def, sub_zero] |
246 | leanexplore_declaration | leanexplore:379229 | leanexplore_sqlite | leanexplore_declarations | theorem projLE_zero_cfc' : {A ≤ₚ 0} = A.cfc (fun x ↦ if x ≤ 0 then 1 else 0) := by
simp only [projLE_def, zero_sub]
--TODO: Should do a `HermitianMat.cfc_comp_neg`?
nth_rw 1 [← cfc_id A]
rw [← cfc_neg, ← cfc_comp]
congr! 2 with x
simp |
246 | leanexplore_declaration | leanexplore:379230 | leanexplore_sqlite | leanexplore_declarations | theorem projLT_zero_cfc' : {A <ₚ 0} = A.cfc (fun x ↦ if x < 0 then 1 else 0) := by
simp only [projLT_def, zero_sub]
--TODO: Should do a `HermitianMat.cfc_comp_neg`?
nth_rw 1 [← cfc_id A]
rw [← cfc_neg, ← cfc_comp]
congr! 2 with x
simp |
118 | leanexplore_declaration | leanexplore:379231 | leanexplore_sqlite | leanexplore_declarations | theorem projLE_nonneg : 0 ≤ {A ≤ₚ B} := by
rw [projLE_def, cfc_nonneg_iff]
intro i
apply ite_nonneg <;> norm_num |
118 | leanexplore_declaration | leanexplore:379232 | leanexplore_sqlite | leanexplore_declarations | theorem projLT_nonneg : 0 ≤ {A <ₚ B} := by
rw [projLT_def, cfc_nonneg_iff]
intro i
apply ite_nonneg <;> norm_num |
322 | leanexplore_declaration | leanexplore:379233 | leanexplore_sqlite | leanexplore_declarations | theorem projLE_le_one : {A ≤ₚ B} ≤ 1 := by
--The whole `rw` line is a defeq, i.e. `change _root_.cfc _ (B - A).mat ≤ 1` works too.
--TODO better API.
open MatrixOrder in
rw [← Subtype.coe_le_coe, val_eq_coe, selfAdjoint.val_one]
apply cfc_le_one (f := fun x ↦ if 0 ≤ x then 1 else 0)
intros; split <;> norm_n... |
165 | leanexplore_declaration | leanexplore:379234 | leanexplore_sqlite | leanexplore_declarations | theorem projLE_mul_nonneg : 0 ≤ {A ≤ₚ B}.mat * (B - A).mat := by
rw [projLE_def]
nth_rewrite 2 [← cfc_id (B - A)]
rw [← mat_cfc_mul]
apply cfc_nonneg
aesop |
147 | leanexplore_declaration | leanexplore:379235 | leanexplore_sqlite | leanexplore_declarations | theorem projLE_mul_le : {A ≤ₚ B}.mat * A.mat ≤ {A ≤ₚ B}.mat * B.mat := by
rw [← sub_nonneg, ← mul_sub_left_distrib]
exact projLE_mul_nonneg A B |
244 | leanexplore_declaration | leanexplore:379236 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem proj_le_add_lt : {A <ₚ B} + {B ≤ₚ A} = 1 := by
rw [projLE_def, projLT_def]
rw [← neg_sub A B]
nth_rw 1 [← cfc_id (A - B)]
rw[← cfc_neg, ← cfc_comp, ← cfc_add]
convert cfc_const (A - B) 1 with x
· simp; grind
· simp |
210 | leanexplore_declaration | leanexplore:379237 | leanexplore_sqlite | leanexplore_declarations | theorem conj_lt_add_conj_le : A.conj {A <ₚ 0} + A.conj {0 ≤ₚ A} = A := by
rw (occs := [2, 4, 5]) [← cfc_id A]
rw [projLT_zero_cfc', projLE_zero_cfc, cfc_conj, cfc_conj, ← cfc_add]
congr; ext
simp; grind |
225 | leanexplore_declaration | leanexplore:379238 | leanexplore_sqlite | leanexplore_declarations | theorem supportProj_eq_proj_lt_add_proj_lt (A : HermitianMat n 𝕜) :
A.supportProj = {A <ₚ 0} + {0 <ₚ A} := by
rw [supportProj_eq_cfc, projLT_zero_cfc, projLT_zero_cfc', ← cfc_add A]
congr 1
grind only [Pi.add_apply] |
174 | leanexplore_declaration | leanexplore:379239 | leanexplore_sqlite | leanexplore_declarations | /-- The positive part of a Hermitian matrix: the projection onto its positive eigenvalues. -/
instance : PosPart (HermitianMat n 𝕜) where
posPart A := A.cfc (fun x ↦ x ⊔ 0) |
175 | leanexplore_declaration | leanexplore:379240 | leanexplore_sqlite | leanexplore_declarations | /-- The negative part of a Hermitian matrix: the projection onto its negative eigenvalues. -/
instance : NegPart (HermitianMat n 𝕜) where
negPart A := A.cfc (fun x ↦ -x ⊔ 0) |
67 | leanexplore_declaration | leanexplore:379241 | leanexplore_sqlite | leanexplore_declarations | theorem posPart_eq_cfc_max : A⁺ = A.cfc (fun x ↦ x ⊔ 0) := by
rfl |
68 | leanexplore_declaration | leanexplore:379242 | leanexplore_sqlite | leanexplore_declarations | theorem negPart_eq_cfc_min : A⁻ = A.cfc (fun x ↦ -x ⊔ 0) := by
rfl |
123 | leanexplore_declaration | leanexplore:379243 | leanexplore_sqlite | leanexplore_declarations | theorem posPart_eq_cfc_ite : A⁺ = A.cfc (fun x ↦ if 0 ≤ x then x else 0) := by
simp only [← max_def', posPart_eq_cfc_max] |
162 | leanexplore_declaration | leanexplore:379244 | leanexplore_sqlite | leanexplore_declarations | theorem negPart_eq_cfc_ite : A⁻ = A.cfc (fun x ↦ if x ≤ 0 then -x else 0) := by
simp only [negPart_eq_cfc_min, max_def]
congr; ext
split <;> split <;> grind |
203 | leanexplore_declaration | leanexplore:379245 | leanexplore_sqlite | leanexplore_declarations | /-- There is an existing (very slow) `PosPart` instance on `Matrix n n 𝕜`, this shows
that this is equal. -/
theorem posPart_eq_posPart_toMat : A⁺ = A.mat⁺ := by
rw [CFC.posPart_def, cfcₙ_eq_cfc]
rfl |
203 | leanexplore_declaration | leanexplore:379246 | leanexplore_sqlite | leanexplore_declarations | /-- There is an existing (very slow) `PosPart` instance on `Matrix n n 𝕜`, this shows
that this is equal. -/
theorem negPart_eq_negPart_toMat : A⁻ = A.mat⁻ := by
rw [CFC.negPart_def, cfcₙ_eq_cfc]
rfl |
235 | leanexplore_declaration | leanexplore:379247 | leanexplore_sqlite | leanexplore_declarations | /-- The positive part can be equivalently described as the nonnegative part. -/
theorem posPart_eq_cfc_lt : A⁺ = A.cfc (fun x ↦ if 0 < x then x else 0) := by
rw [posPart_eq_cfc_ite]
congr with x
rcases lt_trichotomy x 0 <;> grind |
236 | leanexplore_declaration | leanexplore:379248 | leanexplore_sqlite | leanexplore_declarations | /-- The negative part can be equivalently described as the nonpositive part. -/
theorem negPart_eq_cfc_lt : A⁻ = A.cfc (fun x ↦ if x < 0 then -x else 0) := by
rw [negPart_eq_cfc_ite]
congr with x
rcases lt_trichotomy x 0 <;> grind |
142 | leanexplore_declaration | leanexplore:379249 | leanexplore_sqlite | leanexplore_declarations | theorem posPart_add_negPart : A⁺ - A⁻ = A := by
rw [posPart_eq_cfc_ite, negPart_eq_cfc_lt, ← cfc_sub]
convert cfc_id A
ext; dsimp; grind |
152 | leanexplore_declaration | leanexplore:379250 | leanexplore_sqlite | leanexplore_declarations | theorem posPart_eq_self {A : HermitianMat n 𝕜} (hA : 0 ≤ A) :
A⁺ = A := by
nth_rw 2 [← cfc_id A]
apply cfc_congr_of_nonneg hA
grind [Set.EqOn] |
104 | leanexplore_declaration | leanexplore:379251 | leanexplore_sqlite | leanexplore_declarations | theorem posPart_nonneg : 0 ≤ A⁺ := by
rw [posPart_eq_cfc_ite, cfc_nonneg_iff]
intro; split <;> order |
104 | leanexplore_declaration | leanexplore:379252 | leanexplore_sqlite | leanexplore_declarations | theorem negPart_nonneg : 0 ≤ A⁻ := by
rw [negPart_eq_cfc_ite, cfc_nonneg_iff]
intro; split <;> grind |
155 | leanexplore_declaration | leanexplore:379253 | leanexplore_sqlite | leanexplore_declarations | theorem posPart_le : A ≤ A⁺ := by
nth_rw 1 [← cfc_id A]
rw [posPart_eq_cfc_ite, ← sub_nonneg, ← cfc_sub, cfc_nonneg_iff]
intro; simp; split <;> order |
202 | leanexplore_declaration | leanexplore:379254 | leanexplore_sqlite | leanexplore_declarations | theorem posPart_mul_negPart : A⁺.mat * A⁻.mat = 0 := by
rw [posPart_eq_cfc_ite, negPart_eq_cfc_ite, ← mat_cfc_mul]
convert congrArg mat (cfc_const A 0)
· grind [Pi.mul_apply, mul_eq_zero]
· simp |
180 | leanexplore_declaration | leanexplore:379255 | leanexplore_sqlite | leanexplore_declarations | theorem projLE_inner_nonneg : 0 ≤ ⟪{A ≤ₚ B}, (B - A)⟫ :=
--This inner is equal to `(B - A)⁺.trace`, could be better way to describe it
inner_mul_nonneg (projLE_mul_nonneg A B) |
132 | leanexplore_declaration | leanexplore:379256 | leanexplore_sqlite | leanexplore_declarations | theorem projLE_inner_le : ⟪{A ≤ₚ B}, A⟫ ≤ ⟪{A ≤ₚ B}, B⟫ := by
rw [← sub_nonneg, ← inner_sub_right]
exact projLE_inner_nonneg A B |
82 | leanexplore_declaration | leanexplore:379257 | leanexplore_sqlite | leanexplore_declarations | theorem inner_projLE_nonneg : 0 ≤ ⟪{A ≤ₚ B}, (B - A)⟫ :=
projLE_inner_nonneg A B |
80 | leanexplore_declaration | leanexplore:379258 | leanexplore_sqlite | leanexplore_declarations | theorem inner_projLE_le : ⟪{A ≤ₚ B}, A⟫ ≤ ⟪{A ≤ₚ B}, B⟫ :=
projLE_inner_le A B |
127 | leanexplore_declaration | leanexplore:379259 | leanexplore_sqlite | leanexplore_declarations | @[fun_prop]
theorem posPart_Continuous : Continuous (·⁺ : HermitianMat n ℂ → _) := by
simp_rw [posPart_eq_cfc_max]
fun_prop |
127 | leanexplore_declaration | leanexplore:379260 | leanexplore_sqlite | leanexplore_declarations | @[fun_prop]
theorem negPart_Continuous : Continuous (·⁻ : HermitianMat n ℂ → _) := by
simp_rw [negPart_eq_cfc_min]
fun_prop |
95 | leanexplore_declaration | leanexplore:379261 | leanexplore_sqlite | leanexplore_declarations | theorem one_sub_projLT : 1 - {B ≤ₚ A} = {A <ₚ B} := by
rw [sub_eq_iff_eq_add, proj_le_add_lt] |
246 | leanexplore_declaration | leanexplore:379262 | leanexplore_sqlite | leanexplore_declarations | theorem projLT_mul_nonneg : 0 ≤ {A <ₚ B}.mat * (B - A).mat := by
rw [projLT_def]
nth_rewrite 2 [← cfc_id (B - A)]
rw [← mat_cfc_mul]
apply cfc_nonneg
intros
simp only [Pi.mul_apply, id_eq, ite_mul, one_mul, zero_mul]
split <;> order |
148 | leanexplore_declaration | leanexplore:379263 | leanexplore_sqlite | leanexplore_declarations | theorem proj_lt_mul_lt : {A <ₚ B}.mat * A.mat ≤ {A <ₚ B}.mat * B.mat := by
rw [← sub_nonneg, ← mul_sub_left_distrib]
exact A.projLT_mul_nonneg B |
348 | leanexplore_declaration | leanexplore:379264 | leanexplore_sqlite | leanexplore_declarations | theorem inner_negPart_nonpos : ⟪A, A⁻⟫ ≤ 0 := by
rw [← neg_le_neg_iff, neg_zero, ← inner_neg_right]
apply inner_mul_nonneg
nth_rw 1 [← A.cfc_id]
rw [negPart_eq_cfc_ite]
rw [← cfc_neg]
rw [← mat_cfc_mul]
change 0 ≤ A.cfc _
rw [cfc_nonneg_iff]
intro i
dsimp
split_ifs with h
· rw [neg_neg]
exac... |
188 | leanexplore_declaration | leanexplore:379265 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem posPart_inner_negPart_zero : ⟪A⁺, A⁻⟫ = 0 := by
have hi := inner_eq_trace_rc A⁺ A⁻
rw [posPart_mul_negPart, Matrix.trace_zero] at hi
simpa only [map_eq_zero] using hi |
732 | leanexplore_declaration | leanexplore:379266 | leanexplore_sqlite | leanexplore_declarations | theorem inner_negPart_zero_iff : ⟪A, A⁻⟫ = 0 ↔ 0 ≤ A := by
constructor
· intro h
nth_rw 1 [← posPart_add_negPart A] at h
rw [inner_sub_left, sub_eq_zero, posPart_inner_negPart_zero, eq_comm, inner_self_eq_zero] at h
rw [← zero_smul ℝ 1, ← cfc_const A, negPart_eq_cfc_ite] at h --TODO cfc_zero
rw [cfc... |
134 | leanexplore_declaration | leanexplore:379267 | leanexplore_sqlite | leanexplore_declarations | theorem inner_negPart_neg_iff : ⟪A, A⁻⟫ < 0 ↔ ¬0 ≤ A := by
simp [← inner_negPart_zero_iff, lt_iff_le_and_ne, inner_negPart_nonpos A] |
351 | leanexplore_declaration | leanexplore:379268 | leanexplore_sqlite | leanexplore_declarations | /-- The self-duality of the PSD cone: a matrix is PSD iff its inner product with all
nonnegative matrices is non-negative. -/
theorem nonneg_iff_inner_nonneg (A : HermitianMat n 𝕜) :
0 ≤ A ↔ ∀ B, 0 ≤ B → 0 ≤ ⟪A, B⟫ := by
use fun h _ ↦ inner_ge_zero h
intro h
contrapose! h
classical
use A⁻, negPart_nonneg... |
91 | leanexplore_declaration | leanexplore:379269 | leanexplore_sqlite | leanexplore_declarations | def reindex (e : d ≃ d₂) : HermitianMat d₂ 𝕜 :=
⟨A.mat.reindex e e, A.H.submatrix e.symm⟩ |
79 | leanexplore_declaration | leanexplore:379270 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem mat_reindex : (A.reindex e).mat = A.mat.reindex e e := by
rfl |
93 | leanexplore_declaration | leanexplore:379271 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem reindex_refl (A : HermitianMat d 𝕜) :
A.reindex (.refl _) = A := by
rfl |
159 | leanexplore_declaration | leanexplore:379272 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem reindex_reindex (A : HermitianMat d 𝕜) (e : d ≃ d₂) (f : d₂ ≃ d₃) :
(A.reindex e).reindex f = A.reindex (e.trans f) := by
ext1; simp; rfl |
86 | leanexplore_declaration | leanexplore:379273 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem reindex_zero : (0 : HermitianMat d 𝕜).reindex e = 0 := by
ext1; simp |
133 | leanexplore_declaration | leanexplore:379274 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem reindex_one [DecidableEq d] [DecidableEq d₂] :
(1 : HermitianMat d 𝕜).reindex e = 1 := by
ext1
simp [reindex] |
117 | leanexplore_declaration | leanexplore:379275 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem reindex_add : A.reindex e + B.reindex e = (A + B).reindex e := by
ext1; simp [Matrix.submatrix_add] |
118 | leanexplore_declaration | leanexplore:379276 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem reindex_sub : A.reindex e - B.reindex e = (A - B).reindex e := by
ext1; simp [Matrix.submatrix_sub] |
103 | leanexplore_declaration | leanexplore:379277 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem reindex_neg : (-A).reindex e = -(A.reindex e) := by
ext1; simp [Matrix.submatrix_neg] |
119 | leanexplore_declaration | leanexplore:379278 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem reindex_smul (c : ℝ) : (c • A).reindex e = c • (A.reindex e) := by
ext1; simp [Matrix.submatrix_smul] |
332 | leanexplore_declaration | leanexplore:379279 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem reindex_conj [Fintype d₂] [Fintype d] (B : Matrix d₃ d₂ 𝕜) :
(A.reindex e).conj B = A.conj (B.submatrix id e) := by
ext1
simp only [conj_apply, mat_reindex, Matrix.reindex_apply, mat_mk]
rw [← Matrix.submatrix_id_mul_right, Matrix.mul_assoc]
rw [← Matrix.submatrix_id_mul_left, ← Matrix.mul_... |
225 | leanexplore_declaration | leanexplore:379280 | leanexplore_sqlite | leanexplore_declarations | theorem conj_submatrix (B : Matrix d₂ d₄ 𝕜) (e : d₃ ≃ d₂) (f : d → d₄) :
A.conj (B.submatrix e f) = (A.conj (B.submatrix id f)).reindex e.symm := by
ext1
simp [conj_apply, ← Matrix.submatrix_mul_equiv (e₂ := .refl d)] |
221 | leanexplore_declaration | leanexplore:379281 | leanexplore_sqlite | leanexplore_declarations | theorem reindex_eq_conj [DecidableEq d] (e : d ≃ d₂) : A.reindex e = A.conj (Matrix.reindex e (.refl d) 1) := by
ext : 3
simp [-mat_apply, reindex, conj_apply, Matrix.submatrix,
Matrix.mul_apply, Matrix.one_apply] |
247 | leanexplore_declaration | leanexplore:379282 | leanexplore_sqlite | leanexplore_declarations | theorem ker_reindex :
(A.reindex e).ker = A.ker.comap (LinearEquiv.euclidean_of_relabel 𝕜 e).toLinearMap := by
dsimp only [reindex, ker, lin]
simp only [mat_mk]
rw [Matrix.reindex_toEuclideanLin, LinearEquiv.ker_comp, LinearMap.ker_comp] |
253 | leanexplore_declaration | leanexplore:379283 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem ker_reindex_le_iff :
(A.reindex e).ker ≤ (B.reindex e).ker ↔ A.ker ≤ B.ker := by
rw [ker_reindex, ker_reindex]
apply Submodule.comap_le_comap_iff_of_surjective
exact LinearEquiv.surjective (LinearEquiv.euclidean_of_relabel 𝕜 e) |
310 | leanexplore_declaration | leanexplore:379284 | leanexplore_sqlite | leanexplore_declarations | /-- Matrix power of a positive semidefinite matrix, as given by the elementwise
real power of the diagonal in a diagonalized form.
Note that this has the usual `Real.rpow` caveats, such as 0 to the power -1 giving 0. -/
def rpow (A : HermitianMat d 𝕜) (r : ℝ) : HermitianMat d 𝕜 :=
A.cfc (Real.rpow · r) |
56 | leanexplore_declaration | leanexplore:379285 | leanexplore_sqlite | leanexplore_declarations | instance instRPow : Pow (HermitianMat d 𝕜) ℝ :=
⟨rpow⟩ |
201 | leanexplore_declaration | leanexplore:379286 | leanexplore_sqlite | leanexplore_declarations | theorem rpow_conj_unitary (A : HermitianMat d 𝕜) (U : Matrix.unitaryGroup d 𝕜) (r : ℝ) :
(HermitianMat.conj U.val A) ^ r = HermitianMat.conj U.val (A ^ r) := by
exact A.cfc_conj_unitary (· ^ r) U |
47 | leanexplore_declaration | leanexplore:379287 | leanexplore_sqlite | leanexplore_declarations | theorem pow_eq_rpow : A ^ r = A.rpow r :=
rfl |
52 | leanexplore_declaration | leanexplore:379288 | leanexplore_sqlite | leanexplore_declarations | theorem rpow_eq_cfc : A ^ r = A.cfc (· ^ r) :=
rfl |
123 | leanexplore_declaration | leanexplore:379289 | leanexplore_sqlite | leanexplore_declarations | theorem diagonal_pow (f : d → ℝ) :
(diagonal 𝕜 f) ^ r = diagonal 𝕜 (fun i ↦ (f i) ^ r) := by
simp [rpow_eq_cfc]
rfl |
184 | leanexplore_declaration | leanexplore:379290 | leanexplore_sqlite | leanexplore_declarations | @[fun_prop]
theorem rpow_const_continuous {r : ℝ} (hr : 0 ≤ r) : Continuous (fun A : HermitianMat d ℂ ↦ A ^ r) := by
exact HermitianMat.cfc_continuous (Real.continuous_rpow_const hr) |
228 | leanexplore_declaration | leanexplore:379291 | leanexplore_sqlite | leanexplore_declarations | @[fun_prop]
theorem const_rpow_continuous [NonSingular A] : Continuous (fun r : ℝ ↦ A ^ r) := by
rw [← continuousOn_univ]
apply continuousOn_cfc_fun_nonsingular
simp only [Real.rpow_eq_pow]
fun_prop (disch := assumption) |
335 | leanexplore_declaration | leanexplore:379292 | leanexplore_sqlite | leanexplore_declarations | /--
For a fixed Hermitian matrix A, the function x ↦ A^x is continuous for x > 0.
-/
@[fun_prop]
theorem continuousOn_rpow_pos (A : HermitianMat d ℂ) : ContinuousOn (fun x : ℝ ↦ A ^ x) (Set.Ioi 0) := by
apply A.continuousOn_cfc_fun (hA := subset_rfl)
intro i _ x hx
exact (Real.continuousAt_const_rpow' hx.ne').con... |
334 | leanexplore_declaration | leanexplore:379293 | leanexplore_sqlite | leanexplore_declarations | /--
For a fixed Hermitian matrix A, the function x ↦ A^x is continuous for x < 0.
-/
@[fun_prop]
theorem continuousOn_rpow_neg (A : HermitianMat d ℂ) : ContinuousOn (fun x : ℝ ↦ A ^ x) (Set.Iio 0) := by
apply A.continuousOn_cfc_fun (hA := subset_rfl)
intro i _ x hx
exact (Real.continuousAt_const_rpow' hx.ne).cont... |
69 | leanexplore_declaration | leanexplore:379294 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem rpow_one : A ^ (1 : ℝ) = A := by
simp [rpow_eq_cfc] |
254 | leanexplore_declaration | leanexplore:379295 | leanexplore_sqlite | leanexplore_declarations | /--
Functional calculus of Real.sqrt is equal to functional calculus of x^(1/2).
-/
lemma sqrt_eq_cfc_rpow_half (A : HermitianMat d 𝕜) :
A.sqrt = A.cfc (fun x ↦ x ^ (1/2 : ℝ)) := by
rw [sqrt, cfc_eq_cfc_iff_eqOn]
intro
simp [Real.sqrt_eq_rpow] |
224 | leanexplore_declaration | leanexplore:379296 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem one_rpow : (1 : HermitianMat d 𝕜) ^ r = 1 := by
rcases isEmpty_or_nonempty d
· apply Subsingleton.allEq
· nth_rw 2 [← HermitianMat.cfc_id (1 : HermitianMat d 𝕜)]
rw [rpow_eq_cfc]
gcongr
simp |
91 | leanexplore_declaration | leanexplore:379297 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma rpow_zero (A : HermitianMat d 𝕜) : A ^ (0 : ℝ) = 1 := by
simp [rpow_eq_cfc] |
127 | leanexplore_declaration | leanexplore:379298 | leanexplore_sqlite | leanexplore_declarations | lemma rpow_diagonal (a : d → ℝ) (r : ℝ) :
(diagonal ℂ a) ^ r = diagonal ℂ (fun i => a i ^ r) := by
exact cfc_diagonal _ _ |
187 | leanexplore_declaration | leanexplore:379299 | leanexplore_sqlite | leanexplore_declarations | /-- Keeps in line with our simp-normal form for moving reindex outwards. -/
@[simp]
theorem reindex_rpow (e : d ≃ d₂) :
A.reindex e ^ r = (A ^ r).reindex e := by
apply A.cfc_reindex |
250 | leanexplore_declaration | leanexplore:379300 | leanexplore_sqlite | leanexplore_declarations | theorem mat_rpow_add (hA : 0 ≤ A) {p q : ℝ} (hpq : p + q ≠ 0) :
(A ^ (p + q)).mat = (A ^ p).mat * (A ^ q).mat := by
simp only [rpow_eq_cfc, ← mat_cfc_mul, ← HermitianMat.ext_iff]
exact cfc_congr_of_nonneg hA (fun i hi ↦ Real.rpow_add' hi hpq) |
176 | leanexplore_declaration | leanexplore:379301 | leanexplore_sqlite | leanexplore_declarations | theorem rpow_mul (hA : 0 ≤ A) {p q : ℝ} : A ^ (p * q) = (A ^ p) ^ q := by
simp only [rpow_eq_cfc, ← cfc_comp]
exact cfc_congr_of_nonneg hA (fun i hi ↦ Real.rpow_mul hi p q) |
283 | leanexplore_declaration | leanexplore:379302 | leanexplore_sqlite | leanexplore_declarations | theorem conj_rpow (hA : 0 ≤ A) (hq : q ≠ 0) (hqr : r + 2 * q ≠ 0) :
(A ^ r).conj (A ^ q) = A ^ (r + 2 * q) := by
simp only [rpow_eq_cfc, cfc_conj]
refine cfc_congr_of_nonneg hA (fun i hi ↦ ?_)
rw [pow_two, Real.rpow_add' hi hqr, two_mul, Real.rpow_add' hi (by simpa)]
rfl |
142 | leanexplore_declaration | leanexplore:379303 | leanexplore_sqlite | leanexplore_declarations | theorem pow_half_mul (hA : 0 ≤ A) :
(A ^ (1/2 : ℝ)).mat * (A ^ (1/2 : ℝ)).mat = A := by
rw [← mat_rpow_add hA]
· norm_num
· norm_num |
206 | leanexplore_declaration | leanexplore:379304 | leanexplore_sqlite | leanexplore_declarations | theorem rpow_pos {A : HermitianMat d 𝕜} (hA : 0 < A) {p : ℝ} : 0 < A ^ p := by
convert cfc_pos_of_pos hA _ _
· exact fun i hi => Real.rpow_pos_of_pos hi _
· rcases eq_or_ne p 0 with h | h <;> simp [h] |
132 | leanexplore_declaration | leanexplore:379305 | leanexplore_sqlite | leanexplore_declarations | theorem rpow_nonneg (hA : 0 ≤ A) {p : ℝ} : 0 ≤ A ^ p := by
apply cfc_nonneg_of_nonneg hA
exact fun i hi => Real.rpow_nonneg hi p |
169 | leanexplore_declaration | leanexplore:379306 | leanexplore_sqlite | leanexplore_declarations | theorem inv_eq_rpow_neg_one (hA : A.mat.PosDef) : A⁻¹ = A ^ (-1 : ℝ) := by
have := nonSingular_of_posDef hA
rw [← cfc_inv, rpow_eq_cfc]
simp_rw [Real.rpow_neg_one] |
583 | leanexplore_declaration | leanexplore:379307 | leanexplore_sqlite | leanexplore_declarations | theorem sandwich_self (hB : B.mat.PosDef) :
(B.conj (B ^ (-1/2 : ℝ)).mat) = 1 := by
have hB_inv_sqrt : (B ^ (-1 / 2 : ℝ)).mat * (B ^ (-1 / 2 : ℝ)).mat = (B ^ (-1 : ℝ)).mat := by
rw [ ← mat_rpow_add ] <;> norm_num
rw [zero_le_iff]
exact hB.posSemidef
have hB_inv : (B ^ (-1 : ℝ)).mat = B.mat⁻¹ := by
... |
1,076 | leanexplore_declaration | leanexplore:379308 | leanexplore_sqlite | leanexplore_declarations | lemma rpow_inv_eq_neg_rpow (hA : A.mat.PosDef) (p : ℝ) : (A ^ p)⁻¹ = A ^ (-p) := by
--TODO cleanup
ext i j;
have h_inv : (A ^ p).mat * (A ^ (-p)).mat = 1 := by
have h_inv : (A ^ p).mat * (A ^ (-p)).mat = 1 := by
have h_pow : (A ^ p).mat = A.cfc (fun x => x ^ p) := by
exact rfl
have h_pow_n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.