Recognizer for lhspairs.
(lhspairs-p x) → *
Function:
(defun lhspairs-p (x) (declare (xargs :guard t)) (let ((__function__ 'lhspairs-p)) (declare (ignorable __function__)) (if (atom x) t (and (consp (car x)) (lhs-p (caar x)) (lhs-p (cdar x)) (lhspairs-p (cdr x))))))
Theorem:
(defthm lhspairs-p-of-butlast (implies (lhspairs-p (double-rewrite x)) (lhspairs-p (butlast x acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-update-nth (implies (lhspairs-p (double-rewrite x)) (iff (lhspairs-p (update-nth acl2::n y x)) (and (and (consp y) (lhs-p (car y)) (lhs-p (cdr y))) (or (<= (nfix acl2::n) (len x)) (and (consp nil) (lhs-p (car nil)) (lhs-p (cdr nil))))))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-union-equal (equal (lhspairs-p (union-equal x y)) (and (lhspairs-p (list-fix x)) (lhspairs-p (double-rewrite y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-intersection-equal-2 (implies (lhspairs-p (double-rewrite y)) (lhspairs-p (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-intersection-equal-1 (implies (lhspairs-p (double-rewrite x)) (lhspairs-p (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-set-difference-equal (implies (lhspairs-p x) (lhspairs-p (set-difference-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-set-equiv-congruence (implies (set-equiv x y) (equal (lhspairs-p x) (lhspairs-p y))) :rule-classes :congruence)
Theorem:
(defthm lhspairs-p-when-subsetp-equal (and (implies (and (subsetp-equal x y) (lhspairs-p y)) (lhspairs-p x)) (implies (and (lhspairs-p y) (subsetp-equal x y)) (lhspairs-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-rcons (iff (lhspairs-p (acl2::rcons acl2::a x)) (and (and (consp acl2::a) (lhs-p (car acl2::a)) (lhs-p (cdr acl2::a))) (lhspairs-p (list-fix x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-repeat (iff (lhspairs-p (repeat acl2::n x)) (or (and (consp x) (lhs-p (car x)) (lhs-p (cdr x))) (zp acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-rev (equal (lhspairs-p (rev x)) (lhspairs-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-list-fix (equal (lhspairs-p (list-fix x)) (lhspairs-p x)) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-append (equal (lhspairs-p (append acl2::a acl2::b)) (and (lhspairs-p acl2::a) (lhspairs-p acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-when-not-consp (implies (not (consp x)) (lhspairs-p x)) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-cdr-when-lhspairs-p (implies (lhspairs-p (double-rewrite x)) (lhspairs-p (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-cons (equal (lhspairs-p (cons acl2::a x)) (and (and (consp acl2::a) (lhs-p (car acl2::a)) (lhs-p (cdr acl2::a))) (lhspairs-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-fast-alist-clean (implies (lhspairs-p x) (lhspairs-p (fast-alist-clean x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-hons-shrink-alist (implies (and (lhspairs-p x) (lhspairs-p y)) (lhspairs-p (hons-shrink-alist x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhspairs-p-of-hons-acons (equal (lhspairs-p (hons-acons acl2::a acl2::n x)) (and (lhs-p acl2::a) (lhs-p acl2::n) (lhspairs-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-cdr-of-hons-assoc-equal-when-lhspairs-p (implies (lhspairs-p x) (iff (lhs-p (cdr (hons-assoc-equal acl2::k x))) (or (hons-assoc-equal acl2::k x) (lhs-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-cdar-when-lhspairs-p (implies (lhspairs-p x) (iff (lhs-p (cdar x)) (or (consp x) (lhs-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-caar-when-lhspairs-p (implies (lhspairs-p x) (iff (lhs-p (caar x)) (or (consp x) (lhs-p nil)))) :rule-classes ((:rewrite)))