(mach-o-section-headers-fix x) is a usual ACL2::fty list fixing function.
(mach-o-section-headers-fix x) → fty::newx
In the logic, we apply mach-o-section-header-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.
Function:
(defun mach-o-section-headers-fix$inline (x) (declare (xargs :guard (mach-o-section-headers-p x))) (let ((__function__ 'mach-o-section-headers-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (cons (mach-o-section-header-fix (car x)) (mach-o-section-headers-fix (cdr x)))) :exec x)))
Theorem:
(defthm mach-o-section-headers-p-of-mach-o-section-headers-fix (b* ((fty::newx (mach-o-section-headers-fix$inline x))) (mach-o-section-headers-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm mach-o-section-headers-fix-when-mach-o-section-headers-p (implies (mach-o-section-headers-p x) (equal (mach-o-section-headers-fix x) x)))
Function:
(defun mach-o-section-headers-equiv$inline (x y) (declare (xargs :guard (and (mach-o-section-headers-p x) (mach-o-section-headers-p y)))) (equal (mach-o-section-headers-fix x) (mach-o-section-headers-fix y)))
Theorem:
(defthm mach-o-section-headers-equiv-is-an-equivalence (and (booleanp (mach-o-section-headers-equiv x y)) (mach-o-section-headers-equiv x x) (implies (mach-o-section-headers-equiv x y) (mach-o-section-headers-equiv y x)) (implies (and (mach-o-section-headers-equiv x y) (mach-o-section-headers-equiv y z)) (mach-o-section-headers-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm mach-o-section-headers-equiv-implies-equal-mach-o-section-headers-fix-1 (implies (mach-o-section-headers-equiv x x-equiv) (equal (mach-o-section-headers-fix x) (mach-o-section-headers-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm mach-o-section-headers-fix-under-mach-o-section-headers-equiv (mach-o-section-headers-equiv (mach-o-section-headers-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-mach-o-section-headers-fix-1-forward-to-mach-o-section-headers-equiv (implies (equal (mach-o-section-headers-fix x) y) (mach-o-section-headers-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-mach-o-section-headers-fix-2-forward-to-mach-o-section-headers-equiv (implies (equal x (mach-o-section-headers-fix y)) (mach-o-section-headers-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm mach-o-section-headers-equiv-of-mach-o-section-headers-fix-1-forward (implies (mach-o-section-headers-equiv (mach-o-section-headers-fix x) y) (mach-o-section-headers-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm mach-o-section-headers-equiv-of-mach-o-section-headers-fix-2-forward (implies (mach-o-section-headers-equiv x (mach-o-section-headers-fix y)) (mach-o-section-headers-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm car-of-mach-o-section-headers-fix-x-under-mach-o-section-header-equiv (mach-o-section-header-equiv (car (mach-o-section-headers-fix x)) (car x)))
Theorem:
(defthm car-mach-o-section-headers-equiv-congruence-on-x-under-mach-o-section-header-equiv (implies (mach-o-section-headers-equiv x x-equiv) (mach-o-section-header-equiv (car x) (car x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cdr-of-mach-o-section-headers-fix-x-under-mach-o-section-headers-equiv (mach-o-section-headers-equiv (cdr (mach-o-section-headers-fix x)) (cdr x)))
Theorem:
(defthm cdr-mach-o-section-headers-equiv-congruence-on-x-under-mach-o-section-headers-equiv (implies (mach-o-section-headers-equiv x x-equiv) (mach-o-section-headers-equiv (cdr x) (cdr x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cons-of-mach-o-section-header-fix-x-under-mach-o-section-headers-equiv (mach-o-section-headers-equiv (cons (mach-o-section-header-fix x) y) (cons x y)))
Theorem:
(defthm cons-mach-o-section-header-equiv-congruence-on-x-under-mach-o-section-headers-equiv (implies (mach-o-section-header-equiv x x-equiv) (mach-o-section-headers-equiv (cons x y) (cons x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm cons-of-mach-o-section-headers-fix-y-under-mach-o-section-headers-equiv (mach-o-section-headers-equiv (cons x (mach-o-section-headers-fix y)) (cons x y)))
Theorem:
(defthm cons-mach-o-section-headers-equiv-congruence-on-y-under-mach-o-section-headers-equiv (implies (mach-o-section-headers-equiv y y-equiv) (mach-o-section-headers-equiv (cons x y) (cons x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-mach-o-section-headers-fix (equal (consp (mach-o-section-headers-fix x)) (consp x)))
Theorem:
(defthm mach-o-section-headers-fix-under-iff (iff (mach-o-section-headers-fix x) (consp x)))
Theorem:
(defthm mach-o-section-headers-fix-of-cons (equal (mach-o-section-headers-fix (cons a x)) (cons (mach-o-section-header-fix a) (mach-o-section-headers-fix x))))
Theorem:
(defthm len-of-mach-o-section-headers-fix (equal (len (mach-o-section-headers-fix x)) (len x)))
Theorem:
(defthm mach-o-section-headers-fix-of-append (equal (mach-o-section-headers-fix (append std::a std::b)) (append (mach-o-section-headers-fix std::a) (mach-o-section-headers-fix std::b))))
Theorem:
(defthm mach-o-section-headers-fix-of-repeat (equal (mach-o-section-headers-fix (acl2::repeat n x)) (acl2::repeat n (mach-o-section-header-fix x))))
Theorem:
(defthm list-equiv-refines-mach-o-section-headers-equiv (implies (acl2::list-equiv x y) (mach-o-section-headers-equiv x y)) :rule-classes :refinement)
Theorem:
(defthm nth-of-mach-o-section-headers-fix (equal (nth n (mach-o-section-headers-fix x)) (if (< (nfix n) (len x)) (mach-o-section-header-fix (nth n x)) nil)))
Theorem:
(defthm mach-o-section-headers-equiv-implies-mach-o-section-headers-equiv-append-1 (implies (mach-o-section-headers-equiv x fty::x-equiv) (mach-o-section-headers-equiv (append x y) (append fty::x-equiv y))) :rule-classes (:congruence))
Theorem:
(defthm mach-o-section-headers-equiv-implies-mach-o-section-headers-equiv-append-2 (implies (mach-o-section-headers-equiv y fty::y-equiv) (mach-o-section-headers-equiv (append x y) (append x fty::y-equiv))) :rule-classes (:congruence))
Theorem:
(defthm mach-o-section-headers-equiv-implies-mach-o-section-headers-equiv-nthcdr-2 (implies (mach-o-section-headers-equiv l l-equiv) (mach-o-section-headers-equiv (nthcdr n l) (nthcdr n l-equiv))) :rule-classes (:congruence))
Theorem:
(defthm mach-o-section-headers-equiv-implies-mach-o-section-headers-equiv-take-2 (implies (mach-o-section-headers-equiv l l-equiv) (mach-o-section-headers-equiv (take n l) (take n l-equiv))) :rule-classes (:congruence))