Similar to a streaming concatenation operation in SystemVerilog.
BOZO document me.
Function:
(defun 4vec-rev-blocks (nbits blocksz x) (declare (xargs :guard (and (4vec-p nbits) (4vec-p blocksz) (4vec-p x)))) (let ((__function__ '4vec-rev-blocks)) (declare (ignorable __function__)) (if (and (2vec-p nbits) (<= 0 (2vec->val nbits)) (2vec-p blocksz) (< 0 (2vec->val blocksz))) (b* (((4vec x))) (4vec (rev-blocks (2vec->val nbits) (2vec->val blocksz) x.upper) (rev-blocks (2vec->val nbits) (2vec->val blocksz) x.lower))) (4vec-x))))
Theorem:
(defthm 4vec-p-of-4vec-rev-blocks (b* ((res (4vec-rev-blocks nbits blocksz x))) (4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm 4vec-rev-blocks-of-4vec-fix-nbits (equal (4vec-rev-blocks (4vec-fix nbits) blocksz x) (4vec-rev-blocks nbits blocksz x)))
Theorem:
(defthm 4vec-rev-blocks-4vec-equiv-congruence-on-nbits (implies (4vec-equiv nbits nbits-equiv) (equal (4vec-rev-blocks nbits blocksz x) (4vec-rev-blocks nbits-equiv blocksz x))) :rule-classes :congruence)
Theorem:
(defthm 4vec-rev-blocks-of-4vec-fix-blocksz (equal (4vec-rev-blocks nbits (4vec-fix blocksz) x) (4vec-rev-blocks nbits blocksz x)))
Theorem:
(defthm 4vec-rev-blocks-4vec-equiv-congruence-on-blocksz (implies (4vec-equiv blocksz blocksz-equiv) (equal (4vec-rev-blocks nbits blocksz x) (4vec-rev-blocks nbits blocksz-equiv x))) :rule-classes :congruence)
Theorem:
(defthm 4vec-rev-blocks-of-4vec-fix-x (equal (4vec-rev-blocks nbits blocksz (4vec-fix x)) (4vec-rev-blocks nbits blocksz x)))
Theorem:
(defthm 4vec-rev-blocks-4vec-equiv-congruence-on-x (implies (4vec-equiv x x-equiv) (equal (4vec-rev-blocks nbits blocksz x) (4vec-rev-blocks nbits blocksz x-equiv))) :rule-classes :congruence)