/- From Prove2Me, definition `KissingNumber` (https://prove2.me/definitions/770a7c1e-e019-4f7b-86f6-23d82ee50472). Apache-2.0 per Prove2Me's terms. -/ import Mathlib namespace KissingNumber noncomputable section open scoped InnerProductSpace /-- The ambient Euclidean space `ℝ^d`. -/ abbrev Ambient (d : ℕ) := EuclideanSpace ℝ (Fin d) /-- A kissing configuration in dimension `d`: a finite set of unit vectors in `ℝ^d` with pairwise inner products at most `1/2` (equivalently, pairwise distances at least `1`). These are exactly the (rescaled) centers of non-overlapping unit balls touching a common unit ball. -/ structure KissingConfig (d : ℕ) where points : Finset (Ambient d) unit_norm : ∀ x ∈ points, ‖x‖ = 1 inner_le : ∀ x ∈ points, ∀ y ∈ points, x ≠ y → ⟪x, y⟫_ℝ ≤ (1 : ℝ) / 2 /-- The kissing number `τ(d)`: the largest number of non-overlapping unit balls in `ℝ^d` that can touch a common unit ball. Defined as the supremum of the cardinalities of all kissing configurations, valued in `ℕ∞`. -/ def kissingNumber (d : ℕ) : ℕ∞ := ⨆ C : KissingConfig d, (C.points.card : ℕ∞) end end KissingNumber