math / data /lean /OAI /Geometry /Borsuk /MatrixGeometry /MatrixNorm.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
2.66 kB
import Mathlib
namespace OAI
namespace BorsukNine
open scoped RealInnerProductSpace ContDiff
open scoped Manifold
open MeasureTheory Set Metric
open scoped ENNReal Pointwise Matrix
section MatrixNorm
open scoped MatrixOrder Matrix.Norms.L2Operator
variable {Ξ½ : Type*} [Fintype Ξ½] [DecidableEq Ξ½]
local notation "E" => EuclideanSpace ℝ Ξ½
lemma matrix_action_norm_sq (A : Matrix Ξ½ Ξ½ ℝ) (x : E) :
β€–(Matrix.toEuclideanCLM (n := Ξ½) (π•œ := ℝ)) A xβ€– ^ 2 =
βŸͺx, (Matrix.toEuclideanCLM (n := Ξ½) (π•œ := ℝ)) (star A * A) x⟫ := by
rw [map_mul, map_star]
change β€–(Matrix.toEuclideanCLM (n := Ξ½) (π•œ := ℝ)) A xβ€– ^ 2 =
βŸͺx, (star ((Matrix.toEuclideanCLM (n := Ξ½) (π•œ := ℝ)) A)) ((Matrix.toEuclideanCLM (n := Ξ½) (π•œ := ℝ)) A x)⟫
rw [ContinuousLinearMap.star_eq_adjoint, ContinuousLinearMap.adjoint_inner_right,
real_inner_self_eq_norm_sq]
lemma sqrt_action_norm_sq (Q : Matrix Ξ½ Ξ½ ℝ) (hQ : 0 ≀ Q) (x : E) :
β€–(Matrix.toEuclideanCLM (n := Ξ½) (π•œ := ℝ)) (CFC.sqrt Q) xβ€– ^ 2 = βŸͺx, (Matrix.toEuclideanCLM (n := Ξ½) (π•œ := ℝ)) Q x⟫ := by
rw [matrix_action_norm_sq, (CFC.sqrt_nonneg Q).star_eq, CFC.sqrt_mul_sqrt_self Q hQ]
lemma matrix_sqrt_smul {Q : Matrix Ξ½ Ξ½ ℝ} (hQ : 0 ≀ Q) {t : ℝ} (ht : 0 ≀ t) :
CFC.sqrt (t β€’ Q) = Real.sqrt t β€’ CFC.sqrt Q := by
apply (CFC.sqrt_eq_iff _ _ (smul_nonneg ht hQ)
(smul_nonneg (Real.sqrt_nonneg _) (CFC.sqrt_nonneg _))).mpr
rw [smul_mul_smul, CFC.sqrt_mul_sqrt_self Q hQ, Real.mul_self_sqrt ht]
end MatrixNorm
section MatrixRange
open scoped MatrixOrder Matrix.Norms.L2Operator
variable {Ξ½ : Type*} [Fintype Ξ½] [DecidableEq Ξ½]
local notation "E" => EuclideanSpace ℝ Ξ½
local notation "op" => Matrix.toEuclideanCLM (n := Ξ½) (π•œ := ℝ)
lemma matrix_sqrt_range (Q : Matrix Ξ½ Ξ½ ℝ) (hQ : 0 ≀ Q) :
LinearMap.range (op (CFC.sqrt Q)).toLinearMap = LinearMap.range (op Q).toLinearMap := by
have hs : star (op (CFC.sqrt Q)) = op (CFC.sqrt Q) := by
rw [← map_star, (CFC.sqrt_nonneg Q).star_eq]
have hh := LinearMap.range_adjoint_comp_self (op (CFC.sqrt Q)).toLinearMap
have ha : (op (CFC.sqrt Q)).toLinearMap.adjoint = (op (CFC.sqrt Q)).toLinearMap := by
change (ContinuousLinearMap.adjoint (op (CFC.sqrt Q))).toLinearMap = _
rw [← ContinuousLinearMap.star_eq_adjoint, hs]
rw [ha] at hh
have hm : (op (CFC.sqrt Q)).toLinearMap.comp (op (CFC.sqrt Q)).toLinearMap = (op Q).toLinearMap := by
change (op (CFC.sqrt Q) * op (CFC.sqrt Q)).toLinearMap = _
rw [← map_mul, CFC.sqrt_mul_sqrt_self Q hQ]
rw [hm] at hh
exact hh.symm
end MatrixRange
end BorsukNine
end OAI