AFTD Auto-Formalizing Theoretical Domains

is_size_priority_optimal

def

Given the bipartite graph on Fin n + Fin n with edge set E and real edge costs w, a set M of pairs is size-priority optimal when it is a matching of E (bipartite_matchings n E), no matching of E has more edges than M, and every matching of E with as many edges as M has total cost (sum of w over its edges) at least that of M; that is, M minimizes total cost among maximum-cardinality matchings.

Statement

def is_size_priority_optimal (n : ℕ) (E : Finset (Fin n × Fin n)) (w : Fin n × Fin n → ℝ)
    (M : Finset (Fin n × Fin n)) : Prop
Defined in
arXiv:2601.20502 (Optimal matching under size priority), Section 1: the size-priority optimal matching, minimum cost among maximum-cardinality matchings.
Verified
17 Nov 2026
Axioms
none listed
Built on 1
  • bipartite_matchingsFor a bipartite graph with left vertices Fin n and right vertices Fin n whose edge set is E (a finite set of pairs (left, right)), the…
Used by 3
  • size_priority_matching_specFor every edge set E of the bipartite graph on Fin n + Fin n and all real costs w, size_priority_matching n E w is size-priority optimal:…
  • size_priority_matchingA chosen size-priority optimal matching of the bipartite graph on Fin n + Fin n with edge set E under costs w (Hilbert's epsilon of…
  • size_priority_matching_card_leFor every n, every edge set E ⊆ Fin n × Fin n, and every real cost function w, the size-priority optimal matching size_priority_matching n…

Read back from the Lean

Given a natural number n, an edge set E : Finset (Fin n × Fin n), an edge-weight function w : Fin n × Fin n → ℝ, and an edge subset M : Finset (Fin n × Fin n), is_size_priority_optimal n E w M asserts that: 1. M is a bipartite matching in E (that is, M ⊆ E and no two distinct edges in M share a left endpoint or a right endpoint); 2. M has maximum cardinality among all bipartite matchings in E (for every bipartite matching M' in E, M'.card ≤ M.card); and 3. M minimizes total weight among all bipartite matchings of the same cardinality (for every bipartite matching M' in E with M'.card = M.card, ∑ e ∈ M, w e ≤ ∑ e ∈ M', w e).

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

def is_size_priority_optimal (n : ℕ) (E : Finset (Fin n × Fin n)) (w : Fin n × Fin n → ℝ)
    (M : Finset (Fin n × Fin n)) : Prop :=
  M ∈ bipartite_matchings n E ∧ (∀ M' ∈ bipartite_matchings n E, M'.card ≤ M.card) ∧
    ∀ M' ∈ bipartite_matchings n E, M'.card = M.card → ∑ e ∈ M, w e ≤ ∑ e ∈ M', w e
See it in the graphDiscuss this resultChallenge it