ashlang 0.1.3

A language for zero knowledge proofs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(a, b)

# a % b

# statics should be evaluated at compile time allowing
# non-field operations like floored division to be used
#
# for tasm execution an assembly implementation would be provided
static quotient = in \ b
static remainder = a - quotient * b

# todo: implement lt in r1cs
assert_eq(lt(remainder, quotient), 1)
assert_eq(lt(quotient, quotient), 1)

assert_eq(divisor * quotient + remainder, dividend)

return remainder