def decompress_r
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/secp256k1/penc.bend:185
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/fieldpow.bend as FP
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/point.bend as PT
185def decompress_r(+one: Nat, +h1: {one == 1n : Nat}, +x: List<&2, Nat>, +par: Nat, +hx: {PT.red(one, x) == True{} : Bool}, +hp: {Nat.is_lt(par, 2n) == True{} : Bool}) -> {mpred(one, P.decompress(x, par)) == True{} : Bool}:
186 +hy = FP.sqrt_r(one, h1, P.rhs(x), rhs_r(one, h1, x, hx))
187 dif_r(one, h1, x, P.lift_y(F.sqrt(P.rhs(x)), par), hx, lift_r(one, h1, F.sqrt(P.rhs(x)), par, hy, hp), F.eq(F.mul(F.sqrt(P.rhs(x)), F.sqrt(P.rhs(x))), P.rhs(x)))