Fixing function for te-args structures.
Function:
(defun te-args-fix$inline (x) (declare (xargs :guard (te-args-p x))) (let ((acl2::__function__ 'te-args-fix)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((expr-lst (pseudo-term-list-fix (cdr (std::da-nth 0 x)))) (fn-lst (func-alist-fix (cdr (std::da-nth 1 x)))) (fty-info (fty-info-alist-fix (cdr (std::da-nth 2 x)))) (symbol-index (nfix (cdr (std::da-nth 3 x)))) (symbol-list (str::string-list-fix (cdr (std::da-nth 4 x)))) (avoid-list (symbol-list-fix (cdr (std::da-nth 5 x)))) (symbol-map (symbol-string-alist-fix (cdr (std::da-nth 6 x))))) (list (cons 'expr-lst expr-lst) (cons 'fn-lst fn-lst) (cons 'fty-info fty-info) (cons 'symbol-index symbol-index) (cons 'symbol-list symbol-list) (cons 'avoid-list avoid-list) (cons 'symbol-map symbol-map))) :exec x)))
Theorem:
(defthm te-args-p-of-te-args-fix (b* ((new-x (te-args-fix$inline x))) (te-args-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm te-args-fix-when-te-args-p (implies (te-args-p x) (equal (te-args-fix x) x)))
Function:
(defun te-args-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (te-args-p acl2::x) (te-args-p acl2::y)))) (equal (te-args-fix acl2::x) (te-args-fix acl2::y)))
Theorem:
(defthm te-args-equiv-is-an-equivalence (and (booleanp (te-args-equiv x y)) (te-args-equiv x x) (implies (te-args-equiv x y) (te-args-equiv y x)) (implies (and (te-args-equiv x y) (te-args-equiv y z)) (te-args-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm te-args-equiv-implies-equal-te-args-fix-1 (implies (te-args-equiv acl2::x x-equiv) (equal (te-args-fix acl2::x) (te-args-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm te-args-fix-under-te-args-equiv (te-args-equiv (te-args-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-te-args-fix-1-forward-to-te-args-equiv (implies (equal (te-args-fix acl2::x) acl2::y) (te-args-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-te-args-fix-2-forward-to-te-args-equiv (implies (equal acl2::x (te-args-fix acl2::y)) (te-args-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm te-args-equiv-of-te-args-fix-1-forward (implies (te-args-equiv (te-args-fix acl2::x) acl2::y) (te-args-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm te-args-equiv-of-te-args-fix-2-forward (implies (te-args-equiv acl2::x (te-args-fix acl2::y)) (te-args-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)