Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarRecursiveSample

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

Direct imports

Imported by project modules

2 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

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

27 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarIteratedExpectation7import Nonadditivity.HaarTensorEvaluation8import Mathlib.MeasureTheory.Integral.Prod910/-! # The iterated integrals are finite tensor-matrix moments1112This identifies repeated partial substitution with a genuine finite tensor13representation on one product probability space. Reindexing bases and Fubini14introduce no change in norms or probability laws.15-/16noncomputable section17set_option backward.isDefEq.respectTransparency false18set_option maxHeartbeats 150000019set_option linter.unusedSectionVars false20namespace Nonadditivity.HaarIteratedMoments21open MeasureTheory HaarModel HaarWordExpansion HaarTensorReplacement22open ProductHaagerupProduct23open scoped BigOperators Matrix Matrix.Norms.L2Operator2425def TensorIndex (N : ℕ) : ℕ → Type26  | 0 => PUnit27  | j+1 => Fin (N+1) × TensorIndex N j2829instance tensorIndexFintype (N : ℕ) : (j : ℕ) → Fintype (TensorIndex N j)30  | 0 => inferInstanceAs (Fintype PUnit)31  | j+1 => @instFintypeProd _ _ inferInstance (tensorIndexFintype N j)3233instance tensorIndexDecidableEq (N : ℕ) : (j : ℕ) → DecidableEq (TensorIndex N j)34  | 0 => inferInstanceAs (DecidableEq PUnit)35  | j+1 => @instDecidableEqProd _ _ inferInstance (tensorIndexDecidableEq N j)3637def recursiveRepresentation (N : ℕ) : (j : ℕ) → (Fin j → Pair N) →38    GroupIndex (Fin 2) j →* Matrix (TensorIndex N j) (TensorIndex N j) ℂ39  | 0, _ => 140  | j+1, U => productRepresentation (representationMatrix (pairRepresentation N (U 0)))41      (recursiveRepresentation N j (fun r => U r.succ))4243def recursiveMeasure (N j : ℕ) : Measure (Fin j → Pair N) :=44  Measure.pi (fun _ => pairMeasure N)4546instance recursiveProbability (N j : ℕ) : IsProbabilityMeasure (recursiveMeasure N j) := by47  unfold recursiveMeasure48  infer_instance4950theorem continuous_recursiveRepresentation (N j : ℕ) (g : GroupIndex (Fin 2) j) :51    Continuous (fun U : Fin j → Pair N => recursiveRepresentation N j U g) := by52  induction j with53  | zero => exact continuous_const54  | succ j ih =>55    apply continuous_matrix56    intro a b57    change Continuous (fun U : Fin (j+1) → Pair N =>58      (pairRepresentation N (U 0) g.1 : Matrix (Fin (N+1)) (Fin (N+1)) ℂ) a.1 b.1 *59        recursiveRepresentation N j (fun r => U r.succ) g.2 a.2 b.2)60    apply Continuous.mul61    · exact ((continuous_pairRepresentation N g.1).comp (continuous_apply 0)).matrix_elem _ _62    · exact ((ih g.2).comp (continuous_pi (fun r => continuous_apply r.succ))).matrix_elem _ _6364theorem continuous_finiteEval {G ι ν Ω : Type} [Group G] [DecidableEq G]65    [Fintype ι] [DecidableEq ι] [Fintype ν] [DecidableEq ν] [TopologicalSpace Ω]66    (ρ : Ω → G →* Matrix ν ν ℂ) (hρ : ∀ g, Continuous (fun U => ρ U g))67    (f : MatrixPolynomial G ι) : Continuous (fun U => finiteEval (ρ U) f) := by68  simp only [finiteEval_eq_sum]69  apply continuous_finset_sum70  intro g hg71  apply continuous_matrix72  intro a b73  exact continuous_const.mul ((hρ g).matrix_elem a.2 b.2)7475theorem recursive_finiteEval_cons_norm {N j : ℕ} {ι : Type} [Fintype ι] [DecidableEq ι]76    (U : Pair N) (V : Fin j → Pair N) (f : MatrixPolynomial (GroupIndex (Fin 2) (j+1)) ι) :77    ‖finiteEval (recursiveRepresentation N (j+1) (Fin.cons U V)) f‖ =78      ‖finiteEval (recursiveRepresentation N j V)79        (partialEval (representationMatrix (pairRepresentation N U)) f)‖ := by80  simp only [recursiveRepresentation, Fin.cons_zero, Fin.cons_succ]81  exact (finiteEval_partial_norm _ _ _).symm8283theorem recursiveMoment_eq_iteratedMoment (N p j : ℕ) {ι : Type} [Fintype ι] [DecidableEq ι]84    (f : MatrixPolynomial (GroupIndex (Fin 2) j) ι) :85    (∫ U : Fin j → Pair N, ‖finiteEval (recursiveRepresentation N j U) f‖^p86      ∂recursiveMeasure N j) = iteratedMoment N p j f := by87  induction j generalizing ι with88  | zero =>89    letI : Unique (GroupIndex (Fin 2) 0) := inferInstanceAs (Unique PUnit)90    have hn : ∀ U : Fin 0 → Pair N,91        ‖finiteEval (recursiveRepresentation N 0 U) f‖ = ‖regularEval f‖ :=92      fun U => finiteEval_trivial_norm f93    simp only [hn, integral_const, measureReal_univ_eq_one, one_smul, iteratedMoment]94  | succ j ih =>95    let e := MeasurableEquiv.piFinSuccAbove (fun _ : Fin (j+1) => Pair N) 096    have hpres : MeasurePreserving e (recursiveMeasure N (j+1))97        ((pairMeasure N).prod (recursiveMeasure N j)) :=98      measurePreserving_piFinSuccAbove (fun _ : Fin (j+1) => pairMeasure N) 099    have he : ∀ x : Pair N × (Fin j → Pair N), e.symm x = Fin.cons x.1 x.2 := by100      intro x101      ext r102      refine Fin.cases ?_ (fun s => ?_) r <;> simp [e]103    let F := fun U : Fin (j+1) → Pair N =>104      ‖finiteEval (recursiveRepresentation N (j+1) U) f‖^p105    have hcont : Continuous F :=106      ((continuous_finiteEval _ (continuous_recursiveRepresentation N (j+1)) f).norm).pow p107    have hcons : Continuous (fun x : Pair N × (Fin j → Pair N) => (Fin.cons x.1 x.2 : Fin (j+1) → Pair N)) := by108      apply continuous_pi109      intro r110      refine Fin.cases ?_ (fun s => ?_) r111      · simpa only [Fin.cons_zero] using continuous_fst112      · simpa only [Fin.cons_succ] using (continuous_apply s).comp continuous_snd113    have hint : Integrable (fun x : Pair N × (Fin j → Pair N) => F (e.symm x))114        ((pairMeasure N).prod (recursiveMeasure N j)) := by115      simp only [he]116      exact (hcont.comp hcons).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)117    rw [← hpres.symm.integral_comp' F, integral_prod _ hint]118    change (∫ U : Pair N, ∫ V : Fin j → Pair N, F (e.symm (U,V))119      ∂recursiveMeasure N j ∂pairMeasure N) = _120    simp only [he, F, recursive_finiteEval_cons_norm]121    simp only [ih, iteratedMoment]122123end Nonadditivity.HaarIteratedMoments