Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarWeingartenCycles

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

Direct imports

Imported by project modules

3 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

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

28 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarWeingartenGram7import Mathlib.GroupTheory.Perm.Cycle.Basic89/-! # Quantitative Gram decay from permutation support1011A fixed tuple is exactly a function on the permutation cycles.  Every nontrivial12cycle has at least two elements.  These elementary facts give the support decay13needed by the weighted inverse estimate.14-/1516noncomputable section17set_option backward.isDefEq.respectTransparency false18set_option maxHeartbeats 10000001920namespace Nonadditivity.HaarWeingartenCycles2122open HaarInvariantTensor23open scoped BigOperators Matrix Matrix.Norms.L2Operator2425abbrev Cycles {p : ℕ} (σ : Perm p) := Quotient (Equiv.Perm.SameCycle.setoid σ)2627instance {p : ℕ} (σ : Perm p) : Fintype (Cycles σ) := Fintype.ofFinite _2829def cycleMap {p : ℕ} (σ : Perm p) (a : Fin p) : Cycles σ := Quotient.mk _ a3031theorem cycleMap_apply {p : ℕ} (σ : Perm p) (a : Fin p) :32    cycleMap σ (σ a) = cycleMap σ a :=33  Quotient.sound (Equiv.Perm.SameCycle.rfl.apply_left)3435lemma fixed_eq_of_sameCycle {p D : ℕ} (σ : Perm p)36    (y : {y : Fin p → Fin D // y ∘ σ = y}) (a b : Fin p)37    (hab : σ.SameCycle a b) : y.1 a = y.1 b := by38  obtain ⟨n, rfl⟩ := hab.exists_nat_pow_eq39  clear hab40  have hy (r : Fin p) : y.1 (σ r) = y.1 r := congrFun y.2 r41  induction n with42  | zero => rfl43  | succ n ih =>44    rw [pow_succ', Equiv.Perm.mul_apply, hy]45    exact ih4647/-- Functions fixed by the permutation are exactly functions on its cycles. -/48def fixedTupleEquiv (D p : ℕ) (σ : Perm p) :49    {y : Fin p → Fin D // y ∘ σ = y} ≃ (Cycles σ → Fin D) where50  toFun y := Quotient.lift y.1 (fun a b h => fixed_eq_of_sameCycle σ y a b h)51  invFun f := ⟨f ∘ cycleMap σ, by52    funext a53    simp only [Function.comp_apply, cycleMap_apply]⟩54  left_inv y := rfl55  right_inv f := by56    funext q57    induction q using Quotient.inductionOn with58    | _ a => rfl5960theorem card_fixedTuple (D p : ℕ) (σ : Perm p) :61    Fintype.card {y : Fin p → Fin D // y ∘ σ = y} = D ^ Fintype.card (Cycles σ) := by62  classical63  rw [Fintype.card_congr (fixedTupleEquiv D p σ)]64  simp6566/-- Nontrivial cycles have at least two representatives, counted injectively. -/67theorem card_cycles_support_le (p : ℕ) (σ : Perm p) :68    2 * Fintype.card (Cycles σ) + σ.support.card ≤ 2*p := by69  classical70  let Q := Cycles σ71  let moved : Q → Prop := fun q => σ q.out ≠ q.out72  let J : Q ⊕ {q : Q // moved q} → Fin p :=73    Sum.elim Quotient.out (fun q => σ q.1.out)74  have hcross (q : Q) (r : {q : Q // moved q}) : q.out ≠ σ r.1.out := by75    intro h76    have he : q = r.1 := by77      calc78        q = cycleMap σ q.out := (Quotient.out_eq q).symm79        _ = cycleMap σ (σ r.1.out) := congrArg (cycleMap σ) h80        _ = cycleMap σ r.1.out := cycleMap_apply σ _81        _ = r.1 := Quotient.out_eq _82    have hz : σ r.1.out = r.1.out := by simpa [he] using h.symm83    exact r.2 hz84  have hJ : Function.Injective J := by85    intro q r h86    cases q with87    | inl q =>88      cases r with89      | inl r => exact congrArg Sum.inl (Quotient.out_injective h)90      | inr r => exact False.elim (hcross q r h)91    | inr q =>92      cases r with93      | inl r => exact False.elim (hcross r q h.symm)94      | inr r =>95        exact congrArg Sum.inr (Subtype.ext (Quotient.out_injective (σ.injective h)))96  have hcard := Fintype.card_le_of_injective J hJ97  simp only [Fintype.card_sum, Fintype.card_fin] at hcard98  let R : {q : Q // ¬moved q} → {a : Fin p // σ a=a} :=99    fun q => ⟨q.1.out, not_not.mp q.2⟩100  have hR : Function.Injective R := by101    intro q r h102    apply Subtype.ext103    exact Quotient.out_injective (congrArg Subtype.val h)104  have hfix := Fintype.card_le_of_injective R hR105  have hpart : Fintype.card {q : Q // ¬moved q} =106      Fintype.card Q - Fintype.card {q : Q // moved q} :=107    Fintype.card_subtype_compl moved108  have hmovle : Fintype.card {q : Q // moved q} ≤ Fintype.card Q :=109    Fintype.card_subtype_le _110  have hfixcard : Fintype.card {a : Fin p // σ a=a} = p - σ.support.card := by111    have hc := Fintype.card_subtype_compl (fun a : Fin p => σ a ≠ a)112    simpa [Fintype.card_subtype, Equiv.Perm.support] using hc113  have hs : σ.support.card ≤ p := by simpa using Finset.card_le_univ σ.support114  change 2 * Fintype.card Q + σ.support.card ≤ 2*p115  omega116117/-- Squared fixed-tuple counts carry at least one dimension factor per moved index. -/118theorem card_fixedTuple_sq_mul_support_le (D p : ℕ) (σ : Perm p) (hD : 1 ≤ D) :119    (Fintype.card {y : Fin p → Fin D // y ∘ σ = y})^2 * D^σ.support.card ≤ D^(2*p) := by120  rw [card_fixedTuple, ← pow_mul, ← pow_add]121  apply Nat.pow_le_pow_right hD122  have h := card_cycles_support_le p σ123  omega124125def relativeFixedEquiv (D p : ℕ) (σ τ : Perm p) :126    {y : Fin p → Fin D // y ∘ σ = y ∘ τ} ≃127      {z : Fin p → Fin D // z ∘ (σ⁻¹*τ) = z} where128  toFun y := ⟨y.1 ∘ σ, by129    funext a130    simpa [Function.comp_apply] using (congrFun y.2 a).symm⟩131  invFun z := ⟨fun a => z.1 (σ.symm a), by132    funext a133    simpa [Function.comp_apply] using (congrFun z.2 a).symm⟩134  left_inv y := by135    apply Subtype.ext136    funext a137    simp [Function.comp_apply]138  right_inv z := by139    apply Subtype.ext140    funext a141    simp [Function.comp_apply]142143theorem card_relative (D p : ℕ) (σ τ : Perm p) :144    Fintype.card {y : Fin p → Fin D // y ∘ σ = y ∘ τ} =145      Fintype.card {z : Fin p → Fin D // z ∘ (σ⁻¹*τ) = z} := by146  classical147  exact Fintype.card_congr (relativeFixedEquiv D p σ τ)148149/-- Exact support decay of the actual Gram matrix, in a form without real exponents. -/150theorem norm_gram_sq_mul_support_le (N p : ℕ) (σ τ : Perm p) :151    ‖gram N p σ τ‖^2 * (N+1:ℝ)^((σ⁻¹*τ).support.card) ≤ (N+1:ℝ)^(2*p) := by152  rw [gram_apply_card]153  norm_num only [Complex.norm_natCast]154  have h := card_fixedTuple_sq_mul_support_le (N+1) p (σ⁻¹*τ) (by omega)155  rw [← card_relative (N+1) p σ τ] at h156  exact_mod_cast h157158/-- The normalized Gram coefficient decays by one square-root dimension factor159for each moved index of the relative permutation. -/160theorem norm_gram_mul_sqrt_pow_le (N p : ℕ) (σ τ : Perm p) :161    ‖gram N p σ τ‖ * (Real.sqrt (N+1))^((σ⁻¹*τ).support.card) ≤ (N+1:ℝ)^p := by162  have hs : ((Real.sqrt (N+1))^((σ⁻¹*τ).support.card))^2 =163      (N+1:ℝ)^((σ⁻¹*τ).support.card) := by164    rw [← pow_mul, Nat.mul_comm _ 2, pow_mul, Real.sq_sqrt (by positivity)]165  have hh : (‖gram N p σ τ‖ * (Real.sqrt (N+1))^((σ⁻¹*τ).support.card))^2 ≤166      ((N+1:ℝ)^p)^2 := by167    rw [mul_pow, hs, ← pow_mul, Nat.mul_comm p 2]168    exact norm_gram_sq_mul_support_le N p σ τ169  exact (sq_le_sq₀ (by positivity) (by positivity)).mp hh170171end Nonadditivity.HaarWeingartenCycles