Fixing function for snippet-info structures.
(snippet-info-fix x) → new-x
Function:
(defun snippet-info-fix$inline (x) (declare (xargs :guard (snippet-info-p x))) (let ((__function__ 'snippet-info-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (acl2::str-fix (std::da-nth 0 x))) (input-size (nfix (std::da-nth 1 x))) (output-size (pos-fix (std::da-nth 2 x))) (addr (canonical-address-fix (std::da-nth 3 x)))) (list name input-size output-size addr)) :exec x)))
Theorem:
(defthm snippet-info-p-of-snippet-info-fix (b* ((new-x (snippet-info-fix$inline x))) (snippet-info-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm snippet-info-fix-when-snippet-info-p (implies (snippet-info-p x) (equal (snippet-info-fix x) x)))
Function:
(defun snippet-info-equiv$inline (x y) (declare (xargs :guard (and (snippet-info-p x) (snippet-info-p y)))) (equal (snippet-info-fix x) (snippet-info-fix y)))
Theorem:
(defthm snippet-info-equiv-is-an-equivalence (and (booleanp (snippet-info-equiv x y)) (snippet-info-equiv x x) (implies (snippet-info-equiv x y) (snippet-info-equiv y x)) (implies (and (snippet-info-equiv x y) (snippet-info-equiv y z)) (snippet-info-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm snippet-info-equiv-implies-equal-snippet-info-fix-1 (implies (snippet-info-equiv x x-equiv) (equal (snippet-info-fix x) (snippet-info-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm snippet-info-fix-under-snippet-info-equiv (snippet-info-equiv (snippet-info-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-snippet-info-fix-1-forward-to-snippet-info-equiv (implies (equal (snippet-info-fix x) y) (snippet-info-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-snippet-info-fix-2-forward-to-snippet-info-equiv (implies (equal x (snippet-info-fix y)) (snippet-info-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm snippet-info-equiv-of-snippet-info-fix-1-forward (implies (snippet-info-equiv (snippet-info-fix x) y) (snippet-info-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm snippet-info-equiv-of-snippet-info-fix-2-forward (implies (snippet-info-equiv x (snippet-info-fix y)) (snippet-info-equiv x y)) :rule-classes :forward-chaining)