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