Mathlib.Optimization.Affine.Sign­Cell

Optimization over regions determined by affine sign restrictions, including closure, common-slack, extrema, and polynomial formulations.

Basic 10 core · 7 supporting This module defines finite systems of real affine inequalities with individually weak or strict comparisons, together with their strict cells and weak relaxations. ★ isClosed_weakCell

Finite affine sign cells

This module defines finite systems of real affine inequalities with individually weak or strict comparisons, together with their strict cells and weak relaxations. It proves that the weak relaxation is a closed convex set.

structure AffineFn reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a finite number of coordinates, an affine real-valued function is specified by one coefficient for each coordinate and one constant term.

Definition (Lean source)
n :
ℕ
The coefficient of each coordinate.
coeff :
Fin n → ℝ
The constant term.
constant :
ℝ
Causalean.Mathlib.Optimization.Affine.SignCell.AffineFn · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:25
def eval reviewed
Causalean.Mathlib.Optimization.Affine.SignCell.AffineFn

Given an affine function and a coordinate vector, its evaluated real value is given by the finite coefficient-weighted sum plus the constant.

Definition (Lean source)
n :
ℕ
f :
x :
Fin n → ℝ
eval f x :
ℝ
∑ i, f.coeff i * x i + f.constant
Causalean.Mathlib.Optimization.Affine.SignCell.AffineFn.eval · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:37 · uses AffineFn
inductive ConstraintKind reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

A constraint kind records whether its affine inequality is weak or strict.

Definition (Lean source)
ConstraintKind :
Type
weak :

The constraint is interpreted with a weak comparison.

strict :

The constraint is interpreted with a strict comparison.

deriving DecidableEq
Causalean.Mathlib.Optimization.Affine.SignCell.ConstraintKind · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:70
structure Constraint reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a finite number of coordinates, a marked affine constraint contains its normalized affine left-hand side and its weak-or-strict mark.

Definition (Lean source)
n :
ℕ
The affine left-hand side, normalized against zero.
fn :
Whether the normalized inequality is weak or strict.
Causalean.Mathlib.Optimization.Affine.SignCell.Constraint · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:79
abbrev AffineSystem reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a finite number of coordinates, an affine constraint system is given by a finite list of marked affine constraints.

Definition (Lean source)
n :
ℕ
AffineSystem n :
Type
Causalean.Mathlib.Optimization.Affine.SignCell.AffineSystem · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:89
def strictHolds reviewed
Causalean.Mathlib.Optimization.Affine.SignCell.Constraint

Given a marked affine constraint and a coordinate vector, the original constraint-satisfaction condition uses the comparison selected by the constraint's mark.

Definition (Lean source)
n :
ℕ
c :
x :
Fin n → ℝ
strictHolds c x :
Prop
match c.kind with | .weak => c.fn.eval x ≤ 0 | .strict => c.fn.eval x < 0
Causalean.Mathlib.Optimization.Affine.SignCell.Constraint.strictHolds · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:95 · uses Constraint
def weakHolds reviewed
Causalean.Mathlib.Optimization.Affine.SignCell.Constraint

Given a marked affine constraint and a coordinate vector, the weak constraint-satisfaction condition is given by the nonpositive affine evaluation.

Definition (Lean source)
n :
ℕ
c :
x :
Fin n → ℝ
weakHolds c x :
Prop
c.fn.eval x ≤ 0
Causalean.Mathlib.Optimization.Affine.SignCell.Constraint.weakHolds · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:104 · uses Constraint
def strictCell reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given an affine constraint system, its strict cell is given by the points satisfying every listed constraint using its original comparison.

Definition (Lean source)
n :
ℕ
Γ :
strictCell Γ :
Set (Fin n → ℝ)
{x | ∀ c ∈ Γ, c.strictHolds x}
Causalean.Mathlib.Optimization.Affine.SignCell.strictCell · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:113 · uses AffineSystem
def weakCell reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given an affine constraint system, its weak relaxation is given by the points weakly satisfying every listed constraint.

Definition (Lean source)
n :
ℕ
Γ :
weakCell Γ :
Set (Fin n → ℝ)
{x | ∀ c ∈ Γ, c.weakHolds x}
Causalean.Mathlib.Optimization.Affine.SignCell.weakCell · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:120 · uses AffineSystem
theorem isClosed_weakCell reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given an affine constraint system, its weak relaxation is closed.

Formal statement
n :
ℕ
Γ :
Proof (Lean source)
theorem isClosed_weakCell {n : ℕ} (Γ : AffineSystem n) : IsClosed (weakCell Γ) := by induction Γ with | nil => simp [weakCell] | cons c Γ ih => rw [show weakCell (c :: Γ) = {x | c.fn.eval x ≤ 0} ∩ weakCell Γ by ext x simp [weakCell, Constraint.weakHolds]] exact (isClosed_le c.fn.continuous_eval continuous_const).inter ih
Causalean.Mathlib.Optimization.Affine.SignCell.isClosed_weakCell · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:147 · uses AffineSystem , weakCell
7 supporting declarations (lemmas, instances)
  • eval_affineCombination theorem — Given an affine function, two coordinate vectors, and a real weight, evaluation at their affine combination equals the same affine combination of their evaluations.
    n :
    ℕ
    f :
    x y :
    Fin n → ℝ
    t :
    ℝ
    f.eval ((1 - t) • x + t • y) = (1 - t) * f.eval x + t * f.eval y
    Proof (Lean source)
    theorem eval_affineCombination {n : ℕ} (f : AffineFn n) (x y : Fin n → ℝ) (t : ℝ) : f.eval ((1 - t) • x + t • y) = (1 - t) * f.eval x + t * f.eval y := by simp only [eval, Pi.add_apply, Pi.smul_apply, smul_eq_mul] calc (∑ i, f.coeff i * ((1 - t) * x i + t * y i)) + f.constant = (1 - t) * (∑ i, f.coeff i * x i) + t * (∑ i, f.coeff i * y i) + f.constant := by rw [Finset.mul_sum, Finset.mul_sum, ← Finset.sum_add_distrib] apply congrArg (fun z => z + f.constant) apply Finset.sum_congr rfl intro i hi ring _ = (1 - t) * ((∑ i, f.coeff i * x i) + f.constant) + t * ((∑ i, f.coeff i * y i) + f.constant) := by ring
    Causalean.Mathlib.Optimization.Affine.SignCell.AffineFn.eval_affineCombination · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:44
  • continuous_eval theorem — Given an affine function, its evaluation map is continuous.
    n :
    ℕ
    f :
    Continuous f.eval
    Proof (Lean source)
    theorem continuous_eval {n : ℕ} (f : AffineFn n) : Continuous f.eval := by unfold eval fun_prop
    Causalean.Mathlib.Optimization.Affine.SignCell.AffineFn.continuous_eval · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:63
  • instDecidableEqConstraintKind instance
    deriving DecidableEq
    Causalean.Mathlib.Optimization.Affine.SignCell.instDecidableEqConstraintKind · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:77
  • mem_strictCell theorem — Given a point, membership in the strict cell is equivalent to satisfying every listed constraint with its original comparison.
    n :
    ℕ
    Fin n → ℝ
    x ∈ strictCell Γ ↔ ∀ c ∈ Γ, c.strictHolds x
    Proof (Lean source)
    @[simp] theorem mem_strictCell {n : ℕ} {Γ : AffineSystem n} {x : Fin n → ℝ} : x ∈ strictCell Γ ↔ ∀ c ∈ Γ, c.strictHolds x := Iff.rfl
    Causalean.Mathlib.Optimization.Affine.SignCell.mem_strictCell · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:127
  • mem_weakCell theorem — Given a point, membership in the weak relaxation is equivalent to weakly satisfying every listed constraint.
    n :
    ℕ
    Fin n → ℝ
    x ∈ weakCell Γ ↔ ∀ c ∈ Γ, c.weakHolds x
    Proof (Lean source)
    @[simp] theorem mem_weakCell {n : ℕ} {Γ : AffineSystem n} {x : Fin n → ℝ} : x ∈ weakCell Γ ↔ ∀ c ∈ Γ, c.weakHolds x := Iff.rfl
    Causalean.Mathlib.Optimization.Affine.SignCell.mem_weakCell · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:132
  • strictCell_subset_weakCell theorem — Given an affine constraint system, every strictly feasible point belongs to its weak relaxation.
    n :
    ℕ
    Γ :
    Proof (Lean source)
    theorem strictCell_subset_weakCell {n : ℕ} (Γ : AffineSystem n) : strictCell Γ ⊆ weakCell Γ := by intro x hx c hc have h := hx c hc cases hkind : c.kind with | weak => simpa [Constraint.strictHolds, Constraint.weakHolds, hkind] using h | strict => exact le_of_lt (by simpa [Constraint.strictHolds, hkind] using h)
    Causalean.Mathlib.Optimization.Affine.SignCell.strictCell_subset_weakCell · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:137
  • convex_weakCell theorem — Given an affine constraint system, its weak relaxation is convex.
    n :
    ℕ
    Γ :
    Convex ℝ (weakCell Γ)
    Proof (Lean source)
    theorem convex_weakCell {n : ℕ} (Γ : AffineSystem n) : Convex ℝ (weakCell Γ) := by intro x hx y hy a b ha hb hab c hc have hxc := hx c hc have hyc := hy c hc unfold Constraint.weakHolds at hxc hyc ⊢ have hab' : a = 1 - b := by linarith rw [hab', AffineFn.eval_affineCombination] exact add_nonpos (mul_nonpos_of_nonneg_of_nonpos (by linarith) hxc) (mul_nonpos_of_nonneg_of_nonpos hb hyc)
    Causalean.Mathlib.Optimization.Affine.SignCell.convex_weakCell · Causalean/Mathlib/Optimization/Affine/SignCell/Basic.lean:157
Closure 2 core · 4 supporting Given one point satisfying every strict comparison, this module approximates every weakly feasible point by strictly feasible segment points and identifies the weak relaxation as the closure of the strict cell. ★ closure_strictCell_eq_weakCell

Segment approximation and closure of affine sign cells

Given one point satisfying every strict comparison, this module approximates every weakly feasible point by strictly feasible segment points and identifies the weak relaxation as the closure of the strict cell.

def segmentPoint reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a weak endpoint, a distinguished strict endpoint, and a real weight, the segment point is given by placing weight ε on the strict endpoint.

Definition (Lean source)
n :
ℕ
x x₀ :
Fin n → ℝ
ε :
ℝ
segmentPoint x x₀ ε :
Fin n → ℝ
(1 - ε) • x + ε • x₀
Causalean.Mathlib.Optimization.Affine.SignCell.segmentPoint · Causalean/Mathlib/Optimization/Affine/SignCell/Closure.lean:24
theorem closure_strictCell_eq_weakCell reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a nonempty strict cell, the closure of that strict cell equals its weak relaxation.

Formal statement
n :
hΓ :
(strictCell Γ).Nonempty
Proof (Lean source)
theorem closure_strictCell_eq_weakCell {n : ℕ} {Γ : AffineSystem n} (hΓ : (strictCell Γ).Nonempty) : closure (strictCell Γ) = weakCell Γ := by apply Set.Subset.antisymm · exact closure_minimal (strictCell_subset_weakCell Γ) (isClosed_weakCell Γ) · exact weakCell_subset_closure_strictCell hΓ
Causalean.Mathlib.Optimization.Affine.SignCell.closure_strictCell_eq_weakCell · Causalean/Mathlib/Optimization/Affine/SignCell/Closure.lean:90 · uses AffineSystem , strictCell , weakCell
4 supporting declarations (lemmas, instances)
Common­Slack 4 core · 6 supporting This module gives the bounded Phase-I common-slack characterization of strict feasibility: one positive margin is shared by all strict affine inequalities, while weak inequalities stay weak. ★ strictFeasible_iff_commonSlackValue_pos

Common-slack strict feasibility

This module gives the bounded Phase-I common-slack characterization of strict feasibility: one positive margin is shared by all strict affine inequalities, while weak inequalities stay weak.

def commonSlackFeasible reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given an affine constraint system, a coordinate vector, and a real slack, the common-slack feasibility condition is given by the slack being nonnegative, the slack being at most one, and every weak constraint evaluating to at most zero while every strict constraint evaluates to at most the negative slack.

Definition (Lean source)
n :
ℕ
Γ :
x :
Fin n → ℝ
δ :
ℝ
commonSlackFeasible Γ x δ :
Prop
clause 1
0 ≤ δ
clause 2
δ ≤ 1
clause 3
c ∈ Γ :
c.fn.eval x ≤ match c.kind with | .weak => 0 | .strict => -δ
Causalean.Mathlib.Optimization.Affine.SignCell.commonSlackFeasible · Causalean/Mathlib/Optimization/Affine/SignCell/CommonSlack.lean:24 · uses AffineSystem
def commonSlackSet reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given an affine constraint system, its feasible slack set is given by the slacks for which some coordinate vector is common-slack feasible.

Definition (Lean source)
n :
ℕ
Γ :
commonSlackSet Γ :
Set ℝ
{δ | ∃ x, commonSlackFeasible Γ x δ}
Causalean.Mathlib.Optimization.Affine.SignCell.commonSlackSet · Causalean/Mathlib/Optimization/Affine/SignCell/CommonSlack.lean:34 · uses AffineSystem
def commonSlackValue reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given an affine constraint system, its common-slack value is given by the supremum of its feasible slack set.

Definition (Lean source)
n :
ℕ
Γ :
commonSlackValue Γ :
ℝ
Causalean.Mathlib.Optimization.Affine.SignCell.commonSlackValue · Causalean/Mathlib/Optimization/Affine/SignCell/CommonSlack.lean:41 · uses AffineSystem
theorem strictFeasible_iff_commonSlackValue_pos reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given an affine constraint system, its strict cell is nonempty exactly when its bounded common-slack value is positive.

Formal statement
n :
ℕ
Γ :
(strictCell Γ).Nonempty ↔ 0 < commonSlackValue Γ
Proof (Lean source)
theorem strictFeasible_iff_commonSlackValue_pos {n : ℕ} (Γ : AffineSystem n) : (strictCell Γ).Nonempty ↔ 0 < commonSlackValue Γ := by constructor · rintro ⟨x, hx⟩ rcases positiveSlackWitness_of_strictPoint hx with ⟨δ, hδ, hfeas⟩ exact commonSlackValue_pos_of_witness hδ hfeas · intro hval rcases positiveSlackWitness_of_commonSlackValue_pos hval with ⟨δ, hδ, x, hx⟩ exact ⟨x, strictPoint_of_positiveSlack hδ hx⟩
Causalean.Mathlib.Optimization.Affine.SignCell.strictFeasible_iff_commonSlackValue_pos · Causalean/Mathlib/Optimization/Affine/SignCell/CommonSlack.lean:139 · uses AffineSystem , commonSlackValue , strictCell
6 supporting declarations (lemmas, instances)
Example 2 core · 3 supporting This module instantiates the API with the interval cut out by the strict inequality 0 < x and the weak inequality x ≤ 1. ★ closure_strictCell_mixedExample

Mixed strict/weak sign-cell example

This module instantiates the API with the interval cut out by the strict inequality 0 < x and the weak inequality x ≤ 1.

def mixedExample reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

The mixed one-dimensional example system is given by the strict lower inequality -x < 0 and the weak upper inequality x - 1 ≤ 0.

Definition (Lean source)
mixedExample :
[ { fn := { coeff := fun _ => -1, constant := 0 }, kind := .strict }, { fn := { coeff := fun _ => 1, constant := -1 }, kind := .weak } ]
Causalean.Mathlib.Optimization.Affine.SignCell.mixedExample · Causalean/Mathlib/Optimization/Affine/SignCell/Example.lean:23 · uses AffineSystem
theorem closure_strictCell_mixedExample reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

The closure of the example's half-open strict interval equals its closed weak interval.

Formal statement
Proof (Lean source)
theorem closure_strictCell_mixedExample : closure (strictCell mixedExample) = weakCell mixedExample := by apply closure_strictCell_eq_weakCell exact ⟨_, half_mem_strictCell_mixedExample⟩
Causalean.Mathlib.Optimization.Affine.SignCell.closure_strictCell_mixedExample · Causalean/Mathlib/Optimization/Affine/SignCell/Example.lean:47 · uses mixedExample , strictCell , weakCell
3 supporting declarations (lemmas, instances)
Extrema 1 core · 6 supporting Continuous real objectives have the same bounded infima and suprema on a nonempty strict affine cell and on its weak relaxation. ★ sInf_image_strictCell_eq_weakCell

Preservation of bounded extrema

Continuous real objectives have the same bounded infima and suprema on a nonempty strict affine cell and on its weak relaxation.

theorem sInf_image_strictCell_eq_weakCell reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a nonempty strict cell, a continuous real objective, and a lower bound for its strict-cell image, the strict and weak image sets have the same infimum.

Formal statement
n :
ℕ
(Fin n → ℝ) → ℝ
hΓ :
(strictCell Γ).Nonempty
hφ :
hBdd :
BddBelow (φ '' strictCell Γ)
sInf (φ '' strictCell Γ) = sInf (φ '' weakCell Γ)
Proof (Lean source)
theorem sInf_image_strictCell_eq_weakCell {n : ℕ} {Γ : AffineSystem n} {φ : (Fin n → ℝ) → ℝ} (hΓ : (strictCell Γ).Nonempty) (hφ : Continuous φ) (hBdd : BddBelow (φ '' strictCell Γ)) : sInf (φ '' strictCell Γ) = sInf (φ '' weakCell Γ) := by have hcl := closure_image_strictCell_eq_closure_image_weakCell hΓ hφ have hlb : lowerBounds (φ '' strictCell Γ) = lowerBounds (φ '' weakCell Γ) := by rw [← lowerBounds_closure (φ '' strictCell Γ), hcl, lowerBounds_closure] have hBdd' := bddBelow_image_weakCell_of_strictCell hΓ hφ hBdd have hne : (φ '' strictCell Γ).Nonempty := hΓ.image φ have hne' : (φ '' weakCell Γ).Nonempty := hne.mono (image_mono (strictCell_subset_weakCell Γ)) rw [← csSup_lowerBounds_eq_csInf hBdd hne, ← csSup_lowerBounds_eq_csInf hBdd' hne', hlb]
Causalean.Mathlib.Optimization.Affine.SignCell.sInf_image_strictCell_eq_weakCell · Causalean/Mathlib/Optimization/Affine/SignCell/Extrema.lean:51 · uses AffineSystem , strictCell , weakCell
6 supporting declarations (lemmas, instances)
Polynomial 7 core · 2 supporting This module compiles checked real multivariate polynomials of total degree at most one into the explicit affine-constraint representation and proves that this compilation preserves both strict and weak cells. ★ affineFnOfMvPolynomial_eval

Degree-one polynomial bridge

This module compiles checked real multivariate polynomials of total degree at most one into the explicit affine-constraint representation and proves that this compilation preserves both strict and weak cells.

def affineFnOfMvPolynomial reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a real multivariate polynomial, its compiled affine function is given by the coefficients of its degree-one monomials and its constant coefficient.

Definition (Lean source)
n :
ℕ
p :
affineFnOfMvPolynomial p :
clause 1
coeff i := coeff (Finsupp.single i 1) p
clause 2
constant := coeff 0 p
Causalean.Mathlib.Optimization.Affine.SignCell.affineFnOfMvPolynomial · Causalean/Mathlib/Optimization/Affine/SignCell/Polynomial.lean:25 · uses AffineFn
theorem affineFnOfMvPolynomial_eval reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a real multivariate polynomial, a proof that its total degree is at most one, and a coordinate vector, evaluating its compiled affine function equals evaluating the polynomial.

Formal statement
n :
ℕ
p :
hp :
p.totalDegree ≤ 1
x :
Fin n → ℝ
(affineFnOfMvPolynomial p).eval x = eval x p
Proof (Lean source)
theorem affineFnOfMvPolynomial_eval {n : ℕ} (p : MvPolynomial (Fin n) ℝ) (hp : p.totalDegree ≤ 1) (x : Fin n → ℝ) : (affineFnOfMvPolynomial p).eval x = eval x p := by classical have hp_eq : p = C (coeff 0 p) + ∑ i, C (coeff (Finsupp.single i 1) p) * X i := by ext d by_cases hd0 : d = 0 · subst d rw [MvPolynomial.coeff_add, MvPolynomial.coeff_C, coeff_linear_sum_zero] simp by_cases hd1 : ∃ i, d = Finsupp.single i 1 · obtain ⟨i, rfl⟩ := hd1 rw [MvPolynomial.coeff_add, MvPolynomial.coeff_C, coeff_linear_sum_single] have hs : (0 : Fin n →₀ ℕ) ≠ Finsupp.single i 1 := Ne.symm (Finsupp.single_ne_zero.mpr one_ne_zero) simp [hs] · have hd_not_mem : d ∉ p.support := by intro hd_mem have hsum : d.sum (fun _ e => e) ≤ 1 := (MvPolynomial.le_totalDegree hd_mem).trans hp exact (finsupp_eq_zero_or_single_of_sum_le_one d hsum).elim hd0 hd1 rw [MvPolynomial.notMem_support_iff.mp hd_not_mem, MvPolynomial.coeff_add, MvPolynomial.coeff_C] simp only [if_neg (Ne.symm hd0), zero_add] rw [MvPolynomial.coeff_sum] symm apply Finset.sum_eq_zero intro i hi have hs : Finsupp.single i 1 ≠ d := fun h => hd1 ⟨i, h.symm⟩ simp [MvPolynomial.coeff_C_mul, MvPolynomial.coeff_X, hs] unfold AffineFn.eval affineFnOfMvPolynomial calc (∑ i, coeff (Finsupp.single i 1) p * x i) + coeff 0 p = coeff 0 p + ∑ i, coeff (Finsupp.single i 1) p * x i := add_comm _ _ _ = eval x (C (coeff 0 p) + ∑ i, C (coeff (Finsupp.single i 1) p) * X i) := by simp _ = eval x p := by rw [← hp_eq]
Causalean.Mathlib.Optimization.Affine.SignCell.affineFnOfMvPolynomial_eval · Causalean/Mathlib/Optimization/Affine/SignCell/Polynomial.lean:67 · uses eval , affineFnOfMvPolynomial
structure PolynomialConstraint reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a finite number of coordinates, a checked polynomial constraint contains its polynomial left-hand side, its weak-or-strict mark, and a certificate that it is affine.

Definition (Lean source)
n :
ℕ
The polynomial left-hand side, normalized against zero.
polynomial :
Whether the normalized inequality is weak or strict.
The polynomial has total degree at most one.
degree_le_one :
polynomial.totalDegree ≤ 1
Causalean.Mathlib.Optimization.Affine.SignCell.PolynomialConstraint · Causalean/Mathlib/Optimization/Affine/SignCell/Polynomial.lean:108
def toConstraint reviewed
Causalean.Mathlib.Optimization.Affine.SignCell.PolynomialConstraint

Given a checked polynomial constraint, its affine constraint compilation is given by the compiled affine function with the original mark retained.

Definition (Lean source)
n :
ℕ
toConstraint c :
clause 1
fn := affineFnOfMvPolynomial c.polynomial
clause 2
kind := c.kind
Causalean.Mathlib.Optimization.Affine.SignCell.PolynomialConstraint.toConstraint · Causalean/Mathlib/Optimization/Affine/SignCell/Polynomial.lean:121 · uses Constraint , PolynomialConstraint
def affineSystemOfPolynomials reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a finite list of checked polynomial constraints, its compiled affine system is given by compiling every listed constraint.

Definition (Lean source)
n :
ℕ
affineSystemOfPolynomials Γ :
Γ.map PolynomialConstraint.toConstraint
Causalean.Mathlib.Optimization.Affine.SignCell.affineSystemOfPolynomials · Causalean/Mathlib/Optimization/Affine/SignCell/Polynomial.lean:129 · uses AffineSystem , PolynomialConstraint
def polynomialStrictCell reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a finite list of checked polynomial constraints, its direct strict polynomial cell is given by satisfaction of each original weak-or-strict polynomial comparison.

Definition (Lean source)
n :
ℕ
polynomialStrictCell Γ :
Set (Fin n → ℝ)
{x | ∀ c ∈ Γ, match c.kind with | .weak => eval x c.polynomial ≤ 0 | .strict => eval x c.polynomial < 0}
Causalean.Mathlib.Optimization.Affine.SignCell.polynomialStrictCell · Causalean/Mathlib/Optimization/Affine/SignCell/Polynomial.lean:136 · uses PolynomialConstraint
def polynomialWeakCell reviewed
Causalean.Mathlib.Optimization.Affine.SignCell

Given a finite list of checked polynomial constraints, its direct weak polynomial cell is given by weak satisfaction of every polynomial constraint.

Definition (Lean source)
n :
ℕ
polynomialWeakCell Γ :
Set (Fin n → ℝ)
{x | ∀ c ∈ Γ, eval x c.polynomial ≤ 0}
Causalean.Mathlib.Optimization.Affine.SignCell.polynomialWeakCell · Causalean/Mathlib/Optimization/Affine/SignCell/Polynomial.lean:145 · uses PolynomialConstraint
2 supporting declarations (lemmas, instances)