Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathInternalColors

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.HaarPathChainPartition78/-! # Internal vertices have unique outgoing signed colors910The degree-two hypothesis alone would not separate colors. Reducedness of the11original path supplies two distinct signed colors, exhausting its two darts.12Core-chain internal vertices also occur only once, by deterministic continuation13and the prohibition against traversing both orientations of one edge.14-/15noncomputable section16set_option maxHeartbeats 150000017set_option backward.isDefEq.respectTransparency false18set_option linter.unusedSectionVars false19namespace Nonadditivity.HaarPathGraph.Path20open HaarPathGraph HaarPathProfiles21variable {V : Type*} [DecidableEq V] {d m : ℕ} (P : Path V d m)2223theorem internal_darts_color_separated {v : V} (hv : v∈P.vertices)24    (hcore : v∉P.coreVertices) :25    ∃ a b : Dart V d, a∈P.darts ∧ b∈P.darts ∧ source a=v ∧ source b=v ∧26      color a≠color b ∧ ∀ q∈P.darts, source q=v → q=a ∨ q=b := by27  have hroot : v≠P.vertex 0 := by28    intro he29    exact hcore (Finset.mem_filter.mpr ⟨hv,Or.inl he⟩)30  obtain ⟨i,hi,hiv⟩ := Finset.mem_image.mp hv31  have hi0 : 0 < (i : Fin m).val := by32    by_contra h33    have he : i.castSucc=0 := Fin.ext (by simp; omega)34    exact hroot (by rw [←hiv,he])35  let j : Fin m := ⟨i.val-1,by omega⟩36  have hji : j.val+1=i.val := by dsimp [j]; omega37  have hjs : j.succ=i.castSucc := Fin.ext hji38  let a := P.traversal i39  let b := reverse (P.traversal j)40  have ha : a∈P.darts := P.traversal_mem i41  have hb : b∈P.darts := P.reverse_traversal_mem j42  have hav : source a=v := by simpa only [a,traversal,source_dart] using hiv43  have hbv : source b=v := by simp only [b,traversal,source_reverse_dart,hjs,hiv]44  have hc : color a≠color b := by45    simpa only [a,b,traversal,color_dart,color_reverse_dart] using P.reduced j i hji46  refine ⟨a,b,ha,hb,hav,hbv,hc,?_⟩47  intro q hq hqv48  by_cases hqa : q=a49  · exact Or.inl hqa50  · right51    have hba : b≠a := fun he => hc (congrArg color he.symm)52    exact (P.next_dart_unique ha hb hq (hav ▸ hcore)53      (hav.trans hbv.symm) (hav.trans hqv.symm) hba hqa).symm5455/-- At a non-core vertex, its signed color determines its outgoing dart. -/56theorem internal_color_injective {q r : Dart V d} (hq : q∈P.darts) (hr : r∈P.darts)57    (hcore : source q∉P.coreVertices) (hs : source q=source r) (hc : color q=color r) : q=r := by58  obtain ⟨a,b,ha,hb,hav,hbv,hab,hex⟩ := P.internal_darts_color_separated (P.source_mem hq) hcore59  rcases hex q hq rfl with hqa | hqb <;> rcases hex r hr hs.symm with hra | hrb60  · exact hqa.trans hra.symm61  · exact (hab (by simpa only [hqa,hrb] using hc)).elim62  · exact (hab (by simpa only [hqb,hra] using hc.symm)).elim63  · exact hqb.trans hrb.symm6465theorem toCore_predecessor_or_first {l : List (Dart V d)} (h : P.ToCore l)66    {q : Dart V d} (hq : q∈l) :67    l.head?=some q ∨ ∃ p∈l, source (reverse p)=source q ∧ q≠reverse p := by68  induction h with69  | last a ha hc => left; simpa using (List.mem_singleton.mp hq).symm70  | cons a b l ha hc hj hr ht ih =>71    rcases List.mem_cons.mp hq with hqa | hq72    · left; simp [hqa]73    · rcases ih hq with hhead | ⟨p,hp,hpq,hred⟩74      · have he : b=q := by simpa using hhead75        subst q76        exact Or.inr ⟨a,by simp,hj,hr⟩77      · exact Or.inr ⟨p,List.mem_cons_of_mem _ hp,hpq,hred⟩7879theorem coreChain_predecessor (c : P.CoreChain) {q : Dart V d}80    (hq : q∈c.val) (hcore : source q∉P.coreVertices) :81    ∃ p∈c.val, source (reverse p)=source q ∧ q≠reverse p := by82  rcases P.toCore_predecessor_or_first c.property.1 hq with hh | h83  · obtain ⟨a,t,he,hac⟩ := c.property.284    have haq : a=q := by simpa only [he,List.head?_cons,Option.some.injEq] using hh85    exact (hcore (haq ▸ hac)).elim86  · exact h8788/-- An internal vertex appears at most once in a maximal core chain. -/89theorem coreChain_source_injective (c : P.CoreChain) {q r : Dart V d}90    (hq : q∈c.val) (hr : r∈c.val) (hcore : source q∉P.coreVertices)91    (hs : source q=source r) : q=r := by92  by_contra hne93  obtain ⟨p,hp,hpq,hred⟩ := P.coreChain_predecessor c hq hcore94  have he : reverse p=r := P.next_dart_unique (P.toCore_mem c.property.1 hq)95    (P.reverse_mem (P.toCore_mem c.property.1 hp)) (P.toCore_mem c.property.1 hr)96    hcore hpq.symm hs (Ne.symm hred) (Ne.symm hne)97  exact P.coreChain_not_both_orientations c hp (he ▸ hr)9899theorem toCore_tail_source_not_core {l : List (Dart V d)} (h : P.ToCore l)100    {q : Dart V d} (hq : q∈l.tail) : source q∉P.coreVertices := by101  induction h with102  | last a ha hc => simp at hq103  | cons a b l ha hc hj hr ht ih =>104    rcases List.mem_cons.mp hq with rfl | hq105    · simpa only [hj] using hc106    · exact ih hq107108theorem toCore_step {l : List (Dart V d)} (h : P.ToCore l)109    (i : ℕ) (hi : i+1<l.length) :110    source (reverse l[i])=source l[i+1] ∧ l[i+1]≠reverse l[i] := by111  induction h generalizing i with112  | last a ha hc => simp at hi113  | cons a b l ha hc hj hr ht ih =>114    cases i with115    | zero => exact ⟨hj,hr⟩116    | succ i => exact ih i (by simpa using hi)117118theorem coreChain_internal_sources_nodup (c : P.CoreChain) :119    (c.val.tail.map source).Nodup := by120  apply List.Nodup.map_on _ (P.toCore_nodup c.property.1).tail121  intro q hq r hr hs122  exact P.coreChain_source_injective c (List.mem_of_mem_tail hq) (List.mem_of_mem_tail hr)123    (P.toCore_tail_source_not_core c.property.1 hq) hs124125end Nonadditivity.HaarPathGraph.Path