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