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

ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Documentation

type IsWitness a n w = (Scale a w, FromConstant a w, ResidueField n w) Source #

newtype WitnessF a v Source #

Constructors

WitnessF 

Fields

Instances

Instances details
FromConstant Integer (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

FromConstant Natural (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

FromConstant a (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

fromConstant :: a -> WitnessF a v Source #

Scale Integer (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

scale :: Integer -> WitnessF a v -> WitnessF a v Source #

Scale Natural (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

scale :: Natural -> WitnessF a v -> WitnessF a v Source #

Scale a (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

scale :: a -> WitnessF a v -> WitnessF a v Source #

Applicative (WitnessF a) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

pure :: a0 -> WitnessF a a0 #

(<*>) :: WitnessF a (a0 -> b) -> WitnessF a a0 -> WitnessF a b #

liftA2 :: (a0 -> b -> c) -> WitnessF a a0 -> WitnessF a b -> WitnessF a c #

(*>) :: WitnessF a a0 -> WitnessF a b -> WitnessF a b #

(<*) :: WitnessF a a0 -> WitnessF a b -> WitnessF a a0 #

Functor (WitnessF a) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

fmap :: (a0 -> b) -> WitnessF a a0 -> WitnessF a b #

(<$) :: a0 -> WitnessF a b -> WitnessF a a0 #

Monad (WitnessF a) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

(>>=) :: WitnessF a a0 -> (a0 -> WitnessF a b) -> WitnessF a b #

(>>) :: WitnessF a a0 -> WitnessF a b -> WitnessF a b #

return :: a0 -> WitnessF a a0 #

NFData (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

rnf :: WitnessF a v -> () #

AdditiveGroup (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

(-) :: WitnessF a v -> WitnessF a v -> WitnessF a v Source #

negate :: WitnessF a v -> WitnessF a v Source #

AdditiveMonoid (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

zero :: WitnessF a v Source #

AdditiveSemigroup (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

(+) :: WitnessF a v -> WitnessF a v -> WitnessF a v Source #

Field (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

(//) :: WitnessF a v -> WitnessF a v -> WitnessF a v Source #

finv :: WitnessF a v -> WitnessF a v Source #

rootOfUnity :: Natural -> Maybe (WitnessF a v) Source #

Finite a => Finite (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Associated Types

type Order (WitnessF a v) :: Natural Source #

MultiplicativeMonoid (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

one :: WitnessF a v Source #

MultiplicativeSemigroup (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

(*) :: WitnessF a v -> WitnessF a v -> WitnessF a v Source #

Ring (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Semiring (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

ToConstant (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Associated Types

type Const (WitnessF a v) Source #

Methods

toConstant :: WitnessF a v -> Const (WitnessF a v) Source #

Exponent (WitnessF a v) Integer Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

(^) :: WitnessF a v -> Integer -> WitnessF a v Source #

Exponent (WitnessF a v) Natural Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

(^) :: WitnessF a v -> Natural -> WitnessF a v Source #

(Arithmetic a, Binary a, Binary (Rep p), Binary (Rep i), Ord (Rep i), o ~ (U1 :: Type -> Type)) => MonadCircuit (Var a i) a (WitnessF a (WitVar p i)) (State (ArithmeticCircuit a p i o)) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Internal

Methods

unconstrained :: WitnessF a (WitVar p i) -> State (ArithmeticCircuit a p i o) (Var a i) Source #

constraint :: ClosedPoly (Var a i) a -> State (ArithmeticCircuit a p i o) () Source #

rangeConstraint :: Var a i -> a -> State (ArithmeticCircuit a p i o) () Source #

newAssigned :: ClosedPoly (Var a i) a -> State (ArithmeticCircuit a p i o) (Var a i) Source #

FromConstant (EuclideanF a v) (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

fromConstant :: EuclideanF a v -> WitnessF a v Source #

Finite a => Witness (Var a i) (WitnessF a (WitVar p i)) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Internal

Methods

at :: Var a i -> WitnessF a (WitVar p i) Source #

type Const (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

type Const (WitnessF a v) = EuclideanF a v
type Order (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

type Order (WitnessF a v) = Order a

newtype EuclideanF a v Source #

Constructors

EuclideanF 

Fields

Instances

Instances details
FromConstant Natural (EuclideanF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Scale Natural (EuclideanF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

scale :: Natural -> EuclideanF a v -> EuclideanF a v Source #

AdditiveMonoid (EuclideanF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

zero :: EuclideanF a v Source #

AdditiveSemigroup (EuclideanF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

(+) :: EuclideanF a v -> EuclideanF a v -> EuclideanF a v Source #

MultiplicativeMonoid (EuclideanF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

one :: EuclideanF a v Source #

MultiplicativeSemigroup (EuclideanF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

(*) :: EuclideanF a v -> EuclideanF a v -> EuclideanF a v Source #

SemiEuclidean (EuclideanF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

divMod :: EuclideanF a v -> EuclideanF a v -> (EuclideanF a v, EuclideanF a v) Source #

div :: EuclideanF a v -> EuclideanF a v -> EuclideanF a v Source #

mod :: EuclideanF a v -> EuclideanF a v -> EuclideanF a v Source #

Semiring (EuclideanF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Exponent (EuclideanF a v) Natural Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

(^) :: EuclideanF a v -> Natural -> EuclideanF a v Source #

FromConstant (EuclideanF a v) (WitnessF a v) Source # 
Instance details

Defined in ZkFold.Symbolic.Compiler.ArithmeticCircuit.Witness

Methods

fromConstant :: EuclideanF a v -> WitnessF a v Source #