Abstract a
(abs-numeral tree) → nat
Function:
(defun abs-numeral (tree) (declare (xargs :guard (abnf::treep tree))) (let ((__function__ 'abs-numeral)) (declare (ignorable __function__)) (b* (((okf sub) (check-tree-nonleaf-1 tree "numeral")) ((unless (consp sub)) (reserrf (list :empty-numeral)))) (abs-*-decimal-digit-to-nat sub))))
Theorem:
(defthm nat-resultp-of-abs-numeral (b* ((nat (abs-numeral tree))) (nat-resultp nat)) :rule-classes :rewrite)
Theorem:
(defthm abs-numeral-of-tree-fix-tree (equal (abs-numeral (abnf::tree-fix tree)) (abs-numeral tree)))
Theorem:
(defthm abs-numeral-tree-equiv-congruence-on-tree (implies (abnf::tree-equiv tree tree-equiv) (equal (abs-numeral tree) (abs-numeral tree-equiv))) :rule-classes :congruence)