AFTD Auto-Formalizing Theoretical Domains

EconCSLib.LinearAlgebra.reduced_pair_ineq

theoremverifiedformalizationimported Lean

EconCSLib.LinearAlgebra.reduced_pair_ineq

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.reduced_pair_ineq
    {A : I โ†’ Fin (n+1) โ†’ ๐•œ} {b : I โ†’ ๐•œ} {x' : Fin n โ†’ ๐•œ}
    (hx' : โˆ€ idx, fmB A b idx โ‰ค rowEval (fmA A) idx x')
    (p : PosRows A) (q : NegRows A) :
    (b p.val - โˆ‘ j : Fin n, A p.val j.castSucc * x' j) / A p.val (Fin.last n)
    โ‰ค (b q.val - โˆ‘ j : Fin n, A q.val j.castSucc * x' j) / A q.val (Fin.last n)
Formalizes
EconCSLib, `EconCSLib.LinearAlgebra.reduced_pair_ineq`
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 12
Used by 1

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.reduced_pair_ineq    {A : I โ†’ Fin (n+1) โ†’ ๐•œ} {b : I โ†’ ๐•œ} {x' : Fin n โ†’ ๐•œ}    (hx' : โˆ€ idx, fmB A b idx โ‰ค rowEval (fmA A) idx x')    (p : PosRows A) (q : NegRows A) :    (b p.val - โˆ‘ j : Fin n, A p.val j.castSucc * x' j) / A p.val (Fin.last n)    โ‰ค (b q.val - โˆ‘ j : Fin n, A q.val j.castSucc * x' j) / A q.val (Fin.last n) := by  have h_pq := hx' (Sum.inr (p, q))  simp only [fmB_inr, rowEval_def, fmA_inr] at h_pq  -- Distribute the sum in h_pq's RHS.  have hdist :      (โˆ‘ 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)      = (-A q.val (Fin.last n))          * (โˆ‘ j : Fin n, A p.val j.castSucc * x' j)        + A p.val (Fin.last n)          * (โˆ‘ j : Fin n, A q.val j.castSucc * x' j) := by    rw [Finset.mul_sum, Finset.mul_sum, โ† Finset.sum_add_distrib]    refine Finset.sum_congr rfl ?_    intro j _    ring  rw [hdist] at h_pq  -- h_pq : (-A q last) ยท b p + A p last ยท b q โ‰ค (-A q last) ยท ฮฃp + A p last ยท ฮฃq  have hฮฒp : 0 < A p.val (Fin.last n) := p.property  have hฮฑq : 0 < -A q.val (Fin.last n) := by linarith [q.property]  have hAql_neg : A q.val (Fin.last n) < 0 := q.property  have hAql_ne : A q.val (Fin.last n) โ‰  0 := ne_of_lt hAql_neg  -- Convert U_q's denominator (negative) to a positive form.  set sumP := โˆ‘ j : Fin n, A p.val j.castSucc * x' j with hsumP_def  set sumQ := โˆ‘ j : Fin n, A q.val j.castSucc * x' j with hsumQ_def  have hUq_flip :      (b q.val - sumQ) / A q.val (Fin.last n)      = -(b q.val - sumQ) / (-A q.val (Fin.last n)) := by    rw [neg_div_neg_eq]  rw [hUq_flip]  rw [div_le_div_iffโ‚€ hฮฒp hฮฑq]  -- Goal: (b p val - sumP) * (-A q val last) โ‰ค -(b q val - sumQ) * (A p val last)  linarith
See it in the graphDiscuss this resultChallenge it