• 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
            • Loghead
            • Logops-bit-functions
            • Logtail
            • Logapp
            • Logsat
            • Binary--
            • Logcdr
            • Logcar
            • Logbit
            • Logextu
            • Logcons
            • Lshu
            • Logrpl
            • Ashu
            • Logmaskp
              • Ihs/logmaskp-lemmas
                • 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
    • Logmaskp
    • Logops-lemmas

    Ihs/logmaskp-lemmas

    Lemmas about logmaskp from the logops-lemmas book.

    Definitions and Theorems

    Theorem: logmaskp-expt-2-n-minus-1

    (defthm logmaskp-expt-2-n-minus-1
      (implies (and (force (integerp n)) (>= n 0))
               (logmaskp (+ -1 (expt 2 n)))))

    Theorem: logmaskp-logmask

    (defthm logmaskp-logmask
      (implies (logmask-guard n)
               (logmaskp (logmask n))))

    Theorem: logand-with-mask

    (defthm logand-with-mask
      (implies (and (logmaskp mask)
                    (equal size (integer-length mask))
                    (force (integerp i)))
               (equal (logand mask i)
                      (loghead size i))))