AFTD Auto-Formalizing Theoretical Domains

EconCSLib.LinearAlgebra.fm_feasible_of_feasible

theoremverifiedformalizationimported Lean

EconCSLib.LinearAlgebra.fm_feasible_of_feasible

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.LinearAlgebra.fm_feasible_of_feasible (A : I โ†’ Fin (n+1) โ†’ ๐•œ) (b : I โ†’ ๐•œ)
    (hfeas : IsFeasible A b) : IsFeasible (fmA A) (fmB A b)
Formalizes
EconCSLib, `EconCSLib.LinearAlgebra.fm_feasible_of_feasible`
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 13

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 : โ„•} intheorem EconCSLib.LinearAlgebra.fm_feasible_of_feasible (A : I โ†’ Fin (n+1) โ†’ ๐•œ) (b : I โ†’ ๐•œ)    (hfeas : IsFeasible A b) : IsFeasible (fmA A) (fmB A b) := by  obtain โŸจx, hxโŸฉ := hfeas  refine โŸจfun j => x j.castSucc, ?_โŸฉ  intro idx  -- Split each original row sum into first n + last entry.  have hsplit : โˆ€ i : I,      rowEval A i x        = (โˆ‘ j : Fin n, A i j.castSucc * x j.castSucc)          + A i (Fin.last n) * x (Fin.last n) := by    intro i    rw [rowEval, Fin.sum_univ_castSucc]  rcases idx with k | โŸจp, qโŸฉ  ยท -- Zero-row pass-through.    have hk := hx k.val    rw [hsplit, k.property, zero_mul, add_zero] at hk    simp only [fmB_inl, rowEval_def, fmA_inl]    exact hk  ยท -- Combined-row inequality.    have hp := hx p.val    have hq := hx q.val    rw [hsplit] at hp hq    have hฮฑq_pos : 0 < -A q.val (Fin.last n) := by linarith [q.property]    have hฮฒp_pos : 0 < A p.val (Fin.last n) := p.property    -- ฮฑq ยท (hp stripped) + ฮฒp ยท (hq stripped) gives the combined inequality.    have hcomb :        (-A q.val (Fin.last n)) * b p.val          + A p.val (Fin.last n) * b q.val        โ‰ค (-A q.val (Fin.last n))            * (โˆ‘ j : Fin n, A p.val j.castSucc * x j.castSucc)          + A p.val (Fin.last n)            * (โˆ‘ j : Fin n, A q.val j.castSucc * x j.castSucc) := by      have hp_strip :          b p.val - A p.val (Fin.last n) * x (Fin.last n)          โ‰ค โˆ‘ j : Fin n, A p.val j.castSucc * x j.castSucc := by linarith      have hq_strip :          b q.val - A q.val (Fin.last n) * x (Fin.last n)          โ‰ค โˆ‘ j : Fin n, A q.val j.castSucc * x j.castSucc := by linarith      nlinarith [mul_le_mul_of_nonneg_left hp_strip hฮฑq_pos.le,        mul_le_mul_of_nonneg_left hq_strip hฮฒp_pos.le]    simp only [fmB_inr, rowEval_def, fmA_inr]    -- Distribute the sum in the goal RHS.    have hRHS :        (โˆ‘ j : Fin n,          ((-A q.val (Fin.last n)) * A p.val j.castSucc            + A p.val (Fin.last n) * A q.val j.castSucc)            * x j.castSucc)        = (-A q.val (Fin.last n))            * (โˆ‘ j : Fin n, A p.val j.castSucc * x j.castSucc)          + A p.val (Fin.last n)            * (โˆ‘ j : Fin n, A q.val j.castSucc * x j.castSucc) := by      rw [Finset.mul_sum, Finset.mul_sum, โ† Finset.sum_add_distrib]      refine Finset.sum_congr rfl ?_      intro j _      ring    rw [hRHS]    exact hcomb
See it in the graphDiscuss this resultChallenge it