Fixer for secp256k1-pub-key.
(secp256k1-pub-key-fix x) → fixed-x
Function:
(defun secp256k1-pub-key-fix (x) (declare (xargs :guard (secp256k1-pub-key-p x))) (mbe :logic (if (secp256k1-pub-key-p x) x (secp256k1-point 1 1)) :exec x))
Theorem:
(defthm secp256k1-pub-key-p-of-secp256k1-pub-key-fix (b* ((fixed-x (secp256k1-pub-key-fix x))) (secp256k1-pub-key-p fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm secp256k1-pub-key-fix-when-secp256k1-pub-key-p (implies (secp256k1-pub-key-p x) (equal (secp256k1-pub-key-fix x) x)))