package tezos-plonk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Module to operate with polynomials in FFT evaluations form.

type polynomial = PC.Polynomial.Polynomial.t
type t = PC.Polynomial.Evaluations.t
val t : t Repr.t
val of_array : (int * PC.Scalar.t array) -> t
val to_array : t -> PC.Scalar.t array
val string_of_eval : t -> string
type domain = PC.Polynomial.Domain.t
val of_domain : domain -> t
val to_domain : t -> domain
val zero : t
val is_zero : t -> bool
val degree : t -> int
val length : t -> int
val create : int -> t
val copy : ?res:t -> t -> t
val get : t -> int -> PC.Scalar.t
val mul_by_scalar : PC.Scalar.t -> t -> t
val mul_c : ?res:t -> evaluations:t list -> ?composition_gx:(int list * int) -> ?powers:int list -> unit -> t
val linear_c : ?res:t -> evaluations:t list -> ?linear_coeffs:PC.Scalar.t list -> ?composition_gx:(int list * int) -> ?add_constant:PC.Scalar.t -> unit -> t
val linear_with_powers : t list -> PC.Scalar.t -> t
val add : ?res:t -> t -> t -> t
val equal : t -> t -> bool
val evaluation_fft : domain -> polynomial -> t
val interpolation_fft : domain -> t -> polynomial
val interpolation_fft2 : domain -> PC.Scalar.t array -> polynomial
val dft : domain -> polynomial -> t
val idft_inplace : domain -> t -> polynomial
val evaluation_fft_prime_factor_algorithm : domain1:domain -> domain2:domain -> polynomial -> t
val interpolation_fft_prime_factor_algorithm_inplace : domain1:domain -> domain2:domain -> t -> polynomial
val size_evaluations : t Plonk.SMap.t -> int

size_evaluations returns the maximum size of elements in evaluations

val find_evaluation : t Plonk.SMap.t -> string -> t

find_evaluation m name returns the evaluation for a given name name

val print_evaluations_name : t Plonk.SMap.t -> unit

print_evaluations_name prints (name, degree, length) for each evaluation

val get_domain : t Plonk.SMap.t -> domain

get_domain returns the evaluation for "X"

val compute_evaluations : domain:domain -> polynomial Plonk.SMap.t -> t Plonk.SMap.t

compute_evaluations converts the coefficient representation of each polynomial pᵢ to the evaluation representation.

Note:

  • size of domain must be a power of two
  • size of a polynomial pᵢ must be less than or equal to size of domain
val compute_evaluations_update_map : ?domain:domain -> evaluations:t Plonk.SMap.t -> polynomial Plonk.SMap.t -> t Plonk.SMap.t

compute_evaluations_update_map writes the result of compute_evaluations in evaluations. If domain is not provided, get_domain is called

val mul : ?res:t -> evaluations:t Plonk.SMap.t -> poly_names:string list -> ?composition_gx:(int list * int) -> ?powers:int list -> unit -> t

mul invokes mul_c with the evaluations for given names poly_names

val linear : ?res:t -> evaluations:t Plonk.SMap.t -> poly_names:Plonk.SMap.key list -> ?linear_coeffs:PC.Scalar.t list -> ?composition_gx:(int list * int) -> ?add_constant:PC.Scalar.t -> unit -> t

linear invokes linear_c with the evaluations for given names poly_names

OCaml

Innovation. Community. Security.