Build a finite elliptic curve point.
Function:
(defun point-finite (x y) (declare (xargs :guard (and (natp x) (natp y)))) (let ((acl2::__function__ 'point-finite)) (declare (ignorable acl2::__function__)) (b* ((x (mbe :logic (nfix x) :exec x)) (y (mbe :logic (nfix y) :exec y))) (cons x y))))
Theorem:
(defthm pointp-of-point-finite (b* ((p (point-finite x y))) (pointp p)) :rule-classes :rewrite)
Theorem:
(defthm point-kind-of-point-finite (equal (point-kind (point-finite x y)) :finite))
Theorem:
(defthm point-finite->x-of-point-finite (equal (point-finite->x (point-finite x y)) (nfix x)))
Theorem:
(defthm point-finite->y-of-point-finite (equal (point-finite->y (point-finite x y)) (nfix y)))
Theorem:
(defthm point-finite-of-point-finite->x/y (implies (equal (point-kind p) :finite) (equal (point-finite (point-finite->x p) (point-finite->y p)) (point-fix p))))
Theorem:
(defthm point-fix-when-finite (implies (equal (point-kind p) :finite) (equal (point-fix p) (point-finite (point-finite->x p) (point-finite->y p)))))
Theorem:
(defthm equal-of-point-finite (equal (equal (point-finite x y) p) (and (pointp p) (equal (point-kind p) :finite) (equal (point-finite->x p) (nfix x)) (equal (point-finite->y p) (nfix y)))))
Theorem:
(defthm point-finite-of-nfix-x (equal (point-finite (nfix x) y) (point-finite x y)))
Theorem:
(defthm point-finite-nat-equiv-congruence-on-x (implies (nat-equiv x x-equiv) (equal (point-finite x y) (point-finite x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm point-finite-of-nfix-y (equal (point-finite x (nfix y)) (point-finite x y)))
Theorem:
(defthm point-finite-nat-equiv-congruence-on-y (implies (nat-equiv y y-equiv) (equal (point-finite x y) (point-finite x y-equiv))) :rule-classes :congruence)