Fixing function for addnames-indices structures.
(addnames-indices-fix x) → new-x
Function:
(defun addnames-indices-fix$inline (x) (declare (xargs :guard (addnames-indices-p x))) (let ((__function__ 'addnames-indices-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((genblk-idx (pos-fix (std::prod-car (std::prod-car x)))) (gateinst-idx (pos-fix (std::prod-cdr (std::prod-car x)))) (blockstmt-idx (pos-fix (std::prod-car (std::prod-cdr x)))) (modinst-idx (pos-fix (std::prod-cdr (std::prod-cdr x))))) (std::prod-cons (std::prod-cons genblk-idx gateinst-idx) (std::prod-cons blockstmt-idx modinst-idx))) :exec x)))
Theorem:
(defthm addnames-indices-p-of-addnames-indices-fix (b* ((new-x (addnames-indices-fix$inline x))) (addnames-indices-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm addnames-indices-fix-when-addnames-indices-p (implies (addnames-indices-p x) (equal (addnames-indices-fix x) x)))
Function:
(defun addnames-indices-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (addnames-indices-p acl2::x) (addnames-indices-p acl2::y)))) (equal (addnames-indices-fix acl2::x) (addnames-indices-fix acl2::y)))
Theorem:
(defthm addnames-indices-equiv-is-an-equivalence (and (booleanp (addnames-indices-equiv x y)) (addnames-indices-equiv x x) (implies (addnames-indices-equiv x y) (addnames-indices-equiv y x)) (implies (and (addnames-indices-equiv x y) (addnames-indices-equiv y z)) (addnames-indices-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm addnames-indices-equiv-implies-equal-addnames-indices-fix-1 (implies (addnames-indices-equiv acl2::x x-equiv) (equal (addnames-indices-fix acl2::x) (addnames-indices-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm addnames-indices-fix-under-addnames-indices-equiv (addnames-indices-equiv (addnames-indices-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-addnames-indices-fix-1-forward-to-addnames-indices-equiv (implies (equal (addnames-indices-fix acl2::x) acl2::y) (addnames-indices-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-addnames-indices-fix-2-forward-to-addnames-indices-equiv (implies (equal acl2::x (addnames-indices-fix acl2::y)) (addnames-indices-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm addnames-indices-equiv-of-addnames-indices-fix-1-forward (implies (addnames-indices-equiv (addnames-indices-fix acl2::x) acl2::y) (addnames-indices-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm addnames-indices-equiv-of-addnames-indices-fix-2-forward (implies (addnames-indices-equiv acl2::x (addnames-indices-fix acl2::y)) (addnames-indices-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)