Exact Lean source
Nonadditivity.GaussianNormalization
Download original .lean · View on GitHub · Jump to source
Direct imports
Imported by project modules
3 direct reverse imports
Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.
Declarations in this module
32 project constants, including generated, internal and private declarations.
32 declarations
Nonadditivity.GaussianNormalization.channelNonadditivity.GaussianNormalization.channel._proof_1internal/detail/privateNonadditivity.GaussianNormalization.channelOfIsometryNonadditivity.GaussianNormalization.channelOfIsometry._proof_1internal/detail/privateNonadditivity.GaussianNormalization.channelOfIsometry_adjointNonadditivity.GaussianNormalization.channel_adjointNonadditivity.GaussianNormalization.channel_adjoint_norm_leNonadditivity.GaussianNormalization.eigenvalue_lowerNonadditivity.GaussianNormalization.eigenvalue_lower._simp_1_1internal/detail/privateNonadditivity.GaussianNormalization.eigenvalue_lower._simp_1_2internal/detail/privateNonadditivity.GaussianNormalization.gramNonadditivity.GaussianNormalization.gram.eq_1internal/detail/privateNonadditivity.GaussianNormalization.gram_hermitianNonadditivity.GaussianNormalization.inv_sqrt_identityNonadditivity.GaussianNormalization.normalizedNonadditivity.GaussianNormalization.normalized.eq_1internal/detail/privateNonadditivity.GaussianNormalization.normalized_isometryNonadditivity.GaussianNormalization.normalizerNonadditivity.GaussianNormalization.normalizer._proof_1internal/detail/privateNonadditivity.GaussianNormalization.normalizer._proof_2internal/detail/privateNonadditivity.GaussianNormalization.normalizer.congr_simpNonadditivity.GaussianNormalization.normalizer_hermitianNonadditivity.GaussianNormalization.normalizer_identityNonadditivity.GaussianNormalization.normalizer_norm_sqNonadditivity.GaussianNormalization.rawAdjointNonadditivity.GaussianNormalization.rawAdjoint.eq_1internal/detail/privateNonadditivity.GaussianNormalization.rawAdjoint_eq_sumNonadditivity.GaussianNormalization.rawAdjoint_eq_sum._simp_1_3internal/detail/privateNonadditivity.GaussianNormalization.rawAdjoint_normalizedNonadditivity.GaussianNormalization.sliceNonadditivity.GaussianNormalization.slice.eq_1internal/detail/privateNonadditivity.GaussianNormalization.transfer_observable_bound
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarMomentTail78/-! Deterministic polar normalization of a rectangular matrix close to an isometry. -/9noncomputable section10set_option backward.isDefEq.respectTransparency false11set_option linter.unusedSectionVars false12set_option maxHeartbeats 120000013namespace Nonadditivity.GaussianNormalization14open scoped BigOperators Matrix Matrix.Norms.L2Operator Kronecker ComplexConjugate15open Channels16variable {D B E : Type*} [Fintype D] [DecidableEq D] [Nonempty D]17[Fintype B] [DecidableEq B] [Fintype E] [DecidableEq E]1819/-- The positive inverse square root, constructed by the matrix spectral theorem. -/20def normalizer (A : Matrix D D ℂ) (hA : A.IsHermitian) : Matrix D D ℂ :=21Unitary.conjStarAlgAut ℂ _ hA.eigenvectorUnitary22(Matrix.diagonal fun i => ((Real.sqrt (hA.eigenvalues i))⁻¹ : ℂ))2324theorem eigenvalue_lower (A : Matrix D D ℂ) (hA : A.IsHermitian)25(hclose : ‖A-1‖≤1/2) (i : D) : 1/2 ≤ hA.eigenvalues i := by26letI : CStarAlgebra (Matrix D D ℂ) := {}27let f : D → ℂ := fun i => (hA.eigenvalues i : ℂ)-128have hnorm : ‖A-1‖ = ‖f‖ := by29conv_lhs => rw [hA.spectral_theorem]30rw [← map_one (Unitary.conjStarAlgAut ℂ _ hA.eigenvectorUnitary), ←map_sub,31StarAlgEquiv.norm_map]32have hd : Matrix.diagonal (fun i => (hA.eigenvalues i : ℂ)) - 1 = Matrix.diagonal f := by33rw [← Matrix.diagonal_one, ← Matrix.diagonal_sub]34change ‖Matrix.diagonal (fun i => (hA.eigenvalues i : ℂ)) - 1‖ = ‖f‖35rw [hd,Matrix.l2_opNorm_diagonal]36have hi : |hA.eigenvalues i-1| ≤ 1/2 := by37have h := (norm_le_pi_norm f i).trans (hnorm ▸ hclose)38simpa only [f, ←Complex.ofReal_one, ←Complex.ofReal_sub,Complex.norm_real,Real.norm_eq_abs] using h39linarith [(abs_le.mp hi).1]4041theorem normalizer_hermitian (A : Matrix D D ℂ) (hA : A.IsHermitian) :42(normalizer A hA).IsHermitian := by43change star (normalizer A hA) = normalizer A hA44unfold normalizer45rw [← map_star]46congr 147ext i j48by_cases h:i=j49· subst j; simp [Matrix.star_apply]50· simp [Matrix.star_apply,h,Ne.symm h]5152theorem inv_sqrt_identity (x : ℝ) (hx : 0<x) :53((Real.sqrt x)⁻¹:ℂ) * (x:ℂ) * ((Real.sqrt x)⁻¹:ℂ) = 1 := by54have h : (Real.sqrt x)⁻¹ * x * (Real.sqrt x)⁻¹ = (1:ℝ) := by55have hsq := Real.sq_sqrt hx.le56have hn := (Real.sqrt_pos.mpr hx).ne'57field_simp58nlinarith59exact_mod_cast h6061theorem normalizer_identity (A : Matrix D D ℂ) (hA : A.IsHermitian)62(hclose : ‖A-1‖≤1/2) : normalizer A hA * A * normalizer A hA = 1 := by63let U := Unitary.conjStarAlgAut ℂ _ hA.eigenvectorUnitary64have ha : A = U (Matrix.diagonal fun i => (hA.eigenvalues i:ℂ)) := hA.spectral_theorem65unfold normalizer66change U _ * A * U _ = 167conv_lhs => arg 1; arg 2; rw [ha]68rw [←map_mul,←map_mul,←map_one U]69congr 170rw [Matrix.diagonal_mul_diagonal,Matrix.diagonal_mul_diagonal]71ext i j72by_cases h:i=j73· subst j74simp only [Matrix.diagonal_apply_eq,Matrix.one_apply_eq]75exact inv_sqrt_identity _ (by have := eigenvalue_lower A hA hclose i; linarith)76· simp [h]7778theorem normalizer_norm_sq (A : Matrix D D ℂ) (hA : A.IsHermitian)79(hclose : ‖A-1‖≤1/2) : ‖normalizer A hA‖^2≤2 := by80letI : CStarAlgebra (Matrix D D ℂ) := {}81have hnorm : ‖normalizer A hA‖ ≤ Real.sqrt 2 := by82unfold normalizer83rw [StarAlgEquiv.norm_map,Matrix.l2_opNorm_diagonal]84apply (pi_norm_le_iff_of_nonneg (Real.sqrt_nonneg _)).mpr85intro i86have hl := eigenvalue_lower A hA hclose i87have hx : 0 < hA.eigenvalues i := by linarith88have hinv : ((Real.sqrt (hA.eigenvalues i))⁻¹)^2≤2 := by89rw [inv_pow,Real.sq_sqrt hx.le]90rw [inv_eq_one_div]91exact (div_le_iff₀ hx).mpr (by linarith)92have hs := Real.sq_sqrt (show (0:ℝ)≤2 by norm_num)93have hi : (Real.sqrt (hA.eigenvalues i))⁻¹ ≤ Real.sqrt 2 := by nlinarith [Real.sqrt_nonneg (2:ℝ)]94simpa only [norm_inv,Complex.norm_real,Real.norm_eq_abs,abs_of_nonneg (Real.sqrt_nonneg _)] using hi95nlinarith [Real.sq_sqrt (show (0:ℝ)≤2 by norm_num),norm_nonneg (normalizer A hA)]9697def gram (G : Matrix (B×E) D ℂ) : Matrix D D ℂ := G.conjTranspose * G9899theorem gram_hermitian (G : Matrix (B×E) D ℂ) : (gram G).IsHermitian :=100Matrix.isHermitian_conjTranspose_mul_self G101102def normalized (G : Matrix (B×E) D ℂ) : Matrix (B×E) D ℂ :=103G * normalizer (gram G) (gram_hermitian G)104105theorem normalized_isometry (G : Matrix (B×E) D ℂ) (hclose : ‖gram G-1‖≤1/2) :106(normalized G).conjTranspose * normalized G = 1 := by107unfold normalized108rw [Matrix.conjTranspose_mul,(normalizer_hermitian (gram G) (gram_hermitian G)).eq]109simpa only [Matrix.mul_assoc,gram] using normalizer_identity (gram G) (gram_hermitian G) hclose110111/-- Slicing an actual isometry into environment-indexed Kraus matrices. -/112def channelOfIsometry (V : Matrix (B×E) D ℂ) (hV : V.conjTranspose*V=1) : KrausChannel D B E where113kraus e b d := V (b,e) d114complete := by115ext i j116have h := congrArg (fun M : Matrix D D ℂ => M i j) hV117simp only [Matrix.sum_apply,Matrix.mul_apply,Matrix.conjTranspose_apply,Fintype.sum_prod_type] at h ⊢118rw [Finset.sum_comm] at h119exact h120121/-- An actual finite channel obtained by polar normalization of `G`. -/122def channel (G : Matrix (B×E) D ℂ) (hclose : ‖gram G-1‖≤1/2) : KrausChannel D B E :=123channelOfIsometry (normalized G) (normalized_isometry G hclose)124125def slice (G : Matrix (B×E) D ℂ) (e : E) : Matrix B D ℂ := fun b d => G (b,e) d126127/-- The unnormalized adjoint compression whose Gaussian concentration is needed. -/128def rawAdjoint (G : Matrix (B×E) D ℂ) (A : Matrix B B ℂ) : Matrix D D ℂ :=129G.conjTranspose * (A ⊗ₖ (1 : Matrix E E ℂ)) * G130131theorem rawAdjoint_eq_sum (G : Matrix (B×E) D ℂ) (A : Matrix B B ℂ) :132rawAdjoint G A = ∑ e, (slice G e).conjTranspose * A * slice G e := by133ext i j134simp only [rawAdjoint,Matrix.mul_assoc,Matrix.mul_apply,Matrix.kronecker_apply,135Matrix.one_apply,Matrix.conjTranspose_apply,Matrix.sum_apply,Fintype.sum_prod_type,slice]136simp only [mul_ite,mul_one,mul_zero,Finset.sum_ite_eq',Finset.mem_univ,if_true]137simp only [Finset.mul_sum,Finset.sum_mul,mul_assoc]138rw [Finset.sum_comm]139apply Finset.sum_congr rfl140intro e _141exact Finset.sum_comm142143theorem channelOfIsometry_adjoint (V : Matrix (B×E) D ℂ) (hV : V.conjTranspose*V=1)144(A : Matrix B B ℂ) : (channelOfIsometry V hV).adjointMap A = rawAdjoint V A := by145rw [rawAdjoint_eq_sum]146rfl147148theorem rawAdjoint_normalized (G : Matrix (B×E) D ℂ) (A : Matrix B B ℂ) :149rawAdjoint (normalized G) A = normalizer (gram G) (gram_hermitian G) *150rawAdjoint G A * normalizer (gram G) (gram_hermitian G) := by151simp only [rawAdjoint,normalized,Matrix.conjTranspose_mul,152(normalizer_hermitian (gram G) (gram_hermitian G)).eq,Matrix.mul_assoc]153154theorem channel_adjoint (G : Matrix (B×E) D ℂ) (hclose : ‖gram G-1‖≤1/2)155(A : Matrix B B ℂ) : (channel G hclose).adjointMap A =156normalizer (gram G) (gram_hermitian G) * rawAdjoint G A *157normalizer (gram G) (gram_hermitian G) := by158exact (channelOfIsometry_adjoint _ _ A).trans (rawAdjoint_normalized G A)159160/-- Polar normalization costs at most a factor two in every adjoint observable bound. -/161theorem channel_adjoint_norm_le (G : Matrix (B×E) D ℂ) (hclose : ‖gram G-1‖≤1/2)162(A : Matrix B B ℂ) : ‖(channel G hclose).adjointMap A‖ ≤ 2*‖rawAdjoint G A‖ := by163rw [channel_adjoint]164let S := normalizer (gram G) (gram_hermitian G)165calc166‖S * rawAdjoint G A * S‖ ≤ (‖S‖*‖rawAdjoint G A‖)*‖S‖ :=167(norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _))168_ = ‖S‖^2*‖rawAdjoint G A‖ := by ring169_ ≤ 2*‖rawAdjoint G A‖ := mul_le_mul_of_nonneg_right170(normalizer_norm_sq (gram G) (gram_hermitian G) hclose) (norm_nonneg _)171172theorem transfer_observable_bound (G : Matrix (B×E) D ℂ) (hclose : ‖gram G-1‖≤1/2)173(A : Matrix B B ℂ) (t h : ℝ) (hraw : ‖rawAdjoint G A‖ ≤ t*h) :174‖(channel G hclose).adjointMap A‖ ≤ (2*t)*h :=175(channel_adjoint_norm_le G hclose A).trans (by nlinarith)176177end Nonadditivity.GaussianNormalization