Fixing function for svl-module structures.
(svl-module-fix x) → new-x
Function:
(defun svl-module-fix$inline (x) (declare (xargs :guard (svl-module-p x))) (let ((acl2::__function__ 'svl-module-fix)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((rank (nfix (cdr (std::da-nth 0 x)))) (inputs (wire-list-fix (cdr (std::da-nth 1 x)))) (delayed-inputs (sv::svarlist-fix (cdr (std::da-nth 2 x)))) (outputs (wire-list-fix (cdr (std::da-nth 3 x)))) (occs (svl-occ-alist-fix (cdr (std::da-nth 4 x))))) (list (cons 'rank rank) (cons 'inputs inputs) (cons 'delayed-inputs delayed-inputs) (cons 'outputs outputs) (cons 'occs occs))) :exec x)))
Theorem:
(defthm svl-module-p-of-svl-module-fix (b* ((new-x (svl-module-fix$inline x))) (svl-module-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm svl-module-fix-when-svl-module-p (implies (svl-module-p x) (equal (svl-module-fix x) x)))
Function:
(defun svl-module-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (svl-module-p acl2::x) (svl-module-p acl2::y)))) (equal (svl-module-fix acl2::x) (svl-module-fix acl2::y)))
Theorem:
(defthm svl-module-equiv-is-an-equivalence (and (booleanp (svl-module-equiv x y)) (svl-module-equiv x x) (implies (svl-module-equiv x y) (svl-module-equiv y x)) (implies (and (svl-module-equiv x y) (svl-module-equiv y z)) (svl-module-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm svl-module-equiv-implies-equal-svl-module-fix-1 (implies (svl-module-equiv acl2::x x-equiv) (equal (svl-module-fix acl2::x) (svl-module-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm svl-module-fix-under-svl-module-equiv (svl-module-equiv (svl-module-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-svl-module-fix-1-forward-to-svl-module-equiv (implies (equal (svl-module-fix acl2::x) acl2::y) (svl-module-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-svl-module-fix-2-forward-to-svl-module-equiv (implies (equal acl2::x (svl-module-fix acl2::y)) (svl-module-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm svl-module-equiv-of-svl-module-fix-1-forward (implies (svl-module-equiv (svl-module-fix acl2::x) acl2::y) (svl-module-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm svl-module-equiv-of-svl-module-fix-2-forward (implies (svl-module-equiv acl2::x (svl-module-fix acl2::y)) (svl-module-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)