Recognizer for short-weierstrass structures.
(short-weierstrass-p x) → *
Function:
(defun short-weierstrass-p (x) (declare (xargs :guard t)) (let ((acl2::__function__ 'short-weierstrass-p)) (declare (ignorable acl2::__function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(p a b))) :exec (fty::alist-with-carsp x '(p a b))) (b* ((p (cdr (std::da-nth 0 x))) (a (cdr (std::da-nth 1 x))) (b (cdr (std::da-nth 2 x)))) (and (natp p) (natp a) (natp b) (> p 3) (fep a p) (fep b p) (posp (mod (+ (* 4 a a a) (* 27 b b)) p)))))))
Theorem:
(defthm consp-when-short-weierstrass-p (implies (short-weierstrass-p x) (consp x)) :rule-classes :compound-recognizer)