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