Documentation

Complexity.Algorithms.Lean.Sort.Bitonic.ZeroOne

The zero-one argument for bitonic splitting #

Thresholding a tuple at any pivot preserves its four-point bitonic invariant. A finite kernel-checked Boolean lemma therefore proves that pairwise minima and maxima of two halves remain bitonic over every linear order.

Main results #

References #

theorem Cslib.BitonicSort.IsBitonic.min_halves {α : Type u_1} [LinearOrder α] {n : ℕ} (first second : Fin n → α) (hsequence : IsBitonic (Fin.append first second)) :
IsBitonic (first ⊓ second)

The minima of corresponding entries in the two halves of a bitonic tuple are bitonic.

theorem Cslib.BitonicSort.IsBitonic.dual {α : Type u_1} [LinearOrder α] {n : ℕ} {input : Fin n → α} (h : IsBitonic input) :
IsBitonic input

Reversing the value order exchanges the two four-point inequalities.

theorem Cslib.BitonicSort.IsBitonic.max_halves {α : Type u_1} [LinearOrder α] {n : ℕ} (first second : Fin n → α) (h : IsBitonic (Fin.append first second)) :
IsBitonic (first ⊔ second)

The maxima of corresponding entries in the two halves of a bitonic tuple are bitonic.