(vl-value-in-range x range) → *
Function:
(defun vl-value-in-range (x range) (declare (xargs :guard (and (vl-expr-p x) (vl-range-p range)))) (declare (xargs :guard (and (vl-expr-resolved-p x) (vl-range-resolved-p range)))) (let ((__function__ 'vl-value-in-range)) (declare (ignorable __function__)) (b* (((vl-range range)) (msb (vl-resolved->val range.msb)) (lsb (vl-resolved->val range.lsb)) (x (vl-resolved->val x))) (or (and (<= msb x) (<= x lsb)) (and (<= lsb x) (<= x msb))))))
Theorem:
(defthm vl-value-in-range-of-vl-expr-fix-x (equal (vl-value-in-range (vl-expr-fix x) range) (vl-value-in-range x range)))
Theorem:
(defthm vl-value-in-range-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-value-in-range x range) (vl-value-in-range x-equiv range))) :rule-classes :congruence)
Theorem:
(defthm vl-value-in-range-of-vl-range-fix-range (equal (vl-value-in-range x (vl-range-fix range)) (vl-value-in-range x range)))
Theorem:
(defthm vl-value-in-range-vl-range-equiv-congruence-on-range (implies (vl-range-equiv range range-equiv) (equal (vl-value-in-range x range) (vl-value-in-range x range-equiv))) :rule-classes :congruence)