def rhs_r

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/secp256k1/penc.bend:69

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/penc.bend as Penc
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/field.bend as F
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/point.bend as P
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fieldops.bend as FO
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/point.bend as PT

69def rhs_r(+one: Nat, +h1: {one == 1n : Nat}, +x: List<&2, Nat>, +hx: {PT.red(one, x) == True{} : Bool}) -> {PT.red(one, P.rhs(x)) == True{} : Bool}:
70  +h2 = FO.mul_r(one, h1, x, x, hx, hx)
71  +h3 = FO.mul_r(one, h1, F.mul(x, x), x, h2, hx)
72  FO.add_r(one, h1, F.mul(F.mul(x, x), x), F.small(7n), h3, FO.small_r(one, h1, 7n, seven_lt(one, h1)))

Uses (11)

Used by (3)