Fixing function for lifetime structures.
Function:
(defun lifetime-fix$inline (x) (declare (xargs :guard (lifetimep x))) (let ((__function__ 'lifetime-fix)) (declare (ignorable __function__)) (mbe :logic (case (lifetime-kind x) (:static (cons :static (list))) (:thread (cons :thread (list))) (:auto (cons :auto (list)))) :exec x)))
Theorem:
(defthm lifetimep-of-lifetime-fix (b* ((new-x (lifetime-fix$inline x))) (lifetimep new-x)) :rule-classes :rewrite)
Theorem:
(defthm lifetime-fix-when-lifetimep (implies (lifetimep x) (equal (lifetime-fix x) x)))
Function:
(defun lifetime-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (lifetimep acl2::x) (lifetimep acl2::y)))) (equal (lifetime-fix acl2::x) (lifetime-fix acl2::y)))
Theorem:
(defthm lifetime-equiv-is-an-equivalence (and (booleanp (lifetime-equiv x y)) (lifetime-equiv x x) (implies (lifetime-equiv x y) (lifetime-equiv y x)) (implies (and (lifetime-equiv x y) (lifetime-equiv y z)) (lifetime-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm lifetime-equiv-implies-equal-lifetime-fix-1 (implies (lifetime-equiv acl2::x x-equiv) (equal (lifetime-fix acl2::x) (lifetime-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm lifetime-fix-under-lifetime-equiv (lifetime-equiv (lifetime-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-lifetime-fix-1-forward-to-lifetime-equiv (implies (equal (lifetime-fix acl2::x) acl2::y) (lifetime-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-lifetime-fix-2-forward-to-lifetime-equiv (implies (equal acl2::x (lifetime-fix acl2::y)) (lifetime-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm lifetime-equiv-of-lifetime-fix-1-forward (implies (lifetime-equiv (lifetime-fix acl2::x) acl2::y) (lifetime-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm lifetime-equiv-of-lifetime-fix-2-forward (implies (lifetime-equiv acl2::x (lifetime-fix acl2::y)) (lifetime-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm lifetime-kind$inline-of-lifetime-fix-x (equal (lifetime-kind$inline (lifetime-fix x)) (lifetime-kind$inline x)))
Theorem:
(defthm lifetime-kind$inline-lifetime-equiv-congruence-on-x (implies (lifetime-equiv x x-equiv) (equal (lifetime-kind$inline x) (lifetime-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-lifetime-fix (consp (lifetime-fix x)) :rule-classes :type-prescription)