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