Weighted system (2.4), cluster weights W_A and perturbing-agent stability (§2.2)
DefinitionBHTOpinion_Approx_Supplement_WeightedFix agents with real opinions and real weights . The weighted system (2.4) is the integral equation
A solution is a trajectory that is continuous and satisfies this identity for every and every agent . The interaction radius is strict () and each summand carries the weight of the sending agent , without normalization. With all weights equal to this is the unweighted system (2.1).
For an opinion vector and weights , the cluster at a value is the set of agents with , and its weight is
Perturbing-agent stability. Add a new agent of weight and initial opinion to the configuration . Let be the supremum of over every perturbing opinion , every original agent , every time and every solution of the weighted system started at the augmented configuration (uniqueness is not required). The configuration is stable if , i.e. for every there is such that for every all those displacements are at most .
These objects are the setting of Theorem 3, which characterizes the stable equilibria by their intercluster distances.
Formalization Note The augmented configuration lives on Fin (n+1), the new agent is Fin.last n (via Fin.snoc), and original agents are Fin.castSucc i. Stability is written as the – form of the limit, which avoids the real supremum of a possibly unbounded or empty set; when no solution exists for some perturbation that perturbation imposes nothing, matching the supremum of an empty family of nonnegative numbers. The paragraph defining says "solutions of the system (2.1)"; in its weighted setup (2.4), with the new agent of weight , this is read as the weighted system. Solutions require interval integrability of the integrand, which excludes no continuous solution.
import Mathlib
namespace BHTOpinion.Approx.Supplement
/-- The right-hand side of the weighted system (2.4) (p. 5220) at the opinion profile
`y : Fin m → ℝ` with agent weights `w : Fin m → ℝ`, for agent `i`:
`∑_{j : |y_i − y_j| < 1} w_j (y_j − y_i)`. The neighbourhood is **strict** (`< 1`) and contains
`j = i`, whose term is `0`. The weight is that of the sending agent `j`; there is no
normalization. -/
noncomputable def weightedRhs {m : ℕ} (w : Fin m → ℝ) (y : Fin m → ℝ) (i : Fin m) : ℝ :=
∑ j ∈ Finset.univ.filter (fun j => |y i - y j| < 1), w j * (y j - y i)
/-- `x` is a solution of the weighted integral equation (2.4) (p. 5220) with weights `w`: `x` is
continuous on `[0, ∞)` and, for every `t ≥ 0` and every agent `i`, the integrand is integrable on
`[0, t]` and `x_i(t) = x_i(0) + ∫_0^t ∑_{j : |x_i(τ) − x_j(τ)| < 1} w_j (x_j(τ) − x_i(τ)) dτ`.
Time is `ℝ`; only the values of `x` at `t ≥ 0` enter. With `w ≡ 1` this is (2.1). -/
def IsWeightedSolution {m : ℕ} (w : Fin m → ℝ) (x : ℝ → Fin m → ℝ) : Prop :=
ContinuousOn x (Set.Ici 0) ∧
(∀ t : ℝ, 0 ≤ t → ∀ i : Fin m,
IntervalIntegrable (fun τ => weightedRhs w (x τ) i) MeasureTheory.volume 0 t) ∧
∀ t : ℝ, 0 ≤ t → ∀ i : Fin m, x t i = x 0 i + ∫ τ in (0 : ℝ)..t, weightedRhs w (x τ) i
/-- The weight `W_A` of the cluster of the equilibrium vector `s` located at the opinion value `a`
(p. 5220): the sum of the weights of all agents `i` with `s_i = a`. -/
noncomputable def clusterWeight {n : ℕ} (w : Fin n → ℝ) (s : Fin n → ℝ) (a : ℝ) : ℝ :=
∑ i ∈ Finset.univ.filter (fun i => s i = a), w i
/-- Perturbing-agent stability (p. 5220). The configuration `s` of `n` agents with weights `w` is
augmented by one new agent (index `Fin.last n`) of weight `δ` and arbitrary initial opinion `q`.
`s` is stable when `lim_{δ↓0} Δ(δ, s) = 0`, where `Δ(δ, s)` is the supremum of `|x_i(t) − s_i|`
over every perturbing opinion `q`, every original agent `i`, every time `t ≥ 0` and every solution
`x` of the weighted system (2.4) started at the augmented configuration (uniqueness is not
required). The limit is written out: for every `ε > 0` there is `η > 0` such that for every
`δ ∈ (0, η)` all these displacements are at most `ε`. -/
def IsStable {n : ℕ} (w : Fin n → ℝ) (s : Fin n → ℝ) : Prop :=
∀ ε : ℝ, 0 < ε → ∃ η : ℝ, 0 < η ∧ ∀ δ : ℝ, 0 < δ → δ < η → ∀ q : ℝ,
∀ x : ℝ → Fin (n + 1) → ℝ,
IsWeightedSolution (Fin.snoc (α := fun _ => ℝ) w δ) x →
x 0 = Fin.snoc (α := fun _ => ℝ) s q →
∀ i : Fin n, ∀ t : ℝ, 0 ≤ t → |x t (Fin.castSucc i) - s i| ≤ ε
end BHTOpinion.Approx.Supplement