Check the binary search tree property.
(bst-p tree) → *
This recognizer is currently inefficient, operating in
Function:
(defun bst-p (tree) (declare (xargs :guard (binary-tree-p tree))) (declare (xargs :type-prescription (booleanp (bst-p tree)))) (let ((__function__ 'bst-p)) (declare (ignorable __function__)) (or (tree-emptyp tree) (and (bst-p (tree-left tree)) (bst-p (tree-right tree)) (bst<-all-l (tree-left tree) (tree-head tree)) (bst<-all-r (tree-head tree) (tree-right tree))))))