Documentation

CslibFrontier.Foundations.Data.BitString.Single

Unit vectors in Boolean vectors #

The unit vectors in ι → Bool are the functions Pi.single i true: they have a unique true coordinate and Hamming weight one. For a Boolean vector t : ι → Bool with exclusive or as addition, the two vectors obtained by adding Pi.single i b with b = false and b = true add up to Pi.single i true: the shared mask t cancels. This is the reconstruction step of the two-server and subcube private information retrieval schemes of Chor, Goldreich, Kushilevitz and Sudan.

Main definitions #

Main results #

def Cslib.BitString.IsSingle {ι : Type u_1} [DecidableEq ι] (c : ι → Bool) :

A bit string is a unit vector if it is Pi.single i true for some i.

Instances For
    @[instance_reducible]
    @[simp]

    A Boolean unit vector has Hamming weight one.

    A Boolean vector has Hamming weight one exactly when it is a unit vector.

    Adding the two choices of the i-th unit vector to a shared mask t and summing leaves the unit vector: (t + e_i·0) + (t + e_i·1) = e_i.