Fixing function for vl-zipfile structures.
(vl-zipfile-fix x) → new-x
Function:
(defun vl-zipfile-fix$inline (x) (declare (xargs :guard (vl-zipfile-p x))) (let ((__function__ 'vl-zipfile-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (str-fix (cdr (std::da-nth 0 (cdr x))))) (syntax (str-fix (cdr (std::da-nth 1 (cdr x))))) (date (str-fix (cdr (std::da-nth 2 (cdr x))))) (ltime (nfix (cdr (std::da-nth 3 (cdr x))))) (design (vl-design-fix (cdr (std::da-nth 4 (cdr x))))) (filemap (vl-filemap-fix (cdr (std::da-nth 5 (cdr x))))) (defines (vl-defines-fix (cdr (std::da-nth 6 (cdr x)))) )) (cons :vl-zip (list (cons 'name name) (cons 'syntax syntax) (cons 'date date) (cons 'ltime ltime) (cons 'design design) (cons 'filemap filemap) (cons 'defines defines)))) :exec x)))
Theorem:
(defthm vl-zipfile-p-of-vl-zipfile-fix (b* ((new-x (vl-zipfile-fix$inline x))) (vl-zipfile-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-zipfile-fix-when-vl-zipfile-p (implies (vl-zipfile-p x) (equal (vl-zipfile-fix x) x)))
Function:
(defun vl-zipfile-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-zipfile-p acl2::x) (vl-zipfile-p acl2::y)))) (equal (vl-zipfile-fix acl2::x) (vl-zipfile-fix acl2::y)))
Theorem:
(defthm vl-zipfile-equiv-is-an-equivalence (and (booleanp (vl-zipfile-equiv x y)) (vl-zipfile-equiv x x) (implies (vl-zipfile-equiv x y) (vl-zipfile-equiv y x)) (implies (and (vl-zipfile-equiv x y) (vl-zipfile-equiv y z)) (vl-zipfile-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-zipfile-equiv-implies-equal-vl-zipfile-fix-1 (implies (vl-zipfile-equiv acl2::x x-equiv) (equal (vl-zipfile-fix acl2::x) (vl-zipfile-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-zipfile-fix-under-vl-zipfile-equiv (vl-zipfile-equiv (vl-zipfile-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-zipfile-fix-1-forward-to-vl-zipfile-equiv (implies (equal (vl-zipfile-fix acl2::x) acl2::y) (vl-zipfile-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-zipfile-fix-2-forward-to-vl-zipfile-equiv (implies (equal acl2::x (vl-zipfile-fix acl2::y)) (vl-zipfile-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-zipfile-equiv-of-vl-zipfile-fix-1-forward (implies (vl-zipfile-equiv (vl-zipfile-fix acl2::x) acl2::y) (vl-zipfile-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-zipfile-equiv-of-vl-zipfile-fix-2-forward (implies (vl-zipfile-equiv acl2::x (vl-zipfile-fix acl2::y)) (vl-zipfile-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)