• 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
          • Atc
          • Language
          • Representation
          • Transformation-tools
            • Simpadd0
            • Deftrans
            • Splitgso
            • Constant-propagation
              • Value-to-expr
              • Const-prop-eval-impure-binop-expr
              • Env
                • Envp
                • Env-fix
                • Union-env
                • Env-equiv
                • Write-env
                • Declare-var-env
                • Read-env
                • Push-scope-env
                • In-scope-env
                • Pop-scope-env
                • Merge-block-env
                • Env-block
                  • Env-blockp
                    • Env-block-fix
                    • Env-block-equiv
                • Const-prop-eval-pure-binop-expr
                • Const-prop-filepath-transunit-map
                • Const-prop-eval-unop-expr
                • Const-prop-transunit-ensemble
                • Const-prop-fundef
                • Value-result-to-option
                • Const-prop-extdecl-list
                • Const-prop-extdecl
                • Zero-valuep
                • Iconst-to-value
                • Const-to-value
                • Expr-to-ident
                • Const-prop-transunit
                • Pure-binopp
                • Const-prop-initdeclor-list
                • Const-prop-initdeclor
                • Const-prop-structdeclor-list
                • Const-prop-structdecl-list
                • Const-prop-param-declon-list
                • Const-prop-initer-option
                • Const-prop-initer
                • Const-prop-expr-option
                • Const-prop-dirabsdeclor-option
                • Const-prop-dirabsdeclor
                • Const-prop-const-expr-option
                • Const-prop-absdeclor-option
                • Const-prop-type-spec
                • Const-prop-strunispec
                • Const-prop-structdeclor
                • Const-prop-structdecl
                • Const-prop-statassert
                • Const-prop-spec/qual-list
                • Const-prop-spec/qual
                • Const-prop-param-declor
                • Const-prop-param-declon
                • Const-prop-member-designor
                • Const-prop-genassoc-list
                • Const-prop-genassoc
                • Const-prop-expr-list
                • Const-prop-expr
                • Const-prop-enumspec
                • Const-prop-enumer-list
                • Const-prop-dirdeclor
                • Const-prop-desiniter-list
                • Const-prop-desiniter
                • Const-prop-designor-list
                • Const-prop-designor
                • Const-prop-declor-option
                • Const-prop-decl-spec-list
                • Const-prop-decl-spec
                • Const-prop-decl-list
                • Const-prop-block-item-list
                • Const-prop-align-spec
                • Const-prop-absdeclor
                • Const-prop-tyname
                • Const-prop-stmt
                • Const-prop-label
                • Const-prop-enumer
                • Const-prop-declor
                • Const-prop-decl
                • Const-prop-const-expr
                • Const-prop-block-item
              • Split-fn
              • Copy-fn
              • Specialize
              • Split-all-gso
              • Rename
              • Utilities
            • 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
    • Env-block

    Env-blockp

    Recognizer for env-block.

    Signature
    (env-blockp x) → *

    Definitions and Theorems

    Function: env-blockp

    (defun env-blockp (x)
      (declare (xargs :guard t))
      (if (atom x)
          (null x)
        (and (consp (car x))
             (identp (caar x))
             (c::value-optionp (cdar x))
             (or (null (cdr x))
                 (and (consp (cdr x))
                      (consp (cadr x))
                      (acl2::fast-<< (caar x) (caadr x))
                      (env-blockp (cdr x)))))))

    Theorem: booleanp-of-env-blockp

    (defthm booleanp-of-env-blockp
      (booleanp (env-blockp x)))

    Theorem: mapp-when-env-blockp

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

    Theorem: env-blockp-of-tail

    (defthm env-blockp-of-tail
      (implies (env-blockp x)
               (env-blockp (omap::tail x))))

    Theorem: identp-of-head-key-when-env-blockp

    (defthm identp-of-head-key-when-env-blockp
      (implies (and (env-blockp x)
                    (not (omap::emptyp x)))
               (identp (mv-nth 0 (omap::head x)))))

    Theorem: value-optionp-of-head-val-when-env-blockp

    (defthm value-optionp-of-head-val-when-env-blockp
      (implies (and (env-blockp x)
                    (not (omap::emptyp x)))
               (c::value-optionp (mv-nth 1 (omap::head x)))))

    Theorem: env-blockp-of-update

    (defthm env-blockp-of-update
      (implies (and (env-blockp x)
                    (identp k)
                    (c::value-optionp v))
               (env-blockp (omap::update k v x))))

    Theorem: env-blockp-of-update*

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

    Theorem: env-blockp-of-delete

    (defthm env-blockp-of-delete
      (implies (env-blockp x)
               (env-blockp (omap::delete k x))))

    Theorem: env-blockp-of-delete*

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

    Theorem: identp-when-assoc-env-blockp-binds-free-x

    (defthm identp-when-assoc-env-blockp-binds-free-x
      (implies (and (omap::assoc k x) (env-blockp x))
               (identp k)))

    Theorem: identp-of-car-of-assoc-env-blockp

    (defthm identp-of-car-of-assoc-env-blockp
      (implies (and (env-blockp x) (omap::assoc k x))
               (identp (car (omap::assoc k x)))))

    Theorem: value-optionp-of-cdr-of-assoc-env-blockp

    (defthm value-optionp-of-cdr-of-assoc-env-blockp
      (implies (and (env-blockp x) (omap::assoc k x))
               (c::value-optionp (cdr (omap::assoc k x)))))

    Theorem: value-optionp-of-lookup-when-env-blockp

    (defthm value-optionp-of-lookup-when-env-blockp
      (implies (and (env-blockp x) (omap::assoc k x))
               (c::value-optionp (omap::lookup k x))))