Documentation

LeanPool.PebblingLean.Hypercube

Hypercubes #

The n-dimensional hypercube is represented as Boolean coordinate functions Fin n → Bool. Two vertices are adjacent when they differ in exactly one coordinate.

@[reducible, inline]

Vertices of the n-cube.

Equations
Instances For

    Hamming distance on Boolean coordinate functions.

    Equations
    Instances For

      Coordinates on which two hypercube vertices differ.

      Equations
      Instances For

        Hamming distance in Q_n is at most n.

        The vertex obtained from base by flipping exactly the coordinates in s.

        Equations
        Instances For
          @[simp]
          theorem PebblingLean.Hypercube.diffSet_fromDiffSet {n : } (base : HypercubeVertex n) (s : Finset (Fin n)) :
          diffSet base (fromDiffSet base s) = s
          @[simp]

          Vertices of Q_n are equivalent to subsets of coordinates, by recording where they differ from a fixed base vertex.

          Equations
          Instances For

            The Hamming sphere of radius k around any fixed hypercube vertex has cardinality n choose k.

            @[simp]

            Hamming distance satisfies the triangle inequality.

            The n-dimensional hypercube graph.

            Equations
            Instances For
              theorem PebblingLean.Hypercube.dist_adj_le_succ {n : } {x y t : HypercubeVertex n} (hxy : (graph n).Adj x y) :
              dist x t dist y t + 1

              Adjacent hypercube vertices have distances to any third vertex that differ by at most one in this direction.