Recursively annotate an expression with
Even though we recursively annotate an expression, this function is really very fast. We need not do any pretty-printing, because we are only consing the original version of X into its attributes.
Theorem:
(defthm return-type-of-vl-expr-origexprs.new-x (b* ((?new-x (vl-expr-origexprs x))) (vl-expr-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-exprlist-origexprs.new-x (b* ((?new-x (vl-exprlist-origexprs x))) (and (vl-exprlist-p new-x) (equal (len new-x) (len x)))) :rule-classes :rewrite)
Theorem:
(defthm vl-exprlist-origexprs-of-update-nth (implies (<= (nfix acl2::n) (len acl2::x)) (equal (vl-exprlist-origexprs (update-nth acl2::n acl2::v acl2::x)) (update-nth acl2::n (vl-expr-origexprs acl2::v) (vl-exprlist-origexprs acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-exprlist-origexprs-of-revappend (equal (vl-exprlist-origexprs (revappend acl2::x acl2::y)) (revappend (vl-exprlist-origexprs acl2::x) (vl-exprlist-origexprs acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm nthcdr-of-vl-exprlist-origexprs (equal (nthcdr acl2::n (vl-exprlist-origexprs acl2::x)) (vl-exprlist-origexprs (nthcdr acl2::n acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm nth-of-vl-exprlist-origexprs (equal (nth acl2::n (vl-exprlist-origexprs acl2::x)) (and (< (nfix acl2::n) (len acl2::x)) (vl-expr-origexprs (nth acl2::n acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-exprlist-origexprs-of-take (implies (<= (nfix acl2::n) (len acl2::x)) (equal (vl-exprlist-origexprs (take acl2::n acl2::x)) (take acl2::n (vl-exprlist-origexprs acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm set-equiv-congruence-over-vl-exprlist-origexprs (implies (set-equiv acl2::x acl2::y) (set-equiv (vl-exprlist-origexprs acl2::x) (vl-exprlist-origexprs acl2::y))) :rule-classes ((:congruence)))
Theorem:
(defthm subsetp-of-vl-exprlist-origexprs-when-subsetp (implies (subsetp acl2::x acl2::y) (subsetp (vl-exprlist-origexprs acl2::x) (vl-exprlist-origexprs acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm member-of-vl-expr-origexprs-in-vl-exprlist-origexprs (implies (member acl2::k acl2::x) (member (vl-expr-origexprs acl2::k) (vl-exprlist-origexprs acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-exprlist-origexprs-of-rev (equal (vl-exprlist-origexprs (rev acl2::x)) (rev (vl-exprlist-origexprs acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-exprlist-origexprs-of-list-fix (equal (vl-exprlist-origexprs (list-fix acl2::x)) (vl-exprlist-origexprs acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-exprlist-origexprs-of-append (equal (vl-exprlist-origexprs (append acl2::a acl2::b)) (append (vl-exprlist-origexprs acl2::a) (vl-exprlist-origexprs acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm cdr-of-vl-exprlist-origexprs (equal (cdr (vl-exprlist-origexprs acl2::x)) (vl-exprlist-origexprs (cdr acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm car-of-vl-exprlist-origexprs (equal (car (vl-exprlist-origexprs acl2::x)) (and (consp acl2::x) (vl-expr-origexprs (car acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-exprlist-origexprs-under-iff (iff (vl-exprlist-origexprs acl2::x) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-of-vl-exprlist-origexprs (equal (consp (vl-exprlist-origexprs acl2::x)) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm len-of-vl-exprlist-origexprs (equal (len (vl-exprlist-origexprs acl2::x)) (len acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-of-vl-exprlist-origexprs (true-listp (vl-exprlist-origexprs acl2::x)) :rule-classes :type-prescription)
Theorem:
(defthm vl-exprlist-origexprs-when-not-consp (implies (not (consp acl2::x)) (equal (vl-exprlist-origexprs acl2::x) nil)) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-exprlist-origexprs-of-cons (equal (vl-exprlist-origexprs (cons acl2::a acl2::b)) (cons (vl-expr-origexprs acl2::a) (vl-exprlist-origexprs acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-expr-origexprs-of-vl-expr-fix-x (equal (vl-expr-origexprs (vl-expr-fix x)) (vl-expr-origexprs x)))
Theorem:
(defthm vl-exprlist-origexprs-of-vl-exprlist-fix-x (equal (vl-exprlist-origexprs (vl-exprlist-fix x)) (vl-exprlist-origexprs x)))
Theorem:
(defthm vl-expr-origexprs-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-expr-origexprs x) (vl-expr-origexprs x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-exprlist-origexprs-vl-exprlist-equiv-congruence-on-x (implies (vl-exprlist-equiv x x-equiv) (equal (vl-exprlist-origexprs x) (vl-exprlist-origexprs x-equiv))) :rule-classes :congruence)