Constructing an augmenting walk from an improving labeling #
The two phases of Lemma 31 in [KKR18], arXiv v6, Section 6.1, printed p. 15, use deterministic scans of the actual positional incidence records. The first phase repairs defects of the comparison labeling outside the original defect set; the second phase follows remaining disagreements. Each exchange removes exactly two disagreements. The clock counts exchanges, not native-machine steps; native encoding and runtime certification belong to the solver integration. An improving valid comparison labeling is an input, not an assumed solver result. The construction works for any specified excluded start, strengthening the source's hypothesis that this variable is inconsistent; it may be the terminal variable.
Main definitions #
EdgeInstance.repair,EdgeInstance.buildWalk: the two clocked exchange phases.EdgeInstance.augmentingWalk: their total, choice-free composition.
Main results #
EdgeInstance.repair_spec,EdgeInstance.buildWalk_spec: phase invariants and exact progress.EdgeInstance.augmentingWalk_spec: Lemma 31 with a bound on the combined exchange count.EdgeInstance.isOptimalLabeling_iff_no_augmentingWalk: the augmenting-walk characterization.
First satisfying incidence pair in positional order. This scan examines pairs, not trails.
Instances For
A returned scan pair satisfies the predicate.
A failed scan rules out every pair, since all incidences are enumerated.
A first-phase exchange repairs an f-consistent variable at which g has a new defect.
Instances For
Clocked first phase. The second output counts exchanges. No choice or partner operation occurs in this routine; an exhausted clock returns its current labeling.
Instances For
A new defect provides a first-phase exchange using the local even delta-matroid axiom.
The clocked repair preserves validity and never increases defects. It removes two occurrence disagreements per exchange, and a clock at least the initial Hamming distance suffices to leave no new defects.
Two fewer defects and containment provide a starting defect different from any specified variable. Only the start is excluded; the walk may end at that variable.
A second-phase move follows an incidence disagreement at the current endpoint.
Instances For
Clocked second phase. It extends the current trail by one local exchange and stops on the first original defect reached. The scan and recursion contain no noncomputable choice.
Instances For
A defective current endpoint, consistent in the target, always admits an exchange.
The second-phase invariant. Already-used incidences agree with the target, so scans of remaining disagreements cannot reuse them. Once the first step is taken, every incidence of the starting variable agrees with the target, preventing a return to that start.
- prefix_valid : Walk.IsFPrefix sem f w
- endpoint_defect : Inconsistent (w.flip f) w.finish
- target_endpoint : ¬Inconsistent g w.finish
- start_defect : Inconsistent f w.start
- target_start : ¬Inconsistent g w.start
- used_agrees (a : F.Occurrence) : a ∈ w.edges → w.flip f a = g a
Instances For
The second phase returns an augmenting prefix-valid incidence trail. Its clock counts exchanges, and each appended step removes exactly two remaining occurrence disagreements.
Start the second phase at a chosen original defect absent from the comparison labeling.
Full Lemma 31 existence conclusion, obtained by the actual two phases. The specified variable is excluded only as the start. No solver or augmenting-walk assumption is used.
First original defect absent from the comparison labeling, excluding the specified start. Incidences are scanned in positional order; no arbitrary occurrence is chosen.
Instances For
The full two-phase construction of Lemma 31. The clocks are occurrence Hamming distances;
failed or insufficient inputs return none. Correctness under the mathematical hypotheses
is augmentingWalk_spec. The routine does not solve for the improving comparison labeling.
Instances For
Lemma 31 with a concrete total routine: given an improving valid comparison labeling,
augmentingWalk returns an augmenting f-walk starting away from the specified variable.
Both phases together perform at most half the original occurrence disagreements in exchanges.
This bounds local exchanges; no native-machine runtime bound is asserted.
Nonoptimality is equivalent to existence of an augmenting walk, without assuming a solver.
An optimal valid labeling has no augmenting walk, and conversely.