Fixing function for elf-section-header structures.
(elf-section-header-fix x) → new-x
Function:
(defun elf-section-header-fix$inline (x) (declare (xargs :guard (elf-section-header-p x))) (let ((__function__ 'elf-section-header-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name-str (acl2::str-fix (cdr (std::da-nth 0 x)))) (name (nfix (cdr (std::da-nth 1 x)))) (type (nfix (cdr (std::da-nth 2 x)))) (flags (nfix (cdr (std::da-nth 3 x)))) (addr (nfix (cdr (std::da-nth 4 x)))) (offset (nfix (cdr (std::da-nth 5 x)))) (size (nfix (cdr (std::da-nth 6 x)))) (link (nfix (cdr (std::da-nth 7 x)))) (info (nfix (cdr (std::da-nth 8 x)))) (addralign (nfix (cdr (std::da-nth 9 x)))) (entsize (nfix (cdr (std::da-nth 10 x))))) (list (cons 'name-str name-str) (cons 'name name) (cons 'type type) (cons 'flags flags) (cons 'addr addr) (cons 'offset offset) (cons 'size size) (cons 'link link) (cons 'info info) (cons 'addralign addralign) (cons 'entsize entsize))) :exec x)))
Theorem:
(defthm elf-section-header-p-of-elf-section-header-fix (b* ((new-x (elf-section-header-fix$inline x))) (elf-section-header-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm elf-section-header-fix-when-elf-section-header-p (implies (elf-section-header-p x) (equal (elf-section-header-fix x) x)))
Function:
(defun elf-section-header-equiv$inline (x y) (declare (xargs :guard (and (elf-section-header-p x) (elf-section-header-p y)))) (equal (elf-section-header-fix x) (elf-section-header-fix y)))
Theorem:
(defthm elf-section-header-equiv-is-an-equivalence (and (booleanp (elf-section-header-equiv x y)) (elf-section-header-equiv x x) (implies (elf-section-header-equiv x y) (elf-section-header-equiv y x)) (implies (and (elf-section-header-equiv x y) (elf-section-header-equiv y z)) (elf-section-header-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm elf-section-header-equiv-implies-equal-elf-section-header-fix-1 (implies (elf-section-header-equiv x x-equiv) (equal (elf-section-header-fix x) (elf-section-header-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm elf-section-header-fix-under-elf-section-header-equiv (elf-section-header-equiv (elf-section-header-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-elf-section-header-fix-1-forward-to-elf-section-header-equiv (implies (equal (elf-section-header-fix x) y) (elf-section-header-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-elf-section-header-fix-2-forward-to-elf-section-header-equiv (implies (equal x (elf-section-header-fix y)) (elf-section-header-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm elf-section-header-equiv-of-elf-section-header-fix-1-forward (implies (elf-section-header-equiv (elf-section-header-fix x) y) (elf-section-header-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm elf-section-header-equiv-of-elf-section-header-fix-2-forward (implies (elf-section-header-equiv x (elf-section-header-fix y)) (elf-section-header-equiv x y)) :rule-classes :forward-chaining)