Documentation

CslibFrontier.Foundations.Data.BitString.Positions

The positions of the ones of a bit string #

Cslib.BitString.positions x lists the coordinates where x : BitString n is true, in increasing order and without repetition. Streaming reductions from set disjointness read a bit string as the stream of its positions.

Main definitions #

Main results #

The coordinates where a bit string is true, in increasing order.

@[simp]
theorem Cslib.BitString.mem_positions {n : ℕ} {x : BitString n} {i : Fin n} :
@[simp]

The number of 1-bit positions in x equals its Hamming weight.

theorem Cslib.BitString.pairwise_positions {n : ℕ} (x : BitString n) :
List.Pairwise (fun (x1 x2 : Fin n) => x1 < x2) x.positions

The positions of 1-bits in x are strictly increasing under <.