Simplify concatenations and selects in an expression.
(vl-expr-clean-selects x ss) → new-x
We try to simplify
Function:
(defun vl-expr-clean-selects (x ss) (declare (xargs :guard (and (vl-expr-p x) (vl-scopestack-p ss)))) (let ((__function__ 'vl-expr-clean-selects)) (declare (ignorable __function__)) (vl-expr-clean-selects1 (vl-expr-clean-concats x ss) ss)))
Theorem:
(defthm vl-expr-p-of-vl-expr-clean-selects (b* ((new-x (vl-expr-clean-selects x ss))) (vl-expr-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-expr-clean-selects-of-vl-expr-fix-x (equal (vl-expr-clean-selects (vl-expr-fix x) ss) (vl-expr-clean-selects x ss)))
Theorem:
(defthm vl-expr-clean-selects-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-expr-clean-selects x ss) (vl-expr-clean-selects x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-expr-clean-selects-of-vl-scopestack-fix-ss (equal (vl-expr-clean-selects x (vl-scopestack-fix ss)) (vl-expr-clean-selects x ss)))
Theorem:
(defthm vl-expr-clean-selects-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-expr-clean-selects x ss) (vl-expr-clean-selects x ss-equiv))) :rule-classes :congruence)