• 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
            • Svar
            • Least-fixpoint
            • Svex-p
            • Svex-select
              • Svex-select-staticify-assignment
              • Svex-select-fix
              • Svex-select-case
              • Svex-select-split-static
              • Svex-select-p
                • Svex-selects-merge
                • Svex-select-replace-indices
                • Svex-select-vars
                • Svex-select-to-svex-with-substitution
                • Svex-select-equiv
                • Svex-select-part
                • Svex-select-count
                • Svex-select-var
                • Svex-select-to-lhs
                • Svex-select-staticp
                • Svex-select-inner-var
                • Svex-select->indices
                • Svex-select-to-svex
                • Svex-select-inner-width
                • Svex-select->width
                • Svex-select-kind
              • Svex-alist
              • Svex-equiv
              • Svexlist
              • Svex-call
              • Fnsym
              • Svex-quote
              • Svex-var
              • Svcall-rw
              • Svcall
              • Svex-kind
              • Svcall*
              • Svex-fix
              • Svex-count
              • Svex-1z
              • Svex-1x
              • Svex-z
              • Svex-x
            • Bit-blasting
            • Functions
            • 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
    • Svex-select

    Svex-select-p

    Recognizer for svex-select structures.

    Signature
    (svex-select-p x) → *

    Definitions and Theorems

    Function: svex-select-p

    (defun svex-select-p (x)
     (declare (xargs :guard t))
     (let ((__function__ 'svex-select-p))
      (declare (ignorable __function__))
      (and
       (consp x)
       (cond
          ((or (atom x) (eq (car x) :var))
           (and (std::prod-consp (cdr x))
                (b* ((name (std::prod-car (cdr x)))
                     (width (std::prod-cdr (cdr x))))
                  (and (svar-p name) (natp width)))))
          (t (and (eq (car x) :part)
                  (and (std::prod-consp (cdr x))
                       (std::prod-consp (std::prod-cdr (cdr x))))
                  (b* ((lsb (std::prod-car (cdr x)))
                       (width (std::prod-car (std::prod-cdr (cdr x))))
                       (subexp (std::prod-cdr (std::prod-cdr (cdr x)))))
                    (and (svex-p lsb)
                         (natp width)
                         (svex-select-p subexp)))))))))

    Theorem: consp-when-svex-select-p

    (defthm consp-when-svex-select-p
      (implies (svex-select-p x) (consp x))
      :rule-classes :compound-recognizer)