def lxr

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/secp256k1/pschn.bend:181

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/pschn.bend as Pschn
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/schnorr.bend as SC
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/penc.bend as PE

181def lxr(+one: Nat, +h1: {one == 1n : Nat}, +x: List<&2, Nat>, +hl: {FS.limbs16(one, 16n, x) == True{} : Bool}, b: Bool, +hb: {Nat.is_lt(FS.value(one, x), FS.prime(one)) == b : Bool}) -> {PE.mpred(one, SC.lift_if(x, b)) == True{} : Bool}:
182  match b:
183    case True{}:
184      PE.decompress_r(one, h1, x, 0n, SL.red_of(one, x, hl, hb), {==})
185    case False{}:
186      {==}

Uses (11)

Used by (1)