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