• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
        • Semantics
        • Abstract-syntax
          • Aexp
          • Bexp
            • Bexp-case
            • Bexp-fix
            • Bexpp
              • Bexp-count
              • Bexp-equiv
              • Bexp-less
              • Bexp-equal
              • Bexp-and
              • Bexp-const
              • Bexp-not
              • Bexp-kind
            • Comm
            • Comm-list
            • Command-fixtypes
          • Interpreter
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Bexp

    Bexpp

    Recognizer for bexp structures.

    Signature
    (bexpp x) → *

    Definitions and Theorems

    Function: bexpp

    (defun bexpp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'bexpp))
        (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))))
                           (booleanp value))))
                   ((eq (car x) :equal)
                    (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)))))
                   ((eq (car x) :less)
                    (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)))))
                   ((eq (car x) :not)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((arg (std::da-nth 0 (cdr x))))
                           (bexpp arg))))
                   (t (and (eq (car x) :and)
                           (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 (bexpp left) (bexpp right)))))))))

    Theorem: consp-when-bexpp

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