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