Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarRepresentativePositions

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

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.HaarCoreChainReverseAddress78/-! # Reversal-coherent coordinates on unoriented core edges -/9noncomputable section10set_option backward.isDefEq.respectTransparency false11set_option maxHeartbeats 120000012namespace Nonadditivity.HaarPathGraph.Path13variable {V : Type*} [DecidableEq V] {d m : ℕ} (P : Path V d m)1415abbrev RepresentativePosition := Σ e : P.unorientedChains, Fin (P.representative e).val.length × Bool1617def representativePosition (p : P.RepresentativePosition) : P.ChainPosition :=18  if p.2.2 then ⟨P.representative p.1,p.2.1⟩ else19    P.reversePosition ⟨P.representative p.1,p.2.1⟩2021lemma chainLabel_representativePosition (p : P.RepresentativePosition) :22    P.chainLabel (P.representativePosition p).1=p.1 := by23  obtain ⟨e,i,b⟩ := p24  cases b <;> simp [representativePosition,reversePosition,P.label_representative]2526theorem representativePosition_injective : Function.Injective P.representativePosition := by27  rintro ⟨e,i,b⟩ ⟨e',i',b'⟩ he28  have hee : e=e' := by29    simpa only [P.chainLabel_representativePosition] using congrArg (fun q => P.chainLabel q.1) he30  subst e'31  cases b <;> cases b'32  · have hh := congrArg P.reversePosition he33    simp only [representativePosition,Bool.false_eq_true,ite_false,P.reversePosition_involutive] at hh34    have hi : i=i' := by cases hh; rfl35    subst i'; rfl36  · have hh := congrArg Sigma.fst he37    change P.coreChainReverse (P.representative e)=P.representative e at hh38    exact (P.coreChainReverse_ne_self _ hh).elim39  · have hh := congrArg Sigma.fst he40    change P.representative e=P.coreChainReverse (P.representative e) at hh41    exact (P.coreChainReverse_ne_self _ hh.symm).elim42  · have hi : i=i' := by cases he; rfl43    subst i'; rfl4445theorem representativePosition_surjective : Function.Surjective P.representativePosition := by46  rintro ⟨c,i⟩47  have hex : ∃ e : P.unorientedChains,48      c=P.representative e ∨ c=P.coreChainReverse (P.representative e) :=49    ⟨P.chainLabel c,P.eq_representative_or_reverse c⟩50  obtain ⟨e,hc | hc⟩ := hex51  · subst c52    exact ⟨⟨e,i,true⟩,rfl⟩53  · subst c54    let j : Fin (P.representative e).val.length :=55      (Fin.cast (P.coreChainReverse_length (P.representative e)) i).rev56    refine ⟨⟨e,j,false⟩,?_⟩57    change P.reversePosition ⟨P.representative e,j⟩=⟨P.coreChainReverse (P.representative e),i⟩58    have hj : Fin.cast (P.coreChainReverse_length (P.representative e)).symm j.rev=i := by59      apply Fin.ext60      simp only [j,Fin.val_cast,Fin.val_rev]61      have hi : i.val < (P.representative e).val.length :=62        lt_of_lt_of_eq i.isLt (P.coreChainReverse_length _)63      omega64    exact congrArg (fun k => Sigma.mk (P.coreChainReverse (P.representative e)) k) hj6566/-- Each graph dart is exactly one representative position and one orientation. -/67def representativePositionEquiv : P.RepresentativePosition ≃ P.darts :=68  (Equiv.ofBijective P.representativePosition69    ⟨P.representativePosition_injective,P.representativePosition_surjective⟩).trans P.positionEquiv7071@[simp] theorem representativePositionEquiv_apply (p : P.RepresentativePosition) :72    P.representativePositionEquiv p=P.positionDart (P.representativePosition p) := rfl7374/-- Its value formula makes reversal independent of the chain-position index. -/75theorem representativePositionEquiv_val (e : P.unorientedChains)76    (i : Fin (P.representative e).val.length) (b : Bool) :77    (P.representativePositionEquiv ⟨e,i,b⟩).val =78      if b then (P.representative e).val.get i else reverse ((P.representative e).val.get i) := by79  cases b80  · rw [representativePositionEquiv_apply]81    change (P.positionDart (P.reversePosition ⟨P.representative e,i⟩)).val=_82    rw [P.positionDart_reversePosition]83    rfl84  · rfl8586theorem representativePositionEquiv_reverse (e : P.unorientedChains)87    (i : Fin (P.representative e).val.length) (b : Bool) :88    P.representativePositionEquiv ⟨e,i,!b⟩=89      ⟨reverse (P.representativePositionEquiv ⟨e,i,b⟩).val,90        P.reverse_mem (P.representativePositionEquiv ⟨e,i,b⟩).property⟩ := by91  apply Subtype.ext92  simp only [P.representativePositionEquiv_val]93  cases b <;> simp9495end Nonadditivity.HaarPathGraph.Path