The Boolean cube #
An input on a finite coordinate set V is a map V → Bool. For A : Finset V
we write flipSet x A for the input x^A of Section 1 of bs_lambda.txt, obtained by
flipping every coordinate of A.
Hamming distance is taken from Mathlib (hammingDist).
Adapted for Lean Pool from Timeroot/BS_Lam at commit
7bd39a8d41ee7910d3296d0477ad18f8fff9d870; ported to Lean Pool with proof and dependency cleanup.
An input to a Boolean function on the coordinate set V.
Equations
- BSLambda.Input V = (V → Bool)
Instances For
The all-zero input, written 0^V in bs_lambda.txt.
Equations
- BSLambda.zeroInput V x✝ = false
Instances For
A coordinate survives flipSet exactly when it lies outside the flipped set.
An input differs from its flip at every flipped coordinate.
Undoing one half of a pair flip leaves the single flip at the other coordinate: this is the "other midpoint" identity behind every two-midpoint argument.
Flipping a fixed set of coordinates is injective in the input.
Distinct coordinates give distinct single-coordinate flips of a fixed input.
The flipped coordinate of a single-coordinate flip.
Flipping a set of coordinates of the all-zero input yields its indicator function.
The Hamming distance from x to x^A is exactly A.card.
Two flips of the same input differ exactly on the symmetric difference of the flipped sets.
Every input is a flip of every other, at the set of coordinates where they differ.
Two inputs at Hamming distance 1 differ in exactly one coordinate.