Fixing function for pexprs-gin structures.
(pexprs-gin-fix x) → new-x
Function:
(defun pexprs-gin-fix$inline (x) (declare (xargs :guard (pexprs-ginp x))) (let ((__function__ 'pexprs-gin-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((context (atc-context-fix (cdr (std::da-nth 0 x)))) (inscope (atc-symbol-varinfo-alist-list-fix (cdr (std::da-nth 1 x)))) (prec-tags (atc-string-taginfo-alist-fix (cdr (std::da-nth 2 x)))) (fn (symbol-fix (cdr (std::da-nth 3 x)))) (fn-guard (symbol-fix (cdr (std::da-nth 4 x)))) (compst-var (symbol-fix (cdr (std::da-nth 5 x)))) (thm-index (acl2::pos-fix (cdr (std::da-nth 6 x)))) (names-to-avoid (symbol-list-fix (cdr (std::da-nth 7 x)))) (proofs (acl2::bool-fix (cdr (std::da-nth 8 x))))) (list (cons 'context context) (cons 'inscope inscope) (cons 'prec-tags prec-tags) (cons 'fn fn) (cons 'fn-guard fn-guard) (cons 'compst-var compst-var) (cons 'thm-index thm-index) (cons 'names-to-avoid names-to-avoid) (cons 'proofs proofs))) :exec x)))
Theorem:
(defthm pexprs-ginp-of-pexprs-gin-fix (b* ((new-x (pexprs-gin-fix$inline x))) (pexprs-ginp new-x)) :rule-classes :rewrite)
Theorem:
(defthm pexprs-gin-fix-when-pexprs-ginp (implies (pexprs-ginp x) (equal (pexprs-gin-fix x) x)))
Function:
(defun pexprs-gin-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (pexprs-ginp acl2::x) (pexprs-ginp acl2::y)))) (equal (pexprs-gin-fix acl2::x) (pexprs-gin-fix acl2::y)))
Theorem:
(defthm pexprs-gin-equiv-is-an-equivalence (and (booleanp (pexprs-gin-equiv x y)) (pexprs-gin-equiv x x) (implies (pexprs-gin-equiv x y) (pexprs-gin-equiv y x)) (implies (and (pexprs-gin-equiv x y) (pexprs-gin-equiv y z)) (pexprs-gin-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm pexprs-gin-equiv-implies-equal-pexprs-gin-fix-1 (implies (pexprs-gin-equiv acl2::x x-equiv) (equal (pexprs-gin-fix acl2::x) (pexprs-gin-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm pexprs-gin-fix-under-pexprs-gin-equiv (pexprs-gin-equiv (pexprs-gin-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-pexprs-gin-fix-1-forward-to-pexprs-gin-equiv (implies (equal (pexprs-gin-fix acl2::x) acl2::y) (pexprs-gin-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-pexprs-gin-fix-2-forward-to-pexprs-gin-equiv (implies (equal acl2::x (pexprs-gin-fix acl2::y)) (pexprs-gin-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm pexprs-gin-equiv-of-pexprs-gin-fix-1-forward (implies (pexprs-gin-equiv (pexprs-gin-fix acl2::x) acl2::y) (pexprs-gin-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm pexprs-gin-equiv-of-pexprs-gin-fix-2-forward (implies (pexprs-gin-equiv acl2::x (pexprs-gin-fix acl2::y)) (pexprs-gin-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)