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