Recognizer for term-equivs.
(term-equivs-p x) → *
Function:
(defun term-equivs-p (x) (declare (xargs :guard t)) (let ((__function__ 'term-equivs-p)) (declare (ignorable __function__)) (if (atom x) (eq x nil) (and (consp (car x)) (fgl-object-p (caar x)) (nat-listp (cdar x)) (term-equivs-p (cdr x))))))
Theorem:
(defthm term-equivs-p-of-rev (equal (term-equivs-p (rev x)) (term-equivs-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm term-equivs-p-of-list-fix (implies (term-equivs-p x) (term-equivs-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-when-term-equivs-p-compound-recognizer (implies (term-equivs-p x) (true-listp x)) :rule-classes :compound-recognizer)
Theorem:
(defthm term-equivs-p-when-not-consp (implies (not (consp x)) (equal (term-equivs-p x) (not x))) :rule-classes ((:rewrite)))
Theorem:
(defthm term-equivs-p-of-cdr-when-term-equivs-p (implies (term-equivs-p (double-rewrite x)) (term-equivs-p (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm term-equivs-p-of-cons (equal (term-equivs-p (cons a x)) (and (and (consp a) (fgl-object-p (car a)) (nat-listp (cdr a))) (term-equivs-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm term-equivs-p-of-remove-assoc (implies (term-equivs-p x) (term-equivs-p (remove-assoc-equal name x))) :rule-classes ((:rewrite)))
Theorem:
(defthm term-equivs-p-of-put-assoc (implies (and (term-equivs-p x)) (iff (term-equivs-p (put-assoc-equal name acl2::val x)) (and (fgl-object-p name) (nat-listp acl2::val)))) :rule-classes ((:rewrite)))
Theorem:
(defthm term-equivs-p-of-fast-alist-clean (implies (term-equivs-p x) (term-equivs-p (fast-alist-clean x))) :rule-classes ((:rewrite)))
Theorem:
(defthm term-equivs-p-of-hons-shrink-alist (implies (and (term-equivs-p x) (term-equivs-p y)) (term-equivs-p (hons-shrink-alist x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm term-equivs-p-of-hons-acons (equal (term-equivs-p (hons-acons a n x)) (and (fgl-object-p a) (nat-listp n) (term-equivs-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm nat-listp-of-cdr-of-hons-assoc-equal-when-term-equivs-p (implies (term-equivs-p x) (iff (nat-listp (cdr (hons-assoc-equal k x))) (or (hons-assoc-equal k x) (nat-listp nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm alistp-when-term-equivs-p-rewrite (implies (term-equivs-p x) (alistp x)) :rule-classes ((:rewrite)))
Theorem:
(defthm alistp-when-term-equivs-p (implies (term-equivs-p x) (alistp x)) :rule-classes :tau-system)
Theorem:
(defthm nat-listp-of-cdar-when-term-equivs-p (implies (term-equivs-p x) (iff (nat-listp (cdar x)) (or (consp x) (nat-listp nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm fgl-object-p-of-caar-when-term-equivs-p (implies (term-equivs-p x) (iff (fgl-object-p (caar x)) (or (consp x) (fgl-object-p nil)))) :rule-classes ((:rewrite)))