• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
        • Abnf
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Prime-field-constraint-systems
        • Soft
        • Bv
        • Imp-language
        • Event-macros
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Java
        • C
        • Syntheto
        • Number-theory
        • Cryptography
        • Lists-light
        • File-io-light
        • Json
          • Parser-output-to-abstract-syntax
          • Abstract-syntax
            • Values
            • Object-member-values
            • Object-member-value?
            • Maybe-value
            • Object-member-value
            • Object-has-member-p
              • Object-member-values-aux
            • Concrete-syntax
            • Patbind-pattern
          • Built-ins
          • Solidity
          • Axe
          • Std-extensions
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Abstract-syntax

    Object-has-member-p

    Check if a JSON object has some member with a given name.

    Signature
    (object-has-member-p name object) → yes/no
    Arguments
    name — Guard (stringp name).
    object — Guard (valuep object).
    Returns
    yes/no — Type (booleanp yes/no).

    The member may not be unique, i.e. if there are multiple members with the same name, this predicate returns t.

    Definitions and Theorems

    Function: object-has-member-p

    (defun object-has-member-p (name object)
           (declare (xargs :guard (and (stringp name) (valuep object))))
           (declare (xargs :guard (value-case object :object)))
           (let ((__function__ 'object-has-member-p))
                (declare (ignorable __function__))
                (consp (object-member-values name object))))

    Theorem: booleanp-of-object-has-member-p

    (defthm booleanp-of-object-has-member-p
            (b* ((yes/no (object-has-member-p name object)))
                (booleanp yes/no))
            :rule-classes :rewrite)