Mathlib.Optimization.QuadraticSaddle
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.
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)
A fixed compact polytope has a feasible weight set consisting of its nonnegative vectors that satisfy every defining linear equality.
Definition (Lean source)
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 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)
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)
A fixed polytope, quadratic family, and parameter determine the real max-min value, the supremum of all attained weighted-quadratic minima.
Definition (Lean source)
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
Proof (Lean source)
A fixed polytope, quadratic family, parameter, and scalar decision determine the maximum envelope obtained by maximizing the objective over feasible weights.
Definition (Lean source)
8 supporting declarations (lemmas, instances)
-
measurableSet_weightstheorem — The feasible weight set of a fixed compact polytope is Borel.hypothesesconclusionMeasurableSet P.weightsProof (Lean source)
theorem Polytope.measurableSet_weights (P : Polytope ι κ) : MeasurableSet P.weights := by exact P.compact.measurableSet -
measurable_objectivetheorem — A quadratic family has a jointly Borel quadratic objective in the parameter, finite weight vector, and scalar decision.hypothesesconclusionMeasurable (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θ)) -
value_eq_of_isSaddletheorem — 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.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιθ :Θα :EuclideanSpace ℝ ιt :ℝh :IsSaddle P Q θ α tconclusionvalue P Q θ = Q.objective θ α tProof (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) -
measurable_envelopetheorem — A fixed polytope and quadratic family have a jointly Borel maximum envelope in the parameter and scalar decision.hypothesesconclusionMeasurable (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 -
continuous_envelopetheorem — A fixed polytope, quadratic family, and parameter have a continuous maximum envelope as a function of the scalar decision.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιθ :ΘconclusionContinuous (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 -
objective_le_envelopetheorem — A fixed polytope, quadratic family, parameter, scalar decision, and feasible weight have an objective no larger than the maximum envelope.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιθ :Θt :ℝβ :EuclideanSpace ℝ ιhβ :β ∈ P.weightsconclusionQ.objective θ β t ≤ Q.envelope P θ tProof (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⟩ -
envelope_eq_of_isSaddletheorem — A fixed polytope, quadratic family, parameter, weight vector, and scalar decision whose pair is a saddle have a maximum envelope equal to their objective.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιθ :Θα :EuclideanSpace ℝ ιs :ℝhs :IsSaddle P Q θ α sconclusionQ.envelope P θ s = Q.objective θ α sProof (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 -
isSaddle_at_envelope_letheorem — 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.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιθ :Θα :EuclideanSpace ℝ ιs t :ℝhs :IsSaddle P Q θ α shle :Q.envelope P θ t ≤ Q.envelope P θ sconclusionIsSaddle P Q θ α tProof (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
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.
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
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
quadratic_value_eq_envelope_min_of_isSaddletheorem — 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.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιθ :Θα :EuclideanSpace ℝ ιt :ℝhs :IsSaddle P Q θ α tconclusionconclusion 1value P Q θ = CompactSaddleValue.value P.weights Q.objective θconclusion 2u :ℝQ.envelope P θ t ≤ Q.envelope P θ uProof (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 -
continuousAt_inv_quadratic_valuetheorem — 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.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιK :Set ℝhK :hKne :K.Nonemptyθ₀ :ΘU :Set ΘhUopen :IsOpen UhθU :θ₀ ∈ Uhobj :ContinuousOn (fun x : (Θ × ℝ) × EuclideanSpace ℝ ι => Q.objective x.1.1 x.2 x.1.2) {x | x.1.1 ∈ U}hatt :hpos :0 < value P Q θ₀conclusionContinuousAt (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)
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.
A fixed polytope, quadratic family, parameter domain, and pointwise saddle-attainment certificate give a Borel max-min value on that domain.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
measurableSet_isSaddletheorem — 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.hypothesesconclusionProof (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))
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.
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)
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
Proof (Lean source)
7 supporting declarations (lemmas, instances)
-
measurable_slopetheorem — A quadratic family has a jointly Borel scalar slope in the parameter, finite weights, and scalar decision.hypothesesconclusionMeasurable (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θ)) -
continuous_slope_weighttheorem — A quadratic family, parameter, and scalar decision have a scalar slope continuous in the weight vector.hypothesesconclusionContinuous (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 -
slope_eq_zero_of_global_mintheorem — A quadratic family, parameter, weight vector, and scalar decision with a global scalar minimum have zero scalar slope.hypothesesΘ :sharedType u_1ι :sharedType u_2Q :Quadratics Θ ιθ :Θα :EuclideanSpace ℝ ιt :ℝhmin :∀ u : ℝ, Q.objective θ α t ≤ Q.objective θ α uconclusionQ.slope θ α t = 0Proof (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 -
global_min_of_slope_eq_zerotheorem — 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.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιθ :Θα :EuclideanSpace ℝ ιt :ℝhα :α ∈ P.weightshz :Q.slope θ α t = 0u :ℝconclusionQ.objective θ α t ≤ Q.objective θ α uProof (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] -
exists_measurable_envelope_minimizer_ontheorem — 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.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιD :Set ΘhD :hAttains :∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α tProof (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) -
exists_measurable_saddle_weight_ontheorem — 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.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιD :Set ΘhD :hAttains :∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α tt :D → ℝht :hEq :∀ θ : D, Q.envelope P θ.1 (t θ) = value P Q θ.1Proof (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 -
exists_measurable_saddle_ontheorem — A fixed polytope, quadratic family, Borel parameter domain, and pointwise saddle-attainment certificate have Borel saddle weights and scalar decisions on that domain.hypothesesΘ :sharedType u_1ι :sharedType u_2κ :sharedType u_3P :Polytope ι κQ :Quadratics Θ ιD :Set ΘhD :hAttains :∀ θ ∈ D, ∃ α t, IsSaddle P Q θ α tconclusion∃ α : D → EuclideanSpace ℝ ι, ∃ t : D → ℝ,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⟩