• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • 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
          • Semantics
          • Abstract-syntax
            • Aexp
              • Aexp-case
              • Aexp-fix
              • Aexpp
                • Aexp-count
                • Aexp-equiv
                • Aexp-mul
                • Aexp-add
                • Aexp-var
                • Aexp-const
                • Aexp-kind
              • Bexp
              • Comm
              • Comm-list
              • Command-fixtypes
            • Interpreter
          • Event-macros
          • Java
          • 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
    • Aexp

    Aexpp

    Recognizer for aexp structures.

    Signature
    (aexpp x) → *

    Definitions and Theorems

    Function: aexpp

    (defun aexpp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'aexpp))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x) (eq (car x) :const))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((value (std::da-nth 0 (cdr x))))
                           (integerp value))))
                   ((eq (car x) :var)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((name (std::da-nth 0 (cdr x))))
                           (stringp name))))
                   ((eq (car x) :add)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 2)
                         (b* ((left (std::da-nth 0 (cdr x)))
                              (right (std::da-nth 1 (cdr x))))
                           (and (aexpp left) (aexpp right)))))
                   (t (and (eq (car x) :mul)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 2))
                           (b* ((left (std::da-nth 0 (cdr x)))
                                (right (std::da-nth 1 (cdr x))))
                             (and (aexpp left) (aexpp right)))))))))

    Theorem: consp-when-aexpp

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