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

Bitset-union

(bitset-union X Y ...) constructs the set X U Y U ....

Definitions and Theorems

Function: bitset-binary-union$inline

(defun bitset-binary-union$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-union))
            (declare (ignorable __function__))
            (the unsigned-byte
                 (logior (the unsigned-byte (lnfix x))
                         (the unsigned-byte (lnfix y))))))

Theorem: natp-of-bitset-binary-union

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

Theorem: bitset-union-when-not-natp-left

(defthm bitset-union-when-not-natp-left
        (implies (not (natp x))
                 (equal (bitset-union x y) (nfix y))))

Theorem: bitset-union-when-not-natp-right

(defthm bitset-union-when-not-natp-right
        (implies (not (natp y))
                 (equal (bitset-union x y) (nfix x))))

Theorem: bitset-union-of-nfix-left

(defthm bitset-union-of-nfix-left
        (equal (bitset-union (nfix x) y)
               (bitset-union x y)))

Theorem: bitset-union-of-nfix-right

(defthm bitset-union-of-nfix-right
        (equal (bitset-union x (nfix y))
               (bitset-union x y)))

Theorem: bitset-members-of-bitset-union

(defthm bitset-members-of-bitset-union
        (equal (bitset-members (bitset-union x y))
               (union (bitset-members x)
                      (bitset-members y))))

Subtopics

Bitset-binary-union