Fixing function for design structures.
Function:
(defun design-fix$inline (x) (declare (xargs :guard (design-p x))) (let ((__function__ 'design-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((modalist (modalist-fix (cdr (std::da-nth 0 x)))) (top (modname-fix (cdr (std::da-nth 1 x))))) (list (cons 'modalist modalist) (cons 'top top))) :exec x)))
Theorem:
(defthm design-p-of-design-fix (b* ((new-x (design-fix$inline x))) (design-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm design-fix-when-design-p (implies (design-p x) (equal (design-fix x) x)))
Function:
(defun design-equiv$inline (x y) (declare (xargs :guard (and (design-p x) (design-p y)))) (equal (design-fix x) (design-fix y)))
Theorem:
(defthm design-equiv-is-an-equivalence (and (booleanp (design-equiv x y)) (design-equiv x x) (implies (design-equiv x y) (design-equiv y x)) (implies (and (design-equiv x y) (design-equiv y z)) (design-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm design-equiv-implies-equal-design-fix-1 (implies (design-equiv x x-equiv) (equal (design-fix x) (design-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm design-fix-under-design-equiv (design-equiv (design-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-design-fix-1-forward-to-design-equiv (implies (equal (design-fix x) y) (design-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-design-fix-2-forward-to-design-equiv (implies (equal x (design-fix y)) (design-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm design-equiv-of-design-fix-1-forward (implies (design-equiv (design-fix x) y) (design-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm design-equiv-of-design-fix-2-forward (implies (design-equiv x (design-fix y)) (design-equiv x y)) :rule-classes :forward-chaining)