Fixing function for gin structures.
Function:
(defun gin-fix$inline (x) (declare (xargs :guard (ginp x))) (let ((__function__ 'gin-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((ienv (c$::ienv-fix (cdr (std::da-nth 0 x)))) (const-new (acl2::symbol-fix (cdr (std::da-nth 1 x)))) (vartys (c::ident-type-map-fix (cdr (std::da-nth 2 x)))) (events (acl2::pseudo-event-form-list-fix (cdr (std::da-nth 3 x)))) (thm-index (pos-fix (cdr (std::da-nth 4 x))))) (list (cons 'ienv ienv) (cons 'const-new const-new) (cons 'vartys vartys) (cons 'events events) (cons 'thm-index thm-index))) :exec x)))
Theorem:
(defthm ginp-of-gin-fix (b* ((new-x (gin-fix$inline x))) (ginp new-x)) :rule-classes :rewrite)
Theorem:
(defthm gin-fix-when-ginp (implies (ginp x) (equal (gin-fix x) x)))
Function:
(defun gin-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (ginp acl2::x) (ginp acl2::y)))) (equal (gin-fix acl2::x) (gin-fix acl2::y)))
Theorem:
(defthm gin-equiv-is-an-equivalence (and (booleanp (gin-equiv x y)) (gin-equiv x x) (implies (gin-equiv x y) (gin-equiv y x)) (implies (and (gin-equiv x y) (gin-equiv y z)) (gin-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm gin-equiv-implies-equal-gin-fix-1 (implies (gin-equiv acl2::x x-equiv) (equal (gin-fix acl2::x) (gin-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm gin-fix-under-gin-equiv (gin-equiv (gin-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-gin-fix-1-forward-to-gin-equiv (implies (equal (gin-fix acl2::x) acl2::y) (gin-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-gin-fix-2-forward-to-gin-equiv (implies (equal acl2::x (gin-fix acl2::y)) (gin-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm gin-equiv-of-gin-fix-1-forward (implies (gin-equiv (gin-fix acl2::x) acl2::y) (gin-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm gin-equiv-of-gin-fix-2-forward (implies (gin-equiv acl2::x (gin-fix acl2::y)) (gin-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)