• 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
          • 4vmask
          • Why-infinite-width
          • Svex-vars
          • Evaluation
          • Values
            • 4vec
            • 4vec-<<=
            • 3vec
              • 3vec-fix
              • 3vec-equiv
              • 3vec-p!
              • 3vec-p
                • 3vec-fix-fast
              • 2vec
              • 2vecx
              • 2vecnatx
              • 4vec-x
              • 4vec-1x
              • 4vec-1z
              • 4vec-z
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • 3vec

    3vec-p

    Recognizer for 3vecs (with a 4vec-p guard).

    Signature
    (3vec-p x) → bool
    Arguments
    x — Guard (4vec-p x).

    Definitions and Theorems

    Function: 3vec-p

    (defun 3vec-p (x)
      (declare (xargs :guard (4vec-p x)))
      (let ((__function__ '3vec-p))
        (declare (ignorable __function__))
        (mbe :logic
             (b* (((4vec x) x))
               (eql (logand x.lower (lognot x.upper))
                    0))
             :exec
             (if (atom x)
                 t
               (b* (((4vec x) x))
                 (eql (logandc2 x.lower x.upper) 0))))))

    Theorem: 3vec-p-implies-bits

    (defthm 3vec-p-implies-bits
      (and (implies (and (3vec-p x)
                         (not (logbitp n (4vec->upper x))))
                    (not (logbitp n (4vec->lower x))))
           (implies (and (3vec-p x)
                         (logbitp n (4vec->lower x)))
                    (logbitp n (4vec->upper x)))))