Documentation

Complexitylib.Algebraic.CircuitFamily

Nonuniform circuit families #

Circuit lower bounds are finite statements about one input width, while complexity classes quantify over a sequence of circuits. This module supplies that missing bridge without fixing a gate basis.

A Circuit.Family sigma m chooses one m-output circuit for every input width. Its gate count at each width is the member circuit's size, so size agrees definitionally with the finite circuit model. Polynomial size and constant depth are expressed by exact natural-number bounds. The factor (n + 1) ^ degree makes the definition well behaved at input width zero and avoids burying finite-prefix adjustments inside asymptotic notation.

@[reducible, inline]
abbrev Algebraic.Target.Family (U : Type u) (m : ℕ) :

An m-output target at every input width.

Equations
Instances For
    def Algebraic.Target.scalarFamily {U : Type u_1} (family : (n : ℕ) → ScalarFunction U n) :
    Family U 1

    Regard a family of scalar functions as a one-output target family.

    Equations
    Instances For
      @[simp]
      theorem Algebraic.Target.scalarFamily_apply {U : Type u_1} {n : ℕ} (family : (n : ℕ) → ScalarFunction U n) (input : Fin n → U) (output : Fin 1) :
      scalarFamily family n input output = family n input

      A natural-valued resource is bounded by one fixed polynomial.

      The coefficient and degree do not depend on the input width. Using n + 1 gives an exact all-width statement equivalent to the usual eventual polynomial bound for natural-valued resources.

      Equations
      Instances For

        A natural-valued resource is bounded by one constant at every width.

        Equations
        Instances For

          A resource eventually strictly exceeds every fixed natural polynomial.

          Equations
          Instances For
            theorem Cslib.Circuits.Circuit.Resource.PolynomiallyBounded.of_le {smaller larger : ℕ → ℕ} (bounded : PolynomiallyBounded larger) (comparison : ∀ (n : ℕ), smaller n ≤ larger n) :

            A pointwise smaller resource inherits a polynomial upper bound.

            Every constant resource bound is a degree-zero polynomial bound.

            Eventual domination of every polynomial rules out a polynomial bound.

            structure Cslib.Circuits.Circuit.Family (sigma : Signature) (m : ℕ) :
            Type u_1

            A nonuniform family chooses one finite circuit at each input width.

            • circuit (n : ℕ) : Circuit sigma n m

              The circuit chosen nonuniformly at each input width.

            Instances For
              def Cslib.Circuits.Circuit.Family.gateCount {sigma : Signature} {m : ℕ} (family : Family sigma m) (n : ℕ) :

              Number of internal gates at each input width.

              Equations
              Instances For
                def Cslib.Circuits.Circuit.Family.size {sigma : Signature} {m : ℕ} (family : Family sigma m) (n : ℕ) :

                Gate-count size of every member of a circuit family.

                Equations
                Instances For
                  @[simp]
                  theorem Cslib.Circuits.Circuit.Family.size_eq_gateCount {sigma : Signature} {m : ℕ} (family : Family sigma m) (n : ℕ) :
                  family.size n = family.gateCount n
                  def Cslib.Circuits.Circuit.Family.depth {sigma : Signature} {m : ℕ} (family : Family sigma m) (n : ℕ) :

                  Designated-output depth of every member of a circuit family.

                  Equations
                  Instances For
                    def Cslib.Circuits.Circuit.Family.cost {sigma : Signature} {m : ℕ} (family : Family sigma m) (operationCost : Algebraic.OperationCost sigma) (n : ℕ) :

                    Weighted gate cost of every member of a circuit family.

                    Equations
                    Instances For
                      def Cslib.Circuits.Circuit.Family.Computes {sigma : Signature} {m : ℕ} {U : Type u_2} (family : Family sigma m) (interpretation : Interpretation sigma U) (target : Algebraic.Target.Family U m) :

                      Pointwise exact computation of a target family.

                      Equations
                      Instances For
                        def Cslib.Circuits.Circuit.Family.HasSizeAtMost {sigma : Signature} {m : ℕ} (family : Family sigma m) (bound : ℕ → ℕ) :

                        The family has a specified all-width size bound.

                        Equations
                        Instances For
                          def Cslib.Circuits.Circuit.Family.HasDepthAtMost {sigma : Signature} {m : ℕ} (family : Family sigma m) (bound : ℕ → ℕ) :

                          The family has a specified all-width depth bound.

                          Equations
                          Instances For

                            The family has polynomially bounded gate-count size.

                            Equations
                            Instances For
                              def Cslib.Circuits.Circuit.Family.HasPolynomialCost {sigma : Signature} {m : ℕ} (family : Family sigma m) (operationCost : Algebraic.OperationCost sigma) :

                              The family has polynomially bounded weighted cost.

                              Equations
                              Instances For

                                The family has one depth bound independent of the input width.

                                Equations
                                Instances For
                                  theorem Cslib.Circuits.Circuit.Family.HasSizeAtMost.polynomialSize {sigma : Signature} {m : ℕ} {family : Family sigma m} {bound : ℕ → ℕ} (bounded : family.HasSizeAtMost bound) (polynomial : Resource.PolynomiallyBounded bound) :

                                  A pointwise size budget yields polynomial size when the budget is polynomially bounded.

                                  theorem Cslib.Circuits.Circuit.Family.HasDepthAtMost.constantDepth {sigma : Signature} {m : ℕ} {family : Family sigma m} {bound : ℕ → ℕ} (bounded : family.HasDepthAtMost bound) (constant : Resource.ConstantlyBounded bound) :

                                  A pointwise depth budget yields constant depth when the budget is constantly bounded.