Check if a twisted Edwards curve is complete.
(twisted-edwards-curve-completep curve) → yes/no
According to the paper on twisted Edwards curves
referenced in twisted-edwards,
this is the case when
Function:
(defun twisted-edwards-curve-completep (curve) (declare (xargs :guard (twisted-edwards-curvep curve))) (let ((acl2::__function__ 'twisted-edwards-curve-completep)) (declare (ignorable acl2::__function__)) (and (pfield-squarep (twisted-edwards-curve->a curve) (twisted-edwards-curve->p curve)) (not (pfield-squarep (twisted-edwards-curve->d curve) (twisted-edwards-curve->p curve))))))
Theorem:
(defthm booleanp-of-twisted-edwards-curve-completep (b* ((yes/no (twisted-edwards-curve-completep curve))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm twisted-edwards-curve-completep-of-twisted-edwards-curve-fix-curve (equal (twisted-edwards-curve-completep (twisted-edwards-curve-fix curve)) (twisted-edwards-curve-completep curve)))
Theorem:
(defthm twisted-edwards-curve-completep-twisted-edwards-curve-equiv-congruence-on-curve (implies (twisted-edwards-curve-equiv curve curve-equiv) (equal (twisted-edwards-curve-completep curve) (twisted-edwards-curve-completep curve-equiv))) :rule-classes :congruence)