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