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