• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Types
            • Integer-formats-definitions
            • Computation-states
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
              • Tag-info
                • Tag-info-fix
                • Tag-info-case
                • Tag-info-equiv
                • Tag-infop
                  • Tag-info-struct
                  • Tag-info-union
                  • Tag-info-enum
                  • Tag-info-kind
                • Tag-info-option
                • Tag-env-add
                • Tag-env-option
                • Tag-info-struct-flexiblep
                • Tag-env-result
                • Tag-env-lookup
                • Tag-env
                • Tag-env-init
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Tag-info

    Tag-infop

    Recognizer for tag-info structures.

    Signature
    (tag-infop x) → *

    Definitions and Theorems

    Function: tag-infop

    (defun tag-infop (x)
      (declare (xargs :guard t))
      (and (consp x)
           (cond ((or (atom x) (eq (car x) :struct))
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 1)
                       (b* ((members (std::da-nth 0 (cdr x))))
                         (member-type-listp members))))
                 ((eq (car x) :union)
                  (and (true-listp (cdr x))
                       (eql (len (cdr x)) 0)
                       (b* nil t)))
                 (t (and (eq (car x) :enum)
                         (and (true-listp (cdr x))
                              (eql (len (cdr x)) 0))
                         (b* nil t))))))

    Theorem: consp-when-tag-infop

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