Fixing function for svtv structures.
Function:
(defun svtv-fix$inline (x) (declare (xargs :guard (svtv-p x))) (let ((__function__ 'svtv-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (acl2::symbol-fix (std::da-nth 0 x))) (outexprs (svex-alist-fix (std::da-nth 1 x))) (nextstate (svex-alist-fix (std::da-nth 2 x))) (states (svex-alistlist-fix (std::da-nth 3 x))) (inmasks (svar-boolmasks-fix (std::da-nth 4 x))) (outmasks (svar-boolmasks-fix (std::da-nth 5 x))) (inmap (svtv-inputmap-fix (std::da-nth 6 x))) (orig-ins (true-list-list-fix (std::da-nth 7 x))) (orig-overrides (true-list-list-fix (std::da-nth 8 x))) (orig-outs (true-list-list-fix (std::da-nth 9 x))) (orig-internals (true-list-list-fix (std::da-nth 10 x))) (expanded-ins (svtv-lines-fix (std::da-nth 11 x))) (expanded-overrides (svtv-lines-fix (std::da-nth 12 x))) (nphases (nfix (std::da-nth 13 x))) (labels (acl2::symbol-list-fix (std::da-nth 14 x))) (form (std::da-nth 15 x))) (list name outexprs nextstate states inmasks outmasks inmap orig-ins orig-overrides orig-outs orig-internals expanded-ins expanded-overrides nphases labels form)) :exec x)))
Theorem:
(defthm svtv-p-of-svtv-fix (b* ((new-x (svtv-fix$inline x))) (svtv-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm svtv-fix-when-svtv-p (implies (svtv-p x) (equal (svtv-fix x) x)))
Function:
(defun svtv-equiv$inline (x y) (declare (xargs :guard (and (svtv-p x) (svtv-p y)))) (equal (svtv-fix x) (svtv-fix y)))
Theorem:
(defthm svtv-equiv-is-an-equivalence (and (booleanp (svtv-equiv x y)) (svtv-equiv x x) (implies (svtv-equiv x y) (svtv-equiv y x)) (implies (and (svtv-equiv x y) (svtv-equiv y z)) (svtv-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm svtv-equiv-implies-equal-svtv-fix-1 (implies (svtv-equiv x x-equiv) (equal (svtv-fix x) (svtv-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm svtv-fix-under-svtv-equiv (svtv-equiv (svtv-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-svtv-fix-1-forward-to-svtv-equiv (implies (equal (svtv-fix x) y) (svtv-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-svtv-fix-2-forward-to-svtv-equiv (implies (equal x (svtv-fix y)) (svtv-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svtv-equiv-of-svtv-fix-1-forward (implies (svtv-equiv (svtv-fix x) y) (svtv-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svtv-equiv-of-svtv-fix-2-forward (implies (svtv-equiv x (svtv-fix y)) (svtv-equiv x y)) :rule-classes :forward-chaining)