p-families, p-projections and Valiant's class VP #
Valiant's algebraic analogue of P [Val79a], in the form of
Bürgisser, Chapter 2. A family of polynomials over K has, for every n, a
polynomial poly n in vars n variables. It is a p-family when the number of variables and the
total degree are polynomially bounded in n. A p-family is in VP K when it is computed by
arithmetic circuits of polynomially bounded size.
Arithmetic circuits are the library's circuits over Cslib.Circuits.arithSignature K: addition
and multiplication of fan-in two and a constant gate for each element of K. A circuit computes a
polynomial formally: it is evaluated in MvPolynomial (Fin n) K at the variables
(Cslib.Circuits.Circuit.polynomial). Over a finite field this is stronger than computing the
polynomial function. Size counts every gate, constant gates included, and there is no subtraction
gate. Bürgisser counts arithmetic operations, subtraction among them, with constants free;
translating between the two conventions changes sizes by at most a constant factor and does not
change the class (a remark, not formalized here).
The definitions are those of the literature, with three points made explicit.
- Degree. The degree bound is part of the definition of
VP, as in Valiant's. Small circuits alone do not suffice:X ^ 2 ^ nhas circuits with at mostngates but is not inVP(exists_circuit_pow_two_pow,powTwoPowFamily_not_mem_VP). - Uniformity.
VPis nonuniform. Nothing relates the circuits for differentn, and no machine is required to construct them. - Coefficients. Valiant works over a field. The definitions make sense over every commutative
semiring
K, and are stated there. Hypotheses onK, such as its characteristic, appear only in the theorems that need them.
A polynomial P is a projection of Q when P arises from Q by substituting for each
variable of Q a variable of P or a constant. A family f is a p-projection of g when each
f n is a projection of g (t n) for a polynomially bounded t. Projections are Valiant's
reductions; VP is closed under them.
Main definitions #
Cslib.Circuits.Circuit.polynomial: the formal polynomial computed by an arithmetic circuit.Cslib.Circuits.Arithmetic.PolynomialFamily,PolynomialFamily.IsPFamily: families of polynomials and p-families.Cslib.Circuits.Arithmetic.projection,Cslib.Circuits.Arithmetic.IsProjection: substitution of variables and constants, and projections.Cslib.Circuits.Arithmetic.PolynomialFamily.IsPProjection: p-projections.Cslib.Circuits.Arithmetic.projectionCircuit: the circuit supplying a projection's substitution.Cslib.Circuits.Arithmetic.VP: Valiant's classVP.Cslib.Circuits.Arithmetic.powTwoPowFamily: the familyX ^ 2 ^ n.
Main results #
Cslib.Circuits.Circuit.aeval_polynomial: evaluating the computed polynomial in a commutative algebra is evaluating the circuit there;Cslib.Circuits.Circuit.eval_polynomialis the case of the base ring.Cslib.Circuits.Arithmetic.IsProjection.trans,Cslib.Circuits.Arithmetic.PolynomialFamily.IsPProjection.trans: projections compose.Cslib.Circuits.Arithmetic.totalDegree_projection_le: projections do not raise the degree.Cslib.Circuits.Synthesis.arith_const,Cslib.Circuits.Synthesis.arith_add,Cslib.Circuits.Synthesis.arith_mul,Cslib.Circuits.Synthesis.arith_sum: synthesis rules for arithmetic circuits.Cslib.Circuits.Synthesis.exists_circuit_polynomial: a synthesis bound gives a circuit computing the polynomial.Cslib.Circuits.Arithmetic.VP.of_isPProjection:VPis closed under p-projections.Cslib.Circuits.Arithmetic.VP.of_synthesis: p-families synthesized within a polynomial budget are inVP.Cslib.Circuits.Arithmetic.exists_circuit_pow_two_pow,Cslib.Circuits.Arithmetic.powTwoPowFamily_not_mem_VP: repeated squaring has small circuits but is not inVP, whose definition bounds the degree.
References #
The formal polynomial computed at output j of an arithmetic circuit with constants from K:
the circuit evaluated in MvPolynomial (Fin n) K at the variables, the constant symbol a
denoting the constant polynomial C a.
Instances For
Evaluating the polynomial computed by a circuit at a point of a commutative K-algebra is
evaluating the circuit at that point.
Substituting polynomials for the variables of the polynomial computed by a circuit is evaluating the circuit at those polynomials.
Evaluating the formal polynomial computed by an arithmetic circuit at x : Fin n → K agrees
with evaluating the circuit under arithInterpretation K.
Synthesis of arithmetic circuits #
A finite sum costs its summands and one addition each, when zero is available.
A synthesis bound on a function F from the inputs gives a circuit, within the bound,
computing the polynomial F X.
A p-family Bürgisser, Chapter 2: the number of variables and the total degree are polynomially bounded.
Instances For
Projections #
Substitute for each variable i of a polynomial over τ the variable X k when
ρ i = Sum.inl k, and the constant C a when ρ i = Sum.inr a.
Instances For
Substituting every variable for itself changes nothing.
Two successive projections are one projection: a variable substituted for a variable is substituted in turn, and a constant stays.
P is a projection of Q [Val79a]: substituting for each variable of Q a
variable of P or a constant of K gives P.
Instances For
Every polynomial is a projection of itself.
A projection of a projection is a projection.
Projections do not raise the total degree.
f is a p-projection of g Valiant1979Algebra; Bürgisser, Chapter 2:
for a polynomially bounded t, every f.poly n is a projection of g.poly (t n).
Instances For
Every family is a p-projection of itself.
A p-projection of a p-projection is a p-projection.
Circuits for projections #
Feeding the substitution of a projection to a circuit computes the projection of its polynomial.
The class VP #
Valiant's class VP over K Valiant1979Algebra; Bürgisser, Chapter 2:
the p-families computed, for some polynomially bounded size function, by arithmetic circuits of
that size. Nothing relates the circuits for different n: the class is nonuniform. The circuits
compute the members as formal polynomials, and their degrees are bounded by the p-family
condition.
Instances For
VP is closed under p-projections Bürgisser, Chapter 2. A projection
cannot raise the degree, but f may have arbitrarily many variables that it does not use, so the
number of variables of f is required to be polynomially bounded.
A p-family is in VP when, within a polynomially bounded budget, each member f.poly n is
F n X for a function F n synthesized from the inputs.
Degree is part of the definition #
The family X ^ 2 ^ n of powers of one variable.
Instances For
Repeated squaring computes X ^ 2 ^ n with at most n gates.
VP bounds the degree. Over a nontrivial K, the family X ^ 2 ^ n has circuits with n
gates (exists_circuit_pow_two_pow) but is not in VP: its degree 2 ^ n is not polynomially
bounded.