Documentation

CslibFrontier.Foundations.Data.BitString.Support.Equiv

Equivalence between Boolean vectors and coordinate subsets #

Every Boolean vector x : ι → Bool over a finite decidable index type ι corresponds to its support {i | x i = true} : Finset ι, with inverse sending S : Finset ι to its indicator fun i => decide (i ∈ S).

Main definitions #

Main results #

def Cslib.BitString.supportEquiv {ι : Type u_1} [Fintype ι] [DecidableEq ι] :
(ι → Bool) ≃ Finset ι

The bijection between Boolean vectors x : ι → Bool and coordinate subsets S : Finset ι sending x to its support {i | x i = true} and S to its indicator i ↦ decide (i ∈ S).

@[simp]
theorem Cslib.BitString.supportEquiv_apply {ι : Type u_1} [Fintype ι] [DecidableEq ι] (x : ι → Bool) :
supportEquiv x = {i : ι | x i = true}

supportEquiv sends x to its support {i | x i = true}.

theorem Cslib.BitString.mem_supportEquiv {ι : Type u_1} [Fintype ι] [DecidableEq ι] (x : ι → Bool) (i : ι) :

Coordinate i belongs to supportEquiv x iff x i = true.

@[simp]
theorem Cslib.BitString.supportEquiv_symm_apply {ι : Type u_1} [Fintype ι] [DecidableEq ι] (S : Finset ι) (i : ι) :

supportEquiv.symm sends S to its indicator i ↦ decide (i ∈ S).