Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarNonbacktrackingLastReturn

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

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

16 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarNonbacktrackingRenewal78/-! # Exact last-return segmentation of finite matrix-word powers -/910noncomputable section11set_option backward.isDefEq.respectTransparency false1213namespace Nonadditivity.HaarNonbacktracking1415open scoped BigOperators16open HaarWordExpansion1718variable {G R : Type*} [Group G] [DecidableEq G] [Ring R]1920/-- Evaluation at a group word is additive for arbitrary coefficient rings. -/21def coefficientAddHom (g : G) : MonoidAlgebra R G →+ R where22  toFun f := f g23  map_zero' := rfl24  map_add' _ _ := rfl2526omit [DecidableEq G] in27@[simp] theorem coefficientAddHom_apply (g : G) (f : MonoidAlgebra R G) :28    coefficientAddHom g f = f g := rfl2930def removeConstant (f : MonoidAlgebra R G) : MonoidAlgebra R G :=31  f - MonoidAlgebra.single 1 (f 1)3233omit [DecidableEq G] in34theorem removeConstant_add (f h : MonoidAlgebra R G) :35    removeConstant (f + h) = removeConstant f + removeConstant h := by36  change f + h - MonoidAlgebra.single 1 (f 1 + h 1) = _37  rw [MonoidAlgebra.single_add, removeConstant, removeConstant]38  abel3940omit [DecidableEq G] in41theorem removeConstant_sum {I : Type*} (s : Finset I) (f : I → MonoidAlgebra R G) :42    removeConstant (∑ i ∈ s, f i) = ∑ i ∈ s, removeConstant (f i) := by43  classical44  induction s using Finset.induction_on with45  | empty => simp [removeConstant]46  | insert i s hi ih => simp [hi, removeConstant_add, ih]4748omit [DecidableEq G] in49/-- Removing the constant is right-linear over the coefficient matrix algebra. -/50theorem removeConstant_mul_constant (f : MonoidAlgebra R G) (B : R) :51    removeConstant (f * MonoidAlgebra.single 1 B) =52      removeConstant f * MonoidAlgebra.single 1 B := by53  rw [removeConstant, MonoidAlgebra.mul_single_one_apply, removeConstant, sub_mul,54    MonoidAlgebra.single_mul_single, one_mul]5556omit [DecidableEq G] in57theorem removeConstant_add_constant (f : MonoidAlgebra R G) :58    removeConstant f + MonoidAlgebra.single 1 (f 1) = f := by59  simp only [removeConstant, sub_add_cancel]6061omit [DecidableEq G] in62theorem removeConstant_mul_killed (A : MonoidAlgebra R G) (n : ℕ) :63    removeConstant (A * killedPolynomial A 1 n) = killedPolynomial A 1 (n + 1) := rfl6465/-- Decompose an ordinary word power at its last visit to the identity.66The terminal piece has no return, while the prefix is unrestricted. -/67theorem last_return_polynomial_decomposition (A : MonoidAlgebra R G) (n : ℕ) :68    A ^ n = ∑ k ∈ Finset.range (n + 1),69      killedPolynomial A 1 k * MonoidAlgebra.single 1 ((A ^ (n - k)) 1) := by70  induction n with71  | zero => simp [killedPolynomial, MonoidAlgebra.one_def]72  | succ n ih =>73      have hkill : removeConstant (A ^ (n + 1)) =74          ∑ k ∈ Finset.range (n + 1), killedPolynomial A 1 (k + 1) *75            MonoidAlgebra.single 1 ((A ^ (n - k)) 1) := by76        rw [pow_succ', ih, Finset.mul_sum, removeConstant_sum]77        apply Finset.sum_congr rfl78        intro k hk79        rw [← mul_assoc, removeConstant_mul_constant, removeConstant_mul_killed]80      rw [Finset.sum_range_succ']81      simp only [Nat.add_sub_add_right, Nat.sub_zero,82        show killedPolynomial A 1 0 = 1 from rfl, one_mul]83      rw [← hkill]84      exact (removeConstant_add_constant _).symm8586/-- The literal matrix-coefficient last-return formula at every nonidentity word. -/87theorem last_return_coefficient (A : MonoidAlgebra R G) (n : ℕ) (g : G) (hg : g ≠ 1) :88    (A ^ n) g = ∑ k ∈ Finset.range n,89      killedPolynomial A 1 (k + 1) g * (A ^ (n - 1 - k)) 1 := by90  have h := congrArg (fun f : MonoidAlgebra R G => f g)91    (last_return_polynomial_decomposition A n)92  rw [Finset.sum_range_succ'] at h93  simp only [killedPolynomial, one_mul, MonoidAlgebra.coe_add, Pi.add_apply] at h94  change (A ^ n) g = coefficientAddHom g95    (∑ k ∈ Finset.range n, killedPolynomial A 1 (k + 1) *96      MonoidAlgebra.single 1 ((A ^ (n - (k + 1))) 1)) +97    (MonoidAlgebra.single 1 ((A ^ (n - 0)) 1)) g at h98  rw [map_sum] at h99  simp only [coefficientAddHom_apply] at h100  simp only [MonoidAlgebra.mul_single_one_apply, MonoidAlgebra.single_apply,101    if_neg (Ne.symm hg), add_zero] at h102  have he (k : ℕ) : n - 1 - k = n - (k + 1) := by omega103  simpa only [he] using h104105/-- Last-visit decomposition starting from an arbitrary finite word polynomial.106The first summand consists exactly of paths that avoid the cut vertex. -/107theorem last_visit_polynomial_decomposition (A T : MonoidAlgebra R G) (n : ℕ) :108    A ^ n * T = killedPolynomial A T n + ∑ k ∈ Finset.range n,109      killedPolynomial A 1 k * MonoidAlgebra.single 1 ((A ^ (n - k) * T) 1) := by110  induction n with111  | zero => simp [killedPolynomial]112  | succ n ih =>113      have hkill : removeConstant (A ^ (n + 1) * T) = killedPolynomial A T (n + 1) +114          ∑ k ∈ Finset.range n, killedPolynomial A 1 (k + 1) *115            MonoidAlgebra.single 1 ((A ^ (n - k) * T) 1) := by116        rw [pow_succ', mul_assoc, ih, mul_add, Finset.mul_sum,117          removeConstant_add, removeConstant_sum]118        congr 1119        apply Finset.sum_congr rfl120        intro k hk121        rw [← mul_assoc, removeConstant_mul_constant, removeConstant_mul_killed]122      have htotal := removeConstant_add_constant (A ^ (n + 1) * T)123      rw [hkill] at htotal124      rw [Finset.sum_range_succ']125      simp only [Nat.add_sub_add_right, Nat.sub_zero,126        show killedPolynomial A 1 0 = 1 from rfl, one_mul]127      exact htotal.symm.trans (add_assoc _ _ _)128129/-- A matrix-coefficient factorization across any vertex that separates the130start from the endpoint; the explicit killed remainder records the separation. -/131theorem coefficient_factorization_at_cut (A : MonoidAlgebra R G) (n : ℕ)132    (g h : G) (havoid : killedPolynomial A (MonoidAlgebra.single h⁻¹ 1) n g = 0) :133    (A ^ n) (g * h) = ∑ k ∈ Finset.range n,134      killedPolynomial A 1 k g * (A ^ (n - k)) h := by135  have hformula := congrArg (fun f : MonoidAlgebra R G => f g)136    (last_visit_polynomial_decomposition A (MonoidAlgebra.single h⁻¹ 1) n)137  change (A ^ n * MonoidAlgebra.single h⁻¹ 1 : MonoidAlgebra R G) g =138    killedPolynomial A (MonoidAlgebra.single h⁻¹ 1) n g +139      coefficientAddHom g (∑ k ∈ Finset.range n, killedPolynomial A 1 k *140        MonoidAlgebra.single 1 ((A ^ (n - k) * MonoidAlgebra.single h⁻¹ 1 : MonoidAlgebra R G) 1)) at hformula141  rw [map_sum, havoid, zero_add] at hformula142  simp only [coefficientAddHom_apply] at hformula143  simpa only [MonoidAlgebra.mul_single_apply, inv_inv, inv_one, one_mul, mul_one] using hformula144145end Nonadditivity.HaarNonbacktracking