• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
        • Svstmt
        • Sv-tutorial
        • Expressions
          • Rewriting
          • Svex
          • Bit-blasting
          • Functions
            • 4vec-operations
            • 3vec-operations
              • 3vec-bit?
              • 3vec-?*
              • 3vec-?
              • 3vec-reduction-or
              • 3vec-reduction-and
              • 3vec-==
              • 3vec-bitxor
              • 3vec-bitor
              • 3vec-bitand
              • 3vec-bitnot
              • *svex-op-table*
            • 4vmask
            • Why-infinite-width
            • Svex-vars
            • Evaluation
            • Values
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • 3vec-operations

    3vec-bitnot

    Bitwise logical NOT of a 3vec.

    Signature
    (3vec-bitnot x) → ~x
    Arguments
    x — Guard (4vec-p x).
    Returns
    ~x — Type (4vec-p ~x).

    Definitions and Theorems

    Function: 3vec-bitnot

    (defun 3vec-bitnot (x)
      (declare (xargs :guard (4vec-p x)))
      (let ((__function__ '3vec-bitnot))
        (declare (ignorable __function__))
        (if-2vec-p (x)
                   (2vec (lognot (2vec->val x)))
                   (b* (((4vec x)))
                     (4vec (lognot x.lower)
                           (lognot x.upper))))))

    Theorem: 4vec-p-of-3vec-bitnot

    (defthm 4vec-p-of-3vec-bitnot
      (b* ((~x (3vec-bitnot x))) (4vec-p ~x))
      :rule-classes :rewrite)

    Theorem: 3vec-p-of-3vec-bitnot

    (defthm 3vec-p-of-3vec-bitnot
      (b* ((?~x (3vec-bitnot x)))
        (implies (3vec-p x) (3vec-p ~x))))

    Theorem: 3vec-bitnot-bits

    (defthm 3vec-bitnot-bits
      (implies (3vec-p x)
               (equal (4vec-idx->4v n (3vec-bitnot x))
                      (acl2::4v-not (4vec-idx->4v n x)))))

    Theorem: 3vec-bitnot-of-4vec-fix-x

    (defthm 3vec-bitnot-of-4vec-fix-x
      (equal (3vec-bitnot (4vec-fix x))
             (3vec-bitnot x)))

    Theorem: 3vec-bitnot-4vec-equiv-congruence-on-x

    (defthm 3vec-bitnot-4vec-equiv-congruence-on-x
      (implies (4vec-equiv x x-equiv)
               (equal (3vec-bitnot x)
                      (3vec-bitnot x-equiv)))
      :rule-classes :congruence)