Documentation

CslibFrontier.Computability.Circuit.Boolean.Threshold

The basis of threshold gates #

The threshold gate Th^m_j of m arguments says that at least j of them are true (Cslib.threshold m j). The threshold gates of every arity and every cutoff, together with negation, form the basis of threshold circuits Hajnal et al., Section 2. Here the gates are unweighted: each of the m arguments counts once. A circuit may wire one value to several arguments of a gate, which counts it that many times, so positive integer weights cost no extra gates; a gate with weights ±1 is a threshold gate reading some of its arguments negated. As for AC⁰ circuits over the unbounded fan-in basis, negations are free in the depth that counts threshold gates (Threshold.thresholdCost).

Cutoff 0 is the constant true, a cutoff above the arity the constant false (Cslib.threshold_zero_right, Cslib.threshold_eq_false_of_lt), cutoff 1 the disjunction and cutoff m the conjunction of m arguments (Cslib.threshold_one_right, Cslib.threshold_self). So the unbounded fan-in basis maps into the threshold basis keeping the meaning of every operation (Threshold.ofUnbounded), and its AND/OR depth becomes the threshold depth (Threshold.thresholdCost_ofUnbounded). The majority gate of m arguments is the threshold gate Th^m_⌈m/2⌉ (Cslib.majority), so the basis of TC⁰ maps into the threshold basis too (Threshold.ofMajority).

Main definitions #

Main results #

References #

Negation, and the threshold gate of m arguments with cutoff j for every m and j.

  • not : Op

    Negation.

  • threshold (m j : ℕ) : Op

    The threshold gate Th^m_j: at least j of its m arguments are true.

@[reducible, inline]

The arity of an operation.

@[reducible, inline]

The signature of negation and of the threshold gates. It is reducible, so that case analysis on its operations sees their arities.

The Boolean meaning of the operations.

Instances For
    @[simp]

    The threshold-basis interpretation of .not is Boolean negation of its single argument.

    @[simp]

    The threshold-basis interpretation of .threshold m j is Cslib.threshold m j.

    The cost of an operation in the threshold depth: negations are free. With these costs, Circuit.depthWith is the largest number of threshold gates on a path, as Unbounded.andOrCost counts the AND and OR gates of circuits over the unbounded fan-in basis.

    @[simp]

    Every threshold gate .threshold m j has thresholdCost equal to 1.

    Every operation in the threshold basis has thresholdCost at most 1.

    The operations of the unbounded fan-in basis as threshold gates: the conjunction of m arguments is Th^m_m and their disjunction is Th^m_1.

    The unbounded fan-in basis inside the threshold basis.

    Instances For
      @[simp]

      The AND/OR depth of a circuit over the unbounded fan-in basis is the threshold depth of its translation.

      The operations of the basis of TC⁰ as threshold gates: the majority gate of m arguments is Th^m_⌈m/2⌉.

      The basis of TC⁰, the unbounded fan-in basis with majority gates, inside the threshold basis.

      Instances For