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