Fixing function for ex-args structures.
Function:
(defun ex-args-fix$inline (x) (declare (xargs :guard (ex-args-p x))) (let ((acl2::__function__ 'ex-args-fix)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((term-lst (pseudo-term-list-fix (cdr (std::da-nth 0 x)))) (fn-lst (func-alist-fix (cdr (std::da-nth 1 x)))) (fn-lvls (sym-nat-alist-fix (cdr (std::da-nth 2 x)))) (wrld-fn-len (nfix (cdr (std::da-nth 3 x)))) (expand-lst (pseudo-term-alist-fix (cdr (std::da-nth 4 x))))) (list (cons 'term-lst term-lst) (cons 'fn-lst fn-lst) (cons 'fn-lvls fn-lvls) (cons 'wrld-fn-len wrld-fn-len) (cons 'expand-lst expand-lst))) :exec x)))
Theorem:
(defthm ex-args-p-of-ex-args-fix (b* ((new-x (ex-args-fix$inline x))) (ex-args-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm ex-args-fix-when-ex-args-p (implies (ex-args-p x) (equal (ex-args-fix x) x)))
Function:
(defun ex-args-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (ex-args-p acl2::x) (ex-args-p acl2::y)))) (equal (ex-args-fix acl2::x) (ex-args-fix acl2::y)))
Theorem:
(defthm ex-args-equiv-is-an-equivalence (and (booleanp (ex-args-equiv x y)) (ex-args-equiv x x) (implies (ex-args-equiv x y) (ex-args-equiv y x)) (implies (and (ex-args-equiv x y) (ex-args-equiv y z)) (ex-args-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm ex-args-equiv-implies-equal-ex-args-fix-1 (implies (ex-args-equiv acl2::x x-equiv) (equal (ex-args-fix acl2::x) (ex-args-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm ex-args-fix-under-ex-args-equiv (ex-args-equiv (ex-args-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-ex-args-fix-1-forward-to-ex-args-equiv (implies (equal (ex-args-fix acl2::x) acl2::y) (ex-args-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-ex-args-fix-2-forward-to-ex-args-equiv (implies (equal acl2::x (ex-args-fix acl2::y)) (ex-args-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm ex-args-equiv-of-ex-args-fix-1-forward (implies (ex-args-equiv (ex-args-fix acl2::x) acl2::y) (ex-args-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm ex-args-equiv-of-ex-args-fix-2-forward (implies (ex-args-equiv acl2::x (ex-args-fix acl2::y)) (ex-args-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)