Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.FiniteFreeModel

Download original .lean · View on GitHub · Jump to source

Direct imports

Imported by project modules

2 direct reverse imports

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

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

38 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.PolynomialReduction7import Mathlib.Logic.Equiv.Fintype8import Mathlib.Data.Fintype.Vector910/-! Finite quotients that exactly distinguish every word in a prescribed free-group ball. -/11noncomputable section12set_option backward.isDefEq.respectTransparency false13set_option linter.unusedSectionVars false14set_option maxHeartbeats 120000015namespace Nonadditivity.FiniteFreeModel16universe u17variable {α : Type u} [Fintype α] [DecidableEq α]1819abbrev Ball (α : Type*) [DecidableEq α] (R : ℕ) := {w : FreeGroup α // FreeGroup.norm w ≤ R}2021def encode (R : ℕ) (w : Ball α R) : Σ t : Fin (R+1), List.Vector (α×Bool) t.val :=22  ⟨⟨w.val.toWord.length,by have := w.property; change w.val.toWord.length ≤ R at this; omega⟩,23    ⟨w.val.toWord,rfl⟩⟩2425theorem encode_injective (R : ℕ) : Function.Injective (encode (α := α) R) := by26  intro v w h27  have hwords := congrArg (fun x : Σ t : Fin (R+1), List.Vector (α×Bool) t.val => x.2.val) h28  exact Subtype.ext (FreeGroup.toWord_injective hwords)2930instance ballFintype (R : ℕ) : Fintype (Ball α R) := Fintype.ofInjective (encode R) (encode_injective R)3132def base (R : ℕ) : Ball α R := ⟨1,by simp⟩3334/-- Left translation restricted to pairs that remain inside the finite ball. -/35def partialTranslation (R : ℕ) (a : α) :36    {w : Ball α R // FreeGroup.norm (FreeGroup.of a * w.val) ≤ R} ≃37    {w : Ball α R // FreeGroup.norm ((FreeGroup.of a)⁻¹ * w.val) ≤ R} where38  toFun w := ⟨⟨FreeGroup.of a * w.val.val,w.property⟩,by simpa only [inv_mul_cancel_left] using w.val.property⟩39  invFun w := ⟨⟨(FreeGroup.of a)⁻¹ * w.val.val,w.property⟩,by simpa only [mul_inv_cancel_left] using w.val.property⟩40  left_inv w := by apply Subtype.ext; apply Subtype.ext; simp41  right_inv w := by apply Subtype.ext; apply Subtype.ext; simp4243/-- Complete the partial translation to a genuine finite permutation. -/44def generatorPerm (R : ℕ) (a : α) : Equiv.Perm (Ball α R) := (partialTranslation R a).extendSubtype4546theorem generatorPerm_apply (R : ℕ) (a : α) (w : Ball α R)47    (h : FreeGroup.norm (FreeGroup.of a * w.val) ≤ R) :48    (generatorPerm R a w).val = FreeGroup.of a * w.val := by49  rw [generatorPerm,Equiv.extendSubtype_apply_of_mem _ w h]50  rfl5152theorem generatorPerm_inv_apply (R : ℕ) (a : α) (w : Ball α R)53    (h : FreeGroup.norm ((FreeGroup.of a)⁻¹ * w.val) ≤ R) :54    ((generatorPerm R a)⁻¹ w).val = (FreeGroup.of a)⁻¹ * w.val := by55  let v : Ball α R := ⟨(FreeGroup.of a)⁻¹*w.val,h⟩56  have hv : generatorPerm R a v = w := by57    apply Subtype.ext58    rw [generatorPerm_apply]59    · simp [v]60    · simpa [v] using w.property61  have heq : (generatorPerm R a)⁻¹ w = v := by62    rw [←hv]63    exact (generatorPerm R a).symm_apply_apply v64  exact congrArg Subtype.val heq6566/-- A homomorphism into a genuine finite group, with no approximation premise. -/67def model (R : ℕ) : FreeGroup α →* Equiv.Perm (Ball α R) := FreeGroup.lift (generatorPerm R)6869theorem mk_cons_true (a : α) (l : List (α×Bool)) :70    FreeGroup.mk ((a,true)::l) = FreeGroup.of a * FreeGroup.mk l := by71  rw [FreeGroup.of,FreeGroup.mul_mk]72  rfl7374theorem mk_cons_false (a : α) (l : List (α×Bool)) :75    FreeGroup.mk ((a,false)::l) = (FreeGroup.of a)⁻¹ * FreeGroup.mk l := by76  rw [FreeGroup.of,FreeGroup.inv_mk,FreeGroup.mul_mk]77  rfl7879/-- Every word of length at most `R` acts correctly on the distinguished identity. -/80theorem model_mk_base (R : ℕ) (l : List (α×Bool)) (hl : l.length ≤ R) :81    ((model R (FreeGroup.mk l)) (base R)).val = FreeGroup.mk l := by82  induction l with83  | nil => rfl84  | cons x l ih =>85    have hl' : l.length ≤ R := by simp only [List.length_cons] at hl; omega86    specialize ih hl'87    rcases x with ⟨a,b⟩88    cases b with89    | false =>90      rw [mk_cons_false,map_mul,map_inv]91      change ((generatorPerm R a)⁻¹ ((model R (FreeGroup.mk l)) (base R))).val = _92      rw [generatorPerm_inv_apply]93      · rw [ih]94      · rw [ih,←mk_cons_false]95        exact FreeGroup.norm_mk_le.trans hl96    | true =>97      rw [mk_cons_true,map_mul]98      change (generatorPerm R a ((model R (FreeGroup.mk l)) (base R))).val = _99      rw [generatorPerm_apply]100      · rw [ih]101      · rw [ih,←mk_cons_true]102        exact FreeGroup.norm_mk_le.trans hl103104theorem model_base (R : ℕ) (w : FreeGroup α) (hw : FreeGroup.norm w ≤ R) :105    ((model R w) (base R)).val = w := by106  simpa only [FreeGroup.mk_toWord] using model_mk_base R w.toWord hw107108/-- The constructed finite model detects every nontrivial element in the chosen ball. -/109theorem model_eq_one_iff (R : ℕ) (w : FreeGroup α) (hw : FreeGroup.norm w ≤ R) :110    model R w = 1 ↔ w = 1 := by111  constructor112  · intro h113    have hb := model_base R w hw114    rw [h] at hb115    exact hb.symm116  · rintro rfl; exact map_one _117118theorem model_ne_one (R : ℕ) (w : FreeGroup α) (hw : FreeGroup.norm w ≤ R) (h : w≠1) :119    model R w ≠ 1 := (model_eq_one_iff R w hw).not.mpr h120121/-- An explicit finite group separates any given nonidentity free-group element. -/122theorem exists_finite_separating_model (w : FreeGroup α) (hw : w≠1) :123    ∃(H : Type u) (_ : Fintype H) (_ : Group H) (π : FreeGroup α →* H), π w≠1 := by124  exact ⟨Equiv.Perm (Ball α (FreeGroup.norm w)),inferInstance,inferInstance,125    model (FreeGroup.norm w),model_ne_one _ _ le_rfl hw⟩126127/-- Independent coordinate models give a finite quotient of the product free group. -/128def productModel (R n : ℕ) : (Fin n → FreeGroup α) →* (Fin n → Equiv.Perm (Ball α R)) where129  toFun w j := model R (w j)130  map_one' := by funext j; exact map_one _131  map_mul' v w := by funext j; exact map_mul _ _ _132133theorem productModel_eq_one_iff (R n : ℕ) (w : Fin n → FreeGroup α)134    (hw : ∀j, FreeGroup.norm (w j) ≤ R) : productModel R n w = 1 ↔ w=1 := by135  constructor136  · intro h137    funext j138    apply (model_eq_one_iff R (w j) (hw j)).mp139    exact congrFun h j140  · rintro rfl; exact map_one _141142end Nonadditivity.FiniteFreeModel