Same as
In the logic,
I use this function when I do not want to go to the trouble of proving that
some cons-based operation happens to produce a set. In practice, this should
be much faster than a mergesort because checking
By default,
(defun my-function (x) (let ((x-sort (redundant-mergesort x :warnp t :from 'my-function))) ...))
Function:
(defun redundant-mergesort-fn (x warnp from) (declare (xargs :guard (and (booleanp warnp) (symbolp from)))) (let ((__function__ 'redundant-mergesort)) (declare (ignorable __function__)) (mbe :logic (mergesort x) :exec (if (setp x) x (prog2$ (cond ((and warnp from) (cw "; Redundant-mergesort given unsorted list by ~s0.~%" from)) (warnp (cw "; Redundant-mergesort given unsorted list.~%")) (t nil)) (mergesort x))))))