Fixing function for jparam structures.
Function:
(defun jparam-fix$inline (x) (declare (xargs :guard (jparamp x))) (let ((__function__ 'jparam-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))))) (list (cons 'final? final?) (cons 'type type) (cons 'name name))) :exec x)))
Theorem:
(defthm jparamp-of-jparam-fix (b* ((new-x (jparam-fix$inline x))) (jparamp new-x)) :rule-classes :rewrite)
Theorem:
(defthm jparam-fix-when-jparamp (implies (jparamp x) (equal (jparam-fix x) x)))
Function:
(defun jparam-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (jparamp acl2::x) (jparamp acl2::y)))) (equal (jparam-fix acl2::x) (jparam-fix acl2::y)))
Theorem:
(defthm jparam-equiv-is-an-equivalence (and (booleanp (jparam-equiv x y)) (jparam-equiv x x) (implies (jparam-equiv x y) (jparam-equiv y x)) (implies (and (jparam-equiv x y) (jparam-equiv y z)) (jparam-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm jparam-equiv-implies-equal-jparam-fix-1 (implies (jparam-equiv acl2::x x-equiv) (equal (jparam-fix acl2::x) (jparam-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm jparam-fix-under-jparam-equiv (jparam-equiv (jparam-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-jparam-fix-1-forward-to-jparam-equiv (implies (equal (jparam-fix acl2::x) acl2::y) (jparam-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-jparam-fix-2-forward-to-jparam-equiv (implies (equal acl2::x (jparam-fix acl2::y)) (jparam-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm jparam-equiv-of-jparam-fix-1-forward (implies (jparam-equiv (jparam-fix acl2::x) acl2::y) (jparam-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm jparam-equiv-of-jparam-fix-2-forward (implies (jparam-equiv acl2::x (jparam-fix acl2::y)) (jparam-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)