Check if a binary operator is strict.
All the binary operators except logical conjunction and disjunction are strict.
Function:
(defun binop-strictp (op) (declare (xargs :guard (binopp op))) (let ((__function__ 'binop-strictp)) (declare (ignorable __function__)) (and (member-eq (binop-kind op) (list :mul :div :rem :add :sub :shl :shr :lt :gt :le :ge :eq :ne :bitand :bitxor :bitior :asg :asg-mul :asg-div :asg-rem :asg-add :asg-sub :asg-shl :asg-shr :asg-and :asg-xor :asg-ior)) t)))
Theorem:
(defthm booleanp-of-binop-strictp (b* ((yes/no (binop-strictp op))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm binop-strictp-of-binop-fix-op (equal (binop-strictp (binop-fix op)) (binop-strictp op)))
Theorem:
(defthm binop-strictp-binop-equiv-congruence-on-op (implies (binop-equiv op op-equiv) (equal (binop-strictp op) (binop-strictp op-equiv))) :rule-classes :congruence)