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