Basic equivalence relation for elf-header structures.
Function:
(defun elf-header-equiv$inline (x y) (declare (xargs :guard (and (elf-header-p x) (elf-header-p y)))) (equal (elf-header-fix x) (elf-header-fix y)))
Theorem:
(defthm elf-header-equiv-is-an-equivalence (and (booleanp (elf-header-equiv x y)) (elf-header-equiv x x) (implies (elf-header-equiv x y) (elf-header-equiv y x)) (implies (and (elf-header-equiv x y) (elf-header-equiv y z)) (elf-header-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm elf-header-equiv-implies-equal-elf-header-fix-1 (implies (elf-header-equiv x x-equiv) (equal (elf-header-fix x) (elf-header-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm elf-header-fix-under-elf-header-equiv (elf-header-equiv (elf-header-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-elf-header-fix-1-forward-to-elf-header-equiv (implies (equal (elf-header-fix x) y) (elf-header-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-elf-header-fix-2-forward-to-elf-header-equiv (implies (equal x (elf-header-fix y)) (elf-header-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm elf-header-equiv-of-elf-header-fix-1-forward (implies (elf-header-equiv (elf-header-fix x) y) (elf-header-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm elf-header-equiv-of-elf-header-fix-2-forward (implies (elf-header-equiv x (elf-header-fix y)) (elf-header-equiv x y)) :rule-classes :forward-chaining)