Check if an
We check if a list of length
Function:
(defun defdefparse-order-permutationp-aux (a b) (declare (xargs :guard (and (pos-listp a) (pos-listp b)))) (let ((__function__ 'defdefparse-order-permutationp-aux)) (declare (ignorable __function__)) (cond ((endp a) (endp b)) (t (and (member (car a) b) (defdefparse-order-permutationp-aux (cdr a) (remove1 (car a) b)))))))
Theorem:
(defthm booleanp-of-defdefparse-order-permutationp-aux (b* ((yes/no (defdefparse-order-permutationp-aux a b))) (booleanp yes/no)) :rule-classes :rewrite)
Function:
(defun defdefparse-order-permutationp (order) (declare (xargs :guard (pos-listp order))) (let ((__function__ 'defdefparse-order-permutationp)) (declare (ignorable __function__)) (defdefparse-order-permutationp-aux order (integers-from-to 1 (len order)))))
Theorem:
(defthm booleanp-of-defdefparse-order-permutationp (b* ((yes/no (defdefparse-order-permutationp order))) (booleanp yes/no)) :rule-classes :rewrite)