Mathlib.Optimization.Quadratic­Saddle

This module collects fixed compact-polytope finite quadratic max-min problems, their Borel value and saddle relations, and exact Borel saddle selectors with a fixed fallback outside an attainment domain.

Basic 8 core · 8 supporting This module defines fixed compact polytopes, finite families of parameterized convex scalar quadratics, their max-min value, and the maximum envelope. ★ value_eq_extended_maxMin

Finite parametric quadratic saddle problems

This module defines fixed compact polytopes, finite families of parameterized convex scalar quadratics, their max-min value, and the maximum envelope. It proves the Borel and pointwise facts that support an exact measurable saddle-point selector.

structure Polytope reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle

A finite coordinate set and finite equality-index set determine a nonempty compact polytope of nonnegative weight vectors satisfying fixed linear equalities.

Definition (Lean source)
ι κ :
Type*
A :
κ → ι → ℝ
b :
κ → ℝ
compact :
IsCompact {α : EuclideanSpace ℝ ι | (∀ i, 0 ≤ α i) ∧ ∀ j, (∑ i, A j i * α i) = b j}
nonempty :
Nonempty {α : EuclideanSpace ℝ ι | (∀ i, 0 ≤ α i) ∧ ∀ j, (∑ i, A j i * α i) = b j}
Causalean.Mathlib.Optimization.QuadraticSaddle.Polytope · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:20
def weights reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle.Polytope

A fixed compact polytope has a feasible weight set consisting of its nonnegative vectors that satisfy every defining linear equality.

Definition (Lean source)
ι :
Type u_2
shared
κ :
Type u_3
shared
P :
Polytope ι κ
weights P :
{α | (∀ i, 0 ≤ α i) ∧ ∀ j, (∑ i, P.A j i * α i) = P.b j}
Causalean.Mathlib.Optimization.QuadraticSaddle.Polytope.weights · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:30 · uses Polytope
structure Quadratics reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle

A parameter space and finite coordinate set determine Borel coefficient fields with nonnegative quadratic terms for one convex scalar quadratic per coordinate.

Definition (Lean source)
Θ ι :
a :
ι → Θ → ℝ
b :
ι → Θ → ℝ
c :
ι → Θ → ℝ
measurable_a :
∀ i : ι, Measurable (a i)
measurable_b :
∀ i : ι, Measurable (b i)
measurable_c :
∀ i : ι, Measurable (c i)
nonneg_a :
∀ (θ : Θ) (i : ι), 0 ≤ a i θ
Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:40
def objective reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics

A quadratic family, parameter, weight vector, and scalar decision determine the finite weighted quadratic objective: the sum over coordinates of the weight times that coordinate's quadratic a·t² + b·t + c evaluated at the parameter.

Definition (Lean source)
Θ :
Type u_1
shared
ι :
Type u_2
shared
Q :
θ :
Θ
α :
t :
ℝ
objective Q θ α t :
ℝ
∑ i, α i * (Q.a i θ * t ^ 2 + Q.b i θ * t + Q.c i θ)
Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.objective · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:52 · uses Quadratics
def IsSaddle reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle

A fixed polytope, quadratic family, parameter, weight vector, and scalar decision form a saddle pair when the weight is feasible, the scalar globally minimizes its weighted quadratic, and the weight maximizes the objective at that scalar.

Definition (Lean source)
Θ :
Type u_1
shared
ι :
Type u_2
shared
κ :
Type u_3
shared
P :
Polytope ι κ
Q :
θ :
Θ
α :
t :
ℝ
IsSaddle P Q θ α t :
Prop
clause 1
α ∈ P.weights
clause 2
u :
ℝ
Q.objective θ α t ≤ Q.objective θ α u
clause 3
β ∈ P.weights :
Q.objective θ β t ≤ Q.objective θ α t
Causalean.Mathlib.Optimization.QuadraticSaddle.IsSaddle · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:78 · uses Polytope , Quadratics
def value reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle

A fixed polytope, quadratic family, and parameter determine the real max-min value, the supremum of all attained weighted-quadratic minima.

Definition (Lean source)
Θ :
Type u_1
shared
ι :
Type u_2
shared
κ :
Type u_3
shared
P :
Polytope ι κ
Q :
θ :
Θ
value P Q θ :
ℝ
sSup {j : ℝ | ∃ α ∈ P.weights, ∃ t : ℝ, Q.objective θ α t = j ∧ ∀ u : ℝ, Q.objective θ α t ≤ Q.objective θ α u}
Causalean.Mathlib.Optimization.QuadraticSaddle.value · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:88 · uses Polytope , Quadratics
theorem value_eq_extended_maxMin reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle

A fixed polytope, quadratic family, parameter, weight vector, and scalar decision whose pair is a saddle have a real max-min value equal to the extended-real max-min expression, including unbounded-below competitors.

Formal statement
Θ :
Type u_1
shared
ι :
Type u_2
shared
κ :
Type u_3
shared
P :
Polytope ι κ
Q :
θ :
Θ
α :
t :
ℝ
h :
IsSaddle P Q θ α t
(value P Q θ : EReal)
= ⨆ (β : {β : EuclideanSpace ℝ ι // β ∈ P.weights}), ⨅ (u : ℝ), (Q.objective θ β.1 u : EReal)
Proof (Lean source)
theorem value_eq_extended_maxMin (P : Polytope ι κ) (Q : Quadratics Θ ι) (θ : Θ) (α : EuclideanSpace ℝ ι) (t : ℝ) (h : IsSaddle P Q θ α t) : (value P Q θ : EReal) = ⨆ (β : {β : EuclideanSpace ℝ ι // β ∈ P.weights}), ⨅ (u : ℝ), (Q.objective θ β.1 u : EReal) := by rw [value_eq_of_isSaddle P Q θ α t h] apply le_antisymm · calc (Q.objective θ α t : EReal) ≤ ⨅ (u : ℝ), (Q.objective θ α u : EReal) := le_iInf fun u => by exact_mod_cast h.2.1 u _ ≤ ⨆ (β : {β : EuclideanSpace ℝ ι // β ∈ P.weights}), ⨅ (u : ℝ), (Q.objective θ β.1 u : EReal) := le_iSup (fun β : {β : EuclideanSpace ℝ ι // β ∈ P.weights} => ⨅ (u : ℝ), (Q.objective θ β.1 u : EReal)) ⟨α, h.1⟩ · refine iSup_le fun β => ?_ calc (⨅ (u : ℝ), (Q.objective θ β.1 u : EReal)) ≤ (Q.objective θ β.1 t : EReal) := iInf_le _ t _ ≤ (Q.objective θ α t : EReal) := by exact_mod_cast h.2.2 β.1 β.2
Causalean.Mathlib.Optimization.QuadraticSaddle.value_eq_extended_maxMin · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:112 · uses IsSaddle , Polytope , weights , Quadratics , objective , value
def envelope reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics

A fixed polytope, quadratic family, parameter, and scalar decision determine the maximum envelope obtained by maximizing the objective over feasible weights.

Definition (Lean source)
Θ :
Type u_1
shared
ι :
Type u_2
shared
κ :
Type u_3
shared
P :
Polytope ι κ
Q :
θ :
Θ
t :
ℝ
envelope P Q θ t :
ℝ
sSup ((fun β : EuclideanSpace ℝ ι => Q.objective θ β t) '' P.weights)
Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.envelope · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:139 · uses Polytope , Quadratics
8 supporting declarations (lemmas, instances)
  • measurableSet_weights theorem — The feasible weight set of a fixed compact polytope is Borel.
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    MeasurableSet P.weights
    Proof (Lean source)
    theorem Polytope.measurableSet_weights (P : Polytope ι κ) : MeasurableSet P.weights := by exact P.compact.measurableSet
    Causalean.Mathlib.Optimization.QuadraticSaddle.Polytope.measurableSet_weights · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:35
  • measurable_objective theorem — A quadratic family has a jointly Borel quadratic objective in the parameter, finite weight vector, and scalar decision.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    Q :
    Measurable (fun x : Θ × (EuclideanSpace ℝ ι × ℝ) => Q.objective x.1 x.2.1 x.2.2)
    Proof (Lean source)
    theorem Quadratics.measurable_objective (Q : Quadratics Θ ι) : Measurable (fun x : Θ × (EuclideanSpace ℝ ι × ℝ) => Q.objective x.1 x.2.1 x.2.2) := by unfold Quadratics.objective apply Finset.measurable_sum intro i hi have hθ : Measurable (fun x : Θ × (EuclideanSpace ℝ ι × ℝ) => x.1) := measurable_fst have hα : Measurable (fun x : Θ × (EuclideanSpace ℝ ι × ℝ) => x.2.1 i) := (EuclideanSpace.proj (𝕜 := ℝ) i).continuous.measurable.comp (measurable_fst.comp measurable_snd) have ht : Measurable (fun x : Θ × (EuclideanSpace ℝ ι × ℝ) => x.2.2) := measurable_snd.comp measurable_snd exact hα.mul (((((Q.measurable_a i).comp hθ).mul (ht.pow_const 2)).add (((Q.measurable_b i).comp hθ).mul ht)).add ((Q.measurable_c i).comp hθ))
    Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.measurable_objective · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:60
  • value_eq_of_isSaddle theorem — A fixed polytope, quadratic family, parameter, weight vector, and scalar decision whose pair is a saddle have an objective equal to the max-min value.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    θ :
    Θ
    α :
    t :
    ℝ
    h :
    IsSaddle P Q θ α t
    value P Q θ = Q.objective θ α t
    Proof (Lean source)
    theorem value_eq_of_isSaddle (P : Polytope ι κ) (Q : Quadratics Θ ι) (θ : Θ) (α : EuclideanSpace ℝ ι) (t : ℝ) (h : IsSaddle P Q θ α t) : value P Q θ = Q.objective θ α t := by let S : Set ℝ := {j : ℝ | ∃ β ∈ P.weights, ∃ u : ℝ, Q.objective θ β u = j ∧ ∀ v : ℝ, Q.objective θ β u ≤ Q.objective θ β v} have hmem : Q.objective θ α t ∈ S := ⟨α, h.1, t, rfl, h.2.1⟩ have hub : ∀ j ∈ S, j ≤ Q.objective θ α t := by rintro j ⟨β, hβ, u, rfl, hu⟩ exact (hu t).trans (h.2.2 β hβ) have hbdd : BddAbove S := ⟨Q.objective θ α t, hub⟩ change sSup S = Q.objective θ α t exact le_antisymm (csSup_le ⟨_, hmem⟩ hub) (le_csSup hbdd hmem)
    Causalean.Mathlib.Optimization.QuadraticSaddle.value_eq_of_isSaddle · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:95
  • measurable_envelope theorem — A fixed polytope and quadratic family have a jointly Borel maximum envelope in the parameter and scalar decision.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    Measurable (fun x : Θ × ℝ => Q.envelope P x.1 x.2)
    Proof (Lean source)
    theorem Quadratics.measurable_envelope (P : Polytope ι κ) (Q : Quadratics Θ ι) : Measurable (fun x : Θ × ℝ => Q.envelope P x.1 x.2) := by classical letI : Nonempty P.weights := Set.nonempty_coe_sort.mpr P.nonempty let d : ℕ → P.weights := TopologicalSpace.denseSeq P.weights have hd : Dense (range d) := by simpa only [DenseRange, d] using TopologicalSpace.denseRange_denseSeq P.weights have hn : Measurable (fun x : Θ × ℝ => ⨆ n : ℕ, Q.objective x.1 (d n).1 x.2) := by apply Measurable.iSup intro n exact Q.measurable_objective.comp (measurable_fst.prodMk (measurable_const.prodMk measurable_snd)) convert hn using 1 ext x change sSup ((fun β : EuclideanSpace ℝ ι => Q.objective x.1 β x.2) '' P.weights) = ⨆ n : ℕ, Q.objective x.1 (d n).1 x.2 rw [sSup_image'] have hc : Continuous (fun β : P.weights => Q.objective x.1 β.1 x.2) := by unfold Quadratics.objective fun_prop rw [← hd.ciSup' hc] have he : Surjective (fun n : ℕ => (⟨d n, Set.mem_range_self n⟩ : range d)) := by rintro ⟨z, n, rfl⟩ exact ⟨n, rfl⟩ exact (he.iSup_comp (fun s : range d => Q.objective x.1 s.1.1 x.2)).symm
    Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.measurable_envelope · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:146
  • continuous_envelope theorem — A fixed polytope, quadratic family, and parameter have a continuous maximum envelope as a function of the scalar decision.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    θ :
    Θ
    Continuous (Q.envelope P θ)
    Proof (Lean source)
    theorem Quadratics.continuous_envelope (P : Polytope ι κ) (Q : Quadratics Θ ι) (θ : Θ) : Continuous (Q.envelope P θ) := by apply P.compact.continuous_sSup change Continuous (fun p : ℝ × EuclideanSpace ℝ ι => Q.objective θ p.2 p.1) unfold Quadratics.objective fun_prop
    Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.continuous_envelope · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:178
  • objective_le_envelope theorem — A fixed polytope, quadratic family, parameter, scalar decision, and feasible weight have an objective no larger than the maximum envelope.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    θ :
    Θ
    t :
    ℝ
    β :
    hβ :
    β ∈ P.weights
    Q.objective θ β t ≤ Q.envelope P θ t
    Proof (Lean source)
    theorem Quadratics.objective_le_envelope (P : Polytope ι κ) (Q : Quadratics Θ ι) (θ : Θ) (t : ℝ) (β : EuclideanSpace ℝ ι) (hβ : β ∈ P.weights) : Q.objective θ β t ≤ Q.envelope P θ t := by have hc : Continuous (fun γ : EuclideanSpace ℝ ι => Q.objective θ γ t) := by unfold Quadratics.objective fun_prop have hbdd : BddAbove ((fun γ : EuclideanSpace ℝ ι => Q.objective θ γ t) '' P.weights) := P.compact.bddAbove_image hc.continuousOn exact le_csSup hbdd ⟨β, hβ, rfl⟩
    Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.objective_le_envelope · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:188
  • envelope_eq_of_isSaddle theorem — A fixed polytope, quadratic family, parameter, weight vector, and scalar decision whose pair is a saddle have a maximum envelope equal to their objective.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    θ :
    Θ
    α :
    s :
    ℝ
    hs :
    IsSaddle P Q θ α s
    Q.envelope P θ s = Q.objective θ α s
    Proof (Lean source)
    theorem Quadratics.envelope_eq_of_isSaddle (P : Polytope ι κ) (Q : Quadratics Θ ι) (θ : Θ) (α : EuclideanSpace ℝ ι) (s : ℝ) (hs : IsSaddle P Q θ α s) : Q.envelope P θ s = Q.objective θ α s := by apply le_antisymm · apply csSup_le (P.nonempty.image _) rintro y ⟨β, hβ, rfl⟩ exact hs.2.2 β hβ · exact Q.objective_le_envelope P θ s α hs.1
    Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.envelope_eq_of_isSaddle · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:201
  • isSaddle_at_envelope_le theorem — A fixed polytope, quadratic family, parameter, weight vector, known saddle decision, new decision, known saddle certificate, and envelope comparison give a saddle pair at the new decision.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    θ :
    Θ
    α :
    s t :
    ℝ
    hs :
    IsSaddle P Q θ α s
    hle :
    Q.envelope P θ t ≤ Q.envelope P θ s
    IsSaddle P Q θ α t
    Proof (Lean source)
    theorem Quadratics.isSaddle_at_envelope_le (P : Polytope ι κ) (Q : Quadratics Θ ι) (θ : Θ) (α : EuclideanSpace ℝ ι) (s t : ℝ) (hs : IsSaddle P Q θ α s) (hle : Q.envelope P θ t ≤ Q.envelope P θ s) : IsSaddle P Q θ α t := by have hts : Q.objective θ α t ≤ Q.objective θ α s := by calc Q.objective θ α t ≤ Q.envelope P θ t := Q.objective_le_envelope P θ t α hs.1 _ ≤ Q.envelope P θ s := hle _ = Q.objective θ α s := Q.envelope_eq_of_isSaddle P θ α s hs have heq : Q.objective θ α t = Q.objective θ α s := le_antisymm hts (hs.2.1 t) refine ⟨hs.1, ?_, ?_⟩ · intro u rw [heq] exact hs.2.1 u · intro β hβ calc Q.objective θ β t ≤ Q.envelope P θ t := Q.objective_le_envelope P θ t β hβ _ ≤ Q.objective θ α s := by rw [← Q.envelope_eq_of_isSaddle P θ α s hs] exact hle _ = Q.objective θ α t := heq.symm
    Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.isSaddle_at_envelope_le · Causalean/Mathlib/Optimization/QuadraticSaddle/Basic.lean:214
Continuity 1 core · 2 supporting This module transfers local compact-saddle continuity to the existing finite quadratic max-min value. ★ continuousAt_quadratic_value

Continuity of finite quadratic saddle values

This module transfers local compact-saddle continuity to the existing finite quadratic max-min value. It requires joint continuity of the quadratic objective only on an open neighborhood and a common compact bound for locally attaining saddle scalar decisions.

theorem continuousAt_quadratic_value reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle

A fixed polytope, quadratic family, compact nonempty scalar set, parameter, open parameter neighborhood, joint continuity of the quadratic objective on that neighborhood, and eventually attaining saddle pairs whose scalar decisions lie in the compact set give a continuous existing quadratic max-min value at the parameter.

Formal statement
Θ :
Type u_1
shared
ι :
Type u_2
shared
κ :
Type u_3
shared
P :
Polytope ι κ
Q :
K :
Set ℝ
hK :
hKne :
K.Nonempty
θ₀ :
Θ
U :
Set Θ
hUopen :
hθU :
θ₀ ∈ U
hobj :
ContinuousOn (fun x : (Θ × ℝ) × EuclideanSpace ℝ ι => Q.objective x.1.1 x.2 x.1.2) {x | x.1.1 ∈ U}
hatt :
∀ᶠ θ in nhds θ₀, ∃ α : EuclideanSpace ℝ ι, ∃ t ∈ K, IsSaddle P Q θ α t
ContinuousAt (value P Q) θ₀
Proof (Lean source)
theorem continuousAt_quadratic_value (P : Polytope ι κ) (Q : Quadratics Θ ι) (K : Set ℝ) (hK : IsCompact K) (hKne : K.Nonempty) (θ₀ : Θ) (U : Set Θ) (hUopen : IsOpen U) (hθU : θ₀ ∈ U) (hobj : ContinuousOn (fun x : (Θ × ℝ) × EuclideanSpace ℝ ι => Q.objective x.1.1 x.2 x.1.2) {x | x.1.1 ∈ U}) (hatt : ∀ᶠ θ in nhds θ₀, ∃ α : EuclideanSpace ℝ ι, ∃ t ∈ K, IsSaddle P Q θ α t) : ContinuousAt (value P Q) θ₀ := by have hatt' : ∀ᶠ θ in nhds θ₀, ∃ t ∈ K, ∀ u : ℝ, envelope P.weights Q.objective θ t ≤ envelope P.weights Q.objective θ u := by filter_upwards [hatt] with θ ⟨α, t, ht, hs⟩ exact ⟨t, ht, (quadratic_value_eq_envelope_min_of_isSaddle P Q θ α t hs).2⟩ have hcont := continuousAt_value_of_continuousOn P.weights P.compact P.nonempty Q.objective K hK hKne θ₀ U hUopen hθU hobj hatt' apply hcont.congr filter_upwards [hatt] with θ ⟨α, t, ht, hs⟩ exact (quadratic_value_eq_envelope_min_of_isSaddle P Q θ α t hs).1.symm
Causalean.Mathlib.Optimization.QuadraticSaddle.continuousAt_quadratic_value · Causalean/Mathlib/Optimization/QuadraticSaddle/Continuity.lean:55 · uses IsSaddle , Polytope , Quadratics , objective , value
2 supporting declarations (lemmas, instances)
  • quadratic_value_eq_envelope_min_of_isSaddle theorem — A fixed polytope, quadratic family, parameter, weight vector, scalar decision, and saddle certificate give the equality of the existing quadratic max-min value with the unrestricted envelope minimum and the global minimality of that scalar envelope value.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    θ :
    Θ
    α :
    t :
    ℝ
    hs :
    IsSaddle P Q θ α t
    conclusion 1
    value P Q θ = CompactSaddleValue.value P.weights Q.objective θ
    conclusion 2
    u :
    ℝ
    Q.envelope P θ t ≤ Q.envelope P θ u
    Proof (Lean source)
    theorem quadratic_value_eq_envelope_min_of_isSaddle (P : Polytope ι κ) (Q : Quadratics Θ ι) (θ : Θ) (α : EuclideanSpace ℝ ι) (t : ℝ) (hs : IsSaddle P Q θ α t) : value P Q θ = CompactSaddleValue.value P.weights Q.objective θ ∧ ∀ u : ℝ, Q.envelope P θ t ≤ Q.envelope P θ u := by have hmin : ∀ u : ℝ, Q.envelope P θ t ≤ Q.envelope P θ u := by intro u calc Q.envelope P θ t = Q.objective θ α t := Q.envelope_eq_of_isSaddle P θ α t hs _ ≤ Q.objective θ α u := hs.2.1 u _ ≤ Q.envelope P θ u := Q.objective_le_envelope P θ u α hs.1 have hleast : IsLeast ((fun u : ℝ => Q.envelope P θ u) '' univ) (Q.envelope P θ t) := by constructor · exact ⟨t, Set.mem_univ _, rfl⟩ · rintro y ⟨u, -, rfl⟩ exact hmin u have hgeneric : CompactSaddleValue.value P.weights Q.objective θ = Q.envelope P θ t := by exact hleast.csInf_eq constructor · exact (value_eq_of_isSaddle P Q θ α t hs).trans ((Q.envelope_eq_of_isSaddle P θ α t hs).symm.trans hgeneric.symm) · exact hmin
    Causalean.Mathlib.Optimization.QuadraticSaddle.quadratic_value_eq_envelope_min_of_isSaddle · Causalean/Mathlib/Optimization/QuadraticSaddle/Continuity.lean:24
  • continuousAt_inv_quadratic_value theorem — A fixed polytope, quadratic family, compact nonempty scalar set, parameter, open parameter neighborhood, joint continuity of the quadratic objective on that neighborhood, eventually attaining saddle pairs whose scalar decisions lie in the compact set, and a strictly positive existing quadratic max-min value at the parameter give a continuous reciprocal quadratic max-min value at that parameter.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    K :
    Set ℝ
    hK :
    hKne :
    K.Nonempty
    θ₀ :
    Θ
    U :
    Set Θ
    hUopen :
    hθU :
    θ₀ ∈ U
    hobj :
    ContinuousOn (fun x : (Θ × ℝ) × EuclideanSpace ℝ ι => Q.objective x.1.1 x.2 x.1.2) {x | x.1.1 ∈ U}
    hatt :
    ∀ᶠ θ in nhds θ₀, ∃ α : EuclideanSpace ℝ ι, ∃ t ∈ K, IsSaddle P Q θ α t
    hpos :
    0 < value P Q θ₀
    ContinuousAt (fun θ => (value P Q θ)⁻¹) θ₀
    Proof (Lean source)
    theorem continuousAt_inv_quadratic_value (P : Polytope ι κ) (Q : Quadratics Θ ι) (K : Set ℝ) (hK : IsCompact K) (hKne : K.Nonempty) (θ₀ : Θ) (U : Set Θ) (hUopen : IsOpen U) (hθU : θ₀ ∈ U) (hobj : ContinuousOn (fun x : (Θ × ℝ) × EuclideanSpace ℝ ι => Q.objective x.1.1 x.2 x.1.2) {x | x.1.1 ∈ U}) (hatt : ∀ᶠ θ in nhds θ₀, ∃ α : EuclideanSpace ℝ ι, ∃ t ∈ K, IsSaddle P Q θ α t) (hpos : 0 < value P Q θ₀) : ContinuousAt (fun θ => (value P Q θ)⁻¹) θ₀ := by exact (continuousAt_quadratic_value P Q K hK hKne θ₀ U hUopen hθU hobj hatt).inv₀ (ne_of_gt hpos)
    Causalean.Mathlib.Optimization.QuadraticSaddle.continuousAt_inv_quadratic_value · Causalean/Mathlib/Optimization/QuadraticSaddle/Continuity.lean:81
Measurability 1 core · 1 supporting This module proves that the finite-quadratic saddle relation and the attained max-min value are Borel on every parameter domain of pointwise saddle attainment; the domain itself need not be measurable. ★ measurable_value_on

Borel value and saddle relations for finite quadratics

This module proves that the finite-quadratic saddle relation and the attained max-min value are Borel on every parameter domain of pointwise saddle attainment; the domain itself need not be measurable.

theorem measurable_value_on reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle

A fixed polytope, quadratic family, parameter domain, and pointwise saddle-attainment certificate give a Borel max-min value on that domain.

Formal statement
Θ :
Type u_1
shared
ι :
Type u_2
shared
κ :
Type u_3
shared
P :
Polytope ι κ
Q :
D :
Set Θ
hAttains :
∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α t
Measurable (fun θ : D => value P Q θ.1)
Proof (Lean source)
theorem measurable_value_on (P : Polytope ι κ) (Q : Quadratics Θ ι) (D : Set Θ) (hAttains : ∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α t) : Measurable (fun θ : D => value P Q θ.1) := by classical letI : Nonempty P.weights := Set.nonempty_coe_sort.mpr P.nonempty let d : ℕ → P.weights := TopologicalSpace.denseSeq P.weights have hd : Dense (range d) := by simpa only [DenseRange, d] using TopologicalSpace.denseRange_denseSeq P.weights let M : Θ → ℝ → ℝ := fun θ t => sSup ((fun β : EuclideanSpace ℝ ι => Q.objective θ β t) '' P.weights) have hM : Measurable (fun x : Θ × ℝ => M x.1 x.2) := by have hn : Measurable (fun x : Θ × ℝ => ⨆ n : ℕ, Q.objective x.1 (d n).1 x.2) := by apply Measurable.iSup intro n exact Q.measurable_objective.comp (measurable_fst.prodMk (measurable_const.prodMk measurable_snd)) convert hn using 1 ext x change sSup ((fun β : EuclideanSpace ℝ ι => Q.objective x.1 β x.2) '' P.weights) = ⨆ n : ℕ, Q.objective x.1 (d n).1 x.2 rw [sSup_image'] have hc : Continuous (fun β : P.weights => Q.objective x.1 β.1 x.2) := by unfold Quadratics.objective fun_prop rw [← hd.ciSup' hc] have he : Surjective (fun n : ℕ => (⟨d n, Set.mem_range_self n⟩ : range d)) := by rintro ⟨z, n, rfl⟩ exact ⟨n, rfl⟩ exact (he.iSup_comp (fun s : range d => Q.objective x.1 s.1.1 x.2)).symm have hMc : ∀ θ : Θ, Continuous (M θ) := by intro θ apply P.compact.continuous_sSup change Continuous (fun p : ℝ × EuclideanSpace ℝ ι => Q.objective θ p.2 p.1) unfold Quadratics.objective fun_prop have hEq : ∀ θ : D, (⨅ q : ℚ, M θ.1 q) = value P Q θ.1 := by intro θ obtain ⟨α, t, hs⟩ := hAttains θ.1 θ.2 have hc : Continuous (fun β : EuclideanSpace ℝ ι => Q.objective θ.1 β t) := by unfold Quadratics.objective fun_prop have hbdd : BddAbove ((fun β : EuclideanSpace ℝ ι => Q.objective θ.1 β t) '' P.weights) := P.compact.bddAbove_image hc.continuousOn have hMt : M θ.1 t = Q.objective θ.1 α t := by apply le_antisymm · apply csSup_le (P.nonempty.image _) rintro y ⟨β, hβ, rfl⟩ exact hs.2.2 β hβ · exact le_csSup hbdd ⟨α, hs.1, rfl⟩ have hmin : IsMinOn (M θ.1) univ t := by intro u hu have hcu : Continuous (fun β : EuclideanSpace ℝ ι => Q.objective θ.1 β u) := by unfold Quadratics.objective fun_prop have hbu : BddAbove ((fun β : EuclideanSpace ℝ ι => Q.objective θ.1 β u) '' P.weights) := P.compact.bddAbove_image hcu.continuousOn rw [hMt] exact (hs.2.1 u).trans (le_csSup hbu ⟨α, hs.1, rfl⟩) have hr : Dense (range (fun q : ℚ => (q : ℝ))) := Rat.denseRange_cast have hi := hr.ciInf' (hMc θ.1) have he : Surjective (fun q : ℚ => (⟨(q : ℝ), Set.mem_range_self q⟩ : range (fun q : ℚ => (q : ℝ)))) := by rintro ⟨z, q, rfl⟩ exact ⟨q, rfl⟩ rw [← he.iInf_comp (fun s : range (fun q : ℚ => (q : ℝ)) => M θ.1 s.1)] at hi change (⨅ q : ℚ, M θ.1 (q : ℝ)) = ⨅ u : ℝ, M θ.1 u at hi rw [hi] have hlower : BddBelow (range (M θ.1)) := by refine ⟨M θ.1 t, ?_⟩ rintro y ⟨u, rfl⟩ exact hmin (Set.mem_univ u) have hminEq : (⨅ u : ℝ, M θ.1 u) = M θ.1 t := le_antisymm (ciInf_le hlower t) (le_ciInf fun u => hmin (Set.mem_univ u)) rw [hminEq, hMt, value_eq_of_isSaddle P Q θ.1 α t hs] have hresult : Measurable (fun θ : D => ⨅ q : ℚ, M θ.1 q) := by apply Measurable.iInf intro q have hp : Measurable (fun θ : D => ((θ.1, (q : ℝ)) : Θ × ℝ)) := measurable_subtype_coe.prodMk measurable_const simpa only [Function.comp_def] using hM.comp hp convert hresult using 1 ext θ exact (hEq θ).symm
Causalean.Mathlib.Optimization.QuadraticSaddle.measurable_value_on · Causalean/Mathlib/Optimization/QuadraticSaddle/Measurability.lean:88 · uses IsSaddle , Polytope , Quadratics , value
1 supporting declaration (lemmas, instances)
  • measurableSet_isSaddle theorem — A fixed polytope and quadratic family have a Borel saddle relation in the parameter, finite weight vector, and scalar decision, including tied saddles and zero quadratic coefficients.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    MeasurableSet {x : Θ × (EuclideanSpace ℝ ι × ℝ) | IsSaddle P Q x.1 x.2.1 x.2.2}
    Proof (Lean source)
    theorem measurableSet_isSaddle (P : Polytope ι κ) (Q : Quadratics Θ ι) : MeasurableSet {x : Θ × (EuclideanSpace ℝ ι × ℝ) | IsSaddle P Q x.1 x.2.1 x.2.2} := by classical letI : Nonempty P.weights := Set.nonempty_coe_sort.mpr P.nonempty let d : ℕ → P.weights := TopologicalSpace.denseSeq P.weights have hd : Dense (range d) := by simpa only [DenseRange, d] using TopologicalSpace.denseRange_denseSeq P.weights have hobj := Q.measurable_objective have hfeas : MeasurableSet {x : Θ × (EuclideanSpace ℝ ι × ℝ) | x.2.1 ∈ P.weights} := P.measurableSet_weights.preimage (measurable_fst.comp measurable_snd) have hrat : ∀ q : ℚ, MeasurableSet {x : Θ × (EuclideanSpace ℝ ι × ℝ) | Q.objective x.1 x.2.1 x.2.2 ≤ Q.objective x.1 x.2.1 (q : ℝ)} := by intro q apply measurableSet_le hobj exact hobj.comp (measurable_fst.prodMk ((measurable_fst.comp measurable_snd).prodMk measurable_const)) have hwt : ∀ n : ℕ, MeasurableSet {x : Θ × (EuclideanSpace ℝ ι × ℝ) | Q.objective x.1 (d n).1 x.2.2 ≤ Q.objective x.1 x.2.1 x.2.2} := by intro n apply measurableSet_le · exact hobj.comp (measurable_fst.prodMk (measurable_const.prodMk (measurable_snd.comp measurable_snd))) · exact hobj have heq : {x : Θ × (EuclideanSpace ℝ ι × ℝ) | IsSaddle P Q x.1 x.2.1 x.2.2} = {x | x.2.1 ∈ P.weights} ∩ ( (⋂ q : ℚ, {x | Q.objective x.1 x.2.1 x.2.2 ≤ Q.objective x.1 x.2.1 (q : ℝ)}) ∩ (⋂ n : ℕ, {x | Q.objective x.1 (d n).1 x.2.2 ≤ Q.objective x.1 x.2.1 x.2.2})) := by ext x simp only [Set.mem_setOf_eq, Set.mem_inter_iff, Set.mem_iInter, IsSaddle] constructor · rintro ⟨ha, ht, hb⟩ exact ⟨ha, fun q => ht q, fun n => hb (d n).1 (d n).2⟩ · rintro ⟨ha, ht, hb⟩ refine ⟨ha, ?_, ?_⟩ · have hc : Continuous (fun u : ℝ => Q.objective x.1 x.2.1 u) := by unfold Quadratics.objective fun_prop have hden : Dense (range (fun q : ℚ => (q : ℝ))) := Rat.denseRange_cast have hbound := hden.lowerBounds_image hc have hm : Q.objective x.1 x.2.1 x.2.2 ∈ lowerBounds ((fun u : ℝ => Q.objective x.1 x.2.1 u) '' range (fun q : ℚ => (q : ℝ))) := by rintro y ⟨u, ⟨q, rfl⟩, rfl⟩ exact ht q rw [hbound] at hm exact fun u => hm (Set.mem_range_self u) · have hc : Continuous (fun β : P.weights => Q.objective x.1 β.1 x.2.2) := by unfold Quadratics.objective fun_prop have hbound := hd.upperBounds_image hc have hm : Q.objective x.1 x.2.1 x.2.2 ∈ upperBounds ((fun β : P.weights => Q.objective x.1 β.1 x.2.2) '' range d) := by rintro y ⟨β, ⟨n, rfl⟩, rfl⟩ exact hb n rw [hbound] at hm intro β hβ exact hm ⟨⟨β, hβ⟩, rfl⟩ rw [heq] exact hfeas.inter ((MeasurableSet.iInter hrat).inter (MeasurableSet.iInter hwt))
    Causalean.Mathlib.Optimization.QuadraticSaddle.measurableSet_isSaddle · Causalean/Mathlib/Optimization/QuadraticSaddle/Measurability.lean:19
Selection 2 core · 7 supporting This module derives Borel scalar, weight, and total fallback selections for attained finite quadratic saddle problems, including ties and degenerate quadratic coefficients. ★ exists_measurable_saddle_with_fallback

Borel selection for finite quadratic saddle problems

This module derives Borel scalar, weight, and total fallback selections for attained finite quadratic saddle problems, including ties and degenerate quadratic coefficients.

def slope reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics

A quadratic family, parameter, weight vector, and scalar decision determine the scalar slope of the weighted objective: the sum over coordinates of the weight times 2·a·t + b, the derivative of the weighted quadratic objective in the scalar decision.

Definition (Lean source)
Θ :
Type u_1
shared
ι :
Type u_2
shared
Q :
θ :
Θ
α :
t :
ℝ
slope Q θ α t :
ℝ
∑ i, α i * (2 * Q.a i θ * t + Q.b i θ)
Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.slope · Causalean/Mathlib/Optimization/QuadraticSaddle/Selection.lean:21 · uses Quadratics
theorem exists_measurable_saddle_with_fallback reviewed
Causalean.Mathlib.Optimization.QuadraticSaddle

A fixed polytope, quadratic family, Borel parameter domain, pointwise saddle-attainment certificate, and fallback triple have a total Borel policy that equals the fallback off the domain and returns a saddle and its max-min value on the domain.

Formal statement
Θ :
Type u_1
shared
ι :
Type u_2
shared
κ :
Type u_3
shared
P :
Polytope ι κ
Q :
D :
Set Θ
hD :
hAttains :
∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α t
fallback :
EuclideanSpace ℝ ι × ℝ × ℝ
∃ policy : Θ → EuclideanSpace ℝ ι × ℝ × ℝ,
Measurable policy
conclusion 1
θ ∉ D :
policy θ = fallback
conclusion 2
θ ∈ D :
IsSaddle P Q θ (policy θ).1 (policy θ).2.1
(policy θ).2.2 = Q.objective θ (policy θ).1 (policy θ).2.1
(policy θ).2.2 = value P Q θ
Proof (Lean source)
theorem exists_measurable_saddle_with_fallback (P : Polytope ι κ) (Q : Quadratics Θ ι) (D : Set Θ) (hD : MeasurableSet D) (hAttains : ∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α t) (fallback : EuclideanSpace ℝ ι × ℝ × ℝ) : ∃ policy : Θ → EuclideanSpace ℝ ι × ℝ × ℝ, Measurable policy ∧ (∀ θ ∉ D, policy θ = fallback) ∧ (∀ θ ∈ D, IsSaddle P Q θ (policy θ).1 (policy θ).2.1 ∧ (policy θ).2.2 = Q.objective θ (policy θ).1 (policy θ).2.1 ∧ (policy θ).2.2 = value P Q θ) := by classical obtain ⟨α, t, hα, ht, hs⟩ := exists_measurable_saddle_on P Q D hD hAttains let policy : Θ → EuclideanSpace ℝ ι × ℝ × ℝ := fun θ => if hθ : θ ∈ D then (α ⟨θ, hθ⟩, t ⟨θ, hθ⟩, value P Q θ) else fallback have hv : Measurable (fun θ : D => value P Q θ.1) := measurable_value_on P Q D hAttains have hp : Measurable policy := by change Measurable (fun θ : Θ => if hθ : θ ∈ D then (α ⟨θ, hθ⟩, t ⟨θ, hθ⟩, value P Q θ) else fallback) exact Measurable.dite (hα.prodMk (ht.prodMk hv)) measurable_const hD refine ⟨policy, hp, ?_, ?_⟩ · intro θ hθ simp [policy, hθ] · intro θ hθ have h := hs (⟨θ, hθ⟩ : D) have heq := value_eq_of_isSaddle P Q θ (α ⟨θ, hθ⟩) (t ⟨θ, hθ⟩) h simpa [policy, hθ] using intro h heq
Causalean.Mathlib.Optimization.QuadraticSaddle.exists_measurable_saddle_with_fallback · Causalean/Mathlib/Optimization/QuadraticSaddle/Selection.lean:273 · uses IsSaddle , Polytope , Quadratics , objective , value
7 supporting declarations (lemmas, instances)
  • measurable_slope theorem — A quadratic family has a jointly Borel scalar slope in the parameter, finite weights, and scalar decision.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    Q :
    Measurable (fun x : Θ × (EuclideanSpace ℝ ι × ℝ) => Q.slope x.1 x.2.1 x.2.2)
    Proof (Lean source)
    theorem Quadratics.measurable_slope (Q : Quadratics Θ ι) : Measurable (fun x : Θ × (EuclideanSpace ℝ ι × ℝ) => Q.slope x.1 x.2.1 x.2.2) := by unfold Quadratics.slope apply Finset.measurable_sum intro i hi have hθ : Measurable (fun x : Θ × (EuclideanSpace ℝ ι × ℝ) => x.1) := measurable_fst have hα : Measurable (fun x : Θ × (EuclideanSpace ℝ ι × ℝ) => x.2.1 i) := (EuclideanSpace.proj (𝕜 := ℝ) i).continuous.measurable.comp (measurable_fst.comp measurable_snd) have ht : Measurable (fun x : Θ × (EuclideanSpace ℝ ι × ℝ) => x.2.2) := measurable_snd.comp measurable_snd exact hα.mul ((((measurable_const.mul ((Q.measurable_a i).comp hθ)).mul ht)).add ((Q.measurable_b i).comp hθ))
    Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.measurable_slope · Causalean/Mathlib/Optimization/QuadraticSaddle/Selection.lean:29
  • continuous_slope_weight theorem — A quadratic family, parameter, and scalar decision have a scalar slope continuous in the weight vector.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    Q :
    θ :
    Θ
    t :
    ℝ
    Continuous (fun α : EuclideanSpace ℝ ι => Q.slope θ α t)
    Proof (Lean source)
    theorem Quadratics.continuous_slope_weight (Q : Quadratics Θ ι) (θ : Θ) (t : ℝ) : Continuous (fun α : EuclideanSpace ℝ ι => Q.slope θ α t) := by unfold Quadratics.slope fun_prop
    Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.continuous_slope_weight · Causalean/Mathlib/Optimization/QuadraticSaddle/Selection.lean:47
  • slope_eq_zero_of_global_min theorem — A quadratic family, parameter, weight vector, and scalar decision with a global scalar minimum have zero scalar slope.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    Q :
    θ :
    Θ
    α :
    t :
    ℝ
    hmin :
    ∀ u : ℝ, Q.objective θ α t ≤ Q.objective θ α u
    Q.slope θ α t = 0
    Proof (Lean source)
    theorem Quadratics.slope_eq_zero_of_global_min (Q : Quadratics Θ ι) (θ : Θ) (α : EuclideanSpace ℝ ι) (t : ℝ) (hmin : ∀ u : ℝ, Q.objective θ α t ≤ Q.objective θ α u) : Q.slope θ α t = 0 := by have hd : HasDerivAt (fun u => Q.objective θ α u) (Q.slope θ α t) t := by unfold Quadratics.objective Quadratics.slope apply HasDerivAt.fun_sum intro i hi convert (((((hasDerivAt_id t).pow 2).const_mul (Q.a i θ)).add ((hasDerivAt_id t).const_mul (Q.b i θ))).add_const (Q.c i θ)).const_mul (α i) using 1 <;> first | rfl | (simp only [id_eq, Nat.reduceSub, pow_one]; ring) have hm : IsLocalMin (fun u => Q.objective θ α u) t := isLocalMinOn_univ_iff.mp (((isMinOn_univ_iff).2 hmin).localize) exact hm.hasDerivAt_eq_zero hd
    Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.slope_eq_zero_of_global_min · Causalean/Mathlib/Optimization/QuadraticSaddle/Selection.lean:54
  • global_min_of_slope_eq_zero theorem — A fixed polytope, quadratic family, parameter, weight vector, and scalar decision with feasible nonnegative weights and zero scalar slope have a global scalar minimum, including degenerate quadratic coefficients.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    θ :
    Θ
    α :
    t :
    ℝ
    hα :
    α ∈ P.weights
    hz :
    Q.slope θ α t = 0
    u :
    ℝ
    Q.objective θ α t ≤ Q.objective θ α u
    Proof (Lean source)
    theorem Quadratics.global_min_of_slope_eq_zero (P : Polytope ι κ) (Q : Quadratics Θ ι) (θ : Θ) (α : EuclideanSpace ℝ ι) (t : ℝ) (hα : α ∈ P.weights) (hz : Q.slope θ α t = 0) : ∀ u : ℝ, Q.objective θ α t ≤ Q.objective θ α u := by intro u have hcoef : 0 ≤ ∑ i, α i * Q.a i θ := by apply Finset.sum_nonneg intro i hi exact mul_nonneg (hα.1 i) (Q.nonneg_a θ i) have hdiff : Q.objective θ α u - Q.objective θ α t = (u - t) ^ 2 * (∑ i, α i * Q.a i θ) + (u - t) * Q.slope θ α t := by calc Q.objective θ α u - Q.objective θ α t = ∑ i, (α i * (Q.a i θ * u ^ 2 + Q.b i θ * u + Q.c i θ) - α i * (Q.a i θ * t ^ 2 + Q.b i θ * t + Q.c i θ)) := by simp [Quadratics.objective, Finset.sum_sub_distrib] _ = ∑ i, ((u - t) ^ 2 * (α i * Q.a i θ) + (u - t) * (α i * (2 * Q.a i θ * t + Q.b i θ))) := by apply Finset.sum_congr rfl intro i hi ring _ = (u - t) ^ 2 * (∑ i, α i * Q.a i θ) + (u - t) * Q.slope θ α t := by simp only [Quadratics.slope, Finset.sum_add_distrib, Finset.mul_sum] rw [hz, mul_zero, add_zero] at hdiff nlinarith [sq_nonneg (u - t), mul_nonneg (sq_nonneg (u - t)) hcoef]
    Causalean.Mathlib.Optimization.QuadraticSaddle.Quadratics.global_min_of_slope_eq_zero · Causalean/Mathlib/Optimization/QuadraticSaddle/Selection.lean:71
  • exists_measurable_envelope_minimizer_on theorem — A fixed polytope, quadratic family, Borel parameter domain, and pointwise saddle-attainment certificate have a Borel scalar decision that minimizes the maximum envelope and attains the max-min value.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    D :
    Set Θ
    hD :
    hAttains :
    ∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α t
    ∃ t : D → ℝ,
    conclusion 1
    θ :
    D
    Q.envelope P θ.1 (t θ) = value P Q θ.1
    Proof (Lean source)
    theorem exists_measurable_envelope_minimizer_on (P : Polytope ι κ) (Q : Quadratics Θ ι) (D : Set Θ) (hD : MeasurableSet D) (hAttains : ∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α t) : ∃ t : D → ℝ, Measurable t ∧ ∀ θ : D, Q.envelope P θ.1 (t θ) = value P Q θ.1 := by classical letI : StandardBorelSpace D := hD.standardBorel let K : ℕ → Set (EuclideanSpace ℝ (Fin 1)) := fun n => closedBall 0 (n : ℝ) have hK (n : ℕ) : IsCompact (K n) := isCompact_closedBall _ _ have hKne (n : ℕ) : (K n).Nonempty := ⟨0, Metric.mem_closedBall_self (by positivity)⟩ let f : D × EuclideanSpace ℝ (Fin 1) → ℝ := fun x => Q.envelope P x.1.1 (x.2 0) have hf : Measurable f := by change Measurable ((fun z : Θ × ℝ => Q.envelope P z.1 z.2) ∘ (fun x : D × EuclideanSpace ℝ (Fin 1) => (x.1.1, x.2 0))) have hcoord : Measurable (fun y : EuclideanSpace ℝ (Fin 1) => y 0) := (PiLp.continuous_apply 2 (fun _ : Fin 1 => ℝ) 0).measurable have hpair : Measurable (fun x : D × EuclideanSpace ℝ (Fin 1) => ((x.1.1, x.2 0) : Θ × ℝ)) := (measurable_subtype_coe.comp measurable_fst).prodMk (hcoord.comp measurable_snd) exact (Q.measurable_envelope P).comp hpair have hfc' (n : ℕ) (x : D) : ContinuousOn (fun y => f (x, y)) (K n) := by exact (Q.continuous_envelope P x.1).comp (PiLp.continuous_apply 2 (fun _ : Fin 1 => ℝ) 0) |>.continuousOn have hsel (n : ℕ) : ∃ π : D → EuclideanSpace ℝ (Fin 1), Measurable π ∧ ∀ x, π x ∈ K n ∧ ∀ y ∈ K n, f (x, π x) ≤ f (x, y) := borelMeasurable_compact_argmin_selector (K n) (hK n) (hKne n) f hf (hfc' n) choose π hπm hπ using hsel let v : D → ℝ := fun x => value P Q x.1 let g : ℕ → D → ℝ := fun n x => (π n x) 0 have hg (n : ℕ) : Measurable (g n) := (PiLp.continuous_apply 2 (fun _ : Fin 1 => ℝ) 0).measurable.comp (hπm n) have hfg (n : ℕ) : Measurable (fun x : D => Q.envelope P x.1 (g n x)) := by change Measurable ((fun z : Θ × ℝ => Q.envelope P z.1 z.2) ∘ (fun x : D => (x.1, g n x))) exact (Q.measurable_envelope P).comp (measurable_subtype_coe.prodMk (hg n)) have hv : Measurable v := measurable_value_on P Q D hAttains let p : D → ℕ → Prop := fun x n => Q.envelope P x.1 (g n x) = v x have hpmeas (n : ℕ) : MeasurableSet {x : D | p x n} := by change MeasurableSet {x : D | Q.envelope P x.1 (g n x) = v x} exact measurableSet_eq_fun (hfg n) hv have hmin (x : D) (s : ℝ) (hs : ∃ α, IsSaddle P Q x.1 α s) : ∀ t, v x ≤ Q.envelope P x.1 t := by obtain ⟨α, hα⟩ := hs intro t calc v x = Q.objective x.1 α s := value_eq_of_isSaddle P Q x.1 α s hα _ ≤ Q.objective x.1 α t := hα.2.1 t _ ≤ Q.envelope P x.1 t := Q.objective_le_envelope P x.1 t α hα.1 have hp (x : D) : ∃ n, p x n := by obtain ⟨α, s, hs⟩ := hAttains x.1 x.2 obtain ⟨n, hn⟩ : ∃ n : ℕ, ‖s‖ ≤ (n : ℝ) := exists_nat_ge ‖s‖ have hsingle : single (0 : Fin 1) s ∈ K n := by simpa [K, Metric.mem_closedBall, dist_zero_right, EuclideanSpace.norm_single] using hn have heval : (single (0 : Fin 1) s) 0 = s := by simp refine ⟨n, ?_⟩ have hle := (hπ n x).2 (single 0 s) hsingle have hlow := hmin x s ⟨α, hs⟩ (g n x) have hval : Q.envelope P x.1 s = v x := by rw [Q.envelope_eq_of_isSaddle P x.1 α s hs, ← value_eq_of_isSaddle P Q x.1 α s hs] exact le_antisymm (by simpa [f, g, heval, hval] using hle) hlow let n : D → ℕ := fun x => find (hp x) have hn : Measurable n := measurable_find hp hpmeas refine ⟨fun x => g (n x) x, ?_, ?_⟩ · have hge : Measurable (fun z : D × ℕ => g z.2 z.1) := measurable_from_prod_countable_left (fun k => hg k) exact hge.comp (measurable_id.prodMk hn) · intro x exact Nat.find_spec (hp x)
    Causalean.Mathlib.Optimization.QuadraticSaddle.exists_measurable_envelope_minimizer_on · Causalean/Mathlib/Optimization/QuadraticSaddle/Selection.lean:104
  • exists_measurable_saddle_weight_on theorem — A fixed polytope, quadratic family, Borel parameter domain, pointwise saddle-attainment certificate, Borel scalar decision, and envelope-value identity have a Borel feasible weight forming a saddle with that decision.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    D :
    Set Θ
    hD :
    hAttains :
    ∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α t
    t :
    D → ℝ
    ht :
    hEq :
    ∀ θ : D, Q.envelope P θ.1 (t θ) = value P Q θ.1
    ∃ α : D → EuclideanSpace ℝ ι,
    conclusion 1
    θ :
    D
    IsSaddle P Q θ.1 (α θ) (t θ)
    Proof (Lean source)
    theorem exists_measurable_saddle_weight_on (P : Polytope ι κ) (Q : Quadratics Θ ι) (D : Set Θ) (hD : MeasurableSet D) (hAttains : ∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α t) (t : D → ℝ) (ht : Measurable t) (hEq : ∀ θ : D, Q.envelope P θ.1 (t θ) = value P Q θ.1) : ∃ α : D → EuclideanSpace ℝ ι, Measurable α ∧ ∀ θ : D, IsSaddle P Q θ.1 (α θ) (t θ) := by classical haveI : StandardBorelSpace D := hD.standardBorel let f : D × EuclideanSpace ℝ ι → ℝ := fun x => |Q.objective x.1.1 x.2 (t x.1) - value P Q x.1.1| + |Q.slope x.1.1 x.2 (t x.1)| have harg : Measurable (fun x : D × EuclideanSpace ℝ ι => ((x.1.1, (x.2, t x.1)) : Θ × (EuclideanSpace ℝ ι × ℝ))) := (measurable_subtype_coe.comp measurable_fst).prodMk (measurable_snd.prodMk (ht.comp measurable_fst)) have hv : Measurable (fun x : D × EuclideanSpace ℝ ι => value P Q x.1.1) := (measurable_value_on P Q D hAttains).comp measurable_fst have hf : Measurable f := ((Q.measurable_objective.comp harg).sub hv).abs.add ((Q.measurable_slope.comp harg).abs) have hfc (x : D) : ContinuousOn (fun α => f (x, α)) P.weights := by have ho : Continuous (fun α : EuclideanSpace ℝ ι => Q.objective x.1 α (t x)) := by unfold Quadratics.objective fun_prop have hs := Q.continuous_slope_weight x.1 (t x) convert ((ho.sub (continuous_const : Continuous (fun _ : EuclideanSpace ℝ ι => value P Q x.1))).abs.add hs.abs).continuousOn using 1 ext α rfl obtain ⟨α, hαm, hαmin⟩ := borelMeasurable_compact_argmin_selector P.weights P.compact P.nonempty f hf hfc refine ⟨α, hαm, ?_⟩ intro x obtain ⟨β, s, hβs⟩ := hAttains x.1 x.2 have hβt : IsSaddle P Q x.1 β (t x) := by apply Q.isSaddle_at_envelope_le P x.1 β s (t x) hβs rw [hEq x, Q.envelope_eq_of_isSaddle P x.1 β s hβs] exact (value_eq_of_isSaddle P Q x.1 β s hβs).le have hβval : Q.objective x.1 β (t x) = value P Q x.1 := (value_eq_of_isSaddle P Q x.1 β (t x) hβt).symm have hβslope : Q.slope x.1 β (t x) = 0 := Q.slope_eq_zero_of_global_min x.1 β (t x) hβt.2.1 have hfβ : f (x, β) = 0 := by simp [f, hβval, hβslope] have hfα : f (x, α x) = 0 := by have hle := (hαmin x).2 β hβt.1 have hnonneg : 0 ≤ f (x, α x) := add_nonneg (abs_nonneg _) (abs_nonneg _) rw [hfβ] at hle exact le_antisymm hle hnonneg have hzero : Q.objective x.1 (α x) (t x) = value P Q x.1 ∧ Q.slope x.1 (α x) (t x) = 0 := by have hp : |Q.objective x.1 (α x) (t x) - value P Q x.1| = 0 ∧ |Q.slope x.1 (α x) (t x)| = 0 := (add_eq_zero_iff_of_nonneg (abs_nonneg _) (abs_nonneg _)).mp hfα exact ⟨sub_eq_zero.mp (abs_eq_zero.mp hp.1), abs_eq_zero.mp hp.2⟩ refine ⟨(hαmin x).1, Q.global_min_of_slope_eq_zero P x.1 (α x) (t x) (hαmin x).1 hzero.2, ?_⟩ intro γ hγ calc Q.objective x.1 γ (t x) ≤ Q.envelope P x.1 (t x) := Q.objective_le_envelope P x.1 (t x) γ hγ _ = value P Q x.1 := hEq x _ = Q.objective x.1 (α x) (t x) := hzero.1.symm
    Causalean.Mathlib.Optimization.QuadraticSaddle.exists_measurable_saddle_weight_on · Causalean/Mathlib/Optimization/QuadraticSaddle/Selection.lean:186
  • exists_measurable_saddle_on theorem — A fixed polytope, quadratic family, Borel parameter domain, and pointwise saddle-attainment certificate have Borel saddle weights and scalar decisions on that domain.
    Θ :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    κ :
    Type u_3
    shared
    P :
    Polytope ι κ
    Q :
    D :
    Set Θ
    hD :
    hAttains :
    ∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α t
    ∃ α : D → EuclideanSpace ℝ ι, ∃ t : D → ℝ,
    conclusion 1
    θ :
    D
    IsSaddle P Q θ.1 (α θ) (t θ)
    Proof (Lean source)
    theorem exists_measurable_saddle_on (P : Polytope ι κ) (Q : Quadratics Θ ι) (D : Set Θ) (hD : MeasurableSet D) (hAttains : ∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α t) : ∃ α : D → EuclideanSpace ℝ ι, ∃ t : D → ℝ, Measurable α ∧ Measurable t ∧ ∀ θ : D, IsSaddle P Q θ.1 (α θ) (t θ) := by obtain ⟨t, ht, hEq⟩ := exists_measurable_envelope_minimizer_on P Q D hD hAttains obtain ⟨α, hα, hs⟩ := exists_measurable_saddle_weight_on P Q D hD hAttains t ht hEq exact ⟨α, t, hα, ht, hs⟩
    Causalean.Mathlib.Optimization.QuadraticSaddle.exists_measurable_saddle_on · Causalean/Mathlib/Optimization/QuadraticSaddle/Selection.lean:257