def equal
import bend-collections@1.0.0.0/src/crypto/ed25519/point.bend as Pointimport Base
import bend-collections@1.0.0.0/src/crypto/curve25519/field.bend as F
175# the same point: X1 Z2 == X2 Z1 and Y1 Z2 == Y2 Z1
176def equal(p: Pt, q: Pt) -> Bool:
177 match p q:
178 case Pt{+x1, +y1, +z1, t1} Pt{+x2, +y2, +z2, t2}:
179 Bool.and(F.eq(F.mul(x1, z2), F.mul(x2, z1)), F.eq(F.mul(y1, z2), F.mul(y2, z1)))