Download data/lean/OAI/RepresentationTheory/SpinAngle/Compression.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.16 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/SpinAngle/Compression.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/RepresentationTheory/SpinAngle/Compression.lean
-
curl -L -o Compression.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/SpinAngle/Compression.lean
8.16 kB
| import OAI.RepresentationTheory.SpinAngle.Core | |
| namespace OAI | |
| noncomputable section | |
| open scoped BigOperators ComplexConjugate InnerProductSpace | |
| open scoped BigOperators ComplexConjugate InnerProductSpace Matrix | |
| open scoped Matrix ComplexOrder | |
| open scoped TensorProduct InnerProductSpace BigOperators | |
| open scoped BigOperators ComplexConjugate | |
| open scoped InnerProductSpace | |
| open scoped TensorProduct InnerProductSpace ComplexOrder | |
| open scoped BigOperators | |
| open scoped InnerProductSpace ComplexOrder BigOperators | |
| open scoped InnerProductSpace BigOperators ComplexOrder | |
| open scoped BigOperators | |
| open scoped BigOperators | |
| open MeasureTheory TopologicalSpace Set | |
| open scoped BigOperators | |
| open scoped BigOperators | |
| open Set | |
| open scoped BigOperators Matrix.Norms.L2Operator MatrixOrder ComplexOrder | |
| open scoped BigOperators | |
| open scoped BigOperators Matrix.Norms.L2Operator MatrixOrder ComplexOrder | |
| noncomputable section | |
| open scoped BigOperators | |
| namespace SpinAngle.Analytic | |
| variable {A : Type*} [contextInstance35_21 : CStarAlgebra A] [contextInstance35_38 : PartialOrder A] [contextInstance35_55 : StarOrderedRing A] | |
| [contextInstance36_2 : NonnegSpectrumClass β A] | |
| lemma norm_mul_projection_sq | |
| {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] | |
| [NonnegSpectrumClass β A] (a p : A) (hp : IsStarProjection p) : | |
| βa * pβ ^ 2 = βa * p * star aβ := by | |
| rw [sq, β CStarRing.norm_self_mul_star, star_mul, hp.isSelfAdjoint.star_eq] | |
| congr 1 | |
| calc | |
| a * p * (p * star a) = a * (p * p) * star a := by simp only [mul_assoc] | |
| _ = a * p * star a := by rw [hp.isIdempotentElem.eq] | |
| lemma norm_projection_mul_sq | |
| {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] | |
| [NonnegSpectrumClass β A] (p a : A) (hp : IsStarProjection p) : | |
| βp * aβ ^ 2 = βstar a * p * aβ := by | |
| rw [sq, β CStarRing.norm_star_mul_self, star_mul, hp.isSelfAdjoint.star_eq] | |
| congr 1 | |
| calc | |
| star a * p * (p * a) = star a * (p * p) * a := by simp only [mul_assoc] | |
| _ = star a * p * a := by rw [hp.isIdempotentElem.eq] | |
| lemma norm_mul_projection_sq_le_sum {ΞΉ : Type*} [Fintype ΞΉ] | |
| (a p : A) (hp : IsStarProjection p) (w : ΞΉ β β) (r : ΞΉ β A) | |
| (hw : β i, 0 β€ w i) (hdom : p β€ β i, w i β’ (r i * star (r i))) : | |
| βa * pβ ^ 2 β€ β i, w i * βa * r iβ ^ 2 := by | |
| rw [norm_mul_projection_sq a p hp] | |
| have hcomp := star_right_conjugate_le_conjugate hdom a | |
| have hpos : 0 β€ a * p * star a := | |
| star_right_conjugate_nonneg hp.nonneg a | |
| calc | |
| βa * p * star aβ β€ βa * (β i, w i β’ (r i * star (r i))) * star aβ := | |
| CStarAlgebra.norm_le_norm_of_le_of_nonneg hcomp hpos | |
| _ = ββ i, w i β’ ((a * r i) * star (a * r i))β := by | |
| congr 1 | |
| simp only [Finset.mul_sum, Finset.sum_mul, mul_smul_comm, smul_mul_assoc, | |
| star_mul, mul_assoc] | |
| _ β€ β i, βw i β’ ((a * r i) * star (a * r i))β := norm_sum_le _ _ | |
| _ = β i, w i * βa * r iβ ^ 2 := by | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| rw [norm_smul, Real.norm_of_nonneg (hw i), CStarRing.norm_self_mul_star, sq] | |
| lemma norm_projection_mul_sq_le_sum {ΞΉ : Type*} [Fintype ΞΉ] | |
| (p a : A) (hp : IsStarProjection p) (w : ΞΉ β β) (r : ΞΉ β A) | |
| (hw : β i, 0 β€ w i) (hdom : p β€ β i, w i β’ (star (r i) * r i)) : | |
| βp * aβ ^ 2 β€ β i, w i * βr i * aβ ^ 2 := by | |
| have h := norm_mul_projection_sq_le_sum (star a) p hp w (fun i => star (r i)) hw | |
| (by simpa using hdom) | |
| have hab : βstar a * pβ = βp * aβ := by | |
| calc | |
| βstar a * pβ = βstar (p * a)β := by rw [star_mul, hp.isSelfAdjoint.star_eq] | |
| _ = βp * aβ := norm_star _ | |
| have hr (i : ΞΉ) : βstar a * star (r i)β = βr i * aβ := by | |
| rw [β star_mul, norm_star] | |
| simpa only [hab, hr] using h | |
| lemma support_inverse_factorization | |
| {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] | |
| [NonnegSpectrumClass β A] (r v t q k p : A) | |
| (hvt : v * t = q) (hrq : r * q = r) | |
| (htk : Commute t k) (htp : Commute t p) : | |
| r * k * p = (r * v * k) * (p * t) := by | |
| calc | |
| r * k * p = (r * q) * k * p := by rw [hrq] | |
| _ = (r * (v * t)) * k * p := by rw [hvt] | |
| _ = (r * v * k) * (p * t) := by | |
| simp only [mul_assoc] | |
| rw [β mul_assoc t k, htk.eq, mul_assoc k, htp.eq] | |
| lemma norm_support_inverse_le (r v t q k p : A) | |
| (hvt : v * t = q) (hrq : r * q = r) | |
| (htk : Commute t k) (htp : Commute t p) : | |
| βr * k * pβ ^ 2 β€ βr * v * kβ ^ 2 * βp * tβ ^ 2 := by | |
| rw [support_inverse_factorization r v t q k p hvt hrq htk htp] | |
| calc | |
| β(r * v * k) * (p * t)β ^ 2 β€ (βr * v * kβ * βp * tβ) ^ 2 := by | |
| exact pow_le_pow_leftβ (norm_nonneg _) (norm_mul_le _ _) 2 | |
| _ = _ := mul_pow _ _ _ | |
| lemma norm_projection_sqrt_sq (p t : A) (hp : IsStarProjection p) | |
| (ht : IsSelfAdjoint t) (htp : Commute t p) : | |
| βp * tβ ^ 2 = β(t * t) * pβ := by | |
| rw [norm_projection_mul_sq p t hp, ht.star_eq] | |
| congr 1 | |
| calc | |
| t * p * t = t * (p * t) := mul_assoc _ _ _ | |
| _ = t * (t * p) := by rw [htp.eq] | |
| _ = t * t * p := (mul_assoc _ _ _).symm | |
| lemma norm_three_projections_sq_le_one | |
| {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] | |
| [NonnegSpectrumClass β A] (h k p : A) | |
| (hh : IsStarProjection h) (hk : IsStarProjection k) (hp : IsStarProjection p) : | |
| βh * k * pβ ^ 2 β€ 1 := by | |
| have hn : βh * k * pβ β€ 1 := calc | |
| _ β€ (βhβ * βkβ) * βpβ := (norm_mul_le _ _).trans <| | |
| mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _) | |
| _ β€ (1 * 1) * 1 := mul_le_mul | |
| (mul_le_mul hh.norm_le hk.norm_le (norm_nonneg _) zero_le_one) | |
| hp.norm_le (norm_nonneg _) (by norm_num) | |
| _ = 1 := by norm_num | |
| calc | |
| _ β€ (1 : β) ^ 2 := pow_le_pow_leftβ (norm_nonneg _) hn 2 | |
| _ = 1 := by norm_num | |
| theorem three_projection_angle_of_density_mixtures | |
| {ΞΉ ΞΊ : Type*} [Fintype ΞΉ] [Fintype ΞΊ] | |
| (h k p : A) (hh : IsStarProjection h) (hk : IsStarProjection k) | |
| (hp : IsStarProjection p) | |
| (w : ΞΉ β β) (z : ΞΊ β β) (hw : β i, 0 β€ w i) (hz : β j, 0 β€ z j) | |
| (r v t q : ΞΉ β A) (s : ΞΊ β A) | |
| (hH : h β€ β i, w i β’ (star (r i) * r i)) | |
| (hK : k β€ β j, z j β’ (s j * star (s j))) | |
| (hvt : β i, v i * t i = q i) (hrq : β i, r i * q i = r i) | |
| (htk : β i, Commute (t i) k) (htp : β i, Commute (t i) p) | |
| (g phi : β) (hg : 0 β€ g) (hphi : 0 β€ phi) | |
| (hglobal : β i, βp * t iβ ^ 2 β€ g) | |
| (hcell : β i j, βr i * v i * s jβ ^ 2 β€ phi) : | |
| βh * k * pβ ^ 2 β€ min 1 ((β i, w i) * (β j, z j) * g * phi) := by | |
| apply le_min (norm_three_projections_sq_le_one h k p hh hk hp) | |
| have hs (i : ΞΉ) : βr i * v i * kβ ^ 2 β€ (β j, z j) * phi := by | |
| calc | |
| _ β€ β j, z j * βr i * v i * s jβ ^ 2 := | |
| norm_mul_projection_sq_le_sum (r i * v i) k hk z s hz hK | |
| _ β€ β j, z j * phi := Finset.sum_le_sum fun j _ => | |
| mul_le_mul_of_nonneg_left (hcell i j) (hz j) | |
| _ = _ := (Finset.sum_mul _ _ _).symm | |
| have hb (i : ΞΉ) : βr i * k * pβ ^ 2 β€ ((β j, z j) * phi) * g := calc | |
| _ β€ βr i * v i * kβ ^ 2 * βp * t iβ ^ 2 := | |
| norm_support_inverse_le (r i) (v i) (t i) (q i) k p | |
| (hvt i) (hrq i) (htk i) (htp i) | |
| _ β€ ((β j, z j) * phi) * g := by | |
| by_cases hzero : βp * t iβ ^ 2 = 0 | |
| Β· rw [hzero, mul_zero] | |
| exact mul_nonneg (mul_nonneg (Finset.sum_nonneg fun j _ => hz j) hphi) hg | |
| Β· exact mul_le_mul (hs i) (hglobal i) (sq_nonneg _) | |
| (mul_nonneg (Finset.sum_nonneg fun j _ => hz j) hphi) | |
| calc | |
| βh * k * pβ ^ 2 = βh * (k * p)β ^ 2 := by rw [mul_assoc] | |
| _ β€ β i, w i * βr i * (k * p)β ^ 2 := | |
| norm_projection_mul_sq_le_sum h (k * p) hh w r hw hH | |
| _ = β i, w i * βr i * k * pβ ^ 2 := by simp only [mul_assoc] | |
| _ β€ β i, w i * (((β j, z j) * phi) * g) := | |
| Finset.sum_le_sum fun i _ => mul_le_mul_of_nonneg_left (hb i) (hw i) | |
| _ = (β i, w i) * (β j, z j) * g * phi := by rw [β Finset.sum_mul]; ring | |
| end SpinAngle.Analytic | |
| end | |
| end | |
| end OAI | |