Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathRecoloring

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

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

12 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathTransport78/-! # Reconstructing an actual path from compatible dart colors910The local signed-color equality pattern and reversal compatibility suffice to11recolor the literal path. Reducedness follows from the original reduced walk;12the result belongs to its actual coarse path class.13-/14noncomputable section15set_option backward.isDefEq.respectTransparency false16set_option maxHeartbeats 100000017set_option linter.unusedSectionVars false18namespace Nonadditivity.HaarPathRecoloring19open HaarPathGraph HaarPathProfiles HaarPathClasses20variable {V : Type*} [Fintype V] [DecidableEq V] {d m : ℕ}21variable (P : Path V d m) (κ : {q // q∈P.darts} → Color d)22variable (hrev : ∀ q : {q // q∈P.darts},23  κ ⟨reverse q.val,P.reverse_mem q.property⟩=flipColor (κ q))24variable (hkernel : ∀ q r : {q // q∈P.darts}, source q.val=source r.val →25  (κ q=κ r ↔ color q.val=color r.val))26include hrev hkernel2728def recolorPath : Path V d m where29  vertex := P.vertex30  colors i := κ ⟨P.traversal i,P.traversal_mem i⟩31  closed := P.closed32  reduced i j hij := by33    intro he34    have hs : source (P.traversal j)=source (reverse (P.traversal i)) := by35      simp only [Path.traversal,source_dart,source_reverse_dart]36      exact congrArg P.vertex (Fin.ext hij.symm)37    have hk : κ ⟨P.traversal j,P.traversal_mem j⟩=38        κ ⟨reverse (P.traversal i),P.reverse_mem (P.traversal_mem i)⟩ := by39      rw [hrev ⟨P.traversal i,P.traversal_mem i⟩]40      exact he41    have hc := (hkernel ⟨P.traversal j,P.traversal_mem j⟩42      ⟨reverse (P.traversal i),P.reverse_mem (P.traversal_mem i)⟩ hs).mp hk43    exact P.reduced i j hij (by simpa only [Path.traversal,color_dart,color_reverse_dart] using hc)4445@[simp] theorem recolorPath_vertex : (recolorPath P κ hrev hkernel).vertex=P.vertex := rfl4647@[simp] theorem recolorPath_colors (i : Fin m) :48    (recolorPath P κ hrev hkernel).colors i=κ ⟨P.traversal i,P.traversal_mem i⟩ := rfl4950theorem recolorPath_incidenceVertex (a : Incidence m) :51    incidenceVertex (recolorPath P κ hrev hkernel) a=incidenceVertex P a := rfl5253theorem recolorPath_incidenceColor (a : Incidence m) :54    incidenceColor (recolorPath P κ hrev hkernel) a=55      κ ⟨incidenceDart P a,incidenceDart_mem P a⟩ := by56  obtain ⟨i,b⟩ := a57  cases b58  · simpa only [incidenceColor,incidenceDart,Bool.false_eq_true,ite_false,recolorPath]59      using (hrev ⟨P.traversal i,P.traversal_mem i⟩).symm60  · rfl6162/-- This is membership in the literal path equivalence relation, including63the local signed-color equality kernels at both ends of every traversal. -/64theorem recolorPath_samePattern : SamePattern P (recolorPath P κ hrev hkernel) := by65  constructor66  · intro i j67    rfl68  · intro a b hv69    rw [recolorPath_incidenceColor,recolorPath_incidenceColor]70    simpa only [color_incidenceDart] using (hkernel ⟨incidenceDart P a,incidenceDart_mem P a⟩71      ⟨incidenceDart P b,incidenceDart_mem P b⟩72      (by simpa only [source_incidenceDart] using hv)).symm7374/-- The induced dart map changes the signed color and retains both literal75vertex endpoints. -/76theorem recolorPath_dartPerm (q : {q // q∈P.darts}) :77    (recolorPath_samePattern P κ hrev hkernel).dartPerm q.val=78      dart (source q.val) (κ q) (source (reverse q.val)) := by79  let h := recolorPath_samePattern P κ hrev hkernel80  obtain ⟨a,ha⟩ := exists_incidenceDart P q.property81  have hq : (⟨incidenceDart P a,incidenceDart_mem P a⟩ : {q // q∈P.darts})=q :=82    Subtype.ext ha83  rw [←ha,h.dartPerm_apply]84  apply (dart_eq_iff_source_color_target _ _).mpr85  refine ⟨?_,?_,?_⟩86  · simp only [source_incidenceDart,source_dart,recolorPath_incidenceVertex]87  · simp only [color_incidenceDart,color_dart,recolorPath_incidenceColor,hq]88  · rw [←incidenceDart_flip,source_incidenceDart,source_reverse_dart,89      ←incidenceDart_flip,source_incidenceDart,recolorPath_incidenceVertex]9091end Nonadditivity.HaarPathRecoloring