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