Fixing function for tree-list-tuple5 structures.
(tree-list-tuple5-fix x) → new-x
Function:
(defun tree-list-tuple5-fix$inline (x) (declare (xargs :guard (tree-list-tuple5p x))) (let ((__function__ 'tree-list-tuple5-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)))) (4th (tree-list-fix (cdr (std::da-nth 3 x)))) (5th (tree-list-fix (cdr (std::da-nth 4 x))))) (list (cons '1st 1st) (cons '2nd 2nd) (cons '3rd 3rd) (cons '4th 4th) (cons '5th 5th))) :exec x)))
Theorem:
(defthm tree-list-tuple5p-of-tree-list-tuple5-fix (b* ((new-x (tree-list-tuple5-fix$inline x))) (tree-list-tuple5p new-x)) :rule-classes :rewrite)
Theorem:
(defthm tree-list-tuple5-fix-when-tree-list-tuple5p (implies (tree-list-tuple5p x) (equal (tree-list-tuple5-fix x) x)))
Function:
(defun tree-list-tuple5-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (tree-list-tuple5p acl2::x) (tree-list-tuple5p acl2::y)))) (equal (tree-list-tuple5-fix acl2::x) (tree-list-tuple5-fix acl2::y)))
Theorem:
(defthm tree-list-tuple5-equiv-is-an-equivalence (and (booleanp (tree-list-tuple5-equiv x y)) (tree-list-tuple5-equiv x x) (implies (tree-list-tuple5-equiv x y) (tree-list-tuple5-equiv y x)) (implies (and (tree-list-tuple5-equiv x y) (tree-list-tuple5-equiv y z)) (tree-list-tuple5-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm tree-list-tuple5-equiv-implies-equal-tree-list-tuple5-fix-1 (implies (tree-list-tuple5-equiv acl2::x x-equiv) (equal (tree-list-tuple5-fix acl2::x) (tree-list-tuple5-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm tree-list-tuple5-fix-under-tree-list-tuple5-equiv (tree-list-tuple5-equiv (tree-list-tuple5-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-tree-list-tuple5-fix-1-forward-to-tree-list-tuple5-equiv (implies (equal (tree-list-tuple5-fix acl2::x) acl2::y) (tree-list-tuple5-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-tree-list-tuple5-fix-2-forward-to-tree-list-tuple5-equiv (implies (equal acl2::x (tree-list-tuple5-fix acl2::y)) (tree-list-tuple5-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm tree-list-tuple5-equiv-of-tree-list-tuple5-fix-1-forward (implies (tree-list-tuple5-equiv (tree-list-tuple5-fix acl2::x) acl2::y) (tree-list-tuple5-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm tree-list-tuple5-equiv-of-tree-list-tuple5-fix-2-forward (implies (tree-list-tuple5-equiv acl2::x (tree-list-tuple5-fix acl2::y)) (tree-list-tuple5-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)