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