• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/osets
      • Std/io
      • Std/basic
      • Std/system
      • Std/typed-lists
      • Std/bitsets
        • Bitsets
          • Bitset-members
          • Bitset-insert
          • Bitset-delete
          • Bitset-intersectp
          • Bitset-intersect
            • Bitset-binary-intersect
            • Bitset-difference
            • Bitset-subsetp
            • Bitset-union
            • Bitset-memberp
            • Bitset-singleton
            • Bitset-list
            • Bitset-cardinality
            • Bitset-list*
            • Utilities
          • Sbitsets
          • Reasoning
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Bitset-intersect

    Bitset-binary-intersect

    Signature
    (bitset-binary-intersect x y) → bitset
    Arguments
    x — Guard (natp x).
    y — Guard (natp y).
    Returns
    bitset — Type (natp bitset).

    Definitions and Theorems

    Function: bitset-binary-intersect$inline

    (defun bitset-binary-intersect$inline (x y)
      (declare (type unsigned-byte x)
               (type unsigned-byte y))
      (declare (xargs :guard (and (natp x) (natp y))))
      (declare (xargs :split-types t))
      (let ((__function__ 'bitset-binary-intersect))
        (declare (ignorable __function__))
        (the unsigned-byte
             (logand (the unsigned-byte (lnfix x))
                     (the unsigned-byte (lnfix y))))))

    Theorem: natp-of-bitset-binary-intersect

    (defthm natp-of-bitset-binary-intersect
      (b* ((bitset (bitset-binary-intersect$inline x y)))
        (natp bitset))
      :rule-classes :type-prescription)