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