Fixing function for instr-option structures.
(instr-option-fix x) → new-x
Function:
(defun instr-option-fix$inline (x) (declare (xargs :guard (instr-optionp x))) (let ((__function__ 'instr-option-fix)) (declare (ignorable __function__)) (mbe :logic (cond ((not x) nil) (t (b* ((fty::val (instr-fix x))) fty::val))) :exec x)))
Theorem:
(defthm instr-optionp-of-instr-option-fix (b* ((new-x (instr-option-fix$inline x))) (instr-optionp new-x)) :rule-classes :rewrite)
Theorem:
(defthm instr-option-fix-when-instr-optionp (implies (instr-optionp x) (equal (instr-option-fix x) x)))
Function:
(defun instr-option-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (instr-optionp acl2::x) (instr-optionp acl2::y)))) (equal (instr-option-fix acl2::x) (instr-option-fix acl2::y)))
Theorem:
(defthm instr-option-equiv-is-an-equivalence (and (booleanp (instr-option-equiv x y)) (instr-option-equiv x x) (implies (instr-option-equiv x y) (instr-option-equiv y x)) (implies (and (instr-option-equiv x y) (instr-option-equiv y z)) (instr-option-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm instr-option-equiv-implies-equal-instr-option-fix-1 (implies (instr-option-equiv acl2::x x-equiv) (equal (instr-option-fix acl2::x) (instr-option-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm instr-option-fix-under-instr-option-equiv (instr-option-equiv (instr-option-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-instr-option-fix-1-forward-to-instr-option-equiv (implies (equal (instr-option-fix acl2::x) acl2::y) (instr-option-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-instr-option-fix-2-forward-to-instr-option-equiv (implies (equal acl2::x (instr-option-fix acl2::y)) (instr-option-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm instr-option-equiv-of-instr-option-fix-1-forward (implies (instr-option-equiv (instr-option-fix acl2::x) acl2::y) (instr-option-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm instr-option-equiv-of-instr-option-fix-2-forward (implies (instr-option-equiv acl2::x (instr-option-fix acl2::y)) (instr-option-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)