Construct an equality between two expressions.
(equate-expressions left right) → equality
Function:
(defun equate-expressions (left right) (declare (xargs :guard (and (expressionp left) (expressionp right)))) (let ((__function__ 'equate-expressions)) (declare (ignorable __function__)) (make-expression-binary :operator (binary-op-eq) :left-operand left :right-operand right)))
Theorem:
(defthm expressionp-of-equate-expressions (b* ((equality (equate-expressions left right))) (expressionp equality)) :rule-classes :rewrite)
Theorem:
(defthm equate-expressions-of-expression-fix-left (equal (equate-expressions (expression-fix left) right) (equate-expressions left right)))
Theorem:
(defthm equate-expressions-expression-equiv-congruence-on-left (implies (expression-equiv left left-equiv) (equal (equate-expressions left right) (equate-expressions left-equiv right))) :rule-classes :congruence)
Theorem:
(defthm equate-expressions-of-expression-fix-right (equal (equate-expressions left (expression-fix right)) (equate-expressions left right)))
Theorem:
(defthm equate-expressions-expression-equiv-congruence-on-right (implies (expression-equiv right right-equiv) (equal (equate-expressions left right) (equate-expressions left right-equiv))) :rule-classes :congruence)