Fixer for floating-point-literal.
(floating-point-literal-fix x) → fixed-x
Function:
(defun floating-point-literal-fix (x) (declare (xargs :guard (floating-point-literalp x))) (mbe :logic (if (floating-point-literalp x) x (floating-point-literal-witness)) :exec x))
Theorem:
(defthm floating-point-literalp-of-floating-point-literal-fix (b* ((fixed-x (floating-point-literal-fix x))) (floating-point-literalp fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm floating-point-literal-fix-when-floating-point-literalp (implies (floating-point-literalp x) (equal (floating-point-literal-fix x) x)))