Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarTensorReplacement

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

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

29 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.ProductMomentBridge78/-! # Literal partial evaluation of a tensor-group polynomial910Replacing one group coordinate by matrices is a ring homomorphism into11matrix-valued polynomials on the remaining group. Consequently powers and12vacuum moments are those of the original polynomial, with just that coordinate13evaluated. No tensor independence or trace comparison is built into the map.14-/15noncomputable section16set_option backward.isDefEq.respectTransparency false17set_option maxHeartbeats 100000018set_option linter.unusedSectionVars false19namespace Nonadditivity.HaarTensorReplacement20open HaarWordExpansion21open scoped BigOperators Matrix Matrix.Norms.L2Operator Kronecker2223variable {G H ι ν : Type} [Group G] [Group H] [DecidableEq G] [DecidableEq H]24  [Fintype ι] [DecidableEq ι] [Fintype ν] [DecidableEq ν]2526def partialCoefficientHom : Matrix ι ι ℂ →+* MatrixPolynomial H (ι × ν) :=27  MonoidAlgebra.singleOneRingHom.comp (coefficientHom (ν := ν))2829def partialWordHom (ρ : G →* Matrix ν ν ℂ) :30    G × H →* MatrixPolynomial H (ι × ν) where31  toFun w := MonoidAlgebra.single w.2 ((1 : Matrix ι ι ℂ) ⊗ₖ ρ w.1)32  map_one' := by simp [MonoidAlgebra.one_def]33  map_mul' a b := by34    simp only [MonoidAlgebra.single_mul_single, Prod.fst_mul, Prod.snd_mul, map_mul]35    rw [← Matrix.mul_kronecker_mul, Matrix.one_mul]3637theorem partial_commute (ρ : G →* Matrix ν ν ℂ) (A : Matrix ι ι ℂ) (w : G × H) :38    Commute (partialCoefficientHom (H := H) (ν := ν) A) (partialWordHom ρ w) := by39  change MonoidAlgebra.single 1 (A ⊗ₖ (1 : Matrix ν ν ℂ)) *40      MonoidAlgebra.single w.2 ((1 : Matrix ι ι ℂ) ⊗ₖ ρ w.1) =41    MonoidAlgebra.single w.2 ((1 : Matrix ι ι ℂ) ⊗ₖ ρ w.1) *42      MonoidAlgebra.single 1 (A ⊗ₖ (1 : Matrix ν ν ℂ))43  simp only [MonoidAlgebra.single_mul_single, one_mul, mul_one,44    ← Matrix.mul_kronecker_mul, Matrix.one_mul, Matrix.mul_one]4546def partialEval (ρ : G →* Matrix ν ν ℂ) :47    MatrixPolynomial (G × H) ι →+* MatrixPolynomial H (ι × ν) :=48  MonoidAlgebra.liftNCRingHom partialCoefficientHom (partialWordHom ρ)49    (partial_commute ρ)5051@[simp] theorem partialEval_single (ρ : G →* Matrix ν ν ℂ)52    (w : G × H) (A : Matrix ι ι ℂ) :53    partialEval ρ (MonoidAlgebra.single w A) = MonoidAlgebra.single w.2 (A ⊗ₖ ρ w.1) := by54  simp only [partialEval, MonoidAlgebra.liftNCRingHom_single]55  change MonoidAlgebra.single 1 (A ⊗ₖ (1 : Matrix ν ν ℂ)) *56    MonoidAlgebra.single w.2 ((1 : Matrix ι ι ℂ) ⊗ₖ ρ w.1) = _57  simp only [MonoidAlgebra.single_mul_single, one_mul,58    ← Matrix.mul_kronecker_mul, Matrix.mul_one, Matrix.one_mul]5960theorem partialEval_eq_sum (ρ : G →* Matrix ν ν ℂ) (f : MatrixPolynomial (G × H) ι) :61    partialEval ρ f = ∑ w ∈ f.support, MonoidAlgebra.single w.2 (f w ⊗ₖ ρ w.1) := by62  conv_lhs => rw [← MonoidAlgebra.sum_single f]63  change partialEval ρ (∑ w ∈ f.support, MonoidAlgebra.single w (f w)) = _64  simp only [map_sum, partialEval_single]6566theorem partialEval_apply (ρ : G →* Matrix ν ν ℂ)67    (f : MatrixPolynomial (G × H) ι) (h : H) :68    partialEval ρ f h = ∑ w ∈ f.support, if w.2 = h then f w ⊗ₖ ρ w.1 else 0 := by69  rw [partialEval_eq_sum]70  change (∑ w ∈ f.support, (Finsupp.single w.2 (f w ⊗ₖ ρ w.1) : H →₀ Matrix (ι × ν) (ι × ν) ℂ)) h = _71  simp only [Finsupp.finset_sum_apply, Finsupp.single_apply]7273theorem normalizedTrace_kronecker (A : Matrix ι ι ℂ) (B : Matrix ν ν ℂ) :74    normalizedTrace (A ⊗ₖ B) = normalizedTrace A * normalizedTrace B := by75  simp only [normalizedTrace, Matrix.trace_kronecker, Fintype.card_prod, Nat.cast_mul]76  ring7778theorem vacuumTrace_partialEval (ρ : G →* Matrix ν ν ℂ)79    (f : MatrixPolynomial (G × H) ι) :80    vacuumTrace (partialEval ρ f) = ∑ w ∈ f.support,81      if w.2 = 1 then normalizedTrace (f w) * normalizedTrace (ρ w.1) else 0 := by82  rw [vacuumTrace, partialEval_apply]83  simp only [normalizedTrace, Matrix.trace_sum, Finset.sum_div]84  apply Finset.sum_congr rfl85  intro w hw86  split_ifs with h87  · exact normalizedTrace_kronecker _ _88  · simp8990/-- The moment after a replacement is the literal evaluated moment. -/91theorem vacuumTrace_partialEval_pow (ρ : G →* Matrix ν ν ℂ)92    (f : MatrixPolynomial (G × H) ι) (p : ℕ) :93    vacuumTrace ((partialEval ρ f)^p) = ∑ w ∈ (f^p).support,94      if w.2 = 1 then normalizedTrace ((f^p) w) * normalizedTrace (ρ w.1) else 0 := by95  rw [← map_pow, vacuumTrace_partialEval]9697theorem partialEval_support (ρ : G →* Matrix ν ν ℂ)98    (f : MatrixPolynomial (G × H) ι) :99    (partialEval ρ f).support ⊆ f.support.image Prod.snd := by100  intro h hh101  by_contra hnot102  have hz : partialEval ρ f h = 0 := by103    rw [partialEval_apply]104    apply Finset.sum_eq_zero105    intro w hw106    have hn : w.2 ≠ h := fun he => hnot (Finset.mem_image.mpr ⟨w, hw, he⟩)107    simp only [hn, ↓reduceIte]108  exact (Finsupp.mem_support_iff.mp hh) hz109110/-! The involution is written explicitly, since the group algebra currently has111no built-in convolution-star instance. -/112113def adjointPolynomial (f : MatrixPolynomial G ι) : MatrixPolynomial G ι :=114  Finsupp.mapDomain Inv.inv115    (Finsupp.mapRange Matrix.conjTranspose Matrix.conjTranspose_zero f)116117@[simp] theorem adjointPolynomial_apply (f : MatrixPolynomial G ι) (g : G) :118    adjointPolynomial f g = (f g⁻¹).conjTranspose := by119  unfold adjointPolynomial120  simpa only [inv_inv, Finsupp.mapRange_apply] using121    Finsupp.mapDomain_apply (f := Inv.inv) inv_injective122      (Finsupp.mapRange Matrix.conjTranspose Matrix.conjTranspose_zero f) (g⁻¹)123124@[simp] theorem adjointPolynomial_zero : adjointPolynomial (0 : MatrixPolynomial G ι) = 0 := by125  ext g i j126  simp127128@[simp] theorem adjointPolynomial_add (f k : MatrixPolynomial G ι) :129    adjointPolynomial (f+k) = adjointPolynomial f + adjointPolynomial k := by130  ext g i j131  simp132133@[simp] theorem adjointPolynomial_single (g : G) (A : Matrix ι ι ℂ) :134    adjointPolynomial (MonoidAlgebra.single g A) =135      MonoidAlgebra.single g⁻¹ A.conjTranspose := by136  simp only [adjointPolynomial, Finsupp.mapRange_single, Finsupp.mapDomain_single]137138theorem regularEval_adjointPolynomial (f : MatrixPolynomial G ι) :139    regularEval (adjointPolynomial f) = (regularEval f).adjoint := by140  induction f using Finsupp.induction_linear with141  | zero => simp142  | add f k hf hk =>143    change regularEval (adjointPolynomial ((f : MatrixPolynomial G ι) + k)) = _144    rw [adjointPolynomial_add, map_add, hf, hk, map_add, map_add]145  | single g A => simp only [adjointPolynomial_single, regularEval_single,146      RegularFactorization.term_adjoint]147148theorem regularEval_single_column (f : MatrixPolynomial G ι)149    (x : RegularCoefficientEnergy.CoefficientSpace ι) (g : G) :150    regularEval f (lp.single 2 (1:G) x) g =151      RegularCoefficientEnergy.coefficientOperator (f g) x := by152  rw [regularEval_eq_regularPolynomial,153    RegularCoefficientEnergy.regularPolynomial_single_one]154  simp only [lp.coeFn_sum, Finset.sum_apply, lp.single_apply, Pi.single_apply]155  by_cases h : g ∈ f.support156  · simp [h]157  · simp [h, Finsupp.notMem_support_iff.mp h,158      RegularCoefficientEnergy.coefficientOperator]159160theorem regularEval_injective : Function.Injective (regularEval (G := G) (ι := ι)) := by161  intro f k he162  ext g i j163  have hh := congrArg (fun T : RegularCoefficientEnergy.Hilbert G ι →L[ℂ]164      RegularCoefficientEnergy.Hilbert G ι =>165      T (lp.single 2 (1:G) (EuclideanSpace.single j 1)) g i) he166  simp only [regularEval_single_column] at hh167  change ((f g) *ᵥ Pi.single j (1 : ℂ)) i = ((k g) *ᵥ Pi.single j (1 : ℂ)) i at hh168  simpa only [Matrix.mulVec_single_one, Matrix.col_apply] using hh169170theorem regularEval_selfAdjoint_iff (f : MatrixPolynomial G ι) :171    IsSelfAdjoint (regularEval f) ↔ adjointPolynomial f = f := by172  change (regularEval f).adjoint = regularEval f ↔ _173  rw [← regularEval_adjointPolynomial]174  exact ⟨fun h => regularEval_injective h, fun h => congrArg regularEval h⟩175176theorem partialEval_adjointPolynomial177    (ρ : G →* unitary (Matrix ν ν ℂ)) (f : MatrixPolynomial (G × H) ι) :178    partialEval (representationMatrix ρ) (adjointPolynomial f) =179      adjointPolynomial (partialEval (representationMatrix ρ) f) := by180  induction f using Finsupp.induction_linear with181  | zero => simp182  | add f k hf hk =>183    change partialEval (representationMatrix ρ)184      (adjointPolynomial ((f : MatrixPolynomial (G × H) ι) + k)) = _185    rw [adjointPolynomial_add, map_add, hf, hk, map_add, adjointPolynomial_add]186  | single g A =>187    simp only [adjointPolynomial_single, partialEval_single, Prod.fst_inv, Prod.snd_inv,188      Matrix.conjTranspose_kronecker]189    congr 1190    change A.conjTranspose ⊗ₖ (ρ g.1⁻¹ : Matrix ν ν ℂ) =191      A.conjTranspose ⊗ₖ (ρ g.1 : Matrix ν ν ℂ).conjTranspose192    rw [map_inv]193    rfl194195/-- Self-adjointness survives the actual matrix substitution. -/196theorem partialEval_selfAdjoint197    (ρ : G →* unitary (Matrix ν ν ℂ)) (f : MatrixPolynomial (G × H) ι)198    (hf : IsSelfAdjoint (regularEval f)) :199    IsSelfAdjoint (regularEval (partialEval (representationMatrix ρ) f)) := by200  rw [regularEval_selfAdjoint_iff] at hf ⊢201  rw [← partialEval_adjointPolynomial, hf]202203end Nonadditivity.HaarTensorReplacement