• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
        • Svstmt
        • Sv-tutorial
        • Expressions
          • Rewriting
          • Svex
          • Bit-blasting
          • Functions
          • 4vmask
            • Svex-argmasks
              • Svmask-for-bitand
              • Svmask-for-signx
              • Svmask-for-bitxor
              • Svmask-for-concat
              • Svmask-for-bit?!
              • Svmask-for-bit?
              • Svmask-for-?!
              • Svmask-for-?
              • Svmask-for-?*
              • Svmask-for-==??
              • Svmask-for-rsh
              • Svmask-for-bitsel
              • Svmask-for-+
              • Svmask-for-override
              • Svmask-for-uand
              • Svmask-for-zerox
              • Svmask-for-safer-==?
              • Svmask-for-bitor
              • Svmask-for-partinst
              • 4vmasklist-len-fix
              • Svmask-for-==?
              • Svmask-for-xdet
              • Svmask-for-unfloat
              • 4vmask-all-or-none
              • Svmask-for-partsel
              • Svmask-for-offp
              • Svmask-for-bitnot
              • Svmask-for-===*
              • Svmask-for-===
              • Svmask-for-res
              • Svmask-for-onp
              • Svmask-for-blkrev
              • Svmask-for-resor
              • Svmask-for-resand
              • Svmask-for-pow
              • Svmask-for-onehot0
              • Svmask-for-onehot
              • Svmask-for-lsh
              • Svmask-for-id
              • Svmask-for-countones
              • Svmask-for-clog2
              • Svmask-for-/
              • Svmask-for-==
              • Svmask-for-<
              • Svmask-for-*
              • Svmask-for-%
              • Svmask-for-uxor
              • Svmask-for-uor
              • Svmask-for-u-
              • Svmask-for-b-
              • Unrev-block-index
              • Svmask-for-unknown-function
              • Sparseint-unrev-blocks
              • 4vmask-p
              • 4vmask-subsumes
              • 4veclist-mask
              • 4vec-mask-to-zero
              • 4vec-mask
              • 4vmasklist-subsumes
              • 4vmask-union
              • 4vec-mask?
              • 4vmask-equiv
              • 4vmask-fix
              • 4vmask-alist
              • 4veclist-mask?
              • 4vmasklist
              • 4vmask-empty
            • Why-infinite-width
            • Svex-vars
            • Evaluation
            • Values
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Svex-argmasks

    Sparseint-unrev-blocks

    Signature
    (sparseint-unrev-blocks nbits blocksz x) → res
    Arguments
    nbits — Guard (natp nbits).
    blocksz — Guard (posp blocksz).
    x — Guard (sparseint-p x).
    Returns
    res — Type (sparseint-p res).

    Definitions and Theorems

    Function: sparseint-unrev-blocks

    (defun sparseint-unrev-blocks (nbits blocksz x)
      (declare (xargs :guard (and (natp nbits)
                                  (posp blocksz)
                                  (sparseint-p x))))
      (let ((__function__ 'sparseint-unrev-blocks))
        (declare (ignorable __function__))
        (b* ((nbits (lnfix nbits))
             (blocksz (mbe :logic (pos-fix blocksz)
                           :exec blocksz))
             ((when (< nbits blocksz))
              (sparseint-concatenate nbits x 0))
             (next-nbits (- nbits blocksz))
             (rest (sparseint-unrev-blocks next-nbits blocksz x)))
          (sparseint-concatenate blocksz
                                 (sparseint-rightshift next-nbits x)
                                 rest))))

    Theorem: sparseint-p-of-sparseint-unrev-blocks

    (defthm sparseint-p-of-sparseint-unrev-blocks
      (b* ((res (sparseint-unrev-blocks nbits blocksz x)))
        (sparseint-p res))
      :rule-classes :rewrite)

    Theorem: sparseint-unrev-blocks-val

    (defthm sparseint-unrev-blocks-val
      (b* ((?res (sparseint-unrev-blocks nbits blocksz x)))
        (natp (sparseint-val res)))
      :rule-classes :type-prescription)