• 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
      • Sidekick
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • 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
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
                • Expression
                • Syntax-abstraction
                • Statement
                  • Statement-case
                  • Statementp
                  • Statement-for
                  • Statement-equiv
                    • Statement-if
                    • Statement-increment
                    • Statement-decrement
                    • Statement-assign
                    • Statement-return
                    • Statement-let
                    • Statement-kind
                    • Statement-finalize
                    • Statement-const
                    • Statement-console
                    • Statement-block
                    • Statement-fix
                    • Statement-count
                  • Files
                  • Input-files
                  • Identifiers
                  • Types
                  • Struct-init
                  • Branch
                  • Statements
                  • Format-strings
                  • Input-syntax-abstraction
                  • Expressions
                  • Output-files
                  • Addresses
                  • Literals
                  • Characters
                  • Expression-list
                  • Statement-list
                  • Output-syntax-abstraction
                  • Struct-init-list
                  • Branch-list
                  • Annotations
                  • Abstract-syntax-trees
                  • Symbols
                  • Keywords
                  • Programs
                  • Packages
                  • Bit-sizes
                • Dynamic-semantics
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • 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)