Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.UniversalFactorizationGram

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

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

41 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.UniversalFactorizationOperators7import Nonadditivity.RegularFactorization89/-! Representation-independent Gram factorization on arbitrary complex Hilbert spaces. -/10noncomputable section11set_option backward.isDefEq.respectTransparency false12set_option synthInstance.maxHeartbeats 20000013set_option maxHeartbeats 100000014set_option linter.unusedSectionVars false15namespace Nonadditivity.UniversalFactorization16open scoped BigOperators Matrix Matrix.Norms.L2Operator ComplexOrder MatrixOrder17section Assembly18open FiniteSetFactorization19variable {G ι E : Type*} [Group G] [DecidableEq G] [Fintype ι] [DecidableEq ι]20  [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E]21variable (π : G →* unitary (E →L[ℂ] E))2223def polynomial (S : Finset G) (c : G → Matrix ι ι ℂ) : Space ι E →L[ℂ] Space ι E :=24  ∑ w ∈ S, term π (c w) w252627/-- The actual column of represented unitaries on the given finite support. -/28def column (S : Finset G) : Space ι E →L[ℂ] Space (Support S × ι) E :=29  ∑ g : Support S, term π (selector g).conjTranspose g.val3031def evaluate (S : Finset G) (A : Matrix (Support S × ι) (Support S × ι) ℂ) :32    Space ι E →L[ℂ] Space ι E :=33  (column π S).adjoint.comp ((rectLift A).comp (column π S))3435theorem select_column (S : Finset G) (g : Support S) :36    (rectLift (selector (ι := ι) g)).comp (column π S) = shift π g.val := by37  rw [column, ContinuousLinearMap.comp_finset_sum]38  conv_lhs => arg 2; ext h; rw [← term_identity π, term_mul π, one_mul,39    selector_mul_adjoint]40  rw [Finset.sum_eq_single g]41  · simp42  · intro h hh hne43    simp [Ne.symm hne]44  · simp4546@[simp] theorem evaluate_add (S : Finset G)47    (A B : Matrix (Support S × ι) (Support S × ι) ℂ) :48    evaluate π S (A+B) = evaluate π S A + evaluate π S B := by49  simp [evaluate, ContinuousLinearMap.add_comp, ContinuousLinearMap.comp_add]5051@[simp] theorem evaluate_smul (S : Finset G) (r : ℝ)52    (A : Matrix (Support S × ι) (Support S × ι) ℂ) :53    evaluate π S (r • A) = r • evaluate π S A := by54  simp [evaluate, ContinuousLinearMap.smul_comp, ContinuousLinearMap.comp_smul]5556theorem evaluate_sum {α : Type*} (S : Finset G) (s : Finset α)57    (A : α → Matrix (Support S × ι) (Support S × ι) ℂ) :58    evaluate π S (∑ a ∈ s, A a) = ∑ a ∈ s, evaluate π S (A a) := by59  simp [evaluate, ContinuousLinearMap.finset_sum_comp, ContinuousLinearMap.comp_finset_sum]6061theorem evaluate_place (S : Finset G) (g h : Support S) (A : Matrix ι ι ℂ) :62    evaluate π S (place g h A) = term π A (g.val⁻¹*h.val) := by63  have heq : evaluate π S (place g h A) =64      ((rectLift (selector g)).comp (column π S)).adjoint.comp65        ((rectLift A).comp ((rectLift (selector h)).comp (column π S))) := by66    simp only [evaluate, place, rectLift_mul, rectLift_adjoint,67      ContinuousLinearMap.adjoint_comp, ContinuousLinearMap.comp_assoc]68  rw [heq, select_column π, select_column π, shift_adjoint π, ← ContinuousLinearMap.comp_assoc, ← rectLift_shift π,69    ContinuousLinearMap.comp_assoc, shift_mul π]70  rfl7172theorem evaluate_polarInsertion (S : Finset G) (g h : Support S) (c : Matrix ι ι ℂ) :73    evaluate π S (polarInsertion g h c) =74      rectLift (CFC.abs c.conjTranspose) + term π c (g.val⁻¹*h.val) +75      term π c.conjTranspose (h.val⁻¹*g.val) + rectLift (CFC.abs c) := by76  rw [polarInsertion_eq]77  simp only [evaluate_add π, evaluate_place π, inv_mul_cancel, term_identity]7879theorem evaluate_representative (S : Finset G) (c : G → Matrix ι ι ℂ)80    (w : NonidentityWords S) :81    evaluate π S (polarInsertion (representative S w).1 (representative S w).2 (c w.val)) =82      rectLift (CFC.abs (c w.val).conjTranspose) + term π (c w.val) w.val +83      term π (c w.val).conjTranspose w.val⁻¹ + rectLift (CFC.abs (c w.val)) := by84  rw [evaluate_polarInsertion π, representative_spec]85  have hinv : (representative S w).2.val⁻¹ * (representative S w).1.val = w.val⁻¹ := by86    rw [← representative_spec S w]87    simp88  rw [hinv]8990theorem evaluate_nonconstantGram (S : Finset G) (c : G → Matrix ι ι ℂ)91    (hstar : ∀ w ∈ Linearization.differenceSupport S, c w⁻¹ = (c w).conjTranspose) :92    evaluate π S (nonconstantGram S c) =93      (∑ w : NonidentityWords S, term π (c w.val) w.val) + rectLift (diagonalCorrection S c) := by94  have hmod : (∑ w : NonidentityWords S, CFC.abs (c w.val).conjTranspose) =95      diagonalCorrection S c := by96    unfold diagonalCorrection97    apply Fintype.sum_equiv (inverseWords S)98    intro w99    rw [← hstar w.val (Finset.mem_erase.mp w.property).2]100    rfl101  have hinv : (∑ w : NonidentityWords S, term π (c w.val).conjTranspose w.val⁻¹) =102      ∑ w : NonidentityWords S, term π (c w.val) w.val := by103    apply Fintype.sum_equiv (inverseWords S)104    intro w105    rw [← hstar w.val (Finset.mem_erase.mp w.property).2]106    rfl107  unfold nonconstantGram108  rw [evaluate_sum π]109  simp only [evaluate_smul π, evaluate_representative π]110  rw [← Finset.smul_sum (M := ℝ) (N := Space ι E →L[ℂ] Space ι E)111    (r := (1 / 2 : ℝ)) (s := Finset.univ)112    (f := fun w : NonidentityWords S => rectLift (CFC.abs (c w.val).conjTranspose) +113      term π (c w.val) w.val + term π (c w.val).conjTranspose w.val⁻¹ +114      rectLift (CFC.abs (c w.val)))]115  simp only [Finset.sum_add_distrib]116  rw [← rectLift_sum, hmod, hinv, ← rectLift_sum]117  change (1 / 2 : ℝ) •118    (rectLift (diagonalCorrection S c) +119      (∑ w : NonidentityWords S, term π (c w.val) w.val) +120      (∑ w : NonidentityWords S, term π (c w.val) w.val) +121      rectLift (diagonalCorrection S c)) = _122  module123124theorem polynomial_eq (S : Finset G) (c : G → Matrix ι ι ℂ) :125    polynomial π S c = ∑ w ∈ S, term π (c w) w := rfl126127theorem polynomial_decompose (S : Finset G) (hS : (1:G) ∈ S) (c : G → Matrix ι ι ℂ) :128    polynomial π (Linearization.differenceSupport S) c =129      (∑ w : NonidentityWords S, term π (c w.val) w.val) + rectLift (c 1) := by130  have h1 : (1:G) ∈ Linearization.differenceSupport S :=131    Linearization.mem_differenceSupport.mpr ⟨1,hS,1,hS,by simp⟩132  rw [polynomial_eq π]133  have hs : (∑ w : NonidentityWords S, term π (c w.val) w.val) =134      ∑ w ∈ (Linearization.differenceSupport S).erase 1, term π (c w) w :=135    (Finset.sum_subtype (p := fun w => w ∈ (Linearization.differenceSupport S).erase 1)136      ((Linearization.differenceSupport S).erase 1) (fun _ => Iff.rfl) (fun w => term π (c w) w)).symm137  rw [hs, ← term_identity π (c 1)]138  exact (Finset.sum_erase_add _ _ h1).symm139140/-- Evaluation of the same finite positive Gram matrix in any unitary representation. -/141theorem evaluate_gramMatrix (S : Finset G) (hS : (1:G) ∈ S)142    (c : G → Matrix ι ι ℂ)143    (hstar : ∀ w ∈ Linearization.differenceSupport S, c w⁻¹ = (c w).conjTranspose) :144    evaluate π S (gramMatrix S hS c) =145      polynomial π (Linearization.differenceSupport S) c +146        algebraMap ℝ (Space ι E →L[ℂ] Space ι E) (theta S c) := by147  rw [gramMatrix, evaluate_add π, evaluate_nonconstantGram π S c hstar, evaluate_place π]148  simp only [inv_one, one_mul, term_identity]149  rw [add_assoc, ← rectLift_add]150  have hc : diagonalCorrection S c + constantCorrection S c =151      c 1 + algebraMap ℝ (Matrix ι ι ℂ) (theta S c) := by152    unfold constantCorrection153    abel154  rw [hc, rectLift_add, rectLift_algebraMap, polynomial_decompose π S hS c]155  abel156157/-- Rectangular square-root factor evaluated in the given representation. -/158def factor (S : Finset G) (hS : (1:G) ∈ S) (c : G → Matrix ι ι ℂ) :159    Space ι E →L[ℂ] Space (Support S × ι) E :=160  ∑ g : Support S, term π (factorCoefficient S hS c g) g.val161162theorem factor_eq (S : Finset G) (hS : (1:G) ∈ S) (c : G → Matrix ι ι ℂ) :163    factor π S hS c = (rectLift (CFC.sqrt (gramMatrix S hS c))).comp (column π S) := by164  unfold factor factorCoefficient column term165  rw [ContinuousLinearMap.comp_finset_sum]166  apply Finset.sum_congr rfl167  intro g hg168  rw [rectLift_mul, ContinuousLinearMap.comp_assoc]169170/-- The Gram identity on an arbitrary complete complex Hilbert space. -/171theorem factor_gram (S : Finset G) (hS : (1:G) ∈ S) (c : G → Matrix ι ι ℂ)172    (hstar : ∀ w ∈ Linearization.differenceSupport S, c w⁻¹ = (c w).conjTranspose) :173    (factor π S hS c).adjoint.comp (factor π S hS c) =174      polynomial π (Linearization.differenceSupport S) c +175        algebraMap ℝ (Space ι E →L[ℂ] Space ι E) (theta S c) := by176  have hG := gramMatrix_posSemidef S hS c hstar177  have hR := Linearization.positive_sqrt_gram (gramMatrix S hS c) hG178  rw [factor_eq π, ContinuousLinearMap.adjoint_comp, ← rectLift_adjoint]179  rw [ContinuousLinearMap.comp_assoc, ← ContinuousLinearMap.comp_assoc (rectLift _),180    ← rectLift_mul, hR]181  exact evaluate_gramMatrix π S hS c hstar182183/-- The same padded coefficient matrices evaluated in the given representation. -/184def padded (S : Finset G) (hS : (1:G) ∈ S) (c : G → Matrix ι ι ℂ) :185    Space (Support S × ι) E →L[ℂ] Space (Support S × ι) E :=186  ∑ g : Support S, term π (paddedCoefficient S hS c g) g.val187188/-- Extend the constructed supported coefficients by zero to the whole group. -/189def paddedCoefficients (S : Finset G) (hS : (1:G) ∈ S) (c : G → Matrix ι ι ℂ)190    (g : G) : Matrix (Support S × ι) (Support S × ι) ℂ :=191  if hg : g ∈ S then paddedCoefficient S hS c ⟨g,hg⟩ else 0192193/-- The padded factor is the actual polynomial with the constructed supported coefficients. -/194theorem padded_eq_polynomial (S : Finset G) (hS : (1:G) ∈ S)195    (c : G → Matrix ι ι ℂ) :196    padded π S hS c = polynomial π S (paddedCoefficients S hS c) := by197  rw [polynomial_eq π]198  unfold padded199  rw [← Finset.sum_coe_sort S (fun g => term π (paddedCoefficients S hS c g) g)]200  apply Finset.sum_congr rfl201  intro g hg202  simp [paddedCoefficients, g.property]203204theorem padded_eq (S : Finset G) (hS : (1:G) ∈ S) (c : G → Matrix ι ι ℂ) :205    padded π S hS c = (factor π S hS c).comp (rectLift (selector (⟨1,hS⟩ : Support S))) := by206  unfold padded factor paddedCoefficient207  rw [ContinuousLinearMap.finset_sum_comp]208  apply Finset.sum_congr rfl209  intro g hg210  rw [← term_identity π (selector (⟨1,hS⟩ : Support S)), term_mul π, mul_one]211212theorem padded_norm (S : Finset G) (hS : (1:G) ∈ S) (c : G → Matrix ι ι ℂ) :213    ‖padded π S hS c‖ = ‖factor π S hS c‖ := by214  rw [padded_eq π]215  apply RegularFactorization.norm_comp_coisometry216  rw [← rectLift_adjoint, ← rectLift_mul, selector_mul_adjoint]217  simp218219/-- Squared norm of the factor from its proved Gram identity. -/220theorem padded_norm_sq (S : Finset G) (hS : (1:G) ∈ S) (c : G → Matrix ι ι ℂ)221    (hstar : ∀ w ∈ Linearization.differenceSupport S, c w⁻¹ = (c w).conjTranspose) :222    ‖padded π S hS c‖ ^ 2 =223      ‖polynomial π (Linearization.differenceSupport S) c +224        algebraMap ℝ (Space ι E →L[ℂ] Space ι E) (theta S c)‖ := by225  rw [padded_norm π, pow_two, ← ContinuousLinearMap.norm_adjoint_comp_self,226    factor_gram π S hS c hstar]227228229end Assembly230end Nonadditivity.UniversalFactorization