Fixing function for elf32-segment-header structures.
(elf32-segment-header-fix x) → new-x
Function:
(defun elf32-segment-header-fix$inline (x) (declare (xargs :guard (elf32-segment-header-p x))) (let ((__function__ 'elf32-segment-header-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((type (nfix (cdr (std::da-nth 0 x)))) (flags (nfix (cdr (std::da-nth 1 x)))) (offset (nfix (cdr (std::da-nth 2 x)))) (vaddr (nfix (cdr (std::da-nth 3 x)))) (paddr (nfix (cdr (std::da-nth 4 x)))) (filesz (nfix (cdr (std::da-nth 5 x)))) (memsz (nfix (cdr (std::da-nth 6 x)))) (align (nfix (cdr (std::da-nth 7 x))))) (list (cons 'type type) (cons 'flags flags) (cons 'offset offset) (cons 'vaddr vaddr) (cons 'paddr paddr) (cons 'filesz filesz) (cons 'memsz memsz) (cons 'align align))) :exec x)))
Theorem:
(defthm elf32-segment-header-p-of-elf32-segment-header-fix (b* ((new-x (elf32-segment-header-fix$inline x))) (elf32-segment-header-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm elf32-segment-header-fix-when-elf32-segment-header-p (implies (elf32-segment-header-p x) (equal (elf32-segment-header-fix x) x)))
Function:
(defun elf32-segment-header-equiv$inline (x y) (declare (xargs :guard (and (elf32-segment-header-p x) (elf32-segment-header-p y)))) (equal (elf32-segment-header-fix x) (elf32-segment-header-fix y)))
Theorem:
(defthm elf32-segment-header-equiv-is-an-equivalence (and (booleanp (elf32-segment-header-equiv x y)) (elf32-segment-header-equiv x x) (implies (elf32-segment-header-equiv x y) (elf32-segment-header-equiv y x)) (implies (and (elf32-segment-header-equiv x y) (elf32-segment-header-equiv y z)) (elf32-segment-header-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm elf32-segment-header-equiv-implies-equal-elf32-segment-header-fix-1 (implies (elf32-segment-header-equiv x x-equiv) (equal (elf32-segment-header-fix x) (elf32-segment-header-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm elf32-segment-header-fix-under-elf32-segment-header-equiv (elf32-segment-header-equiv (elf32-segment-header-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-elf32-segment-header-fix-1-forward-to-elf32-segment-header-equiv (implies (equal (elf32-segment-header-fix x) y) (elf32-segment-header-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-elf32-segment-header-fix-2-forward-to-elf32-segment-header-equiv (implies (equal x (elf32-segment-header-fix y)) (elf32-segment-header-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm elf32-segment-header-equiv-of-elf32-segment-header-fix-1-forward (implies (elf32-segment-header-equiv (elf32-segment-header-fix x) y) (elf32-segment-header-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm elf32-segment-header-equiv-of-elf32-segment-header-fix-2-forward (implies (elf32-segment-header-equiv x (elf32-segment-header-fix y)) (elf32-segment-header-equiv x y)) :rule-classes :forward-chaining)