An
Time complexity:
Function:
(defun binary-union (x y) (declare (xargs :guard (and (setp x) (setp y)))) (let ((__function__ 'binary-union)) (declare (ignorable __function__)) (tree-union (sfix x) (sfix y))))
Theorem:
(defthm setp-of-binary-union (b* ((set (binary-union x y))) (setp set)) :rule-classes :rewrite)
Function:
(defun union-macro-loop (list) (declare (xargs :guard (true-listp list))) (declare (xargs :guard (and (consp list) (consp (rest list))))) (let ((__function__ 'union-macro-loop)) (declare (ignorable __function__)) (if (endp (rest (rest list))) (list 'binary-union (first list) (second list)) (list 'binary-union (first list) (union-macro-loop (rest list))))))