Documentation

Complexity.Computability.Circuit.Boolean.MassProduction.Uhlig.Layer

One layer of Uhlig's construction #

Split the input of f into a prefix of p bits and a suffix of w bits. For each of the 2 ^ p prefixes, the restriction of f is a function of the suffix. Uhlig's code of these restrictions gives 2 ^ p + 1 resource functions on w bits (resource). Group 2 t copies into t pairs. In each pair, every resource reads the suffix of the copy that uses it (BitString.Uhlig.first, BitString.Uhlig.second); each copy then sums its resources. Hence t copies of every resource yield 2 t copies of f, at an overhead linear in t.

The routing and decoding gates are disjunctive normal forms of the two prefixes in a pair, so their number is polynomial in 2 ^ p and w. This is far from optimal, but it is negligible in the recursion of Uhlig, where 2 ^ p is polynomial in the input length.

Sizes count all gates, including constants and negations. The theorem bounds circuit size; it does not certify the running time of any circuit constructor.

Main definitions #

Main results #

References #

The restriction of f to prefix number a, as a function of the suffix z. It is false when a numbers no prefix.

Instances For

    Resource j of Uhlig's construction: position j of the code of the restrictions.

    Instances For

      Restricting to the number of the actual prefix evaluates f.

      The number of the prefix of copy c.

      Instances For
        @[reducible, inline]

        Copy s of pair i: pair i consists of copies i and t + i.

        Instances For
          def Cslib.Circuits.Boolean.MassProduction.Uhlig.pairWires {p w t : ℕ} (i : Fin t) :
          Fin (p + p) → Fin (2 * t * (p + w))

          The prefix wires of both copies of pair i.

          Instances For

            Whether copy s of a pair uses code position j, read from the pair's two prefixes.

            Instances For
              def Cslib.Circuits.Boolean.MassProduction.Uhlig.routedBit {p w t : ℕ} (j : ℕ) (i : Fin t) (k : Fin w) (x : BitString (2 * t * (p + w))) :

              The suffix bit k routed to resource j from pair i.

              Instances For
                @[reducible, inline]

                The gate budget of one disjunctive normal form over the two prefixes of a pair.

                Instances For

                  The gates spent on each pair, besides the resource circuits.

                  Instances For
                    def Cslib.Circuits.Boolean.MassProduction.Uhlig.decoded {p w t : ℕ} (s : Fin 2) (i : Fin t) (y : BitString (2 * t * (p + w) + (2 ^ p + 1) * t)) :

                    The decoded output of copy s of pair i, reading the bank outputs after the inputs.

                    Instances For
                      theorem Cslib.Circuits.Boolean.MassProduction.Uhlig.decoded_eq {p w t : ℕ} (f : BooleanFunction (p + w)) (s : Fin 2) (i : Fin t) (x : BitString (2 * t * (p + w))) (y : BitString (2 * t * (p + w) + (2 ^ p + 1) * t)) (hx : y ∘ Fin.castAdd ((2 ^ p + 1) * t) = x) (hy : ∀ (j : Fin (2 ^ p + 1)), y (Fin.natAdd (2 * t * (p + w)) (finProdFinEquiv (j, i))) = resource f (↑j) (if BitString.Uhlig.first (rank x (pairCopy 0 i)) (rank x (pairCopy 1 i)) ↑j = true then directProductInput x (pairCopy 0 i) ∘ Fin.natAdd p else directProductInput x (pairCopy 1 i) ∘ Fin.natAdd p)) :

                      If the decoder reads the inputs and, for every resource, its value on the routed suffixes of pair i, then copy s of pair i decodes to f on that copy's input.

                      One layer of Uhlig's construction. If every function on w inputs has t independent copies of size at most B, then every function on p + w inputs has 2 t independent copies of size at most (2 ^ p + 1) * B + t * layerOverhead p w.