Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarRefinedWeight

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

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

23 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarChainReindex7import Nonadditivity.HaarProfilePermutations8import Nonadditivity.HaarPathWeightTransport910/-! # Haar weights are constant on actual refined path classes1112Equal complete-chain profiles give endpoint-fixed permutations of the positions13inside each unoriented core edge. They preserve reversal and directed traversal14multiplicity. Independent row and column Haar invariance then identifies the15literal expectations, without a weight-invariance hypothesis.16-/17noncomputable section18attribute [local instance 2000] instBEqOfDecidableEq19set_option backward.isDefEq.respectTransparency false20set_option maxHeartbeats 150000021set_option linter.unusedSectionVars false22namespace Nonadditivity.HaarPathClasses23open HaarPathGraph HaarPathProfiles HaarProfilePermutations24variable {V : Type*} [Fintype V] [DecidableEq V] {d m : ℕ}25variable {P Q : Path V d m}2627namespace SamePattern2829def dartEquiv (h : SamePattern P Q) : P.darts ≃ Q.darts where30  toFun q := ⟨h.dartPerm q.val,(h.dartPerm_mem_iff q.val).mpr q.property⟩31  invFun q := ⟨h.dartPerm.symm q.val,(h.dartPerm_mem_iff _).mp (by simpa using q.property)⟩32  left_inv := by intro q; apply Subtype.ext; exact h.dartPerm.symm_apply_apply q.val33  right_inv := by intro q; apply Subtype.ext; exact h.dartPerm.apply_symm_apply q.val3435@[simp] theorem dartEquiv_val (h : SamePattern P Q) (q : P.darts) :36    (h.dartEquiv q).val=h.dartPerm q.val := rfl3738theorem dartEquiv_count (h : SamePattern P Q) (q : P.darts) :39    P.traversalList.count q.val=Q.traversalList.count (h.dartEquiv q).val := by40  rw [dartEquiv_val,←h.traversalList_map,List.count_map_of_injective _ _ h.dartPerm.injective]4142end SamePattern43namespace RefinedPattern4445def positionPerm (h : RefinedPattern P Q) (e : P.unorientedChains) :46    Equiv.Perm (Fin (P.representative e).val.length) :=47  Classical.choose (exists_coreChain_positionPerm h (P.representative e))4849theorem positionPerm_color (h : RefinedPattern P Q) (e : P.unorientedChains)50    (i : Fin (P.representative e).val.length) :51    color (h.samePattern.dartPerm ((P.representative e).val.get (h.positionPerm e i)))=52      color ((P.representative e).val.get i) :=53  (Classical.choose_spec (exists_coreChain_positionPerm h (P.representative e))).1 i5455theorem positionPerm_fix (h : RefinedPattern P Q) (e : P.unorientedChains)56    (i : Fin (P.representative e).val.length)57    (hi : i.val=0 ∨ i.val+1=(P.representative e).val.length) : h.positionPerm e i=i :=58  (Classical.choose_spec (exists_coreChain_positionPerm h (P.representative e))).2 i hi5960/-- An actual dart bijection, built from profile equality alone. -/61def weightDartEquiv (h : RefinedPattern P Q) : P.darts ≃ Q.darts :=62  (P.chainReindex h.positionPerm).trans h.samePattern.dartEquiv6364@[simp] theorem weightDartEquiv_val (h : RefinedPattern P Q) (q : P.darts) :65    (h.weightDartEquiv q).val=h.samePattern.dartPerm (P.chainReindex h.positionPerm q).val := rfl6667theorem weightDartEquiv_color (h : RefinedPattern P Q) (q : P.darts) :68    color (h.weightDartEquiv q).val=color q.val := by69  obtain ⟨⟨e,i,b⟩,rfl⟩ := P.representativePositionEquiv.surjective q70  rw [h.weightDartEquiv_val,P.chainReindex_apply_position]71  simp only [P.representativePositionEquiv_val]72  cases b73  · simp only [Bool.false_eq_true,ite_false]74    rw [h.samePattern.dartPerm_reverse (P.toCore_mem (P.representative e).property.1 (List.get_mem _ _))]75    exact congrArg (fun c : Color d => flipColor c) (h.positionPerm_color e i)76  · exact h.positionPerm_color e i7778theorem weightDartEquiv_core (h : RefinedPattern P Q) (q : P.darts)79    (hq : source q.val∈P.coreVertices) :80    source (h.weightDartEquiv q).val=h.samePattern.vertexPerm (source q.val) := by81  rw [h.weightDartEquiv_val,P.chainReindex_fixed_core _ h.positionPerm_fix q hq]82  exact h.samePattern.source_dartPerm q.property8384theorem weightDartEquiv_core_iff (h : RefinedPattern P Q) (q : P.darts) :85    source (h.weightDartEquiv q).val∈Q.coreVertices ↔ source q.val∈P.coreVertices := by86  rw [h.weightDartEquiv_val,h.samePattern.source_dartPerm (P.chainReindex h.positionPerm q).property,87    h.samePattern.vertexPerm_mem_core_iff]88  exact P.chainReindex_mem_core_iff _ h.positionPerm_fix q8990theorem weightDartEquiv_reverse (h : RefinedPattern P Q) (q : P.darts) :91    h.weightDartEquiv ⟨reverse q.val,P.reverse_mem q.property⟩ =92      ⟨reverse (h.weightDartEquiv q).val,Q.reverse_mem (h.weightDartEquiv q).property⟩ := by93  apply Subtype.ext94  rw [h.weightDartEquiv_val,P.chainReindex_reverse]95  exact h.samePattern.dartPerm_reverse (P.chainReindex h.positionPerm q).property9697theorem weightDartEquiv_count (h : RefinedPattern P Q) (q : P.darts) :98    P.traversalList.count q.val=Q.traversalList.count (h.weightDartEquiv q).val :=99  (P.chainReindex_count h.positionPerm q).trans100    (h.samePattern.dartEquiv_count (P.chainReindex h.positionPerm q))101102/-- BC Lemma 5.7 for the literal pair-Haar path integral. No invariance premise103or dimension restriction is needed. -/104theorem integral_pathProduct_eq {N m : ℕ} {P Q : Path (Fin (N+1)) 2 m}105    (h : RefinedPattern P Q) :106    (∫ U : HaarModel.LocalUnitary N × HaarModel.LocalUnitary N,107      HaarPathWeights.pathProduct P U ∂(HaarModel.haar N).prod (HaarModel.haar N)) =108    ∫ U : HaarModel.LocalUnitary N × HaarModel.LocalUnitary N,109      HaarPathWeights.pathProduct Q U ∂(HaarModel.haar N).prod (HaarModel.haar N) := by110  exact HaarPathWeightTransport.integral_pathProduct_eq_of_dart_transport h.samePattern111    h.weightDartEquiv h.weightDartEquiv_color h.weightDartEquiv_core112    h.weightDartEquiv_core_iff h.weightDartEquiv_reverse (by113      intro q114      simpa only [List.count, Bool.beq_eq_decide_eq] using h.weightDartEquiv_count q)115116end RefinedPattern117end Nonadditivity.HaarPathClasses