Documentation

Complexitylib.Algebraic.Analysis.Degree

Syntactic degree propagation #

A degree policy classifies each operation as constant, maximum-like (such as addition), or sum-like (such as multiplication). Inputs start in degree one. The resulting interpretation is a compositional abstract analysis; relating it to semantic polynomial degree only requires a separate soundness proof for the chosen concrete signature.

Local rule used to propagate a degree bound through an operation.

Instances For
    @[instance_reducible]
    Equations
    def Algebraic.DegreeMode.eval (mode : DegreeMode) {arity : ℕ} (input : Fin arity → ℕ) :

    Evaluate a local degree-propagation rule.

    Equations
    Instances For

      Degree interpretation induced by a local rule for every operation.

      Equations
      Instances For
        def Cslib.Circuits.Circuit.degreeProfile {σ : Signature} {n m : ℕ} (circuit : Circuit σ n m) (mode : σ.Op → Algebraic.DegreeMode) :
        Fin m → ℕ

        Degree profile of a circuit when every original input has degree one.

        Equations
        Instances For
          theorem Algebraic.Translation.compile_degreeProfile {σ : Signature} {τ : Signature} {n m : ℕ} (translation : Translation σ τ) (circuit : Circuit σ n m) (targetMode : τ.Op → DegreeMode) :
          (translation.compile circuit).degreeProfile targetMode = circuit.eval (translation.pull (τ.degreeInterpretation targetMode)) fun (x : Fin n) => 1

          Translation gives exact degree propagation using the derived source operation rules implemented by the target gadgets.