Lemmas about revappend available in the std/lists library.
Note: we typically avoid reasoning about
Theorem:
(defthm revappend-removal (equal (revappend x y) (append (rev x) y)))
However, if for some reason you need to disable
Theorem:
(defthm true-listp-of-revappend (equal (true-listp (revappend x y)) (true-listp y)))
Theorem:
(defthm consp-of-revappend (equal (consp (revappend x y)) (or (consp x) (consp y))))
Theorem:
(defthm len-of-revappend (equal (len (revappend x y)) (+ (len x) (len y))))
Theorem:
(defthm equal-when-revappend-same (equal (equal (revappend x y1) (revappend x y2)) (equal y1 y2)))
Theorem:
(defthm list-fix-of-revappend (equal (list-fix (revappend x y)) (revappend x (list-fix y))))
Theorem:
(defthm equal-of-revappends-when-true-listps (implies (and (true-listp x1) (true-listp x2)) (equal (equal (revappend x1 y) (revappend x2 y)) (equal x1 x2))))
Theorem:
(defthm element-list-p-of-revappend (equal (element-list-p (revappend x y)) (and (element-list-p (list-fix x)) (element-list-p y))) :rule-classes :rewrite)
Theorem:
(defthm element-list-fix-of-revappend (equal (element-list-fix (revappend x y)) (revappend (element-list-fix x) (element-list-fix y))) :rule-classes :rewrite)
Theorem:
(defthm elementlist-projection-of-revappend (equal (elementlist-projection (revappend x y)) (revappend (elementlist-projection x) (elementlist-projection y))) :rule-classes :rewrite)