• 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
          • Syntax-for-tools
            • Disambiguator
            • Abstract-syntax
            • Parser
            • Validator
            • Printer
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Defpred
            • Output-files
            • Abstract-syntax-operations
            • Validation-information
            • Implementation-environments
              • Ienv
                • Ienvp
                  • Ienv-fix
                  • Make-ienv
                  • Ienv->short-bytes
                  • Ienv->llong-bytes
                  • Ienv-equiv
                  • Ienv->long-bytes
                  • Ienv->int-bytes
                  • Ienv->plain-char-signedp
                  • Change-ienv
                • Ushort-rangep
                • Ullong-rangep
                • Sshort-rangep
                • Sllong-rangep
                • Ulong-rangep
                • Uint-rangep
                • Slong-rangep
                • Sint-rangep
                • Ushort-max
                • Ulong-max
                • Ullong-max
                • Uint-max
                • Uchar-rangep
                • Sshort-min
                • Sllong-min
                • Schar-rangep
                • Char-min
                • Char-max
                • Sshort-max
                • Slong-min
                • Slong-max
                • Sllong-max
                • Sint-min
                • Sint-max
                • Uchar-max
                • Schar-min
                • Schar-max
                • Ienv-default
              • Concrete-syntax
              • Unambiguity
              • Ascii-identifiers
              • Preprocessing
              • Abstraction-mapping
            • Atc
            • Language
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • 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
    • Ienv

    Ienvp

    Recognizer for ienv structures.

    Signature
    (ienvp x) → *

    Definitions and Theorems

    Function: ienvp

    (defun ienvp (x)
     (declare (xargs :guard t))
     (let ((__function__ 'ienvp))
      (declare (ignorable __function__))
      (and
        (mbe :logic
             (and (alistp x)
                  (equal (strip-cars x)
                         '(short-bytes int-bytes long-bytes
                                       llong-bytes plain-char-signedp)))
             :exec (fty::alist-with-carsp
                        x
                        '(short-bytes int-bytes long-bytes
                                      llong-bytes plain-char-signedp)))
        (b* ((short-bytes (cdr (std::da-nth 0 x)))
             (int-bytes (cdr (std::da-nth 1 x)))
             (long-bytes (cdr (std::da-nth 2 x)))
             (llong-bytes (cdr (std::da-nth 3 x)))
             (plain-char-signedp (cdr (std::da-nth 4 x))))
          (and (posp short-bytes)
               (posp int-bytes)
               (posp long-bytes)
               (posp llong-bytes)
               (booleanp plain-char-signedp)
               (<= short-bytes int-bytes)
               (<= int-bytes long-bytes)
               (<= long-bytes llong-bytes)
               (<= 2 short-bytes)
               (<= 4 int-bytes)
               (<= 8 long-bytes)
               (<= 8 llong-bytes))))))

    Theorem: consp-when-ienvp

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