Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarChainReindex

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

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

10 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarRepresentativePositions7import Nonadditivity.HaarCoreChainMultiplicity8import Nonadditivity.HaarCoreChainEndpoints910/-! # Reversal-coherent reindexing inside unoriented core edges -/11noncomputable section12attribute [local instance 2000] instBEqOfDecidableEq13set_option backward.isDefEq.respectTransparency false14set_option maxHeartbeats 120000015namespace Nonadditivity.HaarPathGraph.Path16variable {V : Type*} [DecidableEq V] {d m : ℕ} (P : Path V d m)1718def representativeReindex (σ : ∀ e : P.unorientedChains,19    Equiv.Perm (Fin (P.representative e).val.length)) : Equiv.Perm P.RepresentativePosition where20  toFun p := ⟨p.1,σ p.1 p.2.1,p.2.2⟩21  invFun p := ⟨p.1,(σ p.1).symm p.2.1,p.2.2⟩22  left_inv := by rintro ⟨e,i,b⟩; simp23  right_inv := by rintro ⟨e,i,b⟩; simp2425/-- Reindex the positions of each unoriented edge, simultaneously and coherently26in its two orientations. -/27def chainReindex (σ : ∀ e : P.unorientedChains,28    Equiv.Perm (Fin (P.representative e).val.length)) : Equiv.Perm P.darts :=29  P.representativePositionEquiv.symm.trans30    ((P.representativeReindex σ).trans P.representativePositionEquiv)3132@[simp] theorem chainReindex_apply_position (σ : ∀ e : P.unorientedChains,33    Equiv.Perm (Fin (P.representative e).val.length))34    (e : P.unorientedChains) (i : Fin (P.representative e).val.length) (b : Bool) :35    P.chainReindex σ (P.representativePositionEquiv ⟨e,i,b⟩)=36      P.representativePositionEquiv ⟨e,σ e i,b⟩ := by37  simp only [chainReindex,Equiv.trans_apply,Equiv.symm_apply_apply]38  rfl3940theorem chainReindex_reverse (σ : ∀ e : P.unorientedChains,41    Equiv.Perm (Fin (P.representative e).val.length)) (q : P.darts) :42    P.chainReindex σ ⟨reverse q.val,P.reverse_mem q.property⟩ =43      ⟨reverse (P.chainReindex σ q).val,P.reverse_mem (P.chainReindex σ q).property⟩ := by44  obtain ⟨⟨e,i,b⟩,rfl⟩ := P.representativePositionEquiv.surjective q45  rw [←P.representativePositionEquiv_reverse,P.chainReindex_apply_position,46    P.chainReindex_apply_position,P.representativePositionEquiv_reverse]4748/-- Directed traversal multiplicity is constant along a chain, so arbitrary49reindexing within that chain preserves the literal number of occurrences. -/50theorem chainReindex_count (σ : ∀ e : P.unorientedChains,51    Equiv.Perm (Fin (P.representative e).val.length)) (q : P.darts) :52    P.traversalList.count q.val=P.traversalList.count (P.chainReindex σ q).val := by53  obtain ⟨j,hj⟩ := P.dart_eq_traversal_or_reverse q.val q.property54  have hm : 0<m := Nat.zero_lt_of_lt j.isLt55  obtain ⟨⟨e,i,b⟩,rfl⟩ := P.representativePositionEquiv.surjective q56  rw [P.chainReindex_apply_position]57  simp only [P.representativePositionEquiv_val]58  cases b59  · simp only [Bool.false_eq_true,ite_false]60    apply P.traversal_count_constant_on_chain hm (P.coreChainReverse (P.representative e))61    · exact List.mem_map.mpr ⟨_,List.mem_reverse.mpr (List.get_mem _ _),rfl⟩62    · exact List.mem_map.mpr ⟨_,List.mem_reverse.mpr (List.get_mem _ _),rfl⟩63  · simp only [ite_true]64    exact P.traversal_count_constant_on_chain hm (P.representative e)65      (List.get_mem _ _) (List.get_mem _ _)6667/-- Fixing the chain endpoints fixes every dart whose source is a core vertex. -/68theorem chainReindex_fixed_core (σ : ∀ e : P.unorientedChains,69    Equiv.Perm (Fin (P.representative e).val.length))70    (hfix : ∀ e i, (i.val=0 ∨ i.val+1=(P.representative e).val.length) → σ e i=i)71    (q : P.darts) (hq : source q.val∈P.coreVertices) : P.chainReindex σ q=q := by72  obtain ⟨⟨e,i,b⟩,rfl⟩ := P.representativePositionEquiv.surjective q73  rw [P.chainReindex_apply_position]74  have hi : i.val=0 ∨ i.val+1=(P.representative e).val.length := by75    rw [P.representativePositionEquiv_val] at hq76    cases b77    · exact Or.inr ((P.coreChain_reverse_source_mem_core_iff _ _).mp hq)78    · exact Or.inl ((P.coreChain_source_mem_core_iff _ _).mp hq)79  rw [hfix e i hi]8081theorem chainReindex_mem_core_iff (σ : ∀ e : P.unorientedChains,82    Equiv.Perm (Fin (P.representative e).val.length))83    (hfix : ∀ e i, (i.val=0 ∨ i.val+1=(P.representative e).val.length) → σ e i=i)84    (q : P.darts) : source (P.chainReindex σ q).val∈P.coreVertices ↔ source q.val∈P.coreVertices := by85  constructor86  · intro hc87    have hfixed := P.chainReindex_fixed_core σ hfix (P.chainReindex σ q) hc88    have he := (P.chainReindex σ).injective hfixed89    simpa only [he] using hc90  · intro hc91    rw [P.chainReindex_fixed_core σ hfix q hc]92    exact hc9394end Nonadditivity.HaarPathGraph.Path