Documentation

CslibFrontier.Algorithms.WordRAM.OddCycleTransversal.CompressProg

Compression leaf, base-3 odometer, and outer octProg Word-RAM programs #

This module defines the Memory.Prog routines implementing Hüffner's three-way compression leaf (buildWProg, unpackGuessProg, checkProperProg, buildTerminalsProg, countDelProg, commitLeafProg, leafProg), the base-3 odometer (incOdomProg, compressProg), and the top-level iterative-compression loop (octStep, octProg), together with octProg_realizes.

Main definitions #

Main results #

Compression leaf, base-3 odometer, and outer iterative compression #

Copy sepBase into wBase, insert m, and compact into wListBase.

Scatter base-3 odometer digits from digitBase to guessBase.

@[reducible, inline]

Number of vertices in properInnerStep arguments (((n, m), u), du), (j, ok).

@[reducible, inline]

Active vertex prefix bound in properInnerStep arguments.

@[reducible, inline]

Candidate vertex u in properInnerStep arguments.

@[reducible, inline]

Candidate colour du in properInnerStep arguments.

@[reducible, inline]

Scan index j in properInnerStep arguments.

@[reducible, inline]

Properness flag ok in properInnerStep arguments.

Check proper colouring between candidate vertex u and the j-th entry of W.

@[reducible, inline]

Number of vertices in properOuterStep arguments ((n, m), L), (i, ok).

@[reducible, inline]

Active vertex prefix bound in properOuterStep arguments.

@[reducible, inline]

List length L in properOuterStep arguments.

@[reducible, inline]

Outer scan index i in properOuterStep arguments.

@[reducible, inline]

Accumulated properness flag ok in properOuterStep arguments.

Outer loop checking that the guessed colouring is proper on W \ D.

@[reducible, inline]

Number of vertices in termInnerStep arguments ((n, m), (v, cv)), j.

@[reducible, inline]

Active vertex prefix bound in termInnerStep arguments.

@[reducible, inline]

Candidate vertex v in termInnerStep arguments.

@[reducible, inline]

Colour cv of vertex v in termInnerStep arguments.

Classify vertex v ∉ W as a keep/flip terminal against the j-th entry of W.

@[reducible, inline]

Number of vertices in termOuterStep arguments ((n, m), L), v.

@[reducible, inline]

Active vertex prefix bound in termOuterStep arguments.

@[reducible, inline]

List length L in termOuterStep arguments.

Outer loop populating keepBase and flipBase for every v < m off W.

Increment the deleted-vertex counter when digitBase n + j = 0.

Single-vertex commit updating sepBase and colBase.

Commit the accepted transversal D ∪ X and flipped colouring into sepBase/colBase.

@[reducible, inline]

Number of vertices in compression leaf configuration (((n, k), m), L).

@[reducible, inline]

Deletion budget k in compression leaf configuration.

@[reducible, inline]

Active vertex prefix bound m in compression leaf configuration.

Evaluate one base-3 guess D, σ on W via minSepProg, committing on success.

Single-digit carry propagation step of the base-3 odometer.

Increment the L-digit base-3 odometer in digitBase, returning final carry (0/1).

@[reducible, inline]

Number of vertices in guessStep arguments ((((n, k), m), L), (done, found)).

@[reducible, inline]

List length L in guessStep arguments.

@[reducible, inline]

Current found flag found in guessStep arguments.

One odometer iteration of compressProg: evaluate leafProg and advance digitBase.

Clamped base-3 evaluation of L digits starting at base in mem.

theorem Cslib.Algorithms.WordRAM.OddCycleTransversal.base3At_lt (mem : ℕ → ℕ) (base L : ℕ) :
base3At mem base L < 3 ^ L
theorem Cslib.Algorithms.WordRAM.OddCycleTransversal.base3At_congr {m₁ m₂ : ℕ → ℕ} {base L : ℕ} :
(∀ i < L, m₁ (base + i) = m₂ (base + i)) → base3At m₁ base L = base3At m₂ base L

Enumerate up to 3 ^ L guesses on W via a base-3 odometer.

@[reducible, inline]

Number of vertices in octStep arguments (n, k), (m, alive).

@[reducible, inline]

Deletion budget k in octStep arguments.

@[reducible, inline]

Active vertex index m in octStep arguments.

@[reducible, inline]

Liveness flag alive in octStep arguments.

One iterative-compression step incorporating vertex m into the candidate set.

Top-level exact-basis Word-RAM iterative-compression odd-cycle-transversal program.