Basic theorems about lhs-p, generated by std::deflist.
Theorem:
(defthm lhs-p-of-cons (equal (lhs-p (cons acl2::a x)) (and (lhrange-p acl2::a) (lhs-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-cdr-when-lhs-p (implies (lhs-p (double-rewrite x)) (lhs-p (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-when-not-consp (implies (not (consp x)) (equal (lhs-p x) (not x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhrange-p-of-car-when-lhs-p (implies (lhs-p x) (iff (lhrange-p (car x)) (or (consp x) (lhrange-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-when-lhs-p-compound-recognizer (implies (lhs-p x) (true-listp x)) :rule-classes :compound-recognizer)
Theorem:
(defthm lhs-p-of-list-fix (implies (lhs-p x) (lhs-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-rev (equal (lhs-p (rev x)) (lhs-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-repeat (iff (lhs-p (repeat acl2::n x)) (or (lhrange-p x) (zp acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-append (equal (lhs-p (append acl2::a acl2::b)) (and (lhs-p (list-fix acl2::a)) (lhs-p acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-rcons (iff (lhs-p (acl2::rcons acl2::a x)) (and (lhrange-p acl2::a) (lhs-p (list-fix x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhrange-p-when-member-equal-of-lhs-p (and (implies (and (member-equal acl2::a x) (lhs-p x)) (lhrange-p acl2::a)) (implies (and (lhs-p x) (member-equal acl2::a x)) (lhrange-p acl2::a))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-when-subsetp-equal (and (implies (and (subsetp-equal x y) (lhs-p y)) (equal (lhs-p x) (true-listp x))) (implies (and (lhs-p y) (subsetp-equal x y)) (equal (lhs-p x) (true-listp x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-set-difference-equal (implies (lhs-p x) (lhs-p (set-difference-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-intersection-equal-1 (implies (lhs-p (double-rewrite x)) (lhs-p (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-intersection-equal-2 (implies (lhs-p (double-rewrite y)) (lhs-p (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-union-equal (equal (lhs-p (union-equal x y)) (and (lhs-p (list-fix x)) (lhs-p (double-rewrite y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-update-nth (implies (lhs-p (double-rewrite x)) (iff (lhs-p (update-nth acl2::n y x)) (and (lhrange-p y) (or (<= (nfix acl2::n) (len x)) (lhrange-p nil))))) :rule-classes ((:rewrite)))
Theorem:
(defthm lhs-p-of-butlast (implies (lhs-p (double-rewrite x)) (lhs-p (butlast x acl2::n))) :rule-classes ((:rewrite)))