Documentation

CslibFrontier.Algorithms.Lean.CDCL.Luby

The Luby sequence #

The restart schedule of MiniSat (luby_restart). The Luby sequence 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 1, 1, 2, 4, 8, … of Luby, Sinclair and Zuckerman repeats each prefix before doubling; luby y x is its x-th term with base y in place of 2, as MiniSat's luby computes it: find the smallest complete subsequence (of length 2 ^ (k + 1) - 1) containing x, then descend into it.

Both loops are bounded by fuel, so the kernel can evaluate the sequence; the fuel suffices, as the tests check on its prefix.

Main definitions #

Main results #

The smallest complete subsequence containing position x: its size 2 ^ (seq + 1) - 1 and seq, by doubling from size and seq. A loop of luby, which supplies enough fuel.

The exponent of the term at position x of a complete subsequence of size size and exponent seq: the last position has the exponent seq; otherwise descend into the half containing x. A loop of luby, which supplies enough fuel.

The Luby sequence: its term at position x, with base y.

theorem Cslib.Algorithms.Lean.CDCL.luby_pow (y m : ℕ) :
luby y (2 ^ (m + 1) - 2) = y ^ m

The peaks of the Luby sequence: for every base y, its term at position 2 ^ (m + 1) - 2, the end of a complete subsequence, is y ^ m. So the sequence is unbounded for y ≥ 2; for y = 1 its peaks, like all its terms, are 1.