Continuity of the at a unique maximiser
ProvedBanditAlgorithm.argmax_dist_le_of_unique_maximiserLet be a compact subset of a metric space, let be continuous along , and suppose is the only maximiser of on . Then for every there is such that every maximiser of lies within of whenever .
This is the argmax half of Berge's maximum theorem, specialised to a singleton argmax, where the set-valued upper hemicontinuity becomes an ordinary continuity statement. Nothing is assumed about maximisers at nearby parameters: they may well fail to be unique, and the conclusion still constrains all of them.
The proof is compactness and contradiction. If the conclusion fails there are and maximisers of with ; compactness extracts a convergent subsequence , still away from ; and passing to the limit in for fixed shows maximises , contradicting uniqueness.
Continuity is required only along the feasible set , which matters in applications where the objective is genuinely discontinuous off it. Uniqueness cannot be dropped: a selection of maximisers can jump between two of them arbitrarily.
import Mathlib.Topology.MetricSpace.Sequences import Mathlib.Topology.Order.Compact open Filter Topology Metric
theorem BanditAlgorithm.argmax_dist_le_of_unique_maximiser {X A : Type*}
[MetricSpace X] [MetricSpace A] {S : Set A} (hS : IsCompact S)
{F : X → A → ℝ}
(hF : ContinuousOn (fun q : X × A ↦ F q.1 q.2) (Set.univ ×ˢ S))
{x₀ : X} {a₀ : A}
(huniq : ∀ a, a ∈ S → (∀ b ∈ S, F x₀ b ≤ F x₀ a) → a = a₀)
{ε : ℝ} (hε : 0 < ε) :
∃ δ > 0, ∀ x : X, dist x x₀ < δ →
∀ a : A, a ∈ S → (∀ b ∈ S, F x b ≤ F x a) → dist a a₀ < ε := by
sorry