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