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