Subtraction
(float-sub operand-left operand-right) → result
Function:
(defun float-sub (operand-left operand-right) (declare (xargs :guard (and (float-valuep operand-left) (float-valuep operand-right)))) (b* ((x (float-value->float operand-left)) (y (float-value->float operand-right))) (float-value (float-sub-abs x y))))
Theorem:
(defthm float-valuep-of-float-sub (b* ((result (float-sub operand-left operand-right))) (float-valuep result)) :rule-classes :rewrite)
Theorem:
(defthm float-sub-of-float-value-fix-operand-left (equal (float-sub (float-value-fix operand-left) operand-right) (float-sub operand-left operand-right)))
Theorem:
(defthm float-sub-float-value-equiv-congruence-on-operand-left (implies (float-value-equiv operand-left operand-left-equiv) (equal (float-sub operand-left operand-right) (float-sub operand-left-equiv operand-right))) :rule-classes :congruence)
Theorem:
(defthm float-sub-of-float-value-fix-operand-right (equal (float-sub operand-left (float-value-fix operand-right)) (float-sub operand-left operand-right)))
Theorem:
(defthm float-sub-float-value-equiv-congruence-on-operand-right (implies (float-value-equiv operand-right operand-right-equiv) (equal (float-sub operand-left operand-right) (float-sub operand-left operand-right-equiv))) :rule-classes :congruence)