Abstract a
(abs-boolean-literal tree) → lit
Function:
(defun abs-boolean-literal (tree) (declare (xargs :guard (abnf::treep tree))) (let ((__function__ 'abs-boolean-literal)) (declare (ignorable __function__)) (b* (((okf tree) (abnf::check-tree-nonleaf-1-1 tree "boolean-literal")) ((okf nats) (abnf::check-tree-leafterm tree))) (cond ((abnf::nats-match-sensitive-chars-p nats (acl2::explode "true")) (literal-bool t)) ((abnf::nats-match-sensitive-chars-p nats (acl2::explode "false")) (literal-bool nil)) (t (reserrf (list :found-subtree (abnf::tree-info-for-error tree))))))))
Theorem:
(defthm literal-resultp-of-abs-boolean-literal (b* ((lit (abs-boolean-literal tree))) (literal-resultp lit)) :rule-classes :rewrite)
Theorem:
(defthm abs-boolean-literal-of-tree-fix-tree (equal (abs-boolean-literal (abnf::tree-fix tree)) (abs-boolean-literal tree)))
Theorem:
(defthm abs-boolean-literal-tree-equiv-congruence-on-tree (implies (abnf::tree-equiv tree tree-equiv) (equal (abs-boolean-literal tree) (abs-boolean-literal tree-equiv))) :rule-classes :congruence)