assert_lte!
Fail compilation unless each element of a static vector is at most the matching element of another. Assertions
assert_lte! lhs, rhs
Checks lhs[i] <= rhs[i] for every index while the program is compiled, comparing canonical integer values in [0, p). Nothing is added to the R1CS.
Arguments
lhs,rhs- Static vectors (or scalars) of equal length. Witness values are an error.
Returns
Nothing, it is used as a statement.
Constraints
None.
Example
(let x) static n = len! x assert_lte! n, 2 n
assert_lte! [1 4], [3 3]
Notes
Unlike assert_lt!, assert_lte! takes no message argument; a third argument is rejected.
Used in the standard library
ext/ext_mle_eval, extend_to, lattice/lattice_squeeze, milli/mldsa/mldsa_reduce, slip/slip_r1cs_arg_verify, split_at, typed/typed_width