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

ZkFold.Symbolic.Data.Bool

Documentation

class BoolType b where Source #

Methods

true :: b Source #

false :: b Source #

not :: b -> b Source #

(&&) :: b -> b -> b infixr 3 Source #

(||) :: b -> b -> b infixr 2 Source #

xor :: b -> b -> b Source #

Instances

Instances details
BoolType Bool Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Bool

Symbolic c => BoolType (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Bool

Methods

true :: Bool c Source #

false :: Bool c Source #

not :: Bool c -> Bool c Source #

(&&) :: Bool c -> Bool c -> Bool c Source #

(||) :: Bool c -> Bool c -> Bool c Source #

xor :: Bool c -> Bool c -> Bool c Source #

(Symbolic c, KnownNat n) => BoolType (ByteString n c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.ByteString

newtype Bool c Source #

Constructors

Bool (c Par1) 

Instances

Instances details
Generic (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Bool

Associated Types

type Rep (Bool c) :: Type -> Type #

Methods

from :: Bool c -> Rep (Bool c) x #

to :: Rep (Bool c) x -> Bool c #

(Eq a, MultiplicativeMonoid a) => Show (Bool (Interpreter a)) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Bool

Show (c Par1) => Show (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Bool

Methods

showsPrec :: Int -> Bool c -> ShowS #

show :: Bool c -> String #

showList :: [Bool c] -> ShowS #

NFData (c Par1) => NFData (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Bool

Methods

rnf :: Bool c -> () #

Eq (c Par1) => Eq (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Bool

Methods

(==) :: Bool c -> Bool c -> Bool0 #

(/=) :: Bool c -> Bool c -> Bool0 #

Symbolic c => BoolType (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Bool

Methods

true :: Bool c Source #

false :: Bool c Source #

not :: Bool c -> Bool c Source #

(&&) :: Bool c -> Bool c -> Bool c Source #

(||) :: Bool c -> Bool c -> Bool c Source #

xor :: Bool c -> Bool c -> Bool c Source #

Symbolic c => SymbolicData (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Class

Associated Types

type Context (Bool c) :: (Type -> Type) -> Type Source #

type Support (Bool c) Source #

type Layout (Bool c) :: Type -> Type Source #

type Payload (Bool c) :: Type -> Type Source #

Methods

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

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

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

Symbolic c => SymbolicInput (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Input

Methods

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

(Arithmetic a, Field x, Eq x) => DiscreteField (Bool (Interpreter a)) x Source # 
Instance details

Defined in ZkFold.Symbolic.Data.DiscreteField

Methods

isZero :: x -> Bool (Interpreter a) Source #

Symbolic c => Conditional (Bool c) (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: Bool c -> Bool c -> Bool c -> Bool c Source #

Symbolic c => Conditional (Bool c) (FieldElement c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FieldElement

(Symbolic c, Traversable f, Representable f) => Conditional (Bool c) (c f) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: c f -> c f -> Bool c -> c f Source #

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

Defined in ZkFold.Symbolic.Data.Eq

Methods

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

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

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

Defined in ZkFold.Symbolic.Data.FieldElement

(Symbolic c, Eq (BaseField c), Representable f, Traversable f) => Eq (Bool c) (c f) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Eq

Methods

(==) :: c f -> c f -> Bool c Source #

(/=) :: c f -> c f -> Bool c Source #

Symbolic c => Ord (Bool c) (FieldElement c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FieldElement

(Symbolic c, Representable f, Traversable f) => Ord (Bool c) (c f) Source #

Every SymbolicData type can be compared lexicographically.

Instance details

Defined in ZkFold.Symbolic.Data.Ord

Methods

(<=) :: c f -> c f -> Bool c Source #

(<) :: c f -> c f -> Bool c Source #

(>=) :: c f -> c f -> Bool c Source #

(>) :: c f -> c f -> Bool c Source #

max :: c f -> c f -> c f Source #

min :: c f -> c f -> c f Source #

Symbolic c => Conditional (Bool c) (Proxy c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: Proxy c -> Proxy c -> Bool c -> Proxy c Source #

(Symbolic c, KnownNat n) => Conditional (Bool c) (ByteString n c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.ByteString

Methods

bool :: ByteString n c -> ByteString n c -> Bool c -> ByteString n c Source #

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

Defined in ZkFold.Symbolic.Data.FFA

Methods

bool :: FFA p c -> FFA p c -> Bool c -> FFA p c Source #

(SymbolicOutput x, Context x ~ c, Conditional (Bool c) x) => Conditional (Bool c) (Maybe c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

Methods

bool :: Maybe c x -> Maybe c x -> Bool c -> Maybe c x Source #

(Symbolic c, KnownNat n) => Eq (Bool c) (ByteString n c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.ByteString

Methods

(==) :: ByteString n c -> ByteString n c -> Bool c Source #

(/=) :: ByteString n c -> ByteString n c -> Bool 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 #

(SymbolicOutput x, Context x ~ c, Eq (Bool c) x) => Eq (Bool c) (Maybe c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

Methods

(==) :: Maybe c x -> Maybe c x -> Bool c Source #

(/=) :: Maybe c x -> Maybe c x -> Bool c Source #

(KnownRegisters c n r, Symbolic c) => Conditional (Bool c) (UInt n r c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.UInt

Methods

bool :: UInt n r c -> UInt n r c -> Bool c -> UInt n r c Source #

(KnownRegisters c n r, Symbolic c) => Eq (Bool c) (UInt n r c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.UInt

Methods

(==) :: UInt n r c -> UInt n r c -> Bool c Source #

(/=) :: UInt n r c -> UInt n r c -> Bool c Source #

(Symbolic c, KnownNat n, KnownRegisterSize r, KnownRegisters c n r, regSize ~ GetRegisterSize (BaseField c) n r, KnownNat (Ceil regSize OrdWord)) => Ord (Bool c) (UInt n r c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.UInt

Methods

(<=) :: UInt n r c -> UInt n r c -> Bool c Source #

(<) :: UInt n r c -> UInt n r c -> Bool c Source #

(>=) :: UInt n r c -> UInt n r c -> Bool c Source #

(>) :: UInt n r c -> UInt n r c -> Bool c Source #

max :: UInt n r c -> UInt n r c -> UInt n r c Source #

min :: UInt n r c -> UInt n r c -> UInt n r c Source #

type Rep (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Bool

type Rep (Bool c) = D1 ('MetaData "Bool" "ZkFold.Symbolic.Data.Bool" "symbolic-base-0.1.0.0-inplace" 'True) (C1 ('MetaCons "Bool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (c Par1))))
type Context (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Class

type Context (Bool c) = Context (c Par1)
type Layout (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Class

type Layout (Bool c) = Layout (c Par1)
type Payload (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Class

type Payload (Bool c) = Payload (c Par1)
type Support (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Class

type Support (Bool c) = Support (c Par1)

all :: (BoolType b, Foldable t) => (x -> b) -> t x -> b Source #

all1 :: (BoolType b, Functor t, Foldable t) => (x -> b) -> t x -> b Source #

any :: (BoolType b, Foldable t) => (x -> b) -> t x -> b Source #

and :: (BoolType b, Foldable t) => t b -> b Source #

or :: (BoolType b, Foldable t) => t b -> b Source #