Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathProfileReverse

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

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

11 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathChainProfiles78/-! # Reversal of actual core-chain profiles910One orientation's profile determines the other, allowing one profile per11unoriented chain in the refined quotient count.12-/13noncomputable section14namespace Nonadditivity.HaarPathGraph.Path15open HaarPathProfiles16variable {V W : Type*} [DecidableEq V] [DecidableEq W] {d m : ℕ}1718theorem coreChainProfile_first (P : Path V d m) (c : P.CoreChain) :19    (P.coreChainProfile c).val.first = color (c.val.head (P.toCore_nonempty c.property.1)) := rfl2021theorem coreChainProfile_last (P : Path V d m) (c : P.CoreChain) :22    (P.coreChainProfile c).val.last = color (c.val.getLast (P.toCore_nonempty c.property.1)) := by23  obtain ⟨a,l,he,ha⟩ := c.property.224  simp [coreChainProfile,he,wordProfile,←List.map_cons,List.getLast_map]2526theorem coreChainProfile_count (P : Path V d m) (c : P.CoreChain) (a : Color d) :27    (P.coreChainProfile c).val.count a = (c.val.map color).count a := by28  obtain ⟨b,l,he,hb⟩ := c.property.229  simp [coreChainProfile,he,wordProfile]30  simp only [List.count_eq_countP,Bool.beq_eq_decide_eq]3132theorem flipColor_involutive : Function.Involutive (@flipColor d) := by33  intro c34  simp [flipColor]3536theorem coreChainProfile_reverse_first (P : Path V d m) (c : P.CoreChain) :37    (P.coreChainProfile (P.coreChainReverse c)).val.first =38      flipColor (P.coreChainProfile c).val.last := by39  rw [coreChainProfile_first,coreChainProfile_last]40  change color ((c.val.reverse.map reverse).head _) = _41  rw [List.head_map,List.head_reverse]42  rfl4344theorem coreChainProfile_reverse_last (P : Path V d m) (c : P.CoreChain) :45    (P.coreChainProfile (P.coreChainReverse c)).val.last =46      flipColor (P.coreChainProfile c).val.first := by47  rw [coreChainProfile_first,coreChainProfile_last]48  change color ((c.val.reverse.map reverse).getLast _) = _49  rw [List.getLast_map,List.getLast_reverse]50  rfl5152theorem coreChainProfile_reverse_count (P : Path V d m) (c : P.CoreChain) (a : Color d) :53    (P.coreChainProfile (P.coreChainReverse c)).val.count a =54      (P.coreChainProfile c).val.count (flipColor a) := by55  rw [coreChainProfile_count,coreChainProfile_count]56  have he : (P.coreChainReverse c).val.map color = (c.val.map color).reverse.map flipColor := by57    change (c.val.reverse.map reverse).map color = _58    simp only [List.map_map,List.map_reverse]59    rfl60  rw [he,←flipColor_involutive a]61  rw [List.count_map_of_injective _ flipColor flipColor_involutive.injective]62  rw [List.count_reverse,flipColor_involutive]6364/-- Cross-path form used by the actual refined quotient encoding. -/65theorem coreChainProfile_reverse_eq_of_profile_eq66    (P : Path V d m) (Q : Path W d m) (c : P.CoreChain) (e : Q.CoreChain)67    (h : P.coreChainProfile c = Q.coreChainProfile e) :68    P.coreChainProfile (P.coreChainReverse c) = Q.coreChainProfile (Q.coreChainReverse e) := by69  apply Subtype.ext70  apply Profile.ext71  · rw [coreChainProfile_reverse_first,coreChainProfile_reverse_first,h]72  · rw [coreChainProfile_reverse_last,coreChainProfile_reverse_last,h]73  · funext a74    rw [coreChainProfile_reverse_count,coreChainProfile_reverse_count,h]7576end Nonadditivity.HaarPathGraph.Path