Get the b field from a montgomery-curve.
(montgomery-curve->b x) → fty::x.name
This is an ordinary field accessor created by fty::defprod.
Function:
(defun montgomery-curve->b$inline (x) (declare (xargs :guard (montgomery-curvep x))) (declare (xargs :guard t)) (let ((acl2::__function__ 'montgomery-curve->b)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((x (and t x)) (p (cdr (std::da-nth 0 x))) (a (cdr (std::da-nth 1 x))) (b (cdr (std::da-nth 2 x)))) (if (and (dm::primep p) (fep b p) (not (equal b 0))) b 1)) :exec (cdr (std::da-nth 2 x)))))
Theorem:
(defthm montgomery-curve->b$inline-of-montgomery-curve-fix-x (equal (montgomery-curve->b$inline (montgomery-curve-fix x)) (montgomery-curve->b$inline x)))
Theorem:
(defthm montgomery-curve->b$inline-montgomery-curve-equiv-congruence-on-x (implies (montgomery-curve-equiv x x-equiv) (equal (montgomery-curve->b$inline x) (montgomery-curve->b$inline x-equiv))) :rule-classes :congruence)