Fixing function for driver structures.
Function:
(defun driver-fix$inline (x) (declare (xargs :guard (driver-p x))) (let ((__function__ 'driver-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((value (svex-fix (std::prod-car x))) (strength (nfix (std::prod-cdr x)))) (std::prod-cons value strength)) :exec x)))
Theorem:
(defthm driver-p-of-driver-fix (b* ((new-x (driver-fix$inline x))) (driver-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm driver-fix-when-driver-p (implies (driver-p x) (equal (driver-fix x) x)))
Function:
(defun driver-equiv$inline (x y) (declare (xargs :guard (and (driver-p x) (driver-p y)))) (equal (driver-fix x) (driver-fix y)))
Theorem:
(defthm driver-equiv-is-an-equivalence (and (booleanp (driver-equiv x y)) (driver-equiv x x) (implies (driver-equiv x y) (driver-equiv y x)) (implies (and (driver-equiv x y) (driver-equiv y z)) (driver-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm driver-equiv-implies-equal-driver-fix-1 (implies (driver-equiv x x-equiv) (equal (driver-fix x) (driver-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm driver-fix-under-driver-equiv (driver-equiv (driver-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-driver-fix-1-forward-to-driver-equiv (implies (equal (driver-fix x) y) (driver-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-driver-fix-2-forward-to-driver-equiv (implies (equal x (driver-fix y)) (driver-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm driver-equiv-of-driver-fix-1-forward (implies (driver-equiv (driver-fix x) y) (driver-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm driver-equiv-of-driver-fix-2-forward (implies (driver-equiv x (driver-fix y)) (driver-equiv x y)) :rule-classes :forward-chaining)