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