AFTD Auto-Formalizing Theoretical Domains

is_k_extendable

def

For a finite vertex type V (with [Fintype V]), a simple graph G : SimpleGraph V and k : ℕ, is_k_extendable G k is the Prop that is the conjunction of three conditions: (1) 2 * k + 2 ≤ Fintype.card V; (2) there is a subgraph M : G.Subgraph with M.IsMatching and M.edgeSet.ncard = k (a matching with exactly k edges); (3) for every subgraph M : G.Subgraph with M.IsMatching and M.edgeSet.ncard = k there is a subgraph P : G.Subgraph with P.IsPerfectMatching and M ≤ P (every k-matching extends to a perfect matching).

Statement

def is_k_extendable {V : Type*} [Fintype V] (G : SimpleGraph V) (k : ℕ) : Prop
Defined in
arXiv:2611.22690, Section 2 (definition of k-extendable graphs); matchings are Mathlib subgraphs with IsMatching, size = ncard of the edge set
Verified
18 Nov 2026
Axioms
none listed
Used by 101

Read back from the Lean

For a finite type V, a simple graph G on V, and a natural number k, is_k_extendable G k asserts the conjunction of three conditions: 1. The number of vertices of V is at least 2 * k + 2 (i.e., 2 * k + 2 ≤ Fintype.card V); 2. There exists a subgraph M of G such that M is a matching and the cardinality of its edge set is k; and 3. For every subgraph M of G, if M is a matching and the cardinality of its edge set is k, then there exists a subgraph P of G such that P is a perfect matching and M ≤ P (i.e., M is a subgraph of P).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- G is k-extendable: at least 2k+2 vertices, has a k-matching, and every k-matching extends to a perfect matching. -/
def is_k_extendable {V : Type*} [Fintype V] (G : SimpleGraph V) (k : ℕ) : Prop :=
  2 * k + 2 ≤ Fintype.card V ∧
  (∃ M : G.Subgraph, M.IsMatching ∧ M.edgeSet.ncard = k) ∧
  ∀ M : G.Subgraph, M.IsMatching → M.edgeSet.ncard = k →
    ∃ P : G.Subgraph, P.IsPerfectMatching ∧ M ≤ P
See it in the graphDiscuss this resultChallenge it