Documentation

CommunicationComplexity.BitString

@[reducible, inline]

n-bit strings, represented as Boolean-valued functions on Fin n.

Equations
Instances For

    The signed inner product of two Boolean strings, viewed through the usual {0,1} to {±1} correspondence. Each agreeing coordinate contributes 1, and each disagreeing coordinate contributes -1.

    Equations
    Instances For

      The number of coordinates on which two bit strings agree.

      Equations
      Instances For

        The number of agreeing coordinates plus the number of disagreeing coordinates is the total length of the strings.

        The number of agreeing coordinates is the total length minus the Hamming distance.

        The signed inner product is the length minus twice the Hamming distance.

        The signed inner product is the number of agreeing coordinates minus the number of disagreeing coordinates.

        theorem CommunicationComplexity.BitString.signedInner_append {m n : } (x₁ : Fin mBool) (x₂ : Fin nBool) (y₁ : Fin mBool) (y₂ : Fin nBool) :
        signedInner (Fin.append x₁ x₂) (Fin.append y₁ y₂) = signedInner x₁ y₁ + signedInner x₂ y₂

        Concatenating two pairs of strings adds their signed inner products.

        Reindexing both inputs along a Fin.cast does not change the signed inner product.

        Repeating both inputs a times multiplies the signed inner product by a.