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