(svex-select-replace-indices x indices) → new-x
Function:
(defun svex-select-replace-indices (x indices) (declare (xargs :guard (and (svex-select-p x) (svexlist-p indices)))) (declare (xargs :guard (equal (len indices) (len (svex-select->indices x))))) (let ((__function__ 'svex-select-replace-indices)) (declare (ignorable __function__)) (b* ((x (svex-select-fix x))) (svex-select-case x :var x :part (change-svex-select-part x :lsb (car indices) :subexp (svex-select-replace-indices x.subexp (cdr indices)))))))
Theorem:
(defthm svex-select-p-of-svex-select-replace-indices (b* ((new-x (svex-select-replace-indices x indices))) (svex-select-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm svex-select-replace-indices-of-svex-select->indices (equal (svex-select-replace-indices x (svex-select->indices x)) (svex-select-fix x)))
Theorem:
(defthm svex-select->indices-of-replace-indices (implies (equal (len indices) (len (svex-select->indices x))) (equal (svex-select->indices (svex-select-replace-indices x indices)) (svexlist-fix indices))))
Theorem:
(defthm svex-select-replace-indices-of-svex-select-fix-x (equal (svex-select-replace-indices (svex-select-fix x) indices) (svex-select-replace-indices x indices)))
Theorem:
(defthm svex-select-replace-indices-svex-select-equiv-congruence-on-x (implies (svex-select-equiv x x-equiv) (equal (svex-select-replace-indices x indices) (svex-select-replace-indices x-equiv indices))) :rule-classes :congruence)
Theorem:
(defthm svex-select-replace-indices-of-svexlist-fix-indices (equal (svex-select-replace-indices x (svexlist-fix indices)) (svex-select-replace-indices x indices)))
Theorem:
(defthm svex-select-replace-indices-svexlist-equiv-congruence-on-indices (implies (svexlist-equiv indices indices-equiv) (equal (svex-select-replace-indices x indices) (svex-select-replace-indices x indices-equiv))) :rule-classes :congruence)