math / data /lean /OAI /Combinatorics /MatchingPSD /AffineModel.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
637 Bytes
import Mathlib
import OAI.Combinatorics.MatchingPSD.Model
namespace OAI
namespace PerfectMatchingPSD
noncomputable def matchingPoint {n : β„•} (M : PerfectMatching n) : Edge n β†’ ℝ := by
classical
exact fun e => if e ∈ M.1 then 1 else 0
noncomputable def matchingPolytope (n : β„•) : Set (Edge n β†’ ℝ) :=
convexHull ℝ (Set.range (matchingPoint (n := n)))
def HasAffineLift (n r : β„•) : Prop :=
βˆƒ (L : AffineSubspace ℝ (Matrix (Fin r) (Fin r) ℝ))
(T : Matrix (Fin r) (Fin r) ℝ →ᡃ[ℝ] (Edge n β†’ ℝ)),
T '' {X | X ∈ L ∧ X.PosSemidef} = matchingPolytope n
end PerfectMatchingPSD
end OAI