Abbreviation to construct a subtraction.
(expression-sub expr1 expr2) → sub-expr
This may be added to the abstract syntax at some point. For now it is just an ephemeral abbreviation.
Function:
(defun expression-sub (expr1 expr2) (declare (xargs :guard (and (expressionp expr1) (expressionp expr2)))) (let ((__function__ 'expression-sub)) (declare (ignorable __function__)) (expression-add expr1 (expression-neg expr2))))
Theorem:
(defthm expressionp-of-expression-sub (b* ((sub-expr (expression-sub expr1 expr2))) (expressionp sub-expr)) :rule-classes :rewrite)