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

ZkFold.Symbolic.Data.Ord

Synopsis

Documentation

class Ord b a where Source #

Methods

(<=) :: a -> a -> b Source #

(<) :: a -> a -> b Source #

(>=) :: a -> a -> b Source #

(>) :: a -> a -> b Source #

max :: a -> a -> a Source #

min :: a -> a -> a Source #

Instances

Instances details
Ord a => Ord Bool a Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Ord

Methods

(<=) :: a -> a -> Bool Source #

(<) :: a -> a -> Bool Source #

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

(>) :: a -> a -> Bool Source #

max :: a -> a -> a Source #

min :: a -> a -> a Source #

(Prime p, Ord x) => Ord (Bool (Zp p)) x Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Ord

Methods

(<=) :: x -> x -> Bool (Zp p) Source #

(<) :: x -> x -> Bool (Zp p) Source #

(>=) :: x -> x -> Bool (Zp p) Source #

(>) :: x -> x -> Bool (Zp p) Source #

max :: x -> x -> x Source #

min :: x -> x -> x Source #

Arithmetic a => Ord (Bool (ArithmeticCircuit a)) (ArithmeticCircuit a) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Ord

SymbolicData a x => Ord (Bool (ArithmeticCircuit a)) (Lexicographical x) Source #

Every SymbolicData type can be compared lexicographically.

Instance details

Defined in ZkFold.Symbolic.Data.Ord

(Finite (Zp p), KnownNat n) => Ord (Bool (Zp p)) (UInt n (Zp p)) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.UInt

Methods

(<=) :: UInt n (Zp p) -> UInt n (Zp p) -> Bool (Zp p) Source #

(<) :: UInt n (Zp p) -> UInt n (Zp p) -> Bool (Zp p) Source #

(>=) :: UInt n (Zp p) -> UInt n (Zp p) -> Bool (Zp p) Source #

(>) :: UInt n (Zp p) -> UInt n (Zp p) -> Bool (Zp p) Source #

max :: UInt n (Zp p) -> UInt n (Zp p) -> UInt n (Zp p) Source #

min :: UInt n (Zp p) -> UInt n (Zp p) -> UInt n (Zp p) Source #

(Arithmetic a, KnownNat n) => Ord (Bool (ArithmeticCircuit a)) (UInt n (ArithmeticCircuit a)) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.UInt

newtype Lexicographical a Source #

A newtype wrapper for easy definition of Ord instances (though not necessarily a most effective one)

Constructors

Lexicographical a 

circuitGE :: Arithmetic a => [ArithmeticCircuit a] -> [ArithmeticCircuit a] -> Bool (ArithmeticCircuit a) Source #

Given two lists of bits of equal length, compares them lexicographically.

circuitGT :: Arithmetic a => [ArithmeticCircuit a] -> [ArithmeticCircuit a] -> Bool (ArithmeticCircuit a) Source #

Given two lists of bits of equal length, compares them lexicographically.

getBitsBE :: SymbolicData a x => x -> [ArithmeticCircuit a] Source #

getBitsBE x returns a list of circuits computing bits of x, eldest to youngest.