Addition of two points on the secp256k1 curve.
For now we do not require the points to be on the curve, but just to be two points with coordinates in the field, as formalized by the guard.
We constrain this function to return a point unconditionally.
We also constrain this function to fix its arguments to points.
Theorem:
(defthm secp256k1-pointp-of-secp256k1-add (secp256k1-pointp (secp256k1-add point1 point2)))
Theorem:
(defthm secp256k1-fixes-input-point1 (equal (secp256k1-add (secp256k1-point-fix point1) point2) (secp256k1-add point1 point2)))
Theorem:
(defthm secp256k1-fixes-input-point2 (equal (secp256k1-add point1 (secp256k1-point-fix point2)) (secp256k1-add point1 point2)))
Theorem:
(defthm secp256k1-point-equiv-implies-equal-secp256k1-add-1 (implies (secp256k1-point-equiv point1 point1-equiv) (equal (secp256k1-add point1 point2) (secp256k1-add point1-equiv point2))) :rule-classes (:congruence))
Theorem:
(defthm secp256k1-point-equiv-implies-equal-secp256k1-add-2 (implies (secp256k1-point-equiv point2 point2-equiv) (equal (secp256k1-add point1 point2) (secp256k1-add point1 point2-equiv))) :rule-classes (:congruence))