Fixing function for initdeclor structures.
(initdeclor-fix x) → new-x
Function:
(defun initdeclor-fix$inline (x) (declare (xargs :guard (initdeclorp x))) (let ((__function__ 'initdeclor-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((declor (declor-fix (cdr (std::da-nth 0 x)))) (init? (initer-option-fix (cdr (std::da-nth 1 x))))) (list (cons 'declor declor) (cons 'init? init?))) :exec x)))
Theorem:
(defthm initdeclorp-of-initdeclor-fix (b* ((new-x (initdeclor-fix$inline x))) (initdeclorp new-x)) :rule-classes :rewrite)
Theorem:
(defthm initdeclor-fix-when-initdeclorp (implies (initdeclorp x) (equal (initdeclor-fix x) x)))
Function:
(defun initdeclor-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (initdeclorp acl2::x) (initdeclorp acl2::y)))) (equal (initdeclor-fix acl2::x) (initdeclor-fix acl2::y)))
Theorem:
(defthm initdeclor-equiv-is-an-equivalence (and (booleanp (initdeclor-equiv x y)) (initdeclor-equiv x x) (implies (initdeclor-equiv x y) (initdeclor-equiv y x)) (implies (and (initdeclor-equiv x y) (initdeclor-equiv y z)) (initdeclor-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm initdeclor-equiv-implies-equal-initdeclor-fix-1 (implies (initdeclor-equiv acl2::x x-equiv) (equal (initdeclor-fix acl2::x) (initdeclor-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm initdeclor-fix-under-initdeclor-equiv (initdeclor-equiv (initdeclor-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-initdeclor-fix-1-forward-to-initdeclor-equiv (implies (equal (initdeclor-fix acl2::x) acl2::y) (initdeclor-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-initdeclor-fix-2-forward-to-initdeclor-equiv (implies (equal acl2::x (initdeclor-fix acl2::y)) (initdeclor-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm initdeclor-equiv-of-initdeclor-fix-1-forward (implies (initdeclor-equiv (initdeclor-fix acl2::x) acl2::y) (initdeclor-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm initdeclor-equiv-of-initdeclor-fix-2-forward (implies (initdeclor-equiv acl2::x (initdeclor-fix acl2::y)) (initdeclor-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)