Polynomial gates over commutative algebras: definitions #
A program whose gates are polynomials with coefficients in a commutative ring K can be run
over every commutative K-algebra A: each operation substitutes its arguments into its gate
polynomial. This file fixes the notation for that formal semantics.
algebraInterpretation P A: the interpretation overAin which the operationopsubstitutes its arguments into the polynomialP op.wirePolynomial P p w: the polynomial in the inputs carried by the wirew, the value ofwover the polynomial ringK[X₀, …, X_{n-1}]at the variables.FormallyComputes P c f: every output wire ofccarries the polynomialf o. This is the usual notion of an arithmetic circuit computing a polynomial; over an infinite field it agrees with computing the polynomial function.arithmeticPolynomial constant: the gate polynomialsX₀ + X₁,X₀ X₁and the constants of arithmetic circuits (Arithmetic.signature).jacobian f aandhessian g a: the matrices of first partial derivatives of a family of polynomials and of second partial derivatives of one polynomial, evaluated at a pointaof aK-algebraL.
The gate polynomials may be arbitrary: any degree, any coefficients, any arity.
The interpretation over a commutative K-algebra A in which each operation op
substitutes its arguments into its gate polynomial P op.
Equations
- Algebraic.Cutwidth.MultiOutput.Taylor.algebraInterpretation P A op x = (MvPolynomial.aeval x) (P op)
Instances For
The polynomial carried by each input or gate wire: its value over the polynomial ring at the variables.
Equations
Instances For
A circuit with gate polynomials P formally computes the polynomials f when its output
o carries the polynomial f o.
Equations
- Algebraic.Cutwidth.MultiOutput.Taylor.FormallyComputes P c f = ∀ (o : Fin m), Algebraic.Cutwidth.MultiOutput.Taylor.wirePolynomial P c.program (c.outputs o) = f o
Instances For
The gate polynomials of arithmetic circuits: addition is X₀ + X₁, multiplication is
X₀ X₁, and a constant symbol is the constant polynomial of its value.
Equations
- Algebraic.Cutwidth.MultiOutput.Taylor.arithmeticPolynomial constant Algebraic.Arithmetic.Op.add = MvPolynomial.X 0 + MvPolynomial.X 1
- Algebraic.Cutwidth.MultiOutput.Taylor.arithmeticPolynomial constant Algebraic.Arithmetic.Op.mul = MvPolynomial.X 0 * MvPolynomial.X 1
- Algebraic.Cutwidth.MultiOutput.Taylor.arithmeticPolynomial constant (Algebraic.Arithmetic.Op.constant c) = MvPolynomial.C (constant c)
Instances For
The Jacobian matrix of a family of polynomials at a point a: the entry in row o and
column j is ∂ f o / ∂ X j evaluated at a.
Equations
- Algebraic.Cutwidth.MultiOutput.Taylor.jacobian f a = Matrix.of fun (o : ι) (j : Fin n) => (MvPolynomial.aeval a) ((MvPolynomial.pderiv j) (f o))
Instances For
The Hessian matrix of a polynomial at a point a: the entry in row i and column j is
∂² g / ∂ X i ∂ X j evaluated at a.
Equations
- Algebraic.Cutwidth.MultiOutput.Taylor.hessian g a = Matrix.of fun (i j : Fin n) => (MvPolynomial.aeval a) ((MvPolynomial.pderiv i) ((MvPolynomial.pderiv j) g))