AFTD Auto-Formalizing Theoretical Domains

EconCSLib.LinearProgramming.optAug_feasible_iff

theoremverifiedformalizationimported Lean

An x satisfies optAugA · x ≥ optAugB iff x is primal-feasible and has objective at most v.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Finset BigOperators in
set_option linter.unusedSectionVars false in
variable {𝕜 : Type*} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] in
variable {I : Type*} [Fintype I] [DecidableEq I] {n : ℕ} in
theorem EconCSLib.LinearProgramming.optAug_feasible_iff (A : I → Fin n → 𝕜) (b : I → 𝕜) (c : Fin n → 𝕜)
    (v : 𝕜) (x : Fin n → 𝕜) :
    (∀ idx, optAugB b v idx ≤ ∑ j, optAugA A c idx j * x j) ↔
      (∀ i, b i ≤ ∑ j, A i j * x j) ∧ (∀ j, 0 ≤ x j) ∧
        (∑ j, c j * x j ≤ v)
Formalizes
EconCSLib, `EconCSLib.LinearProgramming.optAug_feasible_iff`
Lean proof
By xbei (from the file's git history), from github.com/gametheoryinlean/EconCSLib at 1a88f809b538 (Copyright (c) 2026 EconCSLib contributors. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.30.0.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 9
Used by 2

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Finset BigOperators inset_option linter.unusedSectionVars false invariable {𝕜 : Type*} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] invariable {I : Type*} [Fintype I] [DecidableEq I] {n : ℕ} in/-- An `x` satisfies `optAugA · x ≥ optAugB` iff `x` is primal-feasible and has objective at most `v`. -/theorem EconCSLib.LinearProgramming.optAug_feasible_iff (A : I → Fin n → 𝕜) (b : I → 𝕜) (c : Fin n → 𝕜)    (v : 𝕜) (x : Fin n → 𝕜) :    (∀ idx, optAugB b v idx ≤ ∑ j, optAugA A c idx j * x j) ↔      (∀ i, b i ≤ ∑ j, A i j * x j) ∧ (∀ j, 0 ≤ x j) ∧        (∑ j, c j * x j ≤ v) := by  constructor  · intro h    refine ⟨?_, ?_, ?_⟩    · intro i      have h1 := h (Sum.inl (Sum.inl i))      simpa using h1    · intro j'      have h1 := h (Sum.inl (Sum.inr j'))      simp only [optAugB_inl_inr, optAugA_inl_inr, ite_mul, one_mul, zero_mul,                 Fintype.sum_ite_eq'] at h1      exact h1    · have h1 := h (Sum.inr ())      simp only [optAugB_inr, optAugA_inr] at h1      have : (∑ j, -c j * x j) = -(∑ j, c j * x j) := by        simp [Finset.sum_neg_distrib, neg_mul]      linarith [this ▸ h1]  · rintro ⟨hAx, hxnn, hcx⟩ idx    rcases idx with ⟨i | j'⟩ | ⟨⟩    · simpa using hAx i    · simp only [optAugB_inl_inr, optAugA_inl_inr, ite_mul, one_mul, zero_mul,                 Fintype.sum_ite_eq']      exact hxnn j'    · show optAugB b v (Sum.inr ()) ≤ ∑ j, optAugA A c (Sum.inr ()) j * x j      simp only [optAugB_inr, optAugA_inr]      have : (∑ j, -c j * x j) = -(∑ j, c j * x j) := by        simp [Finset.sum_neg_distrib, neg_mul]      linarith [this]
See it in the graphDiscuss this resultChallenge it