Check if a term is a (translated) call of or.
(check-or-call term) → (mv yes/no left right)
Function:
(defun check-or-call (term) (declare (xargs :guard (pseudo-termp term))) (let ((__function__ 'check-or-call)) (declare (ignorable __function__)) (b* (((mv ifp test then else) (check-if-call term)) ((when (not ifp)) (mv nil nil nil))) (if (equal test then) (mv t test else) (mv nil nil nil)))))
Theorem:
(defthm booleanp-of-check-or-call.yes/no (b* (((mv ?yes/no ?left ?right) (check-or-call term))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm pseudo-termp-of-check-or-call.left (implies (and (pseudo-termp term)) (b* (((mv ?yes/no ?left ?right) (check-or-call term))) (pseudo-termp left))) :rule-classes :rewrite)
Theorem:
(defthm pseudo-termp-of-check-or-call.right (implies (and (pseudo-termp term)) (b* (((mv ?yes/no ?left ?right) (check-or-call term))) (pseudo-termp right))) :rule-classes :rewrite)
Theorem:
(defthm acl2-count-of-check-or-call.left (b* (((mv ?yes/no ?left ?right) (check-or-call term))) (implies yes/no (< (acl2-count left) (acl2-count term)))) :rule-classes :linear)
Theorem:
(defthm acl2-count-of-check-or-call.right (b* (((mv ?yes/no ?left ?right) (check-or-call term))) (implies yes/no (< (acl2-count right) (acl2-count term)))) :rule-classes :linear)