Penc.on_curve_v: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/penc.bend as Penc Lines 83-89 of bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/penc.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/penc.bend&start_line=83&end_line=89 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/spec/crypto/secp256k1/curve.bend as CV 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/fieldops.bend as FO import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fwrap.bend as FW 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 PM def on_curve_v(+one: Nat, +h1: {one == 1n : Nat}, +x: List<&2, Nat>, +y: List<&2, Nat>, +hx: {PT.red(one, x) == True{} : Bool}, +hy: {PT.red(one, y) == True{} : Bool}) -> {P.on_curve(x, y) == CV.on_curve(FS.prime(one), FS.value(one, x), FS.value(one, y)) : Bool}: +hs = FO.mul_r(one, h1, y, y, hy, hy) +hr = rhs_r(one, h1, x, hx) %Equal.sym(Bool, F.eq(F.mul(y, y), P.rhs(x)), Nat.is_eq(FS.value(one, F.mul(y, y)), FS.value(one, P.rhs(x))), FW.eq_f(one, h1, F.mul(y, y), P.rhs(x), PM.l16(one, F.mul(y, y), hs), PM.l16(one, P.rhs(x), hr))) : {_ == Nat.is_eq(FS.mmul(FS.prime(one), FS.value(one, y), FS.value(one, y)), CV.rhs(FS.prime(one), FS.value(one, x))) : Bool} %Equal.sym(Nat, FS.value(one, F.mul(y, y)), FS.mmul(FS.prime(one), FS.value(one, y), FS.value(one, y)), FO.mul_v(one, h1, y, y, hy, hy)) : {Nat.is_eq(_, FS.value(one, P.rhs(x))) == Nat.is_eq(FS.mmul(FS.prime(one), FS.value(one, y), FS.value(one, y)), CV.rhs(FS.prime(one), FS.value(one, x))) : Bool} %Equal.sym(Nat, FS.value(one, P.rhs(x)), CV.rhs(FS.prime(one), FS.value(one, x)), rhs_v(one, h1, x, hx)) : {Nat.is_eq(FS.mmul(FS.prime(one), FS.value(one, y), FS.value(one, y)), _) == Nat.is_eq(FS.mmul(FS.prime(one), FS.value(one, y), FS.value(one, y)), CV.rhs(FS.prime(one), FS.value(one, x))) : Bool} {==} Uses (21): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fieldops.bend&name=mul_r https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fieldops.bend&name=mul_v https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fwrap.bend&name=eq_f https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/penc.bend&name=rhs_r https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/penc.bend&name=rhs_v https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/point.bend&name=red https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/sel.bend&name=l16 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=on_curve https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=rhs https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend&name=mmul https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend&name=prime https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend&name=value https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/field.bend&name=eq https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/field.bend&name=mul https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/point.bend&name=on_curve https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/point.bend&name=rhs