• 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
            • Step
            • Write-var
            • Outcome
            • Beval
            • Read-var
            • Config
            • Terminatingp
            • Aeval
            • Step*
            • Stepn
            • Env
              • Envp
                • Env-fix
                • Env-equiv
            • Abstract-syntax
            • 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
    • Env

    Envp

    Recognizer for env.

    Signature
    (envp x) → *

    Definitions and Theorems

    Function: envp

    (defun envp (x)
      (declare (xargs :guard t))
      (if (atom x)
          (null x)
        (and (consp (car x))
             (stringp (caar x))
             (integerp (cdar x))
             (or (null (cdr x))
                 (and (consp (cdr x))
                      (consp (cadr x))
                      (acl2::fast-<< (caar x) (caadr x))
                      (envp (cdr x)))))))

    Theorem: booleanp-of-envp

    (defthm booleanp-of-envp
      (booleanp (envp x)))

    Theorem: mapp-when-envp

    (defthm mapp-when-envp
      (implies (envp x) (omap::mapp x))
      :rule-classes (:rewrite :forward-chaining))

    Theorem: envp-of-tail

    (defthm envp-of-tail
      (implies (envp x)
               (envp (omap::tail x))))

    Theorem: stringp-of-head-key-when-envp

    (defthm stringp-of-head-key-when-envp
      (implies (and (envp x) (not (omap::emptyp x)))
               (stringp (mv-nth 0 (omap::head x)))))

    Theorem: integerp-of-head-val-when-envp

    (defthm integerp-of-head-val-when-envp
      (implies (and (envp x) (not (omap::emptyp x)))
               (integerp (mv-nth 1 (omap::head x)))))

    Theorem: envp-of-update

    (defthm envp-of-update
      (implies (and (envp x) (stringp k) (integerp v))
               (envp (omap::update k v x))))

    Theorem: envp-of-update*

    (defthm envp-of-update*
      (implies (and (envp x) (envp y))
               (envp (omap::update* x y))))

    Theorem: envp-of-delete

    (defthm envp-of-delete
      (implies (envp x)
               (envp (omap::delete k x))))

    Theorem: envp-of-delete*

    (defthm envp-of-delete*
      (implies (envp x)
               (envp (omap::delete* k x))))

    Theorem: stringp-when-assoc-envp-binds-free-x

    (defthm stringp-when-assoc-envp-binds-free-x
      (implies (and (omap::assoc k x) (envp x))
               (stringp k)))

    Theorem: stringp-of-car-of-assoc-envp

    (defthm stringp-of-car-of-assoc-envp
      (implies (and (envp x) (omap::assoc k x))
               (stringp (car (omap::assoc k x)))))

    Theorem: integerp-of-cdr-of-assoc-envp

    (defthm integerp-of-cdr-of-assoc-envp
      (implies (and (envp x) (omap::assoc k x))
               (integerp (cdr (omap::assoc k x)))))

    Theorem: integerp-of-lookup-when-envp

    (defthm integerp-of-lookup-when-envp
      (implies (and (envp x) (omap::assoc k x))
               (integerp (omap::lookup k x))))