(database-fix x) is a usual ACL2::fty omap fixing function.
(database-fix x) → *
Function:
(defun database-fix (x) (declare (xargs :guard (databasep x))) (mbe :logic (if (databasep x) x nil) :exec x))
Theorem:
(defthm databasep-of-database-fix (databasep (database-fix x)))
Theorem:
(defthm database-fix-when-databasep (implies (databasep x) (equal (database-fix x) x)))
Theorem:
(defthm emptyp-database-fix (implies (or (omap::emptyp x) (not (databasep x))) (omap::emptyp (database-fix x))))
Theorem:
(defthm emptyp-of-database-fix-to-not-database-or-emptyp (equal (omap::emptyp (database-fix x)) (or (not (databasep x)) (omap::emptyp x))))
Function:
(defun database-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (databasep acl2::x) (databasep acl2::y)))) (equal (database-fix acl2::x) (database-fix acl2::y)))
Theorem:
(defthm database-equiv-is-an-equivalence (and (booleanp (database-equiv x y)) (database-equiv x x) (implies (database-equiv x y) (database-equiv y x)) (implies (and (database-equiv x y) (database-equiv y z)) (database-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm database-equiv-implies-equal-database-fix-1 (implies (database-equiv acl2::x x-equiv) (equal (database-fix acl2::x) (database-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm database-fix-under-database-equiv (database-equiv (database-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-database-fix-1-forward-to-database-equiv (implies (equal (database-fix acl2::x) acl2::y) (database-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-database-fix-2-forward-to-database-equiv (implies (equal acl2::x (database-fix acl2::y)) (database-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm database-equiv-of-database-fix-1-forward (implies (database-equiv (database-fix acl2::x) acl2::y) (database-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm database-equiv-of-database-fix-2-forward (implies (database-equiv acl2::x (database-fix acl2::y)) (database-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)