Pretty-print a binary operator.
Function:
(defun pprint-binop (op) (declare (xargs :guard (binopp op))) (let ((__function__ 'pprint-binop)) (declare (ignorable __function__)) (binop-case op :mul "*" :div "/" :rem "%" :add "+" :sub "-" :shl "<<" :shr ">>" :lt "<" :gt ">" :le "<=" :ge ">=" :eq "==" :ne "!=" :bitand "&" :bitxor "^" :bitior "|" :logand "&&" :logor "||" :asg "=" :asg-mul "*=" :asg-div "/=" :asg-rem "%=" :asg-add "+=" :asg-sub "-=" :asg-shl "<<=" :asg-shr ">>=" :asg-and "&=" :asg-xor "^=" :asg-ior "|=")))
Theorem:
(defthm msgp-of-pprint-binop (b* ((part (pprint-binop op))) (msgp part)) :rule-classes :rewrite)
Theorem:
(defthm pprint-binop-of-binop-fix-op (equal (pprint-binop (binop-fix op)) (pprint-binop op)))
Theorem:
(defthm pprint-binop-binop-equiv-congruence-on-op (implies (binop-equiv op op-equiv) (equal (pprint-binop op) (pprint-binop op-equiv))) :rule-classes :congruence)