def two_r
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/secp256k1/ptwo.bend:13
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/ptwo.bend as Ptwo
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend as FS
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/point.bend as PT
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/sel.bend as SL
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/pmul.bend as PM
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/paff.bend as PA
13
14def two_r(+one: Nat, +h1: {one == 1n : Nat}, +u1: List<&2, Nat>, +hu1: {FS.reduced(one, FS.order(one), u1) == True{} : Bool}, +u2: List<&2, Nat>, +hu2: {FS.reduced(one, FS.order(one), u2) == True{} : Bool}, +pr: P.Point, +hpr: {PT.pred(one, pr) == True{} : Bool}) -> {PT.pred(one, P.add(P.mul(u1, P.g()), P.mul(u2, pr))) == True{} : Bool}:
15 PT.padd_r(one, h1, P.mul(u1, P.g()), P.mul(u2, pr), PM.mul_r(one, h1, u1, P.g(), SL.sl16(one, u1, hu1), PA.g_r(one, h1)), PM.mul_r(one, h1, u2, pr, SL.sl16(one, u2, hu2), hpr))