Fixing function for vl-context1 structures.
(vl-context1-fix x) → new-x
Function:
(defun vl-context1-fix$inline (x) (declare (xargs :guard (vl-context1-p x))) (let ((__function__ 'vl-context1-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((mod (str-fix (std::prod-car (cdr x)))) (elem (vl-ctxelement-fix (std::prod-cdr (cdr x))))) (cons :vl-context (std::prod-cons mod elem))) :exec x)))
Theorem:
(defthm vl-context1-p-of-vl-context1-fix (b* ((new-x (vl-context1-fix$inline x))) (vl-context1-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-context1-fix-when-vl-context1-p (implies (vl-context1-p x) (equal (vl-context1-fix x) x)))
Function:
(defun vl-context1-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-context1-p acl2::x) (vl-context1-p acl2::y)))) (equal (vl-context1-fix acl2::x) (vl-context1-fix acl2::y)))
Theorem:
(defthm vl-context1-equiv-is-an-equivalence (and (booleanp (vl-context1-equiv x y)) (vl-context1-equiv x x) (implies (vl-context1-equiv x y) (vl-context1-equiv y x)) (implies (and (vl-context1-equiv x y) (vl-context1-equiv y z)) (vl-context1-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-context1-equiv-implies-equal-vl-context1-fix-1 (implies (vl-context1-equiv acl2::x x-equiv) (equal (vl-context1-fix acl2::x) (vl-context1-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-context1-fix-under-vl-context1-equiv (vl-context1-equiv (vl-context1-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-context1-fix-1-forward-to-vl-context1-equiv (implies (equal (vl-context1-fix acl2::x) acl2::y) (vl-context1-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-context1-fix-2-forward-to-vl-context1-equiv (implies (equal acl2::x (vl-context1-fix acl2::y)) (vl-context1-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-context1-equiv-of-vl-context1-fix-1-forward (implies (vl-context1-equiv (vl-context1-fix acl2::x) acl2::y) (vl-context1-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-context1-equiv-of-vl-context1-fix-2-forward (implies (vl-context1-equiv acl2::x (vl-context1-fix acl2::y)) (vl-context1-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)