Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarMatchingSingletons

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

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

6 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathMultiplicity7import Mathlib.GroupTheory.Perm.Support8import Mathlib.Data.List.OfFn910/-! # Singleton entries force disagreement between Haar matchings1112A row matching and a column matching that agree at an occurrence pair match13both entry indices. Such an entry occurs on both sides of the Haar moment14and cannot be a singleton. This gives the exact combinatorial source of the15singleton suppression factor in a Weingarten bound.16-/17noncomputable section18namespace Nonadditivity.HaarMatchingSingletons19open HaarPathMultiplicity20variable {E : Type*} [DecidableEq E] {p : ℕ}2122lemma not_mem_singletonEdges_of_mem_both {e : E} {l r : List E}23    (hl : e ∈ l) (hr : e ∈ r) : e ∉ singletonEdges (l++r) := by24  intro h25  have hc := (Finset.mem_filter.mp h).226  rw [List.count_append] at hc27  have hcl := List.count_pos_iff.mpr hl28  have hcr := List.count_pos_iff.mpr hr29  omega3031lemma mem_relative_support (σ τ : Equiv.Perm (Fin p)) (a : Fin p) :32    a ∈ (σ⁻¹*τ).support ↔ τ a ≠ σ a := by33  rw [Equiv.Perm.mem_support]34  change σ.symm (τ a) ≠ a ↔ τ a ≠ σ a35  exact not_congr σ.symm_apply_eq3637/-- Abstract matching form: agreement of the two matchings pairs the entries,38so every singleton belongs to one of two images of their disagreement set. -/39theorem singletonEdges_le_two_support40    (x y : Fin p → E) (σ τ : Equiv.Perm (Fin p))41    (hmatch : ∀ a, σ a=τ a → x a=y (σ a)) :42    (singletonEdges (List.ofFn x ++ List.ofFn y)).card ≤ 2*(σ⁻¹*τ).support.card := by43  classical44  let S := (σ⁻¹*τ).support45  have hsub : singletonEdges (List.ofFn x ++ List.ofFn y) ⊆46      S.image x ∪ S.image (fun a => y (σ a)) := by47    intro e he48    have hmem := List.mem_append.mp (List.mem_toFinset.mp (Finset.mem_filter.mp he).1)49    rcases hmem with hx | hy50    · obtain ⟨a,ha⟩ := List.mem_ofFn.mp hx51      have hs : a ∈ S := by52        by_contra hn53        have hsame : σ a=τ a := by54          have h := not_iff_not.mpr (mem_relative_support σ τ a)55          exact (not_ne_iff.mp (h.mp hn)).symm56        have hyp : e ∈ List.ofFn y := List.mem_ofFn.mpr ⟨σ a,(hmatch a hsame).symm.trans ha⟩57        exact not_mem_singletonEdges_of_mem_both hx hyp he58      exact Finset.mem_union_left _ (Finset.mem_image.mpr ⟨a,hs,ha⟩)59    · obtain ⟨b,hb⟩ := List.mem_ofFn.mp hy60      let a := σ⁻¹ b61      have hab : σ a=b := σ.apply_symm_apply b62      have hs : a ∈ S := by63        by_contra hn64        have hsame : σ a=τ a := by65          have h := not_iff_not.mpr (mem_relative_support σ τ a)66          exact (not_ne_iff.mp (h.mp hn)).symm67        have hxp : e ∈ List.ofFn x := List.mem_ofFn.mpr68          ⟨a,(hmatch a hsame).trans (by rw [hab]; exact hb)⟩69        exact not_mem_singletonEdges_of_mem_both hxp hy he70      exact Finset.mem_union_right _ (Finset.mem_image.mpr ⟨a,hs,by rw [hab]; exact hb⟩)71  calc72    _ ≤ (S.image x ∪ S.image (fun a => y (σ a))).card := Finset.card_le_card hsub73    _ ≤ (S.image x).card+(S.image (fun a => y (σ a))).card := Finset.card_union_le _ _74    _ ≤ S.card+S.card := Nat.add_le_add (Finset.card_image_le) (Finset.card_image_le)75    _ = _ := by dsimp [S]; omega7677/-- For actual matrix entries, row/column matching constraints force at least78half as many disagreement positions as there are singleton entry values. -/79theorem singleton_entries_le_two_support80    {R C : Type*} [DecidableEq R] [DecidableEq C]81    (i k : Fin p → R) (j l : Fin p → C) (σ τ : Equiv.Perm (Fin p))82    (hrow : i=k ∘ σ) (hcol : j=l ∘ τ) :83    (singletonEdges (List.ofFn (fun a => (i a,j a)) ++84      List.ofFn (fun a => (k a,l a)))).card ≤ 2*(σ⁻¹*τ).support.card := by85  apply singletonEdges_le_two_support _ _ σ τ86  intro a ha87  apply Prod.ext88  · exact congrFun hrow a89  · simpa only [Function.comp_apply,←ha] using congrFun hcol a9091end Nonadditivity.HaarMatchingSingletons