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

ZkFold.Base.Protocol.Protostar.AlgebraicMap

Synopsis

Documentation

class Ring f => AlgebraicMap f i (d :: Natural) a where Source #

Algebraic map of a. It calculates a system of equations defining a in some way. The inputs are polymorphic in a ring element f. The main application is to define the verifier's algebraic map in the NARK protocol.

Methods

algebraicMap Source #

Arguments

:: a 
-> i f

public input

-> Vector k [f]

NARK proof witness (the list of prover messages)

-> Vector (k - 1) f

Verifier random challenges

-> f

Slack variable for padding

-> [f] 

the algebraic map Vsps computed by the NARK verifier.

Instances

Instances details
(Ring f, Representable i, KnownNat (d + 1), Arithmetic a, Scale a f) => AlgebraicMap f i d (ArithmetizableFunction a i p) Source # 
Instance details

Defined in ZkFold.Base.Protocol.Protostar.AlgebraicMap

Methods

algebraicMap :: forall (k :: Natural). ArithmetizableFunction a i p -> i f -> Vector k [f] -> Vector (k - 1) f -> f -> [f] Source #

padDecomposition :: forall f n. (MultiplicativeMonoid f, AdditiveMonoid f, KnownNat n) => f -> Vector n [f] -> [f] Source #

degreeDecomposition :: forall f d v. KnownNat (d + 1) => [Poly f v Natural] -> Vector (d + 1) [Poly f v Natural] Source #

Decomposes an algebraic map into homogenous degree-j maps for j from 0 to d