Documentation

CslibFrontier.Foundations.BooleanAnalysis.CharacterProjection

Pulling Boolean characters back along coordinate maps #

For a map π : β → γ, the mod-2 projection BitString.projectSet π T of T : Finset β contains the points of γ with an odd number of preimages in T. Pulling a character back along π projects its frequency set: chi T (f ∘ π) = chi (projectSet π T) f (BitString.chi_comp_eq_chi_projectSet) Håstad. In particular, repeated coordinates cancel in pairs; the coordinate map need not be injective.

Affine Boolean functions, read as signs, are characters multiplied by the sign of their constant term. Adjoining a Boolean function of selected coordinates expands each new character as a linear combination of old characters.

Main results #

References #

Mod-2 projection of subsets and character pullback #

def Cslib.BitString.projectSet {β : Type u_1} {γ : Type u_2} [Fintype γ] [DecidableEq γ] (π : β → γ) (T : Finset β) :

The mod-2 projection π₂(T) of T : Finset β along π : β → γ: the set of y : γ whose fiber in T under π has odd cardinality Håstad.

@[simp]
theorem Cslib.BitString.mem_projectSet {β : Type u_1} {γ : Type u_2} [Fintype γ] [DecidableEq γ] {π : β → γ} {T : Finset β} {y : γ} :
y ∈ projectSet π T ↔ Odd {x ∈ T | π x = y}.card

y lies in the mod-2 projection of T exactly when its fiber in T has odd cardinality.

@[simp]
theorem Cslib.BitString.projectSet_empty {β : Type u_1} {γ : Type u_2} [Fintype γ] [DecidableEq γ] (π : β → γ) :

The mod-2 projection of the empty set is empty.

theorem Cslib.BitString.exists_mem_of_mem_projectSet {β : Type u_1} {γ : Type u_2} [Fintype γ] [DecidableEq γ] {π : β → γ} {T : Finset β} {y : γ} (hy : y ∈ projectSet π T) :
∃ x ∈ T, π x = y

Every element of projectSet π T lies in the image of T under π.

theorem Cslib.BitString.projectSet_subset_image {β : Type u_1} {γ : Type u_2} [Fintype γ] [DecidableEq γ] (π : β → γ) (T : Finset β) :
projectSet π T ⊆ Finset.image π T

The mod-2 projection of T along π is contained in the image T.image π.

theorem Cslib.BitString.card_projectSet_le {β : Type u_1} {γ : Type u_2} [Fintype γ] [DecidableEq γ] (π : β → γ) (T : Finset β) :

The mod-2 projection never increases cardinality: #(projectSet π T) ≤ #T.

theorem Cslib.BitString.projectSet_insert {β : Type u_1} {γ : Type u_2} [Fintype γ] [DecidableEq γ] [DecidableEq β] (π : β → γ) {x : β} {T : Finset β} (hx : x ∉ T) :
projectSet π (insert x T) = symmDiff (projectSet π T) {π x}

Inserting x ∉ T toggles π x in projectSet π T.

@[simp]
theorem Cslib.BitString.projectSet_id {β : Type u_1} [DecidableEq β] [Fintype β] (T : Finset β) :

The mod-2 projection along the identity is the identity.

theorem Cslib.BitString.chi_comp_eq_chi_projectSet {β : Type u_1} {γ : Type u_2} [Fintype γ] [DecidableEq γ] (π : β → γ) (T : Finset β) (f : γ → Bool) :
chi ℝ T (f ∘ π) = chi ℝ (projectSet π T) f

Pulling a character back along π projects the frequency set by projectSet π: chi ℝ T (f ∘ π) = chi ℝ (projectSet π T) f.

theorem Cslib.BitString.exists_signVal_eq_mul_chi_of_isAffine {ι : Type u_3} [Finite ι] {f : (ι → Bool) → Bool} (hf : IsAffine f) :
∃ (T : Finset ι), (fun (x : ι → Bool) => signVal (f x)) = fun (x : ι → Bool) => signVal (f 0) * chi ℝ T x

An affine Boolean function, read as signs, is a character multiplied by the sign of its constant term.

Adjoining a Boolean coordinate #

theorem Cslib.BitString.chi_option_elim {κ : Type u_3} [Finite κ] [DecidableEq κ] (S : Finset (Option κ)) (b : Bool) (y : κ → Bool) :
(chi ℝ S fun (o : Option κ) => o.elim b y) = (if none ∈ S then signVal b else 1) * chi ℝ (Finset.eraseNone S) y

A character of an Option-indexed vector splits into the new coordinate, when selected, and the character of the old coordinates.

theorem Cslib.BitString.chi_append_eq_sum {α : Type u_3} {κ : Type u_4} [Fintype α] [DecidableEq α] [Fintype κ] [DecidableEq κ] (φ : (α → Bool) → Bool) (args : α → κ) (S : Finset (Option κ)) (hnone : none ∈ S) (y : κ → Bool) :
(chi ℝ S fun (o : Option κ) => o.elim (φ (y ∘ args)) y) = ∑ T : Finset α, fourierCoeff (fun (z : α → Bool) => signVal (φ z)) T * chi ℝ (symmDiff (projectSet args T) (Finset.eraseNone S)) y

Adjoining φ of selected coordinates expands a character containing the new coordinate into old characters. The map args may repeat coordinates.