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