Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 6.6.2 — solvability of Ax = b

Proved
MatousekLP.Duality.linear_system_solvable_iff

by mikedeng1 · Oct 3, 2026 · Mathlib 0df444a (Lean v4.33.1)

linear-algebralinear-systemsp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1

Let AAA be a real m×nm\times nm×n matrix and b∈Rmb\in\mathbb{R}^mb∈Rm. The system Ax=bAx=bAx=b has a solution x∈Rnx\in\mathbb{R}^nx∈Rn if and only if every y∈Rmy\in\mathbb{R}^my∈Rm with yTA=0Ty^{T}A=0^{T}yTA=0T also satisfies

yTb=0.y^{T}b=0.yTb=0.

This is the linear-algebra counterpart of the Farkas lemma (the entry "Ax=bAx=bAx=b has a solution x∈Rnx\in\mathbb{R}^nx∈Rn" of the book's table of variants); it is used in §6.6 to derive the Farkas lemma from minimally infeasible systems.

Formalization Note yTA=0Ty^{T}A=0^{T}yTA=0T is written Aᵀ *ᵥ y = 0 and yTby^{T}byTb is y ⬝ᵥ b.

Preamble
import Mathlib
Formal statement
namespace MatousekLP.Duality

open Matrix

/-- Matoušek & Gärtner, Lemma 6.6.2 (p. 99): the system `Ax = b` has a solution if and only if
every `y ∈ ℝ^m` with `yᵀA = 0ᵀ` (written `Aᵀ *ᵥ y = 0`) also satisfies `yᵀb = 0`. -/
theorem linear_system_solvable_iff {m n : ℕ} (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ) :
    (∃ x : Fin n → ℝ, A *ᵥ x = b) ↔ ∀ y : Fin m → ℝ, Aᵀ *ᵥ y = 0 → y ⬝ᵥ b = 0 := by sorry

end MatousekLP.Duality
Source
Matoušek & Gärtner, Understanding and Using Linear Programming, Springer 2007, p. 99, Lemma 6.6.2
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me