Function:
(defun vl-indexexpr->scopeexpr (x) (declare (xargs :guard (vl-expr-p x))) (declare (xargs :guard (vl-indexexpr-p x))) (let ((__function__ 'vl-indexexpr->scopeexpr)) (declare (ignorable __function__)) (b* ((x (vl-expr-fix x)) ((when (vl-atom-p x)) x) ((vl-nonatom x)) ((when (or (vl-op-equiv x.op :vl-index) (vl-op-equiv x.op :vl-bitselect))) (vl-indexexpr->scopeexpr (first x.args)))) x)))
Theorem:
(defthm vl-expr-p-of-vl-indexexpr->scopeexpr (b* ((scopeexpr (vl-indexexpr->scopeexpr x))) (vl-expr-p scopeexpr)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopeexpr-p-of-vl-indexexpr->scopeexpr (b* nil (implies (vl-indexexpr-p x) (vl-scopeexpr-p (vl-indexexpr->scopeexpr x)))))
Theorem:
(defthm vl-indexexpr->scopeexpr-of-vl-expr-fix-x (equal (vl-indexexpr->scopeexpr (vl-expr-fix x)) (vl-indexexpr->scopeexpr x)))
Theorem:
(defthm vl-indexexpr->scopeexpr-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-indexexpr->scopeexpr x) (vl-indexexpr->scopeexpr x-equiv))) :rule-classes :congruence)