Recognizer for modalist.
(modalist-p x) → *
Function:
(defun modalist-p (x) (declare (xargs :guard t)) (let ((__function__ 'modalist-p)) (declare (ignorable __function__)) (if (atom x) t (and (consp (car x)) (modname-p (caar x)) (module-p (cdar x)) (modalist-p (cdr x))))))
Theorem:
(defthm modalist-p-of-butlast (implies (modalist-p (double-rewrite x)) (modalist-p (butlast x acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-of-take (implies (modalist-p (double-rewrite x)) (iff (modalist-p (take acl2::n x)) (or (and (consp nil) (modname-p (car nil)) (module-p (cdr nil))) (<= (nfix acl2::n) (len x))))) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-of-repeat (iff (modalist-p (repeat acl2::n x)) (or (and (consp x) (modname-p (car x)) (module-p (cdr x))) (zp acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-of-rev (equal (modalist-p (rev x)) (modalist-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-of-list-fix (equal (modalist-p (list-fix x)) (modalist-p x)) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-of-append (equal (modalist-p (append acl2::a acl2::b)) (and (modalist-p acl2::a) (modalist-p acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-when-not-consp (implies (not (consp x)) (modalist-p x)) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-of-cdr-when-modalist-p (implies (modalist-p (double-rewrite x)) (modalist-p (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-of-cons (equal (modalist-p (cons acl2::a x)) (and (and (consp acl2::a) (modname-p (car acl2::a)) (module-p (cdr acl2::a))) (modalist-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-of-fast-alist-clean (implies (modalist-p x) (modalist-p (fast-alist-clean x))) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-of-hons-shrink-alist (implies (and (modalist-p x) (modalist-p y)) (modalist-p (hons-shrink-alist x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm modalist-p-of-hons-acons (equal (modalist-p (hons-acons acl2::a acl2::n x)) (and (modname-p acl2::a) (module-p acl2::n) (modalist-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm module-p-of-cdr-of-hons-assoc-equal-when-modalist-p (implies (modalist-p x) (iff (module-p (cdr (hons-assoc-equal acl2::k x))) (or (hons-assoc-equal acl2::k x) (module-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm module-p-of-cdar-when-modalist-p (implies (modalist-p x) (iff (module-p (cdar x)) (or (consp x) (module-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm modname-p-of-caar-when-modalist-p (implies (modalist-p x) (iff (modname-p (caar x)) (or (consp x) (modname-p nil)))) :rule-classes ((:rewrite)))