fact
stringlengths
5
19.5k
statement
stringlengths
5
19.5k
proof
stringlengths
0
4.29k
type
stringclasses
7 values
symbolic_name
stringlengths
0
36
library
stringclasses
13 values
filename
stringclasses
71 values
imports
listlengths
0
23
deps
listlengths
0
14
docstring
stringclasses
0 values
line_start
int64
1
1.24k
line_end
int64
1
1.24k
has_proof
bool
2 classes
source_url
stringclasses
1 value
commit
stringclasses
1 value
i < j = j >= i + 1 // The Literal class ---------------------------------------------------- /** 'Literal n a' asserts that type 'a' contains the number 'n'. */
i < j = j >= i + 1 // The Literal class ---------------------------------------------------- /** 'Literal n a' asserts that type 'a' contains the number 'n'. */
type constraint
lib
lib/Cryptol.cry
[]
[ ">=" ]
null
162
167
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
Literal : # -> * -> Prop /** * 'LiteralLessThan n a' asserts that the type 'a' contains all the * natural numbers strictly below 'n'. Note that we may have 'n = inf', * in which case the type 'a' must be unbounded. */
Literal : # -> * -> Prop /** * 'LiteralLessThan n a' asserts that the type 'a' contains all the * natural numbers strictly below 'n'. Note that we may have 'n = inf', * in which case the type 'a' must be unbounded. */
primitive type
Literal
lib
lib/Cryptol.cry
[]
[]
null
168
174
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
LiteralLessThan : # -> * -> Prop /** * The value corresponding to a numeric type. */
LiteralLessThan : # -> * -> Prop /** * The value corresponding to a numeric type. */
primitive type
LiteralLessThan
lib
lib/Cryptol.cry
[]
[]
null
175
179
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
number : {val, rep} Literal val rep => rep /** * An alternative name for 'number', present for backward compatibility. */
number : {val, rep} Literal val rep => rep /** * An alternative name for 'number', present for backward compatibility. */
primitive
number
lib
lib/Cryptol.cry
[]
[ "Literal" ]
null
180
184
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
fromTo : {first, last, a} (fin last, last >= first, Literal last a) => [1 + (last - first)]a /** * A possibly infinite sequence counting up from 'first' up to (but not including) 'bound'. * * '[ x ..< y ]' is syntactic sugar for 'fromToLessThan`{first=x,bound=y}'. * * Note that if 'first' = 'bound' then the s...
fromTo : {first, last, a} (fin last, last >= first, Literal last a) => [1 + (last - first)]a /** * A possibly infinite sequence counting up from 'first' up to (but not including) 'bound'. * * '[ x ..< y ]' is syntactic sugar for 'fromToLessThan`{first=x,bound=y}'. * * Note that if 'first' = 'bound' then the s...
primitive
fromTo
lib
lib/Cryptol.cry
[]
[ ">=", "Literal", "fin", "first", "last" ]
null
200
211
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
fromToLessThan : {first, bound, a} (fin first, bound >= first, LiteralLessThan bound a) => [bound - first]a /** * A finite sequence counting up from 'first' to 'last' by 'stride'. * Note that 'last' will only be an element of the enumeration if * 'stride' divides 'last - first' evenly. * * '[x .. y by n]' is ...
fromToLessThan : {first, bound, a} (fin first, bound >= first, LiteralLessThan bound a) => [bound - first]a /** * A finite sequence counting up from 'first' to 'last' by 'stride'. * Note that 'last' will only be an element of the enumeration if * 'stride' divides 'last - first' evenly. * * '[x .. y by n]' is ...
primitive
fromToLessThan
lib
lib/Cryptol.cry
[]
[ ">=", "LiteralLessThan", "fin" ]
null
212
222
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
fromToBy : {first, last, stride, a} (fin last, fin stride, stride >= 1, last >= first, Literal last a) => [1 + (last - first)/stride]a /** * A finite sequence counting from 'first' up to (but not including) 'bound' * by 'stride'. Note that if 'first = bound' then the sequence will * be empty. If 'bound = inf'...
fromToBy : {first, last, stride, a} (fin last, fin stride, stride >= 1, last >= first, Literal last a) => [1 + (last - first)/stride]a /** * A finite sequence counting from 'first' up to (but not including) 'bound' * by 'stride'. Note that if 'first = bound' then the sequence will * be empty. If 'bound = inf'...
primitive
fromToBy
lib
lib/Cryptol.cry
[]
[ ">=", "Literal", "fin", "first", "last" ]
null
223
234
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
fromToByLessThan : {first, bound, stride, a} (fin first, fin stride, stride >= 1, bound >= first, LiteralLessThan bound a) => [(bound - first)/^stride]a /** * A finite sequence counting from 'first' down to 'last' by 'stride'. * Note that 'last' will only be an element of the enumeration if * 'stride' divides '...
fromToByLessThan : {first, bound, stride, a} (fin first, fin stride, stride >= 1, bound >= first, LiteralLessThan bound a) => [(bound - first)/^stride]a /** * A finite sequence counting from 'first' down to 'last' by 'stride'. * Note that 'last' will only be an element of the enumeration if * 'stride' divides '...
primitive
fromToByLessThan
lib
lib/Cryptol.cry
[]
[ ">=", "LiteralLessThan", "fin", "first" ]
null
235
245
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
fromToDownBy : {first, last, stride, a} (fin first, fin stride, stride >= 1, first >= last, Literal first a) => [1 + (first - last)/stride]a /** * A finite sequence counting from 'first' down to (but not including) * 'bound' by 'stride'. * * '[x ..> y down by n]' is syntactic sugar for * 'fromToDownByGreaterT...
fromToDownBy : {first, last, stride, a} (fin first, fin stride, stride >= 1, first >= last, Literal first a) => [1 + (first - last)/stride]a /** * A finite sequence counting from 'first' down to (but not including) * 'bound' by 'stride'. * * '[x ..> y down by n]' is syntactic sugar for * 'fromToDownByGreaterT...
primitive
fromToDownBy
lib
lib/Cryptol.cry
[]
[ ">=", "Literal", "fin", "first", "last" ]
null
246
258
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
fromToDownByGreaterThan : {first, bound, stride, a} (fin first, fin stride, stride >= 1, first >= bound, Literal first a) => [(first - bound)/^stride]a /** * A finite arithmetic sequence starting with 'first' and 'next', * stopping when the values reach or would skip over 'last'. * * '[x,y..z]' is syntactic su...
fromToDownByGreaterThan : {first, bound, stride, a} (fin first, fin stride, stride >= 1, first >= bound, Literal first a) => [(first - bound)/^stride]a /** * A finite arithmetic sequence starting with 'first' and 'next', * stopping when the values reach or would skip over 'last'. * * '[x,y..z]' is syntactic su...
primitive
fromToDownByGreaterThan
lib
lib/Cryptol.cry
[]
[ ">=", "Literal", "fin", "first" ]
null
259
268
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
fromThenTo : {first, next, last, a, len} ( fin first, fin next, fin last , Literal first a, Literal next a, Literal last a , first != next , lengthFromThenTo first next last == len) => [len]a // Fractional Literals ------------...
fromThenTo : {first, next, last, a, len} ( fin first, fin next, fin last , Literal first a, Literal next a, Literal last a , first != next , lengthFromThenTo first next last == len) => [len]a // Fractional Literals ------------...
primitive
fromThenTo
lib
lib/Cryptol.cry
[]
[ "!=", "==", "Literal", "fin", "first", "last" ]
null
269
279
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
FLiteral : # -> # -> # -> * -> Prop /** A fractional literal corresponding to 'm/n' */
FLiteral : # -> # -> # -> * -> Prop /** A fractional literal corresponding to 'm/n' */
primitive type
FLiteral
lib
lib/Cryptol.cry
[]
[]
null
280
282
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
fraction : { m, n, r, a } FLiteral m n r a => a // The Zero class ------------------------------------------------------- /** Value types that have a notion of 'zero'. */
fraction : { m, n, r, a } FLiteral m n r a => a // The Zero class ------------------------------------------------------- /** Value types that have a notion of 'zero'. */
primitive
fraction
lib
lib/Cryptol.cry
[]
[ "FLiteral" ]
null
284
294
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
Zero : * -> Prop /** * Gives an arbitrary shaped value whose bits are all False. * ~zero likewise gives an arbitrary shaped value whose bits are all True. */
Zero : * -> Prop /** * Gives an arbitrary shaped value whose bits are all False. * ~zero likewise gives an arbitrary shaped value whose bits are all True. */
primitive type
Zero
lib
lib/Cryptol.cry
[]
[]
null
295
300
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
zero : {a} (Zero a) => a // The Logic class ------------------------------------------------------ /** Value types that support logical operations. */
zero : {a} (Zero a) => a // The Logic class ------------------------------------------------------ /** Value types that support logical operations. */
primitive
zero
lib
lib/Cryptol.cry
[]
[ "Zero" ]
null
301
306
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
Logic : * -> Prop /** * Logical 'and' over bits. Extends element-wise over sequences, tuples. */
Logic : * -> Prop /** * Logical 'and' over bits. Extends element-wise over sequences, tuples. */
primitive type
Logic
lib
lib/Cryptol.cry
[]
[]
null
307
311
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
&&) : {a} (Logic a) => a -> a -> a /** * Logical 'or' over bits. Extends element-wise over sequences, tuples. */
&&) : {a} (Logic a) => a -> a -> a /** * Logical 'or' over bits. Extends element-wise over sequences, tuples. */
primitive
&&
lib
lib/Cryptol.cry
[]
[ "Logic" ]
null
312
316
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
||) : {a} (Logic a) => a -> a -> a /** * Logical 'exclusive or' over bits. Extends element-wise over sequences, tuples. */
||) : {a} (Logic a) => a -> a -> a /** * Logical 'exclusive or' over bits. Extends element-wise over sequences, tuples. */
primitive
||
lib
lib/Cryptol.cry
[]
[ "Logic" ]
null
317
321
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
^) : {a} (Logic a) => a -> a -> a /** * Bitwise complement. The prefix notation '~ x' * is syntactic sugar for 'complement x'. */
^) : {a} (Logic a) => a -> a -> a /** * Bitwise complement. The prefix notation '~ x' * is syntactic sugar for 'complement x'. */
primitive
^
lib
lib/Cryptol.cry
[]
[ "Logic" ]
null
322
327
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
complement : {a} (Logic a) => a -> a // The Ring class ------------------------------------------------------- /** * Value types that support ring addition and multiplication. * * Floating-point values are only approximately a ring, but * nonetheless inhabit this class. */
complement : {a} (Logic a) => a -> a // The Ring class ------------------------------------------------------- /** * Value types that support ring addition and multiplication. * * Floating-point values are only approximately a ring, but * nonetheless inhabit this class. */
primitive
complement
lib
lib/Cryptol.cry
[]
[ "Logic" ]
null
328
338
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
Ring : * -> Prop /** * Converts an unbounded integer to a value in a Ring using the following rules: * * to bitvector type [n]: * the value is reduced modulo 2^^n, * * to Z n: * the value is reduced modulo n, * * floating point types: * the value is rounded to the nearest representable value, ...
Ring : * -> Prop /** * Converts an unbounded integer to a value in a Ring using the following rules: * * to bitvector type [n]: * the value is reduced modulo 2^^n, * * to Z n: * the value is reduced modulo n, * * floating point types: * the value is rounded to the nearest representable value, ...
primitive type
Ring
lib
lib/Cryptol.cry
[]
[]
null
339
357
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
fromInteger : {a} (Ring a) => Integer -> a /** * Add two values. * * For type [n], addition is modulo 2^^n. * * Structured values are added element-wise. */
fromInteger : {a} (Ring a) => Integer -> a /** * Add two values. * * For type [n], addition is modulo 2^^n. * * Structured values are added element-wise. */
primitive
fromInteger
lib
lib/Cryptol.cry
[]
[ "Integer", "Ring" ]
null
358
364
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
+) : {a} (Ring a) => a -> a -> a /** * Subtract two values. * * For type [n], subtraction is modulo 2^^n. * * Structured values are subtracted element-wise. * * Satisfies 'a - b = a + negate b'. * See also: 'negate'. */
+) : {a} (Ring a) => a -> a -> a /** * Subtract two values. * * For type [n], subtraction is modulo 2^^n. * * Structured values are subtracted element-wise. * * Satisfies 'a - b = a + negate b'. * See also: 'negate'. */
primitive
+
lib
lib/Cryptol.cry
[]
[ "Ring" ]
null
365
373
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
-) : {a} (Ring a) => a -> a -> a /** * Multiply two values. * * For type [n], multiplication is modulo 2^^n. * * Structured values are multiplied element-wise. */
-) : {a} (Ring a) => a -> a -> a /** * Multiply two values. * * For type [n], multiplication is modulo 2^^n. * * Structured values are multiplied element-wise. */
primitive
-
lib
lib/Cryptol.cry
[]
[ "Ring" ]
null
374
380
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
*) : {a} (Ring a) => a -> a -> a /** * Returns the additive inverse of its argument. * Over structured values, operates element-wise. * The prefix notation '- x' is syntactic sugar * for 'negate x'. * * Satisfies 'a + negate a = 0'. * Satisfies 'negate a = ~a + 1' for bitvector values. */
*) : {a} (Ring a) => a -> a -> a /** * Returns the additive inverse of its argument. * Over structured values, operates element-wise. * The prefix notation '- x' is syntactic sugar * for 'negate x'. * * Satisfies 'a + negate a = 0'. * Satisfies 'negate a = ~a + 1' for bitvector values. */
primitive
*
lib
lib/Cryptol.cry
[]
[ "Ring" ]
null
381
391
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
negate : {a} (Ring a) => a -> a // The Integral class ------------------------------------------------- /** * Value types that correspond to a segment of the * integers. These types support integer division and * modulus, indexing into sequences, and enumeration. */
negate : {a} (Ring a) => a -> a // The Integral class ------------------------------------------------- /** * Value types that correspond to a segment of the * integers. These types support integer division and * modulus, indexing into sequences, and enumeration. */
primitive
negate
lib
lib/Cryptol.cry
[]
[ "Ring" ]
null
392
401
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
Integral : * -> Prop /** * Divide two values, rounding down (toward negative infinity). * * For type [n], the arguments are treated as unsigned. * * Division by zero is undefined. */
Integral : * -> Prop /** * Divide two values, rounding down (toward negative infinity). * * For type [n], the arguments are treated as unsigned. * * Division by zero is undefined. */
primitive type
Integral
lib
lib/Cryptol.cry
[]
[]
null
402
408
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
/) : {a} (Integral a) => a -> a -> a /** * Compute the remainder from dividing two values. * * For type [n], the arguments are treated as unsigned. * * Remainder of division by zero is undefined. * * Satisfies 'x % y == x - (x / y) * y'. */
/) : {a} (Integral a) => a -> a -> a /** * Compute the remainder from dividing two values. * * For type [n], the arguments are treated as unsigned. * * Remainder of division by zero is undefined. * * Satisfies 'x % y == x - (x / y) * y'. */
primitive
/
lib
lib/Cryptol.cry
[]
[ "Integral" ]
null
409
416
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
%) : {a} (Integral a) => a -> a -> a /** * Converts a value of an integral type to an integer. */
%) : {a} (Integral a) => a -> a -> a /** * Converts a value of an integral type to an integer. */
primitive
%
lib
lib/Cryptol.cry
[]
[ "Integral" ]
null
417
421
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
toInteger : {a} (Integral a) => a -> Integer /** * Compute the exponentiation of a value in a ring. * * For type [n], the exponent is treated as unsigned. * * It is an error to raise a value to a negative integer exponent. * * Satisfies: 'x ^^ 0 == fromInteger 1' * * Satisfies: 'x ^^ e == x * x ^^ (e-1)' when...
toInteger : {a} (Integral a) => a -> Integer /** * Compute the exponentiation of a value in a ring. * * For type [n], the exponent is treated as unsigned. * * It is an error to raise a value to a negative integer exponent. * * Satisfies: 'x ^^ 0 == fromInteger 1' * * Satisfies: 'x ^^ e == x * x ^^ (e-1)' when...
primitive
toInteger
lib
lib/Cryptol.cry
[]
[ "Integer", "Integral" ]
null
422
430
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
^^) : {a, e} (Ring a, Integral e) => a -> e -> a /** * An infinite sequence counting up from the given starting value. * '[x...]' is syntactic sugar for 'infFrom x'. */
^^) : {a, e} (Ring a, Integral e) => a -> e -> a /** * An infinite sequence counting up from the given starting value. * '[x...]' is syntactic sugar for 'infFrom x'. */
primitive
^^
lib
lib/Cryptol.cry
[]
[ "Integral", "Ring" ]
null
431
436
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
infFrom : {a} (Integral a) => a -> [inf]a /** * An infinite arithmetic sequence starting with the given two values. * '[x,y...]' is syntactic sugar for 'infFromThen x y'. */
infFrom : {a} (Integral a) => a -> [inf]a /** * An infinite arithmetic sequence starting with the given two values. * '[x,y...]' is syntactic sugar for 'infFromThen x y'. */
primitive
infFrom
lib
lib/Cryptol.cry
[]
[ "Integral" ]
null
437
442
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
infFromThen : {a} (Integral a) => a -> a -> [inf]a // The Field class ------------------------------------------------- /** * Value types that correspond to a field; that is, * a ring also possessing multiplicative inverses for * non-zero elements. * * Floating-point values are only approximately a field, * bu...
infFromThen : {a} (Integral a) => a -> a -> [inf]a // The Field class ------------------------------------------------- /** * Value types that correspond to a field; that is, * a ring also possessing multiplicative inverses for * non-zero elements. * * Floating-point values are only approximately a field, * bu...
primitive
infFromThen
lib
lib/Cryptol.cry
[]
[ "Integral" ]
null
443
455
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
Field : * -> Prop /** * Reciprocal * * Compute the multiplicative inverse of an element of a field. * The reciprocal of 0 is undefined. */
Field : * -> Prop /** * Reciprocal * * Compute the multiplicative inverse of an element of a field. * The reciprocal of 0 is undefined. */
primitive type
Field
lib
lib/Cryptol.cry
[]
[]
null
456
463
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
recip : {a} (Field a) => a -> a /** * Field division * * The division operation in a field. * Satisfies 'x /. y == x * (recip y)' * * Field division by 0 is undefined. */
recip : {a} (Field a) => a -> a /** * Field division * * The division operation in a field. * Satisfies 'x /. y == x * (recip y)' * * Field division by 0 is undefined. */
primitive
recip
lib
lib/Cryptol.cry
[]
[ "Field" ]
null
464
473
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
/.) : {a} (Field a) => a -> a -> a // The Round class ------------------------------------------------- /** Value types that can be rounded to integer values. */
/.) : {a} (Field a) => a -> a -> a // The Round class ------------------------------------------------- /** Value types that can be rounded to integer values. */
primitive
/.
lib
lib/Cryptol.cry
[]
[ "Field" ]
null
474
479
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
Round : * -> Prop /** * Ceiling function. * * Given 'x', compute the smallest integer 'i' * such that 'x <= i'. */
Round : * -> Prop /** * Ceiling function. * * Given 'x', compute the smallest integer 'i' * such that 'x <= i'. */
primitive type
Round
lib
lib/Cryptol.cry
[]
[]
null
480
487
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
ceiling : {a} (Round a) => a -> Integer /** * Floor function. * * Given 'x', compute the largest integer 'i' * such that 'i <= x'. */
ceiling : {a} (Round a) => a -> Integer /** * Floor function. * * Given 'x', compute the largest integer 'i' * such that 'i <= x'. */
primitive
ceiling
lib
lib/Cryptol.cry
[]
[ "Integer", "Round" ]
null
488
495
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
floor : {a} (Round a) => a -> Integer /** * Truncate the value toward 0. * * Given 'x' compute the nearest integer between * 'x' and 0. For nonnegative 'x', this is floor, * and for negative 'x' this is ceiling. */
floor : {a} (Round a) => a -> Integer /** * Truncate the value toward 0. * * Given 'x' compute the nearest integer between * 'x' and 0. For nonnegative 'x', this is floor, * and for negative 'x' this is ceiling. */
primitive
floor
lib
lib/Cryptol.cry
[]
[ "Integer", "Round" ]
null
496
504
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
trunc : {a} (Round a) => a -> Integer /** * Round to the nearest integer, ties away from 0. * * Ties are broken away from 0. For nonnegative 'x' * this is 'floor (x + 0.5)'. For negative 'x' this * is 'ceiling (x - 0.5)'. */
trunc : {a} (Round a) => a -> Integer /** * Round to the nearest integer, ties away from 0. * * Ties are broken away from 0. For nonnegative 'x' * this is 'floor (x + 0.5)'. For negative 'x' this * is 'ceiling (x - 0.5)'. */
primitive
trunc
lib
lib/Cryptol.cry
[]
[ "Integer", "Round" ]
null
505
513
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
roundAway : {a} (Round a) => a -> Integer /** * Round to the nearest integer, ties to even. * * Ties are broken to the nearest even integer. */
roundAway : {a} (Round a) => a -> Integer /** * Round to the nearest integer, ties to even. * * Ties are broken to the nearest even integer. */
primitive
roundAway
lib
lib/Cryptol.cry
[]
[ "Integer", "Round" ]
null
514
520
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
roundToEven : {a} (Round a) => a -> Integer // The Eq class ---------------------------------------------------- /** Value types that support equality comparisons. */
roundToEven : {a} (Round a) => a -> Integer // The Eq class ---------------------------------------------------- /** Value types that support equality comparisons. */
primitive
roundToEven
lib
lib/Cryptol.cry
[]
[ "Integer", "Round" ]
null
521
526
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
Eq : * -> Prop /** * Compares any two values of the same type for equality. */
Eq : * -> Prop /** * Compares any two values of the same type for equality. */
primitive type
Eq
lib
lib/Cryptol.cry
[]
[]
null
527
531
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
==) : {a} (Eq a) => a -> a -> Bit /** * Compares any two values of the same type for inequality. */
==) : {a} (Eq a) => a -> a -> Bit /** * Compares any two values of the same type for inequality. */
primitive
==
lib
lib/Cryptol.cry
[]
[ "Bit", "Eq" ]
null
532
536
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
!=) : {a} (Eq a) => a -> a -> Bit /** * Compare the outputs of two functions for equality. */
!=) : {a} (Eq a) => a -> a -> Bit /** * Compare the outputs of two functions for equality. */
primitive
!=
lib
lib/Cryptol.cry
[]
[ "Bit", "Eq" ]
null
537
541
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
Cmp : * -> Prop /** * Less-than. Only works on comparable arguments. * * Bitvectors are compared using unsigned arithmetic. */
Cmp : * -> Prop /** * Less-than. Only works on comparable arguments. * * Bitvectors are compared using unsigned arithmetic. */
primitive type
Cmp
lib
lib/Cryptol.cry
[]
[]
null
555
561
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
<) : {a} (Cmp a) => a -> a -> Bit /** * Greater-than of two comparable arguments. * * Bitvectors are compared using unsigned arithmetic. */
<) : {a} (Cmp a) => a -> a -> Bit /** * Greater-than of two comparable arguments. * * Bitvectors are compared using unsigned arithmetic. */
primitive
<
lib
lib/Cryptol.cry
[]
[ "Bit", "Cmp" ]
null
562
568
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
>) : {a} (Cmp a) => a -> a -> Bit /** * Less-than or equal of two comparable arguments. * * Bitvectors are compared using unsigned arithmetic. */
>) : {a} (Cmp a) => a -> a -> Bit /** * Less-than or equal of two comparable arguments. * * Bitvectors are compared using unsigned arithmetic. */
primitive
>
lib
lib/Cryptol.cry
[]
[ "Bit", "Cmp" ]
null
569
575
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
<=) : {a} (Cmp a) => a -> a -> Bit /** * Greater-than or equal of two comparable arguments. * * Bitvectors are compared using unsigned arithmetic. */
<=) : {a} (Cmp a) => a -> a -> Bit /** * Greater-than or equal of two comparable arguments. * * Bitvectors are compared using unsigned arithmetic. */
primitive
<=
lib
lib/Cryptol.cry
[]
[ "Bit", "Cmp" ]
null
576
582
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
>=) : {a} (Cmp a) => a -> a -> Bit /** * Returns the smaller of two comparable arguments. * Bitvectors are compared using unsigned arithmetic. */
>=) : {a} (Cmp a) => a -> a -> Bit /** * Returns the smaller of two comparable arguments. * Bitvectors are compared using unsigned arithmetic. */
primitive
>=
lib
lib/Cryptol.cry
[]
[ "Bit", "Cmp" ]
null
583
588
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
SignedCmp : * -> Prop /** * 2's complement signed less-than. */
SignedCmp : * -> Prop /** * 2's complement signed less-than. */
primitive type
SignedCmp
lib
lib/Cryptol.cry
[]
[]
null
611
615
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
<$) : {a} (SignedCmp a) => a -> a -> Bit /** * 2's complement signed greater-than. */
<$) : {a} (SignedCmp a) => a -> a -> Bit /** * 2's complement signed greater-than. */
primitive
<$
lib
lib/Cryptol.cry
[]
[ "Bit", "SignedCmp" ]
null
616
620
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
True : Bit /** * The constant False. Corresponds to the bit value 0. */
True : Bit /** * The constant False. Corresponds to the bit value 0. */
primitive
True
lib
lib/Cryptol.cry
[]
[ "Bit" ]
null
661
665
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
False : Bit /** * Short-cutting boolean conjunction function. * If the first argument is False, the second argument * is not evaluated. */
False : Bit /** * Short-cutting boolean conjunction function. * If the first argument is False, the second argument * is not evaluated. */
primitive
False
lib
lib/Cryptol.cry
[]
[ "Bit" ]
null
666
672
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
/$) : {n} (fin n, n >= 1) => [n] -> [n] -> [n] /** * 2's complement signed remainder. Division rounds toward 0. * Division by 0 is undefined. Satisfies the following for 'y != 0' * * * 'x %$ y == x - (x /$ y) * y'. * * 'x >=$ 0 ==> x %$ y >=$ 0' * * 'x <=$ 0 ==> x %$ y <=$ 0' */
/$) : {n} (fin n, n >= 1) => [n] -> [n] -> [n] /** * 2's complement signed remainder. Division rounds toward 0. * Division by 0 is undefined. Satisfies the following for 'y != 0' * * * 'x %$ y == x - (x /$ y) * y'. * * 'x >=$ 0 ==> x %$ y >=$ 0' * * 'x <=$ 0 ==> x %$ y <=$ 0' */
primitive
/$
lib
lib/Cryptol.cry
[]
[ ">=", "fin" ]
null
701
710
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
%$) : {n} (fin n, n >= 1) => [n] -> [n] -> [n] /** * Unsigned carry. Returns true if the unsigned addition of the given * bitvector arguments would result in an unsigned overflow. */
%$) : {n} (fin n, n >= 1) => [n] -> [n] -> [n] /** * Unsigned carry. Returns true if the unsigned addition of the given * bitvector arguments would result in an unsigned overflow. */
primitive
%$
lib
lib/Cryptol.cry
[]
[ ">=", "fin" ]
null
711
716
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
>>$) : {n, ix} (fin n, n >= 1, Integral ix) => [n] -> ix -> [n] /** * The ceiling of the base-2 logarithm of an unsigned bitvector. * We set 'lg2 0 = 0'. */
>>$) : {n, ix} (fin n, n >= 1, Integral ix) => [n] -> ix -> [n] /** * The ceiling of the base-2 logarithm of an unsigned bitvector. * We set 'lg2 0 = 0'. */
primitive
>>$
lib
lib/Cryptol.cry
[]
[ ">=", "Integral", "fin" ]
null
758
763
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
lg2 : {n} (fin n) => [n] -> [n] /** * Convert a signed 2's complement bitvector to an integer. */
lg2 : {n} (fin n) => [n] -> [n] /** * Convert a signed 2's complement bitvector to an integer. */
primitive
lg2
lib
lib/Cryptol.cry
[]
[ "fin" ]
null
764
768
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
toSignedInteger : {n} (fin n, n >= 1) => [n] -> Integer // Rational specific operations ---------------------------------------------- /** * Compute the ratio of two integers as a rational. * Ratio is undefined if the denominator is 0. * * 'ratio x y = (fromInteger x /. fromInteger y) : Rational' */
toSignedInteger : {n} (fin n, n >= 1) => [n] -> Integer // Rational specific operations ---------------------------------------------- /** * Compute the ratio of two integers as a rational. * Ratio is undefined if the denominator is 0. * * 'ratio x y = (fromInteger x /. fromInteger y) : Rational' */
primitive
toSignedInteger
lib
lib/Cryptol.cry
[]
[ ">=", "Integer", "fin" ]
null
769
779
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
ratio : Integer -> Integer -> Rational // Zn specific operations ---------------------------------------------------- /** * Converts an integer modulo n to an unbounded integer in the range 0 to n-1. */
ratio : Integer -> Integer -> Rational // Zn specific operations ---------------------------------------------------- /** * Converts an integer modulo n to an unbounded integer in the range 0 to n-1. */
primitive
ratio
lib
lib/Cryptol.cry
[]
[ "Integer", "Rational" ]
null
780
787
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
fromZ : {n} (fin n, n >= 1) => Z n -> Integer // Sequence operations ------------------------------------------------------- /** * Concatenates two sequences. On bitvectors, the most-significant bits * are in the left argument, and the least-significant bits are in the right. */
fromZ : {n} (fin n, n >= 1) => Z n -> Integer // Sequence operations ------------------------------------------------------- /** * Concatenates two sequences. On bitvectors, the most-significant bits * are in the left argument, and the least-significant bits are in the right. */
primitive
fromZ
lib
lib/Cryptol.cry
[]
[ ">=", "Integer", "fin" ]
null
788
796
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
#) : {front, back, a} (fin front) => [front]a -> [back]a -> [front + back] a /** * Splits a sequence into a pair of sequences. * 'splitAt z = (x, y)' iff 'x # y = z'. */
#) : {front, back, a} (fin front) => [front]a -> [back]a -> [front + back] a /** * Splits a sequence into a pair of sequences. * 'splitAt z = (x, y)' iff 'x # y = z'. */
primitive
#
lib
lib/Cryptol.cry
[]
[ "fin" ]
null
797
803
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
join : {parts, each, a} (fin each) => [parts][each]a -> [parts * each]a /** * Splits a sequence into 'parts' groups with 'each' elements. * 'split' is the inverse function to 'join'. */
join : {parts, each, a} (fin each) => [parts][each]a -> [parts * each]a /** * Splits a sequence into 'parts' groups with 'each' elements. * 'split' is the inverse function to 'join'. */
primitive
join
lib
lib/Cryptol.cry
[]
[ "fin" ]
null
812
818
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
split : {parts, each, a} (fin each) => [parts * each]a -> [parts][each]a /** * Reverses the elements in a sequence. */
split : {parts, each, a} (fin each) => [parts * each]a -> [parts][each]a /** * Reverses the elements in a sequence. */
primitive
split
lib
lib/Cryptol.cry
[]
[ "fin" ]
null
819
824
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
reverse : {n, a} (fin n) => [n]a -> [n]a /** * Transposes a matrix. * Satisfies the property 'transpose m @ i @ j == m @ j @ i'. */
reverse : {n, a} (fin n) => [n]a -> [n]a /** * Transposes a matrix. * Satisfies the property 'transpose m @ i @ j == m @ j @ i'. */
primitive
reverse
lib
lib/Cryptol.cry
[]
[ "fin" ]
null
825
830
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
transpose : {rows, cols, a} [rows][cols]a -> [cols][rows]a /** * Select the first (left-most) 'front' elements of a sequence. */
transpose : {rows, cols, a} [rows][cols]a -> [cols][rows]a /** * Select the first (left-most) 'front' elements of a sequence. */
primitive
transpose
lib
lib/Cryptol.cry
[]
[]
null
831
835
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
take : {front, back, a} [front + back]a -> [front]a /** * Select all the elements after (to the right of) the 'front' elements of a sequence. */
take : {front, back, a} [front + back]a -> [front]a /** * Select all the elements after (to the right of) the 'front' elements of a sequence. */
primitive
take
lib
lib/Cryptol.cry
[]
[]
null
836
840
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
drop : {front, back, a} (fin front) => [front + back]a -> [back]a /** * Drop the first (left-most) element of a sequence. */
drop : {front, back, a} (fin front) => [front + back]a -> [back]a /** * Drop the first (left-most) element of a sequence. */
primitive
drop
lib
lib/Cryptol.cry
[]
[ "fin" ]
null
841
845
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
<<) : {n, ix, a} (Integral ix, Zero a) => [n]a -> ix -> [n]a /** * Right shift. The first argument is the sequence to shift, the second is the * number of positions to shift by. */
<<) : {n, ix, a} (Integral ix, Zero a) => [n]a -> ix -> [n]a /** * Right shift. The first argument is the sequence to shift, the second is the * number of positions to shift by. */
primitive
<<
lib
lib/Cryptol.cry
[]
[ "Integral", "Zero" ]
null
873
878
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
>>) : {n, ix, a} (Integral ix, Zero a) => [n]a -> ix -> [n]a /** * Left rotate. The first argument is the sequence to rotate, the second is the * number of positions to rotate by. */
>>) : {n, ix, a} (Integral ix, Zero a) => [n]a -> ix -> [n]a /** * Left rotate. The first argument is the sequence to rotate, the second is the * number of positions to rotate by. */
primitive
>>
lib
lib/Cryptol.cry
[]
[ "Integral", "Zero" ]
null
879
884
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
<<<) : {n, ix, a} (fin n, Integral ix) => [n]a -> ix -> [n]a /** * Right rotate. The first argument is the sequence to rotate, the second is * the number of positions to rotate by. */
<<<) : {n, ix, a} (fin n, Integral ix) => [n]a -> ix -> [n]a /** * Right rotate. The first argument is the sequence to rotate, the second is * the number of positions to rotate by. */
primitive
<<<
lib
lib/Cryptol.cry
[]
[ "Integral", "fin" ]
null
885
890
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
>>>) : {n, ix, a} (fin n, Integral ix) => [n]a -> ix -> [n]a /** * Index operator. The first argument is a sequence. The second argument is * the zero-based index of the element to select from the sequence. */
>>>) : {n, ix, a} (fin n, Integral ix) => [n]a -> ix -> [n]a /** * Index operator. The first argument is a sequence. The second argument is * the zero-based index of the element to select from the sequence. */
primitive
>>>
lib
lib/Cryptol.cry
[]
[ "Integral", "fin" ]
null
891
896
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
: {n, a, ix} (Integral ix) => [n]a -> ix -> a /** * Bulk index operator. The first argument is a sequence. The second argument * is a sequence of the zero-based indices of the elements to select. */
: {n, a, ix} (Integral ix) => [n]a -> ix -> a /** * Bulk index operator. The first argument is a sequence. The second argument * is a sequence of the zero-based indices of the elements to select. */
primitive
:
lib
lib/Cryptol.cry
[]
[ "Integral" ]
null
897
902
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
!) : {n, a, ix} (fin n, Integral ix) => [n]a -> ix -> a /** * Bulk reverse index operator. The first argument is a finite sequence. The * second argument is a sequence of the zero-based indices of the elements to * select, starting from the end of the sequence. */
!) : {n, a, ix} (fin n, Integral ix) => [n]a -> ix -> a /** * Bulk reverse index operator. The first argument is a finite sequence. The * second argument is a sequence of the zero-based indices of the elements to * select, starting from the end of the sequence. */
primitive
!
lib
lib/Cryptol.cry
[]
[ "Integral", "fin" ]
null
911
917
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
update : {n, a, ix} (Integral ix) => [n]a -> ix -> a -> [n]a /** * Update the given sequence with new value at the given index position. * The first argument is a sequence. The second argument is the zero-based * index of the element to update, starting from the end of the sequence. * The third argument is the new...
update : {n, a, ix} (Integral ix) => [n]a -> ix -> a -> [n]a /** * Update the given sequence with new value at the given index position. * The first argument is a sequence. The second argument is the zero-based * index of the element to update, starting from the end of the sequence. * The third argument is the new...
primitive
update
lib
lib/Cryptol.cry
[]
[ "Integral" ]
null
928
936
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
updateEnd : {n, a, ix} (fin n, Integral ix) => [n]a -> ix -> a -> [n]a /** * Perform a series of updates to a sequence. The first argument is * the initial sequence to update. The second argument is a sequence * of indices, and the third argument is a sequence of values. * This function applies the 'update' func...
updateEnd : {n, a, ix} (fin n, Integral ix) => [n]a -> ix -> a -> [n]a /** * Perform a series of updates to a sequence. The first argument is * the initial sequence to update. The second argument is a sequence * of indices, and the third argument is a sequence of values. * This function applies the 'update' func...
primitive
updateEnd
lib
lib/Cryptol.cry
[]
[ "Integral", "fin" ]
null
937
945
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
pmult : {u, v} (fin u, fin v) => [1 + u] -> [1 + v] -> [1 + u + v] /** * Performs division of polynomials over GF(2). */
pmult : {u, v} (fin u, fin v) => [1 + u] -> [1 + v] -> [1 + u + v] /** * Performs division of polynomials over GF(2). */
primitive
pmult
lib
lib/Cryptol.cry
[]
[ "fin" ]
null
1,002
1,006
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
pdiv : {u, v} (fin u, fin v) => [u] -> [v] -> [u] /** * Performs modulus of polynomials over GF(2). */
pdiv : {u, v} (fin u, fin v) => [u] -> [v] -> [u] /** * Performs modulus of polynomials over GF(2). */
primitive
pdiv
lib
lib/Cryptol.cry
[]
[ "fin" ]
null
1,007
1,011
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
pmod : {u, v} (fin u, fin v) => [u] -> [1 + v] -> [v] // Experimental primitives ------------------------------------------------------------ /** * Parallel map. The given function is applied to each element in the * given finite sequence, and the results are computed in parallel. * The values in the resulting se...
pmod : {u, v} (fin u, fin v) => [u] -> [1 + v] -> [v] // Experimental primitives ------------------------------------------------------------ /** * Parallel map. The given function is applied to each element in the * given finite sequence, and the results are computed in parallel. * The values in the resulting se...
primitive
pmod
lib
lib/Cryptol.cry
[]
[ "fin" ]
null
1,012
1,026
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
parmap : {a, b, n} (Eq b, fin n) => (a -> b) -> [n]a -> [n]b // Utility operations ----------------------------------------------------------------- /** * A strictness-increasing operation. The first operand * is reduced to normal form before evaluating the second * argument. * * The Eq constraint restricts th...
parmap : {a, b, n} (Eq b, fin n) => (a -> b) -> [n]a -> [n]b // Utility operations ----------------------------------------------------------------- /** * A strictness-increasing operation. The first operand * is reduced to normal form before evaluating the second * argument. * * The Eq constraint restricts th...
primitive
parmap
lib
lib/Cryptol.cry
[]
[ "Eq", "fin" ]
null
1,027
1,039
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
deepseq : {a, b} Eq a => a -> b -> b /** * Reduce to normal form. * * The Eq constraint restricts this operation to types * where reduction to normal form makes sense. */
deepseq : {a, b} Eq a => a -> b -> b /** * Reduce to normal form. * * The Eq constraint restricts this operation to types * where reduction to normal form makes sense. */
primitive
deepseq
lib
lib/Cryptol.cry
[]
[ "Eq" ]
null
1,040
1,047
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
error : {a, n} (fin n) => String n -> a /** * Raise a run-time error with a generic message. * This function can be called at any type. */
error : {a, n} (fin n) => String n -> a /** * Raise a run-time error with a generic message. * This function can be called at any type. */
primitive
error
lib
lib/Cryptol.cry
[]
[ "String", "fin" ]
null
1,055
1,060
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
random : {a} [256] -> a /** * Debugging function for tracing. The first argument is a string, * which is prepended to the printed value of the second argument. * This combined string is then printed when the trace function is * evaluated. The return value is equal to the third argument. * * The exact timing an...
random : {a} [256] -> a /** * Debugging function for tracing. The first argument is a string, * which is prepended to the printed value of the second argument. * This combined string is then printed when the trace function is * evaluated. The return value is equal to the third argument. * * The exact timing an...
primitive
random
lib
lib/Cryptol.cry
[]
[]
null
1,076
1,088
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
trace : {n, a, b} (fin n) => String n -> a -> b -> b /** * Debugging function for tracing values. The first argument is a string, * which is prepended to the printed value of the second argument. * This combined string is then printed when the trace function is * evaluated. The return value is equal to the secon...
trace : {n, a, b} (fin n) => String n -> a -> b -> b /** * Debugging function for tracing values. The first argument is a string, * which is prepended to the printed value of the second argument. * This combined string is then printed when the trace function is * evaluated. The return value is equal to the secon...
primitive
trace
lib
lib/Cryptol.cry
[]
[ "String", "fin" ]
null
1,089
1,101
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
foldl : {n, a, b} (fin n) => (a -> b -> a) -> a -> [n]b -> a /** * Functional left fold, with strict evaluation of the accumulator value. * The accumulator is reduced to normal form at each step. The Eq constraint * restricts the accumulator to types where reduction to normal form makes sense. * * foldl' (+) 0 [...
foldl : {n, a, b} (fin n) => (a -> b -> a) -> a -> [n]b -> a /** * Functional left fold, with strict evaluation of the accumulator value. * The accumulator is reduced to normal form at each step. The Eq constraint * restricts the accumulator to types where reduction to normal form makes sense. * * foldl' (+) 0 [...
primitive
foldl
lib
lib/Cryptol.cry
[]
[ "fin" ]
null
1,143
1,151
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
foldl' : {n, a, b} (fin n, Eq a) => (a -> b -> a) -> a -> [n]b -> a /** * Functional right fold. * * foldr (-) 0 [1,2,3] = 0 - (1 - (2 - 3)) */
foldl' : {n, a, b} (fin n, Eq a) => (a -> b -> a) -> a -> [n]b -> a /** * Functional right fold. * * foldr (-) 0 [1,2,3] = 0 - (1 - (2 - 3)) */
primitive
foldl'
lib
lib/Cryptol.cry
[]
[ "Eq", "fin" ]
null
1,152
1,158
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
scanl : {n, a, b} (a -> b -> a) -> a -> [n]b -> [1+n]a /** * Scan right is like a foldr that also emits the intermediate values. */
scanl : {n, a, b} (a -> b -> a) -> a -> [n]b -> [1+n]a /** * Scan right is like a foldr that also emits the intermediate values. */
primitive
scanl
lib
lib/Cryptol.cry
[]
[]
null
1,188
1,192
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
demote : {val, rep} Literal val rep => rep demote = number`{val} /** * Return the length of a sequence. Note that the result depends only * on the type of the argument, not its value. */
demote : {val, rep} Literal val rep => rep
demote = number`{val} /** * Return the length of a sequence. Note that the result depends only * on the type of the argument, not its value. */
function
demote
lib
lib/Cryptol.cry
[]
[ "Literal" ]
null
185
185
true
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
length : {n, a, b} (fin n, Literal n b) => [n]a -> b length _ = `n /** * A finite sequence counting up from 'first' to 'last'. * * '[x .. y]' is syntactic sugar for 'fromTo`{first=x,last=y}'. */
length : {n, a, b} (fin n, Literal n b) => [n]a -> b
length _ = `n /** * A finite sequence counting up from 'first' to 'last'. * * '[x .. y]' is syntactic sugar for 'fromTo`{first=x,last=y}'. */
function
length
lib
lib/Cryptol.cry
[]
[ "Literal", "fin" ]
null
192
192
true
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
(===) : {a, b} (Eq b) => (a -> b) -> (a -> b) -> (a -> Bit)
(===) : {a, b} (Eq b) => (a -> b) -> (a -> b) -> (a -> Bit)
function
===
lib
lib/Cryptol.cry
[]
[ "Bit", "Eq" ]
null
542
542
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
(!==) : {a, b} (Eq b) => (a -> b) -> (a -> b) -> (a -> Bit)
(!==) : {a, b} (Eq b) => (a -> b) -> (a -> b) -> (a -> Bit)
function
!==
lib
lib/Cryptol.cry
[]
[ "Bit", "Eq" ]
null
548
548
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
min : {a} (Cmp a) => a -> a -> a min x y = if x < y then x else y /** * Returns the greater of two comparable arguments. * Bitvectors are compared using unsigned arithmetic. */
min : {a} (Cmp a) => a -> a -> a
min x y = if x < y then x else y /** * Returns the greater of two comparable arguments. * Bitvectors are compared using unsigned arithmetic. */
function
min
lib
lib/Cryptol.cry
[]
[ "Cmp" ]
null
589
589
true
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
max : {a} (Cmp a) => a -> a -> a max x y = if x > y then x else y /** * Compute the absolute value of a value from an ordered ring. * Bitvector values are considered unsigned, so this is * the identity function on [n]. */
max : {a} (Cmp a) => a -> a -> a
max x y = if x > y then x else y /** * Compute the absolute value of a value from an ordered ring. * Bitvector values are considered unsigned, so this is * the identity function on [n]. */
function
max
lib
lib/Cryptol.cry
[]
[ "Cmp" ]
null
596
596
true
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
abs : {a} (Cmp a, Ring a) => a -> a abs x = if x < fromInteger 0 then negate x else x // The SignedCmp class ---------------------------------------------- /** Value types that support signed comparisons. */
abs : {a} (Cmp a, Ring a) => a -> a
abs x = if x < fromInteger 0 then negate x else x // The SignedCmp class ---------------------------------------------- /** Value types that support signed comparisons. */
function
abs
lib
lib/Cryptol.cry
[]
[ "Cmp", "Ring", "fromInteger", "negate" ]
null
604
604
true
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
(>$) : {a} (SignedCmp a) => a -> a -> Bit
(>$) : {a} (SignedCmp a) => a -> a -> Bit
function
>$
lib
lib/Cryptol.cry
[]
[ "Bit", "SignedCmp" ]
null
621
621
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
(<=$) : {a} (SignedCmp a) => a -> a -> Bit
(<=$) : {a} (SignedCmp a) => a -> a -> Bit
function
<=$
lib
lib/Cryptol.cry
[]
[ "Bit", "SignedCmp" ]
null
627
627
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
(>=$) : {a} (SignedCmp a) => a -> a -> Bit
(>=$) : {a} (SignedCmp a) => a -> a -> Bit
function
>=$
lib
lib/Cryptol.cry
[]
[ "Bit", "SignedCmp" ]
null
633
633
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
(/\) : Bit -> Bit -> Bit
(/\) : Bit -> Bit -> Bit
function
/\
lib
lib/Cryptol.cry
[]
[ "Bit" ]
null
673
673
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
(\/) : Bit -> Bit -> Bit
(\/) : Bit -> Bit -> Bit
function
\/
lib
lib/Cryptol.cry
[]
[ "Bit" ]
null
681
681
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb
(==>) : Bit -> Bit -> Bit
(==>) : Bit -> Bit -> Bit
function
==>
lib
lib/Cryptol.cry
[]
[ "Bit" ]
null
689
689
false
https://github.com/GaloisInc/cryptol
a50cac6eb2c30a79503814f423f375f9476aaceb