Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarWordExpansion

Download original .lean · View on GitHub · Jump to source

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

58 project constants, including generated, internal and private declarations.

58 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.StructuredHaarModel7import Nonadditivity.FiniteMomentMatching8import Mathlib.Algebra.MonoidAlgebra.Lift910/-! # Literal matrix-coefficient word expansions of trace moments1112Matrix coefficients are retained inside a noncommutative monoid algebra.13Evaluation is a ring homomorphism, so powers and their Haar integrals expand14into the actual word coefficients without a scalar coefficient norm estimate.15-/1617noncomputable section18set_option backward.isDefEq.respectTransparency false19set_option maxHeartbeats 10000002021namespace Nonadditivity.HaarWordExpansion2223open MeasureTheory RegularCoefficientEnergy24open scoped BigOperators ENNReal Matrix Matrix.Norms.L2Operator Kronecker2526variable {G ι ν : Type*} [Group G] [DecidableEq G]27  [Fintype ι] [DecidableEq ι] [Fintype ν] [DecidableEq ν]2829abbrev MatrixPolynomial (G ι : Type*) [Fintype ι] [DecidableEq ι] :=30  MonoidAlgebra (Matrix ι ι ℂ) G3132def coefficientHom : Matrix ι ι ℂ →+* Matrix (ι × ν) (ι × ν) ℂ where33  toFun A := A ⊗ₖ (1 : Matrix ν ν ℂ)34  map_zero' := Matrix.zero_kronecker _35  map_one' := Matrix.one_kronecker_one36  map_add' A B := Matrix.add_kronecker _ _ _37  map_mul' A B := by rw [← Matrix.mul_kronecker_mul, Matrix.one_mul]3839def wordHom (ρ : G →* Matrix ν ν ℂ) : G →* Matrix (ι × ν) (ι × ν) ℂ where40  toFun g := (1 : Matrix ι ι ℂ) ⊗ₖ ρ g41  map_one' := by rw [map_one, Matrix.one_kronecker_one]42  map_mul' g h := by rw [map_mul, ← Matrix.mul_kronecker_mul, Matrix.one_mul]4344omit [DecidableEq G] in45theorem coefficient_word_commute (ρ : G →* Matrix ν ν ℂ) (A : Matrix ι ι ℂ) (g : G) :46    Commute (coefficientHom (ν := ν) A) (wordHom (ι := ι) ρ g) := by47  change (A ⊗ₖ (1 : Matrix ν ν ℂ)) * ((1 : Matrix ι ι ℂ) ⊗ₖ ρ g) =48    ((1 : Matrix ι ι ℂ) ⊗ₖ ρ g) * (A ⊗ₖ (1 : Matrix ν ν ℂ))49  simp only [← Matrix.mul_kronecker_mul, Matrix.mul_one, Matrix.one_mul]5051def finiteEval (ρ : G →* Matrix ν ν ℂ) :52    MatrixPolynomial G ι →+* Matrix (ι × ν) (ι × ν) ℂ :=53  MonoidAlgebra.liftNCRingHom coefficientHom (wordHom ρ) (coefficient_word_commute ρ)5455omit [DecidableEq G] in56@[simp] theorem finiteEval_single (ρ : G →* Matrix ν ν ℂ) (g : G) (A : Matrix ι ι ℂ) :57    finiteEval ρ (MonoidAlgebra.single g A) = A ⊗ₖ ρ g := by58  simp only [finiteEval, MonoidAlgebra.liftNCRingHom_single, coefficientHom, wordHom,59    RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk, ← Matrix.mul_kronecker_mul,60    Matrix.mul_one, Matrix.one_mul]6162omit [DecidableEq G] in63theorem finiteEval_eq_sum (ρ : G →* Matrix ν ν ℂ) (f : MatrixPolynomial G ι) :64    finiteEval ρ f = ∑ g ∈ f.support, f g ⊗ₖ ρ g := by65  conv_lhs => rw [← MonoidAlgebra.sum_single f]66  change finiteEval ρ (∑ g ∈ f.support, MonoidAlgebra.single g (f g)) = _67  simp only [map_sum, finiteEval_single]6869def regularCoefficientHom : Matrix ι ι ℂ →+* (Hilbert G ι →L[ℂ] Hilbert G ι) where70  toFun := RegularFactorization.rectLift71  map_zero' := RegularFactorization.rectLift_zero72  map_one' := RegularFactorization.rectLift_one73  map_add' := RegularFactorization.rectLift_add74  map_mul' := RegularFactorization.rectLift_mul7576def regularWordHom : G →* (Hilbert G ι →L[ℂ] Hilbert G ι) where77  toFun := leftRegular78  map_one' := RegularFactorization.shift_one79  map_mul' g h := (RegularFactorization.shift_mul g h).symm8081def regularEval : MatrixPolynomial G ι →+* (Hilbert G ι →L[ℂ] Hilbert G ι) :=82  MonoidAlgebra.liftNCRingHom regularCoefficientHom regularWordHom83    (fun A g => show Commute (RegularFactorization.rectLift A) (leftRegular g) from84      RegularFactorization.rectLift_shift A g)8586@[simp] theorem regularEval_single (g : G) (A : Matrix ι ι ℂ) :87    regularEval (MonoidAlgebra.single g A) = RegularFactorization.term A g := by88  rw [regularEval, MonoidAlgebra.liftNCRingHom_single]89  rfl9091theorem regularEval_eq_sum (f : MatrixPolynomial G ι) :92    regularEval f = ∑ g ∈ f.support, RegularFactorization.term (f g) g := by93  conv_lhs => rw [← MonoidAlgebra.sum_single f]94  change regularEval (∑ g ∈ f.support, MonoidAlgebra.single g (f g)) = _95  simp only [map_sum, regularEval_single]9697theorem regularEval_eq_regularPolynomial (f : MatrixPolynomial G ι) :98    regularEval f = regularPolynomial f.support f := by99  rw [regularEval_eq_sum, RegularFactorization.polynomial_eq]100101theorem regularEval_vacuum (f : MatrixPolynomial G ι) (x : CoefficientSpace ι) :102    regularEval f (lp.single 2 (1 : G) x) 1 = coefficientOperator (f 1) x := by103  rw [regularEval_eq_regularPolynomial, regularPolynomial_single_one]104  simp only [lp.coeFn_sum, Finset.sum_apply, lp.single_apply, Pi.single_apply]105  by_cases h : (1 : G) ∈ f.support106  · simp [h]107  · simp [h, Finsupp.notMem_support_iff.mp h, coefficientOperator]108109def normalizedTrace (A : Matrix ι ι ℂ) : ℂ := A.trace / Fintype.card ι110111def vacuumTrace (f : MatrixPolynomial G ι) : ℂ := normalizedTrace (f 1)112113omit [DecidableEq G] in114theorem normalizedTrace_finiteEval (ρ : G →* Matrix ν ν ℂ) (f : MatrixPolynomial G ι) :115    normalizedTrace (finiteEval ρ f) =116      ∑ g ∈ f.support, normalizedTrace (f g) * normalizedTrace (ρ g) := by117  rw [finiteEval_eq_sum]118  simp only [normalizedTrace, Matrix.trace_sum, Matrix.trace_kronecker, Fintype.card_prod,119    Nat.cast_mul, Finset.sum_div]120  apply Finset.sum_congr rfl121  intro g hg122  ring123124omit [DecidableEq G] in125theorem normalizedTrace_pow (ρ : G →* Matrix ν ν ℂ) (f : MatrixPolynomial G ι) (p : ℕ) :126    normalizedTrace ((finiteEval ρ f)^p) =127      ∑ g ∈ (f^p).support, normalizedTrace ((f^p) g) * normalizedTrace (ρ g) := by128  rw [← map_pow, normalizedTrace_finiteEval]129130omit [DecidableEq G] in131/-- The vacuum trace is tracial on the actual matrix-valued group algebra. -/132theorem vacuumTrace_mul_comm (f h : MatrixPolynomial G ι) :133    vacuumTrace (f*h) = vacuumTrace (h*f) := by134  unfold vacuumTrace normalizedTrace135  rw [MonoidAlgebra.mul_apply_left, MonoidAlgebra.mul_apply_right]136  congr 1137  simp only [Finsupp.sum, Matrix.trace_sum, mul_one, one_mul]138  apply Finset.sum_congr rfl139  intro g hg140  exact Matrix.trace_mul_comm _ _141142theorem norm_diagonal_coefficient_le (f : MatrixPolynomial G ι) (i : ι) :143    ‖f 1 i i‖ ≤ ‖regularEval f‖ := by144  let x : CoefficientSpace ι := EuclideanSpace.single i 1145  let e : Hilbert G ι := lp.single 2 (1:G) x146  have hx : ‖x‖ = 1 := by simp [x, EuclideanSpace.norm_single]147  have he : ‖e‖ = 1 := by simp [e, lp.norm_single (by norm_num : (0 : ℝ≥0∞) < 2), hx]148  have hv : regularEval f e 1 i = f 1 i i := by149    rw [show e = lp.single 2 (1:G) x from rfl, regularEval_vacuum]150    change ((f 1) *ᵥ Pi.single i 1) i = _151    simp only [Matrix.mulVec_single_one, Matrix.col_apply]152  calc153    ‖f 1 i i‖ = ‖regularEval f e 1 i‖ := by rw [hv]154    _ ≤ ‖regularEval f e 1‖ := PiLp.norm_apply_le _ _155    _ ≤ ‖regularEval f e‖ := lp.norm_apply_le_norm (by norm_num) _ _156    _ ≤ ‖regularEval f‖ * ‖e‖ := (regularEval f).le_opNorm e157    _ = ‖regularEval f‖ := by rw [he, mul_one]158159/-- A normalized trace of matrix-valued vacuum coefficients is contractive. -/160theorem norm_vacuumTrace_le [Nonempty ι] (f : MatrixPolynomial G ι) :161    ‖vacuumTrace f‖ ≤ ‖regularEval f‖ := by162  have hc : (0:ℝ) < Fintype.card ι := Nat.cast_pos.mpr Fintype.card_pos163  unfold vacuumTrace normalizedTrace164  rw [norm_div, Complex.norm_natCast]165  apply (div_le_iff₀ hc).mpr166  calc167    ‖(f 1).trace‖ ≤ ∑ i, ‖f 1 i i‖ := norm_sum_le _ _168    _ ≤ ∑ _i : ι, ‖regularEval f‖ := Finset.sum_le_sum fun i _ => norm_diagonal_coefficient_le f i169    _ = ‖regularEval f‖ * Fintype.card ι := by simp [mul_comm]170171/-- This controls the free identity term at every moment order. -/172theorem vacuumTrace_pow_re_le [Nonempty ι] (f : MatrixPolynomial G ι) (p : ℕ) :173    (vacuumTrace (f^p)).re ≤ ‖regularEval f‖^p := by174  calc175    (vacuumTrace (f^p)).re ≤ ‖vacuumTrace (f^p)‖ := Complex.re_le_norm _176    _ ≤ ‖regularEval (f^p)‖ := norm_vacuumTrace_le _177    _ = ‖(regularEval f)^p‖ := by rw [map_pow]178    _ ≤ ‖regularEval f‖^p := by179      cases p with180      | zero => exact ContinuousLinearMap.norm_id_le181      | succ p => exact norm_pow_le' _ (Nat.succ_pos p)182183/-- Keep all matrix coefficients grouped: the entire squared column energy of184the coefficients of a power is controlled by the free operator norm. -/185theorem coefficient_power_energy (f : MatrixPolynomial G ι) (p : ℕ)186    (x : CoefficientSpace ι) :187    ∑ g ∈ (f^p).support, ‖coefficientOperator ((f^p) g) x‖^2 ≤188      ‖regularEval f‖^(2*p) * ‖x‖^2 := by189  have hp : ‖regularEval (f^p)‖ ≤ ‖regularEval f‖^p := by190    rw [map_pow]191    cases p with192    | zero => exact ContinuousLinearMap.norm_id_le193    | succ p => exact norm_pow_le' _ (Nat.succ_pos p)194  have he := coefficient_energy_le (f^p).support (f^p) x195  rw [← regularEval_eq_regularPolynomial] at he196  apply he.trans197  have hs := pow_le_pow_left₀ (norm_nonneg _) hp 2198  have hm := mul_le_mul_of_nonneg_right hs (sq_nonneg ‖x‖)199  simpa only [← pow_mul, Nat.mul_comm p 2] using hm200201open scoped Pointwise in202theorem support_pow_length_le (f : MatrixPolynomial G ι) (len : G → ℕ)203    (hone : len 1 = 0) (hmul : ∀ g h, len (g*h) ≤ len g + len h)204    (r : ℕ) (hf : ∀ g ∈ f.support, len g ≤ r) (p : ℕ) :205    ∀ g ∈ (f^p).support, len g ≤ p*r := by206  induction p with207  | zero =>208      intro g hg209      have : g = 1 := by210        have hh := MonoidAlgebra.support_one_subset (by simpa only [pow_zero] using hg)211        simpa using hh212      simp [this, hone]213  | succ p ih =>214      intro g hg215      rw [pow_succ] at hg216      obtain ⟨a, ha, b, hb, rfl⟩ := Finset.mem_mul.mp (MonoidAlgebra.support_mul _ _ hg)217      exact (hmul a b).trans (by nlinarith [ih a ha, hf b hb])218219section Integration220variable {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]221  (ρ : Ω → G →* Matrix ν ν ℂ)222223omit [IsProbabilityMeasure μ] [DecidableEq G] in224/-- The expected normalized trace is exactly the sum of word weights. -/225theorem integral_normalizedTrace_pow (f : MatrixPolynomial G ι) (p : ℕ)226    (hint : ∀ g, Integrable (fun ω => normalizedTrace (ρ ω g)) μ) :227    (∫ ω, normalizedTrace ((finiteEval (ρ ω) f)^p) ∂μ) =228      ∑ g ∈ (f^p).support,229        normalizedTrace ((f^p) g) * ∫ ω, normalizedTrace (ρ ω g) ∂μ := by230  simp_rw [normalizedTrace_pow]231  rw [integral_finset_sum _ (fun g _ => (hint g).const_mul _)]232  simp only [integral_const_mul]233234/-- Subtracting the free moment removes precisely the identity word. -/235theorem integral_moment_error [Nonempty ν] (f : MatrixPolynomial G ι) (p : ℕ)236    (hint : ∀ g, Integrable (fun ω => normalizedTrace (ρ ω g)) μ) :237    (∫ ω, normalizedTrace ((finiteEval (ρ ω) f)^p) ∂μ) - vacuumTrace (f^p) =238      ∑ g ∈ (f^p).support.erase 1,239        normalizedTrace ((f^p) g) * ∫ ω, normalizedTrace (ρ ω g) ∂μ := by240  rw [integral_normalizedTrace_pow μ ρ f p hint]241  have hc : (Fintype.card ν : ℂ) ≠ 0 := by exact_mod_cast Fintype.card_ne_zero242  have hρ : (∫ ω, normalizedTrace (ρ ω 1) ∂μ) = 1 := by243    simp [normalizedTrace, map_one, Matrix.trace_one, hc]244  by_cases h : (1:G) ∈ (f^p).support245  · rw [← Finset.sum_erase_add _ _ h, hρ, mul_one]246    change _ + vacuumTrace (f^p) - vacuumTrace (f^p) = _247    abel248  · have hz : vacuumTrace (f^p) = 0 := by249      simp [vacuumTrace, Finsupp.notMem_support_iff.mp h, normalizedTrace]250    rw [hz, sub_zero, Finset.erase_eq_of_notMem h]251252end Integration253254section LengthExpansion255variable {α : Type*} [DecidableEq α]256  {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]257  (ρ : Ω → FreeGroup α →* Matrix ν ν ℂ)258259def lengthContribution (f : MatrixPolynomial (FreeGroup α) ι) (p t : ℕ) : ℂ :=260  ∑ g ∈ ((f^p).support.erase 1).filter (fun g => FreeGroup.norm g = t),261    normalizedTrace ((f^p) g) * ∫ ω, normalizedTrace (ρ ω g) ∂μ262263/-- The word-length decomposition of the actual trace-moment error. -/264theorem integral_moment_error_by_length [Nonempty ν]265    (f : MatrixPolynomial (FreeGroup α) ι) (p : ℕ)266    (hlinear : ∀ g ∈ f.support, FreeGroup.norm g ≤ 1)267    (hint : ∀ g, Integrable (fun ω => normalizedTrace (ρ ω g)) μ) :268    (∫ ω, normalizedTrace ((finiteEval (ρ ω) f)^p) ∂μ) - vacuumTrace (f^p) =269      ∑ t ∈ Finset.Icc 1 p, lengthContribution μ ρ f p t := by270  rw [integral_moment_error μ ρ f p hint]271  symm272  apply Finset.sum_fiberwise_of_maps_to273  intro g hg274  have hs := (Finset.mem_erase.mp hg).2275  have hn := (Finset.mem_erase.mp hg).1276  have h0 : 0 < FreeGroup.norm g := Nat.pos_of_ne_zero (by277    intro hz278    exact hn (FreeGroup.norm_eq_zero.mp hz))279  have hp := support_pow_length_le f FreeGroup.norm (by simp)280    FreeGroup.norm_mul_le 1 hlinear p g hs281  simp only [Finset.mem_Icc]282  exact ⟨h0, by simpa using hp⟩283284end LengthExpansion285286section ActualPolynomial287variable {G : Type} [Group G] [DecidableEq G]288289def representationMatrix (π : G →* unitary (Matrix ν ν ℂ)) : G →* Matrix ν ν ℂ :=290  (unitary (Matrix ν ν ℂ)).subtype.comp π291292/-- The existing polynomial's matrix coefficients, with coincident words combined. -/293def ofPolynomial (P : PolynomialReduction.Polynomial G) : MatrixPolynomial G P.Index :=294  ∑ g ∈ P.support, MonoidAlgebra.single g (P.coefficient g)295296omit [DecidableEq G] in297theorem finiteEval_ofPolynomial (P : PolynomialReduction.Polynomial G)298    (π : G →* unitary (Matrix ν ν ℂ)) :299    finiteEval (representationMatrix π) (ofPolynomial P) = P.finiteEval π := by300  simp only [ofPolynomial, map_sum, finiteEval_single]301  rfl302303theorem regularEval_ofPolynomial (P : PolynomialReduction.Polynomial G) :304    regularEval (ofPolynomial P) = P.regularEval := by305  simp only [ofPolynomial, map_sum, regularEval_single]306  exact (RegularFactorization.polynomial_eq P.support P.coefficient).symm307308end ActualPolynomial309310section CanonicalHaar311312def haarRepresentation (n N : ℕ) (ω : HaarModel.Sample 2 n N) :=313  representationMatrix (StructuredHaarModel.sampleRepresentation n N ω)314315theorem integrable_haar_word_trace (n N : ℕ) (g : StructuredLinearization.G n) :316    Integrable (fun ω => normalizedTrace (haarRepresentation n N ω g))317      (HaarModel.sampleMeasure 2 n N) := by318  apply Continuous.integrable_of_hasCompactSupport _ (HasCompactSupport.of_compactSpace _)319  unfold normalizedTrace Matrix.trace320  apply Continuous.div_const321  apply continuous_finset_sum322  intro i hi323  exact (StructuredHaarModel.continuous_tensorRepresentation n N n g).matrix_elem i i324325/-- The literal expected moment of the existing Haar polynomial is its free326vacuum moment plus the nonidentity word contributions. No integration premise327or matrix-coefficient scalarization is used. -/328theorem canonical_integral_moment_error (n N : ℕ)329    (P : PolynomialReduction.Polynomial (StructuredLinearization.G n)) (p : ℕ) :330    (∫ ω, normalizedTrace ((P.finiteEval (StructuredHaarModel.sampleRepresentation n N ω))^p)331      ∂HaarModel.sampleMeasure 2 n N) - vacuumTrace ((ofPolynomial P)^p) =332      ∑ g ∈ ((ofPolynomial P)^p).support.erase 1,333        normalizedTrace (((ofPolynomial P)^p) g) *334          ∫ ω, normalizedTrace (haarRepresentation n N ω g)335            ∂HaarModel.sampleMeasure 2 n N := by336  simpa only [haarRepresentation, finiteEval_ofPolynomial] using337    integral_moment_error (HaarModel.sampleMeasure 2 n N) (haarRepresentation n N)338      (ofPolynomial P) p (integrable_haar_word_trace n N)339340end CanonicalHaar341342end Nonadditivity.HaarWordExpansion