(sv::aig-ash-ss place n shamt) → sh
Function:
(defun sv::aig-ash-ss (place n shamt) (declare (xargs :guard (and (posp place) (true-listp n) (true-listp shamt)))) (let ((__function__ 'sv::aig-ash-ss)) (declare (ignorable __function__)) (b* (((mv shdig shrst shend) (first/rest/end shamt)) (place (lposfix place)) ((when shend) (sv::aig-ite-bss shdig (sv::aig-logtail-ns 1 n) (sv::aig-logapp-nss (1- place) nil n))) (rst (sv::aig-ash-ss (* 2 place) n shrst))) (sv::aig-ite-bss shdig rst (sv::aig-logtail-ns place rst)))))
Theorem:
(defthm sv::true-listp-of-aig-ash-ss (b* ((sh (sv::aig-ash-ss place n shamt))) (true-listp sh)) :rule-classes :type-prescription)
Theorem:
(defthm sv::aig-ash-ss-correct (b* ((sh (sv::aig-ash-ss place n shamt))) (and (equal (sv::aig-list->s sh env) (ash (sv::aig-list->s n env) (+ -1 (pos-fix place) (* (pos-fix place) (sv::aig-list->s shamt env))))))))