2.25. Whole-Instance Blossom Contraction and Lifting🔗
Import CslibFrontier.Algorithms.Lean.EdgeCSP.Blossom.Optimality and
CslibFrontier.Algorithms.Lean.EdgeCSP.Blossom.Size. The actual constructor
contracts every internal port of each distinct touched original constraint once,
retains outside order and nullaries, and appends a genuine exactly-one node.
Its reference labels use a one-hot central row:
If b internal variables touch r original constraints, r ≤ b and
numVars(new)+b = numVars(old)+r. Positive constraint count increases by one.
The resource 2*numVars−positiveCount strictly decreases even when r=b;
variable count alone is insufficient. Nullary constraints are not counted.
Cslib.Logic.PL.CSP.Blossom.isOptimal_of_reference transfers
optimality from the contracted reference. If a recursive call instead supplies
any improving valid contracted labels, the executable lift returns valid
original labels with exactly two fewer defects:
No agreement with old outside labels is required. The code derives the actual
augmenting walk, restores its outside prefix, and selects an original exchange
and shortest exit using the full no-shortcut blossom. Forward projection is
Cslib.Logic.PL.CSP.Blossom.projectAugmentation_spec.
CslibFrontierTests/EdgeCSPBlossomContraction.lean and
CslibFrontierTests/EdgeCSPBlossomLifting.lean execute repeated original
constraints, nonempty preparation, changed outside values, sparse binary names,
and exact r=b accounting. Old table row counts do not increase; the new
exactly-one table has r rows of width r. These mathematical and executable
results feed the complete native recursive solver documented next.
Geometric recognition, planar hardness and the full dichotomy remain open.