Recognizer for mode-set.
(mode-setp x) → *
Function:
(defun mode-setp (x) (declare (xargs :guard t)) (if (atom x) (null x) (and (modep (car x)) (or (null (cdr x)) (and (consp (cdr x)) (acl2::fast-<< (car x) (cadr x)) (mode-setp (cdr x)))))))
Theorem:
(defthm booleanp-ofmode-setp (booleanp (mode-setp x)))
Theorem:
(defthm setp-when-mode-setp (implies (mode-setp x) (setp x)) :rule-classes (:rewrite))
Theorem:
(defthm modep-of-head-when-mode-setp (implies (mode-setp x) (equal (modep (head x)) (not (emptyp x)))))
Theorem:
(defthm mode-setp-of-tail-when-mode-setp (implies (mode-setp x) (mode-setp (tail x))))
Theorem:
(defthm mode-setp-of-insert (equal (mode-setp (insert a x)) (and (modep a) (mode-setp (sfix x)))))
Theorem:
(defthm modep-when-in-mode-setp-binds-free-x (implies (and (in a x) (mode-setp x)) (modep a)))
Theorem:
(defthm not-in-mode-setp-when-not-modep (implies (and (mode-setp x) (not (modep a))) (not (in a x))))
Theorem:
(defthm mode-setp-of-union (equal (mode-setp (union x y)) (and (mode-setp (sfix x)) (mode-setp (sfix y)))))
Theorem:
(defthm mode-setp-of-intersect (implies (and (mode-setp x) (mode-setp y)) (mode-setp (intersect x y))))
Theorem:
(defthm mode-setp-of-difference (implies (mode-setp x) (mode-setp (difference x y))))
Theorem:
(defthm mode-setp-of-delete (implies (mode-setp x) (mode-setp (delete a x))))