• 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
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • 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
                  • 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
          • 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
    • Statement

    Statement-equiv

    Basic equivalence relation for statement structures.

    Definitions and Theorems

    Function: statement-equiv$inline

    (defun statement-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (statementp acl2::x)
                                  (statementp acl2::y))))
      (equal (statement-fix acl2::x)
             (statement-fix acl2::y)))

    Theorem: statement-equiv-is-an-equivalence

    (defthm statement-equiv-is-an-equivalence
      (and (booleanp (statement-equiv x y))
           (statement-equiv x x)
           (implies (statement-equiv x y)
                    (statement-equiv y x))
           (implies (and (statement-equiv x y)
                         (statement-equiv y z))
                    (statement-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: statement-equiv-implies-equal-statement-fix-1

    (defthm statement-equiv-implies-equal-statement-fix-1
      (implies (statement-equiv acl2::x x-equiv)
               (equal (statement-fix acl2::x)
                      (statement-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: statement-fix-under-statement-equiv

    (defthm statement-fix-under-statement-equiv
      (statement-equiv (statement-fix acl2::x)
                       acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-statement-fix-1-forward-to-statement-equiv

    (defthm equal-of-statement-fix-1-forward-to-statement-equiv
      (implies (equal (statement-fix acl2::x) acl2::y)
               (statement-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-statement-fix-2-forward-to-statement-equiv

    (defthm equal-of-statement-fix-2-forward-to-statement-equiv
      (implies (equal acl2::x (statement-fix acl2::y))
               (statement-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: statement-equiv-of-statement-fix-1-forward

    (defthm statement-equiv-of-statement-fix-1-forward
      (implies (statement-equiv (statement-fix acl2::x)
                                acl2::y)
               (statement-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: statement-equiv-of-statement-fix-2-forward

    (defthm statement-equiv-of-statement-fix-2-forward
      (implies (statement-equiv acl2::x (statement-fix acl2::y))
               (statement-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)