Fixing function for svl-occ structures.
Function:
(defun svl-occ-fix$inline (x) (declare (xargs :guard (svl-occ-p x))) (let ((acl2::__function__ 'svl-occ-fix)) (declare (ignorable acl2::__function__)) (mbe :logic (case (svl-occ-kind x) (:assign (b* ((output (sv::svar-fix (std::da-nth 0 (cdr x)))) (svex (svex-fix (std::da-nth 1 (cdr x))))) (cons :assign (list output svex)))) (:module (b* ((inputs (sv::svexlist-fix (std::da-nth 0 (cdr x)))) (outputs (wire-list-list-fix (std::da-nth 1 (cdr x)))) (name (sv::modname-fix (std::da-nth 2 (cdr x))))) (cons :module (list inputs outputs name))))) :exec x)))
Theorem:
(defthm svl-occ-p-of-svl-occ-fix (b* ((new-x (svl-occ-fix$inline x))) (svl-occ-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm svl-occ-fix-when-svl-occ-p (implies (svl-occ-p x) (equal (svl-occ-fix x) x)))
Function:
(defun svl-occ-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (svl-occ-p acl2::x) (svl-occ-p acl2::y)))) (equal (svl-occ-fix acl2::x) (svl-occ-fix acl2::y)))
Theorem:
(defthm svl-occ-equiv-is-an-equivalence (and (booleanp (svl-occ-equiv x y)) (svl-occ-equiv x x) (implies (svl-occ-equiv x y) (svl-occ-equiv y x)) (implies (and (svl-occ-equiv x y) (svl-occ-equiv y z)) (svl-occ-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm svl-occ-equiv-implies-equal-svl-occ-fix-1 (implies (svl-occ-equiv acl2::x x-equiv) (equal (svl-occ-fix acl2::x) (svl-occ-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm svl-occ-fix-under-svl-occ-equiv (svl-occ-equiv (svl-occ-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-svl-occ-fix-1-forward-to-svl-occ-equiv (implies (equal (svl-occ-fix acl2::x) acl2::y) (svl-occ-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-svl-occ-fix-2-forward-to-svl-occ-equiv (implies (equal acl2::x (svl-occ-fix acl2::y)) (svl-occ-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm svl-occ-equiv-of-svl-occ-fix-1-forward (implies (svl-occ-equiv (svl-occ-fix acl2::x) acl2::y) (svl-occ-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm svl-occ-equiv-of-svl-occ-fix-2-forward (implies (svl-occ-equiv acl2::x (svl-occ-fix acl2::y)) (svl-occ-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm svl-occ-kind$inline-of-svl-occ-fix-x (equal (svl-occ-kind$inline (svl-occ-fix x)) (svl-occ-kind$inline x)))
Theorem:
(defthm svl-occ-kind$inline-svl-occ-equiv-congruence-on-x (implies (svl-occ-equiv x x-equiv) (equal (svl-occ-kind$inline x) (svl-occ-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-svl-occ-fix (consp (svl-occ-fix x)) :rule-classes :type-prescription)