Recognizer for attributes.
(attributes-p x) → *
Function:
(defun attributes-p (x) (declare (xargs :guard t)) (let ((__function__ 'attributes-p)) (declare (ignorable __function__)) (if (atom x) (eq x nil) (and (consp (car x)) (stringp (caar x)) (maybe-svex-p (cdar x)) (attributes-p (cdr x))))))
Theorem:
(defthm attributes-p-of-butlast (implies (attributes-p (double-rewrite x)) (attributes-p (butlast x acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-take (implies (attributes-p (double-rewrite x)) (iff (attributes-p (take acl2::n x)) (or (and (consp nil) (stringp (car nil)) (maybe-svex-p (cdr nil))) (<= (nfix acl2::n) (len x))))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-append (equal (attributes-p (append acl2::a acl2::b)) (and (attributes-p (list-fix acl2::a)) (attributes-p acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-repeat (iff (attributes-p (repeat acl2::n x)) (or (and (consp x) (stringp (car x)) (maybe-svex-p (cdr x))) (zp acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-rev (equal (attributes-p (rev x)) (attributes-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-list-fix (implies (attributes-p x) (attributes-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-when-attributes-p-compound-recognizer (implies (attributes-p x) (true-listp x)) :rule-classes :compound-recognizer)
Theorem:
(defthm attributes-p-when-not-consp (implies (not (consp x)) (equal (attributes-p x) (not x))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-cdr-when-attributes-p (implies (attributes-p (double-rewrite x)) (attributes-p (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-cons (equal (attributes-p (cons acl2::a x)) (and (and (consp acl2::a) (stringp (car acl2::a)) (maybe-svex-p (cdr acl2::a))) (attributes-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-remove-assoc (implies (attributes-p x) (attributes-p (remove-assoc-equal acl2::name x))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-put-assoc (implies (and (attributes-p x)) (iff (attributes-p (put-assoc-equal acl2::name acl2::val x)) (and (stringp acl2::name) (maybe-svex-p acl2::val)))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-fast-alist-clean (implies (attributes-p x) (attributes-p (fast-alist-clean x))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-hons-shrink-alist (implies (and (attributes-p x) (attributes-p y)) (attributes-p (hons-shrink-alist x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm attributes-p-of-hons-acons (equal (attributes-p (hons-acons acl2::a acl2::n x)) (and (stringp acl2::a) (maybe-svex-p acl2::n) (attributes-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm maybe-svex-p-of-cdr-of-hons-assoc-equal-when-attributes-p (implies (attributes-p x) (iff (maybe-svex-p (cdr (hons-assoc-equal acl2::k x))) (or (hons-assoc-equal acl2::k x) (maybe-svex-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm alistp-when-attributes-p-rewrite (implies (attributes-p x) (alistp x)) :rule-classes ((:rewrite)))
Theorem:
(defthm alistp-when-attributes-p (implies (attributes-p x) (alistp x)) :rule-classes :tau-system)
Theorem:
(defthm maybe-svex-p-of-cdar-when-attributes-p (implies (attributes-p x) (iff (maybe-svex-p (cdar x)) (or (consp x) (maybe-svex-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm stringp-of-caar-when-attributes-p (implies (attributes-p x) (iff (stringp (caar x)) (or (consp x) (stringp nil)))) :rule-classes ((:rewrite)))