Neighbors and cliques in the Boolean input cube #
Neighbors are single-bit flips. Distinct neighbors of a vertex are distance two apart, so every clique has at most two vertices.
The graph whose edges change exactly one Boolean coordinate.
Equations
- Algebraic.BooleanCube.graph = { Adj := fun (left right : ι → Bool) => hammingDist left right = 1, symm := ⋯, loopless := ⋯ }
Instances For
Flip one coordinate of a Boolean vertex.
Equations
- Algebraic.BooleanCube.flip vertex i = Function.update vertex i !vertex i
Instances For
theorem
Algebraic.BooleanCube.hammingDist_flip
{ι : Type u_1}
[Fintype ι]
[DecidableEq ι]
(vertex : ι → Bool)
(i : ι)
:
A single flip changes exactly one coordinate.
theorem
Algebraic.BooleanCube.flip_ne
{ι : Type u_1}
[Fintype ι]
[DecidableEq ι]
(vertex : ι → Bool)
(i : ι)
:
A flipped vertex is different from the original vertex.
theorem
Algebraic.BooleanCube.hammingDist_flip_flip
{ι : Type u_1}
[Fintype ι]
[DecidableEq ι]
(vertex : ι → Bool)
{i j : ι}
(different : i ≠ j)
:
Flipping two different coordinates gives neighbors at mutual distance two.
theorem
Algebraic.BooleanCube.not_adjacent_of_common_neighbor
{ι : Type u_1}
[Fintype ι]
[DecidableEq ι]
{base left right : ι → Bool}
(hl : graph.Adj base left)
(hr : graph.Adj base right)
(different : left ≠ right)
:
Distinct neighbors of a Boolean vertex are never adjacent to each other.