• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
          • Atj
            • Atj-implementation
              • Atj-types
              • Atj-java-primitive-array-model
              • Atj-java-abstract-syntax
              • Atj-input-processing
              • Atj-java-pretty-printer
                • Jexpr-rank
                  • Jexpr-rank-fix
                  • Jexpr-rank-case
                  • Jexpr-rankp
                    • Jexpr-rank-equiv
                    • Jexpr-rank-kind
                    • Jexpr-rank-unary
                    • Jexpr-rank-shift
                    • Jexpr-rank-relational
                    • Jexpr-rank-primary
                    • Jexpr-rank-postfix
                    • Jexpr-rank-multiplicative
                    • Jexpr-rank-inclusive-or
                    • Jexpr-rank-expression
                    • Jexpr-rank-exclusive-or
                    • Jexpr-rank-equality
                    • Jexpr-rank-conditional-or
                    • Jexpr-rank-conditional-and
                    • Jexpr-rank-conditional
                    • Jexpr-rank-assignment
                    • Jexpr-rank-and
                    • Jexpr-rank-additive
                  • Print-jexprs
                  • Print-jchar
                  • Print-jstatems+jblocks
                  • Print-jclasses+jcmembers
                  • Jbinop-expected-ranks
                  • Jexpr->rank
                  • Jexpr-rank-<=
                  • Print-jexpr
                  • Print-optional-integer-type-suffix
                  • Print-octdig/uscore-list
                  • Print-oct-integer-literal
                  • Print-jcunit
                  • Print-hexdig/uscore-list
                  • Print-hex-integer-literal
                  • Print-decdig/uscore-list
                  • Print-dec-integer-literal
                  • Print-bindig/uscore-list
                  • Print-bin-integer-literal
                  • Print-integer-literal
                  • Print-octdig/uscore
                  • Print-jmethod
                  • Print-jfield
                  • Print-hexdig/uscore
                  • Print-decdig/uscore
                  • Print-bindig/uscore
                  • Print-jclass-list
                  • Print-jlocvar
                  • Print-jliteral
                  • Print-jcinitializer
                  • Print-jline
                  • Print-jimports
                  • Print-jchars
                  • Print-comma-sep
                  • Print-jimport
                  • Print-jbinop
                  • Print-primitive-type
                  • Print-jparam-list
                  • Print-jlines-to-channel
                  • Jexpr-rank-index
                  • Atj-indent
                  • Print-to-jfile
                  • Print-jparam
                  • Print-jaccess
                  • Print-oct-digit
                  • Print-junop
                  • Print-jtype
                  • Print-jresult
                  • Print-hex-digit
                  • Print-dec-digit
                  • Print-bin-digit
                  • Print-jline-blank
                • Atj-code-generation
                • Atj-java-primitives
                • Atj-java-primitive-arrays
                • Atj-type-macros
                • Atj-java-syntax-operations
                • Atj-fn
                • Atj-library-extensions
                • Atj-java-input-types
                • Atj-test-structures
                • Aij-notions
                • Atj-macro-definition
              • Atj-tutorial
            • Aij
            • Language
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Jexpr-rank

    Jexpr-rankp

    Recognizer for jexpr-rank structures.

    Signature
    (jexpr-rankp x) → *

    Definitions and Theorems

    Function: jexpr-rankp

    (defun jexpr-rankp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'jexpr-rankp))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x) (eq (car x) :expression))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :assignment)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :conditional)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :conditional-or)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :conditional-and)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :inclusive-or)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :exclusive-or)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :and)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :equality)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :relational)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :shift)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :additive)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :multiplicative)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :unary)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :postfix)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   (t (and (eq (car x) :primary)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 0))
                           (b* nil t)))))))

    Theorem: consp-when-jexpr-rankp

    (defthm consp-when-jexpr-rankp
      (implies (jexpr-rankp x) (consp x))
      :rule-classes :compound-recognizer)