AFTD Auto-Formalizing Theoretical Domains

EconCSLib.LinearAlgebra.theorem_of_alternative_base

theoremverifiedformalizationimported Lean

EconCSLib.LinearAlgebra.theorem_of_alternative_base

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.theorem_of_alternative_base
    {I : Type*} [Fintype I] [DecidableEq I] (A : I β†’ Fin 0 β†’ π•œ) (b : I β†’ π•œ) :
    Β¬ IsFeasible A b ↔ HasCertificate A b
Formalizes
EconCSLib, `EconCSLib.LinearAlgebra.theorem_of_alternative_base`
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 6
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.theorem_of_alternative_base    {I : Type*} [Fintype I] [DecidableEq I] (A : I β†’ Fin 0 β†’ π•œ) (b : I β†’ π•œ) :    Β¬ IsFeasible A b ↔ HasCertificate A b := by  classical  refine ⟨?_, fun hcert hfeas => feas_cert_disjoint A b hfeas hcert⟩  intro hinf  -- `IsFeasible ↔ βˆ€ i, b i ≀ 0`; the negation provides an index with `0 < b i`.  have h_pick : βˆƒ i : I, 0 < b i := by    by_contra hall    push Not at hall    apply hinf    refine ⟨fun j : Fin 0 => Fin.elim0 j, fun i => ?_⟩    have h_row_zero : rowEval A i (fun j : Fin 0 => Fin.elim0 j) = 0 := by      unfold rowEval      apply Finset.sum_eq_zero      intro j _      exact Fin.elim0 j    rw [h_row_zero]    exact hall i  obtain ⟨iβ‚€, hiβ‚€βŸ© := h_pick  refine ⟨fun i => if iβ‚€ = i then 1 else 0, ?_, ?_, ?_⟩  Β· intro i    show 0 ≀ if iβ‚€ = i then (1 : π•œ) else 0    split_ifs <;> norm_num  Β· intro j; exact Fin.elim0 j  Β· -- βˆ‘ i, (if iβ‚€ = i then 1 else 0) * b i = b iβ‚€ > 0    show 0 < βˆ‘ i, (if iβ‚€ = i then (1 : π•œ) else 0) * b i    simp only [ite_mul, one_mul, zero_mul, Fintype.sum_ite_eq]    exact hiβ‚€
See it in the graphDiscuss this resultChallenge it