zkfold-base-0.1.0.0: ZkFold Symbolic compiler and zero-knowledge proof protocols
Safe HaskellSafe-Inferred
LanguageHaskell2010

ZkFold.Base.Algebra.Polynomials.Multivariate.Polynomial

Synopsis

Documentation

type Polynomial c i j = (Eq c, Field c, Monomial i j) Source #

A class for polynomials. c is the coefficient type, i is the variable type, j is the power type.

type Polynomial' c = P c Natural Natural (Map Natural Natural) [(c, Monomial')] Source #

Most general type for a multivariate polynomial

polynomial :: Polynomial c i j => [(c, M i j (Map i j))] -> P c i j (Map i j) [(c, M i j (Map i j))] Source #

Polynomial constructor

type PolynomialAny c = P c Integer Integer MonomialRepAny (PolynomialRepAny c) Source #

Most general type for a multivariate polynomial, parameterized by the field of coefficients

type PolynomialBoundedDegree c i d = P c i Bool (MonomialRepBoundedDegree i d) (PolynomialRepBoundedDegree c i d) Source #

Most general type for a multivariate polynomial with bounded degree, parameterized by the field of coefficients, the type of variables, and the degree

mapCoeffs :: forall c c' i j. (c -> c') -> P c i j (Map i j) [(c, M i j (Map i j))] -> P c' i j (Map i j) [(c', M i j (Map i j))] Source #

var :: Polynomial c i j => i -> P c i j (Map i j) [(c, M i j (Map i j))] Source #

var i is a polynomial \(p(x) = x_i\)

evalPolynomial :: forall c i j b m. Algebra c b => ((i -> b) -> M i j m -> b) -> (i -> b) -> P c i j m [(c, M i j m)] -> b Source #