Fixing function for jlocvar structures.
Function:
(defun jlocvar-fix$inline (x) (declare (xargs :guard (jlocvarp x))) (let ((__function__ 'jlocvar-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((final? (acl2::bool-fix (cdr (std::da-nth 0 x)))) (type (jtype-fix (cdr (std::da-nth 1 x)))) (name (str-fix (cdr (std::da-nth 2 x)))) (init? (maybe-jexpr-fix (cdr (std::da-nth 3 x))))) (list (cons 'final? final?) (cons 'type type) (cons 'name name) (cons 'init? init?))) :exec x)))
Theorem:
(defthm jlocvarp-of-jlocvar-fix (b* ((new-x (jlocvar-fix$inline x))) (jlocvarp new-x)) :rule-classes :rewrite)
Theorem:
(defthm jlocvar-fix-when-jlocvarp (implies (jlocvarp x) (equal (jlocvar-fix x) x)))
Function:
(defun jlocvar-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (jlocvarp acl2::x) (jlocvarp acl2::y)))) (equal (jlocvar-fix acl2::x) (jlocvar-fix acl2::y)))
Theorem:
(defthm jlocvar-equiv-is-an-equivalence (and (booleanp (jlocvar-equiv x y)) (jlocvar-equiv x x) (implies (jlocvar-equiv x y) (jlocvar-equiv y x)) (implies (and (jlocvar-equiv x y) (jlocvar-equiv y z)) (jlocvar-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm jlocvar-equiv-implies-equal-jlocvar-fix-1 (implies (jlocvar-equiv acl2::x x-equiv) (equal (jlocvar-fix acl2::x) (jlocvar-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm jlocvar-fix-under-jlocvar-equiv (jlocvar-equiv (jlocvar-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-jlocvar-fix-1-forward-to-jlocvar-equiv (implies (equal (jlocvar-fix acl2::x) acl2::y) (jlocvar-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-jlocvar-fix-2-forward-to-jlocvar-equiv (implies (equal acl2::x (jlocvar-fix acl2::y)) (jlocvar-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm jlocvar-equiv-of-jlocvar-fix-1-forward (implies (jlocvar-equiv (jlocvar-fix acl2::x) acl2::y) (jlocvar-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm jlocvar-equiv-of-jlocvar-fix-2-forward (implies (jlocvar-equiv acl2::x (jlocvar-fix acl2::y)) (jlocvar-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)