Documentation

Sensitivity.Defs

Boolean Function Definitions #

Core definitions for Boolean functions on the hypercube Fin n → Bool, including sensitivity.

@[reducible, inline]

A Boolean function on n variables.

Equations
Instances For
    def Sensitivity.flipBit {n : } (x : Fin nBool) (i : Fin n) :
    Fin nBool

    Flip the i-th bit of an input.

    Equations
    Instances For
      @[simp]
      theorem Sensitivity.flipBit_apply_same {n : } (x : Fin nBool) (i : Fin n) :
      flipBit x i i = !x i
      @[simp]
      theorem Sensitivity.flipBit_apply_ne {n : } (x : Fin nBool) (i : Fin n) {j : Fin n} (h : j i) :
      flipBit x i j = x j
      @[simp]
      theorem Sensitivity.flipBit_flipBit_same {n : } (x : Fin nBool) (i : Fin n) :
      flipBit (flipBit x i) i = x
      theorem Sensitivity.flipBit_ne_self {n : } (x : Fin nBool) (i : Fin n) :
      flipBit x i x
      def Sensitivity.BoolFun.sensitiveAt {n : } (f : BoolFun n) (x : Fin nBool) (i : Fin n) :

      Whether f is sensitive at input x in coordinate i.

      Equations
      Instances For

        The local sensitivity of f at input x: number of sensitive coordinates.

        Equations
        Instances For
          noncomputable def Sensitivity.BoolFun.sensitivity {n : } (f : BoolFun n) :

          The sensitivity of f: maximum local sensitivity over all inputs.

          Equations
          Instances For

            The sensitivity is at most n.

            The local sensitivity is at most the sensitivity.

            def Sensitivity.flipCoords {n : } (x : Fin nBool) (S : Finset (Fin n)) :
            Fin nBool

            Flip all bits in a set of coordinates.

            Equations
            Instances For