Basic equivalence relation for montgomery-curve structures.
Function:
(defun montgomery-curve-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (montgomery-curvep acl2::x) (montgomery-curvep acl2::y)))) (equal (montgomery-curve-fix acl2::x) (montgomery-curve-fix acl2::y)))
Theorem:
(defthm montgomery-curve-equiv-is-an-equivalence (and (booleanp (montgomery-curve-equiv x y)) (montgomery-curve-equiv x x) (implies (montgomery-curve-equiv x y) (montgomery-curve-equiv y x)) (implies (and (montgomery-curve-equiv x y) (montgomery-curve-equiv y z)) (montgomery-curve-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm montgomery-curve-equiv-implies-equal-montgomery-curve-fix-1 (implies (montgomery-curve-equiv acl2::x x-equiv) (equal (montgomery-curve-fix acl2::x) (montgomery-curve-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm montgomery-curve-fix-under-montgomery-curve-equiv (montgomery-curve-equiv (montgomery-curve-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-montgomery-curve-fix-1-forward-to-montgomery-curve-equiv (implies (equal (montgomery-curve-fix acl2::x) acl2::y) (montgomery-curve-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-montgomery-curve-fix-2-forward-to-montgomery-curve-equiv (implies (equal acl2::x (montgomery-curve-fix acl2::y)) (montgomery-curve-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm montgomery-curve-equiv-of-montgomery-curve-fix-1-forward (implies (montgomery-curve-equiv (montgomery-curve-fix acl2::x) acl2::y) (montgomery-curve-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm montgomery-curve-equiv-of-montgomery-curve-fix-2-forward (implies (montgomery-curve-equiv acl2::x (montgomery-curve-fix acl2::y)) (montgomery-curve-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)