Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.QuantitativeNet

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

Direct imports

  • Nonadditivity.Net
  • Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar dependency
  • Mathlib.Data.Set.Finite.Lemmas dependency
  • Mathlib.Order.Interval.Finset.Nat dependency

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

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

8 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.Net7import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar8import Mathlib.Data.Set.Finite.Lemmas9import Mathlib.Order.Interval.Finset.Nat1011/-! # Sharp finite-dimensional nets1213The cardinality estimate is proved by comparing disjoint Haar-measurable14balls. Maximality is taken among symmetric separated sets, so imposing15negation symmetry does not double the volume bound.16-/1718noncomputable section1920namespace Nonadditivity.QuantitativeNet2122open Metric MeasureTheory Module23open scoped ENNReal2425variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]26  [FiniteDimensional ℝ E]2728/-- The usual packing bound, with its exact radius and dimension. -/29theorem card_le_of_separated (s : Finset E) {δ R : ℝ} (hδ : 0 < δ) (hR : 0 ≤ R)30    (hs : ∀ x ∈ s, ‖x‖ ≤ R)31    (hsep : ∀ x ∈ s, ∀ y ∈ s, x ≠ y → δ ≤ dist x y) :32    (s.card : ℝ) ≤ (1 + 2 * R / δ) ^ finrank ℝ E := by33  classical34  borelize E35  let μ : Measure E := Measure.addHaar36  let r : ℝ := δ / 237  let ρ : ℝ := R + δ / 238  have hr : 0 < r := by dsimp [r]; positivity39  have hρ : 0 < ρ := by dsimp [ρ]; linarith40  let A : Set E := ⋃ x ∈ s, ball x r41  have hdisj : Set.Pairwise (s : Set E) (fun x y => Disjoint (ball x r) (ball y r)) := by42    intro x hx y hy hxy43    apply ball_disjoint_ball44    calc45      r + r = δ := by dsimp [r]; ring46      _ ≤ dist x y := hsep x hx y hy hxy47  have hsub : A ⊆ ball (0 : E) ρ := by48    refine Set.iUnion₂_subset fun x hx => ball_subset_ball' ?_49    change r + dist x 0 ≤ ρ50    rw [dist_zero_right]51    dsimp [r, ρ]52    linarith [hs x hx]53  have hvol : (s.card : ℝ≥0∞) * ENNReal.ofReal (r ^ finrank ℝ E) * μ (ball 0 1) ≤54      ENNReal.ofReal (ρ ^ finrank ℝ E) * μ (ball 0 1) := by55    calc56      (s.card : ℝ≥0∞) * ENNReal.ofReal (r ^ finrank ℝ E) * μ (ball 0 1) = μ A := by57        rw [show A = ⋃ x ∈ s, ball x r from rfl,58          measure_biUnion_finset hdisj (fun x _ => measurableSet_ball)]59        simp only [μ.addHaar_ball_of_pos _ hr, Finset.sum_const, nsmul_eq_mul, mul_assoc]60      _ ≤ μ (ball (0 : E) ρ) := measure_mono hsub61      _ = _ := μ.addHaar_ball_of_pos _ hρ62  have hcancel : (s.card : ℝ≥0∞) * ENNReal.ofReal (r ^ finrank ℝ E) ≤63      ENNReal.ofReal (ρ ^ finrank ℝ E) :=64    (ENNReal.mul_le_mul_iff_left (measure_ball_pos μ (0 : E) zero_lt_one).ne'65      measure_ball_lt_top.ne).1 hvol66  have hreal : (s.card : ℝ) * r ^ finrank ℝ E ≤ ρ ^ finrank ℝ E := by67    simpa only [ENNReal.toReal_mul, ENNReal.toReal_natCast,68      ENNReal.toReal_ofReal (pow_nonneg hr.le _)] using69      ENNReal.toReal_le_of_le_ofReal (pow_nonneg hρ.le _) hcancel70  have hratio : ρ / r = 1 + 2 * R / δ := by71    dsimp [ρ, r]72    field_simp73    ring74  calc75    (s.card : ℝ) ≤ ρ ^ finrank ℝ E / r ^ finrank ℝ E :=76      (le_div_iff₀ (pow_pos hr _)).mpr hreal77    _ = (1 + 2 * R / δ) ^ finrank ℝ E := by rw [← div_pow, hratio]7879omit [NormedSpace ℝ E] [FiniteDimensional ℝ E] in80/-- Strict separation permits adding a point outside all closed net balls. -/81private theorem separated_insert [DecidableEq E] {s : Finset E} {δ : ℝ} {x : E}82    (hs : ∀ y ∈ s, ∀ z ∈ s, y ≠ z → δ < dist y z)83    (hx : ∀ y ∈ s, δ < dist x y) :84    ∀ y ∈ insert x s, ∀ z ∈ insert x s, y ≠ z → δ < dist y z := by85  classical86  intro y hy z hz hyz87  rcases Finset.mem_insert.mp hy with rfl | hys88  · rcases Finset.mem_insert.mp hz with rfl | hzs89    · exact (hyz rfl).elim90    · exact hx z hzs91  · rcases Finset.mem_insert.mp hz with rfl | hzs92    · simpa only [dist_comm] using hx y hys93    · exact hs y hys z hzs hyz9495/-- A symmetric separated seed extends to a symmetric unit-sphere net,96without increasing the sharp packing bound. -/97theorem exists_symmetric_unitSphereNet_containing (seeds : Finset E) {δ : ℝ}98    (hδ : 0 < δ) (hδtwo : δ < 2)99    (hseed_norm : ∀ x ∈ seeds, ‖x‖ = 1)100    (hseed_neg : ∀ x ∈ seeds, -x ∈ seeds)101    (hseed_sep : ∀ x ∈ seeds, ∀ y ∈ seeds, x ≠ y → δ < dist x y) :102    ∃ tests : Finset E, seeds ⊆ tests ∧103      (∀ x ∈ tests, ‖x‖ = 1) ∧ (∀ x ∈ tests, -x ∈ tests) ∧104      (∀ x ∈ tests, ∀ y ∈ tests, x ≠ y → δ < dist x y) ∧105      UnitSphereNet tests δ ∧106      (tests.card : ℝ) ≤ (1 + 2 / δ) ^ finrank ℝ E := by107  classical108  let admissible : Finset E → Prop := fun s => seeds ⊆ s ∧109    (∀ x ∈ s, ‖x‖ = 1) ∧ (∀ x ∈ s, -x ∈ s) ∧110    (∀ x ∈ s, ∀ y ∈ s, x ≠ y → δ < dist x y)111  have hcard (s : Finset E) (hs : admissible s) :112      (s.card : ℝ) ≤ (1 + 2 / δ) ^ finrank ℝ E := by113    simpa only [mul_one] using card_le_of_separated s hδ (by norm_num : (0 : ℝ) ≤ 1)114      (fun x hx => (hs.2.1 x hx).le) (fun x hx y hy hxy => (hs.2.2.2 x hx y hy hxy).le)115  let cards : Set ℕ := {m | ∃ s : Finset E, admissible s ∧ s.card = m}116  obtain ⟨N, hN⟩ := exists_nat_gt ((1 + 2 / δ) ^ finrank ℝ E)117  have hcards_finite : cards.Finite := by118    apply (Set.finite_Iic N).subset119    rintro m ⟨s, hs, rfl⟩120    exact (Nat.cast_lt.mp ((hcard s hs).trans_lt hN)).le121  have hcards_nonempty : cards.Nonempty :=122    ⟨seeds.card, seeds, ⟨Finset.Subset.refl seeds, hseed_norm, hseed_neg, hseed_sep⟩, rfl⟩123  obtain ⟨m, hm, hmax⟩ := Set.exists_max_image cards id hcards_finite hcards_nonempty124  obtain ⟨s, hs, hsm⟩ := hm125  have hnet : UnitSphereNet s δ := by126    intro x hx127    by_contra hnot128    have hfar : ∀ y ∈ s, δ < dist x y := by129      intro y hy130      exact lt_of_not_ge (fun hxy => hnot ⟨y, hy, hxy⟩)131    have hxnot : x ∉ s := by132      intro hxs133      have := hfar x hxs134      rw [dist_self] at this135      exact (not_lt_of_ge hδ.le) this136    have hnormneg : ‖-x‖ = 1 := by simpa only [norm_neg]137    have hfarneg : ∀ y ∈ s, δ < dist (-x) y := by138      intro y hy139      simpa only [← dist_neg_neg (-x) y, neg_neg] using hfar (-y) (hs.2.2.1 y hy)140    have hdistneg : dist x (-x) = 2 := by141      rw [dist_eq_norm, sub_neg_eq_add, ← two_smul ℝ x, norm_smul, Real.norm_two, hx]142      ring143    let t : Finset E := insert x (insert (-x) s)144    have hst : s ⊆ t := fun y hy => Finset.mem_insert_of_mem (Finset.mem_insert_of_mem hy)145    have ht : admissible t := by146      refine ⟨hs.1.trans hst, ?_, ?_, ?_⟩147      · intro y hy148        rcases Finset.mem_insert.mp hy with rfl | hy149        · exact hx150        rcases Finset.mem_insert.mp hy with rfl | hy151        · exact hnormneg152        · exact hs.2.1 y hy153      · intro y hy154        rcases Finset.mem_insert.mp hy with rfl | hy155        · exact Finset.mem_insert_of_mem (Finset.mem_insert_self _ _)156        rcases Finset.mem_insert.mp hy with rfl | hy157        · simpa only [neg_neg] using Finset.mem_insert_self x (insert (-x) s)158        · exact hst (hs.2.2.1 y hy)159      · apply separated_insert (separated_insert hs.2.2.2 hfarneg)160        intro y hy161        rcases Finset.mem_insert.mp hy with rfl | hy162        · simpa only [hdistneg] using hδtwo163        · exact hfar y hy164    have hmax' : t.card ≤ s.card := by165      have := hmax t.card ⟨t, ht, rfl⟩166      simpa only [id_eq, ← hsm] using this167    have hstrict : s.card < t.card := by168      calc169        s.card < (insert x s).card := by rw [Finset.card_insert_of_notMem hxnot]; omega170        _ ≤ t.card := Finset.card_le_card (by171          intro y hy172          rcases Finset.mem_insert.mp hy with rfl | hy173          · exact Finset.mem_insert_self _ _174          · exact hst hy)175    exact (not_lt_of_ge hmax') hstrict176  exact ⟨s, hs.1, hs.2.1, hs.2.2.1, hs.2.2.2, hnet, hcard s hs⟩177178/-- The prescribed test and its negative can be included without any179cardinality overhead. -/180theorem exists_symmetric_unitSphereNet_with_test (a : E) (ha : ‖a‖ = 1)181    {δ : ℝ} (hδ : 0 < δ) (hδtwo : δ < 2) :182    ∃ tests : Finset E, a ∈ tests ∧ -a ∈ tests ∧183      (∀ x ∈ tests, ‖x‖ = 1) ∧ (∀ x ∈ tests, -x ∈ tests) ∧184      (∀ x ∈ tests, ∀ y ∈ tests, x ≠ y → δ < dist x y) ∧185      UnitSphereNet tests δ ∧186      (tests.card : ℝ) ≤ (1 + 2 / δ) ^ finrank ℝ E := by187  classical188  have hd : dist a (-a) = 2 := by189    rw [dist_eq_norm, sub_neg_eq_add, ← two_smul ℝ a, norm_smul, Real.norm_two, ha]190    ring191  have hn : ∀ x ∈ ({a, -a} : Finset E), ‖x‖ = 1 := by192    intro x hx193    simp only [Finset.mem_insert, Finset.mem_singleton] at hx194    rcases hx with rfl | rfl <;> simpa only [norm_neg] using ha195  have hneg : ∀ x ∈ ({a, -a} : Finset E), -x ∈ ({a, -a} : Finset E) := by196    intro x hx197    simp only [Finset.mem_insert, Finset.mem_singleton] at hx ⊢198    rcases hx with rfl | rfl199    · exact Or.inr rfl200    · exact Or.inl (neg_neg a)201  have hsep : ∀ x ∈ ({a, -a} : Finset E), ∀ y ∈ ({a, -a} : Finset E),202      x ≠ y → δ < dist x y := by203    intro x hx y hy hxy204    simp only [Finset.mem_insert, Finset.mem_singleton] at hx hy205    rcases hx with rfl | rfl <;> rcases hy with rfl | rfl206    · exact (hxy rfl).elim207    · simpa only [hd] using hδtwo208    · rw [dist_comm, hd]209      exact hδtwo210    · exact (hxy rfl).elim211  obtain ⟨tests, hmem, htests⟩ :=212    exists_symmetric_unitSphereNet_containing {a, -a} hδ hδtwo hn hneg hsep213  exact ⟨tests, hmem (by simp), hmem (by simp), htests⟩214215/-- Exact appendix net bound at radius `1/n`. -/216theorem exists_symmetric_inverse_nat_net (a : E) (ha : ‖a‖ = 1)217    (n : ℕ) (hn : 1 ≤ n) :218    ∃ tests : Finset E, a ∈ tests ∧ -a ∈ tests ∧219      (∀ x ∈ tests, ‖x‖ = 1) ∧ (∀ x ∈ tests, -x ∈ tests) ∧220      (∀ x ∈ tests, ∀ y ∈ tests, x ≠ y → 1 / (n : ℝ) < dist x y) ∧221      UnitSphereNet tests (1 / (n : ℝ)) ∧222      (tests.card : ℝ) ≤ (1 + 2 * (n : ℝ)) ^ finrank ℝ E := by223  have hn' : (1 : ℝ) ≤ n := by exact_mod_cast hn224  have hn0 : (0 : ℝ) < n := by linarith225  have hδ : 0 < 1 / (n : ℝ) := by positivity226  have hδtwo : 1 / (n : ℝ) < 2 := by227    apply (div_lt_iff₀ hn0).mpr228    linarith229  obtain ⟨tests, ha, hneg, hnorm, hsymm, hsep, hnet, hcard⟩ :=230    exists_symmetric_unitSphereNet_with_test a ha hδ hδtwo231  refine ⟨tests, ha, hneg, hnorm, hsymm, hsep, hnet, ?_⟩232  simpa only [div_eq_mul_inv, one_mul, inv_inv] using hcard233234end Nonadditivity.QuantitativeNet