• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
      • 100-theorems
      • Arithmetic
      • Bit-vectors
        • Sparseint
        • Bitops
        • Bv
        • Ihs
          • Logops-definitions
            • Logops-byte-functions
            • Defword
            • Defbytetype
            • Logext
            • Logrev
              • Logrev1
                • Bitops/fast-logrev
                • Logrev-basics
              • Loghead
              • Logops-bit-functions
              • Logtail
              • Logapp
              • Logsat
              • Binary--
              • Logcdr
              • Logcar
              • Logbit
              • Logextu
              • Logcons
              • Lshu
              • Logrpl
              • Ashu
              • Logmaskp
              • Lognotu
              • Logmask
              • Imod
              • Ifloor
              • Bfix
              • Bitmaskp
              • Logite
              • Expt2
              • Zbp
              • *logops-functions*
              • Word/bit-macros
              • Logops-definitions-theory
              • Logops-functions
              • Lbfix
              • Logextu-guard
              • Lshu-guard
              • Logtail-guard
              • Logrpl-guard
              • Logrev-guard
              • Lognotu-guard
              • Logmask-guard
              • Loghead-guard
              • Logext-guard
              • Logbit-guard
              • Logapp-guard
              • Ashu-guard
            • Math-lemmas
            • Ihs-theories
            • Ihs-init
            • Logops
          • Rtl
        • Algebra
      • Testing-utilities
    • Logrev

    Logrev1

    Helper function for logrev.

    Signature
    (logrev1 size i j) → nat
    Arguments
    size — Guard (and (integerp size) (<= 0 size)).
    i — Guard (integerp i).
    j — Guard (integerp j).

    Definitions and Theorems

    Function: logrev1

    (defun logrev1 (size i j)
      (declare (xargs :guard (and (and (integerp size) (<= 0 size))
                                  (integerp i)
                                  (integerp j))))
      (declare (type unsigned-byte size)
               (type integer i j))
      (declare (xargs :split-types t))
      (let ((__function__ 'logrev1))
        (declare (ignorable __function__))
        (if (zp size)
            (mbe :logic (ifix j) :exec j)
          (logrev1 (the unsigned-byte (- size 1))
                   (logcdr i)
                   (logcons (logcar i) j)))))