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