Fixer for binary-trees.
(tree-fix tree) → tree$
Function:
(defun tree-fix$inline (tree) (declare (xargs :guard (binary-tree-p tree))) (mbe :logic (if (binary-tree-p tree) tree nil) :exec (the (or cons null) tree)))
Theorem:
(defthm binary-tree-p-of-tree-fix (b* ((tree$ (tree-fix$inline tree))) (binary-tree-p tree$)) :rule-classes :rewrite)