• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
            • Loghead
            • Logrev
            • Logops-bit-functions
            • Logapp
            • Logtail
            • Logsat
            • Binary--
            • Logcdr
            • Logcar
            • Logbit
            • Logextu
            • Logcons
            • Lshu
            • Logrpl
            • Logappn
            • Ashu
            • Logmaskp
            • Lognotu
            • Logmask
            • Imod
            • Ifloor
            • Bfix
            • Bitmaskp
            • Logite
            • Expt2
            • Logsquash
              • 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
    • Logops-definitions

    Logsquash

    Squashes to 0 the lowest n bits of i.

    Signature
    (logsquash n i) → val
    Arguments
    n — Guard (natp n).
    i — Guard (integerp i).
    Returns
    val — Type (integerp val).

    Definitions and Theorems

    Function: logsquash$inline

    (defun logsquash$inline (n i)
      (declare (xargs :guard (and (natp n) (integerp i))))
      (let ((__function__ 'logsquash))
        (declare (ignorable __function__))
        (logand i (ash -1 (nfix n)))))

    Theorem: integerp-of-logsquash

    (defthm integerp-of-logsquash
      (b* ((val (logsquash$inline n i)))
        (integerp val))
      :rule-classes :type-prescription)