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