Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarMixedWordExpansion

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

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

14 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarTensorReplacement78/-! # Word-length expansion for one mixed tensor replacement910Taking the vacuum trace in the untouched group extracts its identity11coefficient. Thus the one-pair mixed trace error has exactly the same finite12word expansion as the scalar Haar trace, with genuine remaining-group13coefficients retained until the trace is taken.14-/15noncomputable section16set_option backward.isDefEq.respectTransparency false17set_option maxHeartbeats 100000018namespace Nonadditivity.HaarMixedWordExpansion19open MeasureTheory HaarWordExpansion HaarTensorReplacement20open scoped BigOperators Matrix Matrix.Norms.L2Operator Kronecker2122variable {G H ι ν : Type} [Group G] [Group H] [DecidableEq G] [DecidableEq H]23  [Fintype ι] [DecidableEq ι] [Fintype ν] [DecidableEq ν]2425def identitySlice (f : MatrixPolynomial (G × H) ι) : MatrixPolynomial G ι :=26  Finsupp.mapRange (fun h : MatrixPolynomial H ι => h 1) rfl27    (MonoidAlgebra.curryRingEquiv f)2829omit [DecidableEq G] [DecidableEq H] in30@[simp] theorem identitySlice_apply (f : MatrixPolynomial (G × H) ι) (g : G) :31    identitySlice f g = f (g,1) := rfl3233omit [DecidableEq G] [DecidableEq H] in34@[simp] theorem identitySlice_zero : identitySlice (0 : MatrixPolynomial (G × H) ι) = 0 := by35  apply Finsupp.ext36  intro g37  rfl3839omit [DecidableEq G] [DecidableEq H] in40@[simp] theorem identitySlice_add (f k : MatrixPolynomial (G × H) ι) :41    identitySlice (f+k) = identitySlice f + identitySlice k := by42  apply Finsupp.ext43  intro g44  rfl4546theorem identitySlice_single (g : G) (h : H) (A : Matrix ι ι ℂ) :47    identitySlice (MonoidAlgebra.single (g,h) A) =48      if h=1 then MonoidAlgebra.single g A else 0 := by49  apply Finsupp.ext50  intro a51  rw [identitySlice_apply]52  by_cases hh : h=153  · subst h54    simp [MonoidAlgebra.single_apply]55  · simp [hh, Prod.ext_iff]5657omit [DecidableEq G] [DecidableEq H] in58theorem vacuumTrace_identitySlice (f : MatrixPolynomial (G × H) ι) :59    vacuumTrace (identitySlice f) = vacuumTrace f := rfl6061omit [DecidableEq H] in62theorem vacuumTrace_add (f k : MatrixPolynomial H ι) :63    vacuumTrace (f+k) = vacuumTrace f + vacuumTrace k := by64  change normalizedTrace (f 1 + k 1) = _65  simp [normalizedTrace, Matrix.trace_add, add_div, vacuumTrace]6667/-- A partial finite evaluation followed by the remaining vacuum state is68the ordinary finite trace of the actual identity slice. -/69theorem vacuumTrace_partialEval_eq (ρ : G →* Matrix ν ν ℂ)70    (f : MatrixPolynomial (G × H) ι) :71    vacuumTrace (partialEval ρ f) = normalizedTrace (finiteEval ρ (identitySlice f)) := by72  induction f using Finsupp.induction_linear with73  | zero => simp [vacuumTrace, normalizedTrace]74  | add f k hf hk =>75      change vacuumTrace (partialEval ρ ((f : MatrixPolynomial (G × H) ι)+k)) = _76      rw [map_add, vacuumTrace_add, identitySlice_add, map_add, hf, hk]77      simp [normalizedTrace, Matrix.trace_add, add_div]78  | single w A =>79      obtain ⟨g,h⟩ := w80      rw [partialEval_single, identitySlice_single]81      by_cases hh : h=182      · simp [hh, vacuumTrace]83      · simp [hh, vacuumTrace, normalizedTrace]8485section Integration86variable {Ω : Type} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]87  (ρ : Ω → G →* Matrix ν ν ℂ) [Nonempty ν]8889/-- Exact mixed moment error before any estimate or coefficient scalarization. -/90theorem integral_mixed_moment_error (f : MatrixPolynomial (G × H) ι) (p : ℕ)91    (hint : ∀ g, Integrable (fun ω => normalizedTrace (ρ ω g)) μ) :92    (∫ ω, vacuumTrace ((partialEval (ρ ω) f)^p) ∂μ) - vacuumTrace (f^p) =93      ∑ g ∈ (identitySlice (f^p)).support.erase 1,94        normalizedTrace ((f^p) (g,1)) * ∫ ω, normalizedTrace (ρ ω g) ∂μ := by95  simp_rw [← map_pow, vacuumTrace_partialEval_eq]96  have h := integral_moment_error μ ρ (identitySlice (f^p)) 1 hint97  simpa only [pow_one, vacuumTrace_identitySlice, identitySlice_apply] using h9899end Integration100101section Length102variable {α Ω : Type} [DecidableEq α] [MeasurableSpace Ω]103  (μ : Measure Ω) [IsProbabilityMeasure μ]104  (ρ : Ω → FreeGroup α →* Matrix ν ν ℂ) [Nonempty ν]105106def mixedLengthContribution (f : MatrixPolynomial (FreeGroup α × H) ι) (p t : ℕ) : ℂ :=107  ∑ g ∈ ((identitySlice (f^p)).support.erase 1).filter (fun g => FreeGroup.norm g=t),108    normalizedTrace ((f^p) (g,1)) * ∫ ω, normalizedTrace (ρ ω g) ∂μ109110/-- The exact mixed error decomposes over lengths `1,...,p` when the replaced111coordinate of the original polynomial is linear. -/112theorem integral_mixed_error_by_length (f : MatrixPolynomial (FreeGroup α × H) ι) (p : ℕ)113    (hlinear : ∀ w ∈ f.support, FreeGroup.norm w.1 ≤ 1)114    (hint : ∀ g, Integrable (fun ω => normalizedTrace (ρ ω g)) μ) :115    (∫ ω, vacuumTrace ((partialEval (ρ ω) f)^p) ∂μ) - vacuumTrace (f^p) =116      ∑ t ∈ Finset.Icc 1 p, mixedLengthContribution μ ρ f p t := by117  rw [integral_mixed_moment_error μ ρ f p hint]118  symm119  apply Finset.sum_fiberwise_of_maps_to120  intro g hg121  have hs := (Finset.mem_erase.mp hg).2122  have hn := (Finset.mem_erase.mp hg).1123  have h0 : 0 < FreeGroup.norm g := Nat.pos_of_ne_zero (by124    intro hz125    exact hn (FreeGroup.norm_eq_zero.mp hz))126  have hs' : (g,1) ∈ (f^p).support := by127    exact Finsupp.mem_support_iff.mpr (by128      simpa only [identitySlice_apply] using Finsupp.mem_support_iff.mp hs)129  have hp := support_pow_length_le f (fun w => FreeGroup.norm w.1) (by simp)130    (fun a b => FreeGroup.norm_mul_le a.1 b.1) 1 hlinear p (g,1) hs'131  exact Finset.mem_Icc.mpr ⟨h0, by simpa using hp⟩132133end Length134end Nonadditivity.HaarMixedWordExpansion