def on_curve
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/curve.bend as Curveimport Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend as FS
186def on_curve(+p: Nat, +x: Nat, +y: Nat) -> Bool:
187 Nat.is_eq(FS.mmul(p, y, y), rhs(p, x))