import Mathlib import OAI.Analysis.TracialSplitting.PreparedBlocks import OAI.Analysis.JiangSu.Traces.SmallTracePeakIsometry import OAI.Analysis.JiangSu.Excision.ExcisionUpperCut import OAI.Analysis.JiangSu.CuntzSemigroup.CuntzControlledSupport namespace OAI noncomputable section namespace CStarExcision open scoped BigOperators variable {A : Type*} [NonUnitalCStarAlgebra A] variable {I : Type*} [Fintype I] def assembled (d : I → A) (r : A) (c : I → A) : A := ∑ i,d i*r*c i def coefficientValue (ω : A → ℂ) (d c : I → A) (a : A) : A := ∑ i,∑ j,ω (star (d i)*a*d j) • (star (c i)*c j) lemma assembled_square (d c : I → A) (r a : A) : star (assembled d r c)*a*assembled d r c= ∑ i,∑ j,star (c i)*(star r*(star (d i)*a*d j)*r)*c j := by simp only [assembled,star_sum,star_mul,Finset.sum_mul,Finset.mul_sum] rw [Finset.sum_comm] apply Finset.sum_congr rfl intro i _ apply Finset.sum_congr rfl intro j _ simp only [mul_assoc] lemma coefficient_mul (ω : A → ℂ) (d c : I → A) (a e : A) (he : ∀ i,e*c i=c i*e) : coefficientValue ω d c a*e= ∑ i,∑ j,star (c i)*(ω (star (d i)*a*d j) • e)*c j := by simp only [coefficientValue,Finset.sum_mul,smul_mul_assoc,mul_smul_comm] apply Finset.sum_congr rfl intro i _ apply Finset.sum_congr rfl intro j _ congr 1 calc star (c i)*c j*e=star (c i)*(c j*e) := mul_assoc _ _ _ _=star (c i)*(e*c j) := by rw [he j] _=star (c i)*e*c j := (mul_assoc _ _ _).symm lemma assembly_error_identity (ω : A → ℂ) (d c : I → A) (r a e : A) (he : ∀ i,e*c i=c i*e) : star (assembled d r c)*a*assembled d r c-coefficientValue ω d c a*e= ∑ i,∑ j,star (c i)*(star r*(star (d i)*a*d j)*r- ω (star (d i)*a*d j) • e)*c j := by rw [assembled_square,coefficient_mul ω d c a e he,←Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro i _ rw [←Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro j _ noncomm_ring theorem assembly_error_le (ω : A → ℂ) (d c : I → A) (r a e : A) (he : ∀ i,e*c i=c i*e) {δ : ℝ} (hδ : ∀ i j,‖star r*(star (d i)*a*d j)*r-ω (star (d i)*a*d j) • e‖≤δ) : ‖star (assembled d r c)*a*assembled d r c-coefficientValue ω d c a*e‖≤ δ*(∑ i,‖c i‖)^2 := by rw [assembly_error_identity ω d c r a e he] calc ‖∑ i,∑ j,star (c i)*(star r*(star (d i)*a*d j)*r- ω (star (d i)*a*d j) • e)*c j‖ ≤∑ i,∑ j,‖c i‖*δ*‖c j‖ := by apply (norm_sum_le _ _).trans apply Finset.sum_le_sum intro i _ apply (norm_sum_le _ _).trans apply Finset.sum_le_sum intro j _ calc _≤(‖star (c i)‖*‖star r*(star (d i)*a*d j)*r- ω (star (d i)*a*d j) • e‖)*‖c j‖ := (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) _≤_ := by rw [norm_star] exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (hδ i j) (norm_nonneg _)) (norm_nonneg _) _=δ*(∑ i,‖c i‖)^2 := by simp only [←Finset.mul_sum,←Finset.sum_mul] ring theorem compression_error_le (b r a e : A) (zeta : ℂ) (hb : star b=b) (hbr : b*r=r) {δ ε : ℝ} (hδ : ‖b*a*b-zeta • (b*b)‖≤δ) (hε : ‖star r*r-e‖≤ε) : ‖star r*a*r-zeta • e‖≤‖r‖^2*δ+‖zeta‖*ε := by have hrb : star r*b=star r := by have h := congrArg star hbr simpa only [star_mul,hb] using h have hid : star r*a*r-zeta • e= star r*(b*a*b-zeta • (b*b))*r+zeta • (star r*r-e) := by simp only [mul_sub,sub_mul,mul_smul_comm,smul_mul_assoc,smul_sub] rw [show star r*(b*a*b)*r=star r*a*r by calc star r*(b*a*b)*r=(star r*b)*a*(b*r) := by noncomm_ring _=star r*a*r := by rw [hrb,hbr]] rw [show star r*(b*b)*r=star r*r by calc star r*(b*b)*r=(star r*b)*(b*r) := by noncomm_ring _=star r*r := by rw [hrb,hbr]] abel rw [hid] apply (norm_add_le _ _).trans apply add_le_add · calc ‖star r*(b*a*b-zeta • (b*b))*r‖≤ (‖star r‖*‖b*a*b-zeta • (b*b)‖)*‖r‖ := (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) _≤(‖r‖*δ)*‖r‖ := by rw [norm_star] exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hδ (norm_nonneg _)) (norm_nonneg _) _=‖r‖^2*δ := by ring · rw [norm_smul] exact mul_le_mul_of_nonneg_left hε (norm_nonneg _) end CStarExcision namespace DirectComparison open Pureness CurrentMain open scoped ComplexOrder ENNReal variable {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] lemma cut_rank_lower_from_trace (τ : TracialState A) (w : A) (hw : 0 ≤ w) (hwn : ‖w‖ ≤ 1) {β : ℝ} (hβ : 0 ≤ β) : (τ.functional w).re-β ≤ (normalizedRootRank τ (directPositiveCut β w)).toReal := by let b := directPositiveCut β w have hb := directPositiveCut_nonneg β w have hb1 : b ≤ 1 := (CStarAlgebra.norm_le_one_iff_of_nonneg b hb).mp (norm_directPositiveCut_le_one w hw hwn β hβ) have hr := trace_le_rank_of_mem_hereditary τ b b hb (self_mem_hereditary b hb) hb1 have hrs := ENNReal.toReal_mono (directRank_ne_top τ b hb) hr rw [ENNReal.toReal_ofReal (τ.functional.map_nonneg hb).1] at hrs have he := (trace_sub_real_le_norm τ w b).trans (norm_sub_directPositiveCut_le w hw β hβ) linarith theorem small_trace_supported_isometry [Nonempty (TracialState A)] (hcmp : StrictComparison A) (e w h f : A) (he : 0 ≤ e) (hen : ‖e‖ ≤ 1) (hw : 0 ≤ w) (hwn : ‖w‖ ≤ 1) (hhw : h*w=w) {α β ε : ℝ} (hα : 0<α) (hβ : 0<β) (hε : 0<ε) (hε1 : ε ≤ 1) (hsmall : ∀ τ : TracialState A, (τ.functional e).re<α*β) (hlarge : ∀ τ : TracialState A, 2*β ≤ (τ.functional w).re) : ∃ s : A, ‖s‖ ≤ 2 ∧ ‖star s*s-e‖<ε+α ∧ h*s=s ∧ ‖f*s-s‖ ≤ 2*β⁻¹*‖f*w-w‖ := by let a := directPositiveCut α e let b := directPositiveCut β w have ha := directPositiveCut_nonneg α e have hb := directPositiveCut_nonneg β w have hgap (τ : TracialState A) : normalizedRootRank τ a