Get the delay field from a svar.
This is an ordinary field accessor created by defprod.
Function:
(defun svar->delay$inline (x) (declare (xargs :guard (svar-p x))) (declare (xargs :guard t)) (let ((__function__ 'svar->delay)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x))) (nfix (if (atom x) 0 (b* ((rest (cddr x)) ((when (integerp rest)) (loghead 4 rest)) ((when (integerp (first rest))) (first rest))) (cdr (first rest)))))) :exec (if (atom x) 0 (b* ((rest (cddr x)) ((when (integerp rest)) (loghead 4 rest)) ((when (integerp (first rest))) (first rest))) (cdr (first rest)))))))
Theorem:
(defthm natp-of-svar->delay (b* ((delay (svar->delay$inline x))) (natp delay)) :rule-classes :rewrite)
Theorem:
(defthm svar->delay$inline-of-svar-fix-x (equal (svar->delay$inline (svar-fix x)) (svar->delay$inline x)))
Theorem:
(defthm svar->delay$inline-svar-equiv-congruence-on-x (implies (svar-equiv x x-equiv) (equal (svar->delay$inline x) (svar->delay$inline x-equiv))) :rule-classes :congruence)