Affine, polynomial, and arithmetic bases #
Three ways of computing over a field F:
- the affine basis (
Frontier.affineSignature), whose operations of aritykare the affine mapsx ↦ a₀ x₀ + ... + a_{k-1} x_{k-1} + b; - polynomial interpretations (
Frontier.IsPolynomial), in which every operation of a signature is a polynomial in its arguments, with any coefficients and of any degree; - the arithmetic basis (
Frontier.arithSignature): addition, multiplication, and a constant gate for each element ofF.
Arithmetic circuits are polynomial. Over a finite field every operation is polynomial, so the
distinction matters only over infinite fields, where it is essential: an infinite field admits
bijections F × F → F, through which a single wire can carry any amount of information.
In arithmetic circuits the constants are leaves, and Cslib.Circuits.Circuit.innerSize counts
exactly the additions and multiplications.
The affine basis over F: an operation of arity k is a coefficient vector and a
constant.
Equations
Instances For
An affine operation computes x ↦ ∑ i, a i * x i + b.
Equations
Instances For
The arity of an arithmetic operation.
Equations
Instances For
The arithmetic basis: addition and multiplication of arity two, and constants of arity zero.
Equations
- Complexity.Frontier.arithSignature F = { Op := Complexity.Frontier.ArithOp F, Arity := Complexity.Frontier.ArithOp.arity F }
Instances For
Addition, multiplication, and constants.
Equations
- Complexity.Frontier.arithInterpretation F Complexity.Frontier.ArithOp.add x_2 = x_2 0 + x_2 1
- Complexity.Frontier.arithInterpretation F Complexity.Frontier.ArithOp.mul x_2 = x_2 0 * x_2 1
- Complexity.Frontier.arithInterpretation F (Complexity.Frontier.ArithOp.const c) x_2 = c
Instances For
An interpretation is polynomial when every operation is given by a polynomial in its arguments.
Equations
- Complexity.Frontier.IsPolynomial I = ∀ (o : σ.Op), ∃ (P : MvPolynomial (Fin (σ.Arity o)) F), ∀ (x : Fin (σ.Arity o) → F), I o x = (MvPolynomial.eval x) P
Instances For
Arithmetic circuits are polynomial.
The affine basis is polynomial.