Get the p field from a twisted-edwards-curve.
(twisted-edwards-curve->p x) → p
This is an ordinary field accessor created by fty::defprod.
Function:
(defun twisted-edwards-curve->p$inline (x) (declare (xargs :guard (twisted-edwards-curvep x))) (declare (xargs :guard t)) (let ((acl2::__function__ 'twisted-edwards-curve->p)) (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)) p 3)) :exec (cdr (std::da-nth 0 x)))))
Theorem:
(defthm natp-of-twisted-edwards-curve->p (b* ((p (twisted-edwards-curve->p$inline x))) (natp p)) :rule-classes :rewrite)
Theorem:
(defthm twisted-edwards-curve->p$inline-of-twisted-edwards-curve-fix-x (equal (twisted-edwards-curve->p$inline (twisted-edwards-curve-fix x)) (twisted-edwards-curve->p$inline x)))
Theorem:
(defthm twisted-edwards-curve->p$inline-twisted-edwards-curve-equiv-congruence-on-x (implies (twisted-edwards-curve-equiv x x-equiv) (equal (twisted-edwards-curve->p$inline x) (twisted-edwards-curve->p$inline x-equiv))) :rule-classes :congruence)