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