Lemma 5.8 — sum of basic credits:
OpenStableCountSub3.lemma_5_8Fix an instance of the stable marriage problem with men and women, a downset of the rotation poset (the reference stable matching ), and an outward direction (forward: the order on ; backward: the reverse order on ). For a man write , and for his -th principal cone, its support (the set of men participating in its rotations) and the support size ( when the -th rotation of in the outward order does not exist). A man is simple if ; and (Definition 5.2). Executing a rotation means eliminating it (forward) or undoing its elimination (backward); a swap is a rotation whose execution exchanges the partners of the two men . Let be the set of images (Definition 5.4), and let the basic credit be for , for , for and for every other man (Definition 5.7, Table 1), where
Lemma 5.8. For the fixed downset and direction,
The identity reduces the dependence of the total basic credit on the classes to the number of simple men; averaged over pointed matchings it yields Lemma 5.14.
Formalization Note The basic credit is basicCredit I D m dir, defined by the case distinction , then , then , then the rest; and are cardinalities of filters of Finset.univ, cast to .
import Mathlib import Definitions.Def_StableCountSub3_Credits open StableMatching
namespace StableCountSub3
open Classical in
/-- Lemma 5.8: for a fixed downset and direction,
`∑_{m ∈ M} g^±_basic(D, m) = n δ₁ − (δ₁ − δ₂)(|B| + |C|)`. -/
theorem lemma_5_8 {n : ℕ} (I : Instance n) (D : Finset (Rot n)) (hD : IsDownset I D)
(dir : Dir) :
∑ m : Fin n, basicCredit I D m dir =
n * delta 1 - (delta 1 - delta 2) *
(((Finset.univ.filter fun m => InB I D m dir).card : ℝ) +
((Finset.univ.filter fun m => InC I D m dir).card : ℝ)) := by sorry
end StableCountSub3