Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathWeightTransport

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

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

15 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathColorRelabel7import Nonadditivity.HaarPathRelabel89/-! # Exact transport of Haar path weights1011Color-preserving dart matching, including literal traversal multiplicities,12gives equality of actual Haar integrals. The intermediate permutations act13independently on the row and column labels of each matrix family.14-/15noncomputable section16set_option backward.isDefEq.respectTransparency false17set_option maxHeartbeats 120000018set_option linter.unusedSectionVars false19namespace Nonadditivity.HaarPathWeightTransport20open HaarPathGraph HaarPathProfiles HaarPathClasses HaarPathWeights21open HaarPathColorRelabel MeasureTheory HaarModel22variable {V : Type*} [Fintype V] [DecidableEq V] {d m : ℕ}2324def dartRelabel (σ τ : Fin d → Equiv.Perm V) : Equiv.Perm (Dart V d) where25  toFun q := ((σ q.1.2.1 q.1.1,q.1.2.1,τ q.1.2.1 q.1.2.2),q.2)26  invFun q := (((σ q.1.2.1).symm q.1.1,q.1.2.1,(τ q.1.2.1).symm q.1.2.2),q.2)27  left_inv q := by simp28  right_inv q := by simp2930@[simp] theorem dartRelabel_color (σ τ : Fin d → Equiv.Perm V) (q : Dart V d) :31    color (dartRelabel σ τ q)=color q := rfl3233@[simp] theorem dartRelabel_reverse (σ τ : Fin d → Equiv.Perm V) (q : Dart V d) :34    dartRelabel σ τ (reverse q)=reverse (dartRelabel σ τ q) := rfl3536theorem dartRelabel_eq_of_entry_perms {P Q : Path V d m}37    (F : {q // q∈P.darts} ≃ {q // q∈Q.darts})38    (hcolor : ∀ q, color (F q).val=color q.val)39    (hrev : ∀ q : {q // q∈P.darts},40      F ⟨reverse q.val,P.reverse_mem q.property⟩ =41        ⟨reverse (F q).val,Q.reverse_mem (F q).property⟩)42    (σ τ : Fin d → Equiv.Perm V)43    (hp : ∀ q : {q // q∈P.darts}, ∀ a : Fin d,44      color q.val=(a,true) →45        σ a (source q.val)=source (F q).val ∧46        τ a (source (reverse q.val))=source (reverse (F q).val))47    (q : {q // q∈P.darts}) : dartRelabel σ τ q.val=(F q).val := by48  have hpos (r : {q // q∈P.darts}) (hb : r.val.2=true) :49      dartRelabel σ τ r.val=(F r).val := by50    have hr : color r.val=(r.val.1.2.1,true) := by simp only [color,hb]51    obtain ⟨hrow,hcol⟩ := hp r r.val.1.2.1 hr52    have hc := hcolor r53    have hb' : (F r).val.2=true := (congrArg Prod.snd hc).trans hb54    apply (dart_eq_iff_source_color_target _ _).mpr55    refine ⟨?_,hc.symm,?_⟩56    · simpa only [dartRelabel,Equiv.coe_fn_mk,source,hb,ite_true,hb'] using hrow57    · simpa only [dartRelabel,Equiv.coe_fn_mk,source,reverse,hb,hb',58        Bool.not_true,Bool.false_eq_true,ite_false] using hcol59  cases hb : q.val.260  · let r : {q // q∈P.darts} := ⟨reverse q.val,P.reverse_mem q.property⟩61    have hr : r.val.2=true := by simp only [r,reverse,hb,Bool.not_false]62    have he := hpos r hr63    have he' := congrArg reverse he64    simpa only [r,dartRelabel_reverse,hrev,reverse_reverse] using he'65  · exact hpos q hb6667theorem traversalList_perm_of_dart_counts {P Q : Path V d m}68    (F : {q // q∈P.darts} ≃ {q // q∈Q.darts})69    (E : Equiv.Perm (Dart V d)) (hE : ∀ q, E q.val=(F q).val)70    (hcount : ∀ q : {q // q∈P.darts},71      P.traversalList.count q.val=Q.traversalList.count (F q).val) :72    Q.traversalList.Perm (P.traversalList.map E) := by73  classical74  apply List.perm_iff_count.mpr75  intro r76  obtain ⟨q,rfl⟩ := E.surjective r77  rw [List.count_map_of_injective _ _ E.injective]78  by_cases hq : q∈P.darts79  · rw [hE ⟨q,hq⟩]80    exact (hcount ⟨q,hq⟩).symm81  · have hn : E q∉Q.darts := by82      intro he83      obtain ⟨r,hr⟩ := F.surjective ⟨E q,he⟩84      have hEq : E r.val=E q := (hE r).trans (congrArg Subtype.val hr)85      exact hq (E.injective hEq ▸ r.property)86    have hP : q∉P.traversalList := by87      intro h88      obtain ⟨i,hi⟩ := List.mem_ofFn.mp h89      exact hq (hi ▸ P.traversal_mem i)90    have hQ : E q∉Q.traversalList := by91      intro h92      obtain ⟨i,hi⟩ := List.mem_ofFn.mp h93      exact hn (hi ▸ Q.traversal_mem i)94    rw [List.count_eq_zero.mpr hP,List.count_eq_zero.mpr hQ]9596def dartEntry {N : ℕ} (q : Dart (Fin (N+1)) 2) : SignedEntry N :=97  (color q,(q.1.1,q.1.2.2))9899theorem pathEntries_eq_map_traversal {N m : ℕ} (P : Path (Fin (N+1)) 2 m) :100    pathEntries P=P.traversalList.map dartEntry := by101  simp only [pathEntries,Path.traversalList,List.map_ofFn]102  congr 1103  funext i104  cases hb : (P.colors i).2 <;>105    simp [dartEntry,Path.traversal,dart,edge,color,hb]106  all_goals exact Prod.ext rfl hb107108def signedRelabel {N : ℕ} (σ τ : Fin 2 → Equiv.Perm (Fin (N+1)))109    (e : SignedEntry N) : SignedEntry N := (e.1,(σ e.1.1 e.2.1,τ e.1.1 e.2.2))110111theorem selected_map_signedRelabel {N : ℕ}112    (σ τ : Fin 2 → Equiv.Perm (Fin (N+1))) (c : Color 2) (L : List (SignedEntry N)) :113    selected c (L.map (signedRelabel σ τ))=114      relabelEntries (σ c.1) (τ c.1) (selected c L) := by115  induction L with116  | nil => rfl117  | cons e L ih =>118    by_cases he : e.1=c119    · simp [selected,signedRelabel,relabelEntries,he] at ih ⊢120      exact ih121    · simp [selected,signedRelabel,relabelEntries,he] at ih ⊢122      exact ih123124/-- Literal multiplicity-preserving colored dart matching preserves the exact125path expectation, with no restrictions on the degree or matrix dimension. -/126theorem integral_pathProduct_eq_of_dart_transport {N m : ℕ}127    {P Q : Path (Fin (N+1)) 2 m} (h : SamePattern P Q)128    (F : {q // q∈P.darts} ≃ {q // q∈Q.darts})129    (hcolor : ∀ q, color (F q).val=color q.val)130    (hcore : ∀ q, source q.val∈P.coreVertices →131      source (F q).val=h.vertexPerm (source q.val))132    (hcoreiff : ∀ q, source (F q).val∈Q.coreVertices ↔ source q.val∈P.coreVertices)133    (hrev : ∀ q : {q // q∈P.darts},134      F ⟨reverse q.val,P.reverse_mem q.property⟩ =135        ⟨reverse (F q).val,Q.reverse_mem (F q).property⟩)136    (hcount : ∀ q : {q // q∈P.darts},137      P.traversalList.count q.val=Q.traversalList.count (F q).val) :138    (∫ U : LocalUnitary N × LocalUnitary N, pathProduct P U ∂(haar N).prod (haar N)) =139      ∫ U : LocalUnitary N × LocalUnitary N, pathProduct Q U ∂(haar N).prod (haar N) := by140  obtain ⟨σ,τ,hp⟩ := exists_family_entry_perms h F hcolor hcore hcoreiff hrev141  have hE := dartRelabel_eq_of_entry_perms F hcolor hrev σ τ hp142  have ht := traversalList_perm_of_dart_counts F (dartRelabel σ τ) hE hcount143  have he : (pathEntries Q).Perm ((pathEntries P).map (signedRelabel σ τ)) := by144    rw [pathEntries_eq_map_traversal,pathEntries_eq_map_traversal]145    convert ht.map dartEntry using 1 <;> simp only [List.map_map] <;> rfl146  have hs (a : Fin 2) (b : Bool) :147      (selected (a,b) (pathEntries Q)).Perm148        (relabelEntries (σ a) (τ a) (selected (a,b) (pathEntries P))) := by149    rw [←selected_map_signedRelabel σ τ (a,b) (pathEntries P)]150    exact (he.filter _).map Prod.snd151  simp_rw [pathProduct_eq]152  exact (integral_signedProduct_eq_of_family_relabel (pathEntries P) (pathEntries Q) σ τ hs).symm153154end Nonadditivity.HaarPathWeightTransport