Schnorr.lift_if: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/spec/crypto/secp256k1/schnorr.bend as Schnorr Lines 57-62 of bend-collections@1.0.0.0/spec/crypto/secp256k1/schnorr.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/schnorr.bend&start_line=57&end_line=62 import Base import bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend as CV # lift_x(x): the point with x-coordinate x and even y, if x < p and # x^3 + 7 is a square def lift_if(+one: Nat, +x: Nat, ok: Bool) -> Maybe<&2, CV.SPoint>: match ok: case True{}: CV.decompress(p(one), x, 0n) case False{}: None{} Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=SPoint https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=decompress https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/schnorr.bend&name=p