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

ZkFold.Symbolic.Data.FFA

Synopsis

Documentation

newtype FFA (p :: Natural) c Source #

Foreign-field arithmetic based on https://cr.yp.to/papers/mmecrt.pdf

Constructors

FFA (c (Vector Size)) 

Instances

Instances details
(FromConstant a (Zp p), Symbolic c) => FromConstant a (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

fromConstant :: a -> FFA p c Source #

(KnownNat p, Scale a (Zp p), Symbolic c) => Scale a (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

scale :: a -> FFA p c -> FFA p c Source #

Symbolic c => Eq (Bool c) (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

(==) :: FFA p c -> FFA p c -> Bool c Source #

(/=) :: FFA p c -> FFA p c -> Bool c Source #

Show (c (Vector Size)) => Show (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

showsPrec :: Int -> FFA p c -> ShowS #

show :: FFA p c -> String #

showList :: [FFA p c] -> ShowS #

NFData (c (Vector Size)) => NFData (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

rnf :: FFA p c -> () #

(KnownNat p, Symbolic c) => AdditiveGroup (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

(-) :: FFA p c -> FFA p c -> FFA p c Source #

negate :: FFA p c -> FFA p c Source #

(KnownNat p, Symbolic c) => AdditiveMonoid (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

zero :: FFA p c Source #

(KnownNat p, Symbolic c) => AdditiveSemigroup (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

(+) :: FFA p c -> FFA p c -> FFA p c Source #

(Prime p, Symbolic c) => Field (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

(//) :: FFA p c -> FFA p c -> FFA p c Source #

finv :: FFA p c -> FFA p c Source #

rootOfUnity :: Natural -> Maybe (FFA p c) Source #

Finite (Zp p) => Finite (FFA p b) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Associated Types

type Order (FFA p b) :: Natural Source #

(KnownNat p, Symbolic c) => MultiplicativeMonoid (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

one :: FFA p c Source #

(KnownNat p, Symbolic c) => MultiplicativeSemigroup (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

(*) :: FFA p c -> FFA p c -> FFA p c Source #

(KnownNat p, Symbolic c) => Ring (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

(KnownNat p, Symbolic c) => Semiring (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

(KnownNat p, Arithmetic a) => ToConstant (FFA p (Interpreter a)) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Associated Types

type Const (FFA p (Interpreter a)) Source #

Methods

toConstant :: FFA p (Interpreter a) -> Const (FFA p (Interpreter a)) Source #

Symbolic c => SymbolicData (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Associated Types

type Context (FFA p c) :: (Type -> Type) -> Type Source #

type Support (FFA p c) Source #

type Layout (FFA p c) :: Type -> Type Source #

type Payload (FFA p c) :: Type -> Type Source #

Methods

arithmetize :: FFA p c -> Support (FFA p c) -> Context (FFA p c) (Layout (FFA p c)) Source #

payload :: FFA p c -> Support (FFA p c) -> Payload (FFA p c) (WitnessField (Context (FFA p c))) Source #

restore :: Context (FFA p c) ~ c0 => (Support (FFA p c) -> (c0 (Layout (FFA p c)), Payload (FFA p c) (WitnessField c0))) -> FFA p c Source #

Symbolic c => SymbolicInput (FFA p c) Source #

TODO: fix when rewrite is done

Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

isValid :: FFA p c -> Bool (Context (FFA p c)) Source #

(Prime p, Symbolic c) => Exponent (FFA p c) Integer Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

(^) :: FFA p c -> Integer -> FFA p c Source #

(KnownNat p, Symbolic c) => Exponent (FFA p c) Natural Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

(^) :: FFA p c -> Natural -> FFA p c Source #

FromConstant (FFA p c) (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

fromConstant :: FFA p c -> FFA p c Source #

(KnownNat p, Symbolic c) => Scale (FFA p c) (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

scale :: FFA p c -> FFA p c -> FFA p c Source #

type Const (FFA p (Interpreter a)) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

type Const (FFA p (Interpreter a)) = Zp p
type Order (FFA p b) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

type Order (FFA p b) = p
type Context (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

type Context (FFA p c) = Context (c (Vector Size))
type Layout (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

type Layout (FFA p c) = Layout (c (Vector Size))
type Payload (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

type Payload (FFA p c) = Payload (c (Vector Size))
type Support (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

type Support (FFA p c) = Support (c (Vector Size))

type Size = 7 Source #