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