• 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
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
        • Riscv
        • Bitcoin
        • Zcash
        • Yul
          • Transformations
          • Language
            • Abstract-syntax
              • Escape
              • Swcase-list->value-list
              • Hex-digit-list->chars
              • Fundef-list->name-list
              • Literal
              • Path
              • Hex-string-rest-element
              • Plain-string
              • String-element
              • Hex-string-content-option
              • Hex-string-content
              • Identifier
              • Funcall-option
              • Expression-option
              • Statement-option
              • Literal-option
              • Identifier-option
              • Hex-string
              • Hex-quad
              • Hex-digit
              • Hex-pair
              • Data-value
              • Data-item
              • Statements-to-fundefs
              • String-element-list-result
              • Identifier-identifier-map-result
              • Swcase-result
              • String-element-result
              • Statement-result
              • Literal-result
              • Identifier-set-result
              • Identifier-result
              • Identifier-list-result
              • Fundef-result
              • Funcall-result
              • Expression-result
              • Escape-result
              • Path-result
              • Block-result
              • Objects
              • Statements/blocks/cases/fundefs
                • Statement
                  • Statement-case
                  • Statementp
                  • Statement-for
                    • Make-statement-for
                    • Statement-for->update
                    • Statement-for->test
                    • Statement-for->init
                    • Statement-for->body
                      • Change-statement-for
                    • Statement-equiv
                    • Statement-switch
                    • Statement-variable-single
                    • Statement-variable-multi
                    • Statement-if
                    • Statement-assign-single
                    • Statement-assign-multi
                    • Statement-kind
                    • Statement-fundef
                    • Statement-funcall
                    • Statement-block
                    • Statement-leave
                    • Statement-continue
                    • Statement-break
                    • Statement-fix
                    • Statement-count
                  • Fundef
                  • Block-option
                  • Block
                  • Swcase
                  • Swcase-list
                  • Statement-list
                • Identifier-list
                • Identifier-set
                • Identifier-identifier-map
                • Identifier-identifier-alist
                • Hex-string-rest-element-list
                • String-element-list
                • Path-list
                • Hex-digit-list
                • Literal-list
                • Fundef-list
                • Expressions/funcalls
                • Abstract-syntax-induction-schemas
              • Dynamic-semantics
              • Concrete-syntax
              • Static-soundness
              • Static-semantics
              • Errors
            • Yul-json
          • 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
    • Statement-for

    Statement-for->body

    Get the body field from a statement-for.

    Signature
    (statement-for->body x) → body
    Arguments
    x — Guard (statementp x).
    Returns
    body — Type (blockp body).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: statement-for->body$inline

    (defun statement-for->body$inline (x)
      (declare (xargs :guard (statementp x)))
      (declare (xargs :guard (equal (statement-kind x) :for)))
      (let ((__function__ 'statement-for->body))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and (equal (statement-kind x) :for)
                          x)))
               (block-fix (std::da-nth 3 (cdr x))))
             :exec (std::da-nth 3 (cdr x)))))

    Theorem: blockp-of-statement-for->body

    (defthm blockp-of-statement-for->body
      (b* ((body (statement-for->body$inline x)))
        (blockp body))
      :rule-classes :rewrite)

    Theorem: statement-for->body$inline-of-statement-fix-x

    (defthm statement-for->body$inline-of-statement-fix-x
      (equal (statement-for->body$inline (statement-fix x))
             (statement-for->body$inline x)))

    Theorem: statement-for->body$inline-statement-equiv-congruence-on-x

    (defthm statement-for->body$inline-statement-equiv-congruence-on-x
      (implies (statement-equiv x x-equiv)
               (equal (statement-for->body$inline x)
                      (statement-for->body$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: statement-for->body-when-wrong-kind

    (defthm statement-for->body-when-wrong-kind
      (implies (not (equal (statement-kind x) :for))
               (equal (statement-for->body x)
                      (block-fix nil))))