Download data/lean/OAI/Combinatorics/MatchingPSD/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 1.79 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/MatchingPSD/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/MatchingPSD/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/MatchingPSD/Model.lean
1.79 kB
| import Mathlib | |
| namespace OAI | |
| namespace PerfectMatchingPSD | |
| abbrev Edge (n : β) := {p : Fin n Γ Fin n // p.1 < p.2} | |
| def IsPerfectMatching {n : β} (M : Finset (Edge n)) : Prop := | |
| β v : Fin n, (M.filter fun e => e.1.1 = v β¨ e.1.2 = v).card = 1 | |
| abbrev PerfectMatching (n : β) := | |
| {M : Finset (Edge n) // IsPerfectMatching M} | |
| abbrev OddCut (n : β) := {U : Finset (Fin n) // Odd U.card} | |
| abbrev Row (n : β) := Edge n β OddCut n | |
| def Crosses {n : β} (U : Finset (Fin n)) (e : Edge n) : Prop := | |
| (e.1.1 β U β§ e.1.2 β U) β¨ (e.1.1 β U β§ e.1.2 β U) | |
| noncomputable def crossingCount {n : β} (U : Finset (Fin n)) | |
| (M : PerfectMatching n) : β := by | |
| classical | |
| exact (M.1.filter (Crosses U)).card | |
| noncomputable def slack {n : β} (i : Row n) (M : PerfectMatching n) : β := by | |
| classical | |
| exact match i with | |
| | Sum.inl e => if e β M.1 then 1 else 0 | |
| | Sum.inr U => (crossingCount U.1 M : β) - 1 | |
| /-- Real PSD factors of order `r`, without equivariance or rank-one restrictions. -/ | |
| def HasFactorization (n r : β) : Prop := | |
| β (A : Row n β Matrix (Fin r) (Fin r) β) | |
| (B : PerfectMatching n β Matrix (Fin r) (Fin r) β), | |
| (β i, (A i).PosSemidef) β§ (β M, (B M).PosSemidef) β§ | |
| β i M, slack i M = Matrix.trace (A i * B M) | |
| /-- The least positive order of a real PSD factorization. -/ | |
| noncomputable def psdRank (n : β) : β := | |
| sInf {r : β | 0 < r β§ HasFactorization n r} | |
| /-- Every positive real power is eventually smaller than the PSD rank, | |
| uniformly over all even vertex counts. The exponentiation is real `rpow`. -/ | |
| def MainClaim : Prop := | |
| β C : β, 0 < C β β nβ : β, 4 β€ nβ β§ | |
| β n : β, nβ β€ n β Even n β (n : β) ^ C < (psdRank n : β) | |
| end PerfectMatchingPSD | |
| end OAI | |