• 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
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
          • Process-syntheto-toplevel-fn
          • Translation
          • Language
            • Static-semantics
            • Abstract-syntax
              • Expression
              • Expression-sum-field-list
              • Type
              • Binary-op
              • Expression-product-field-list
              • Abstract-syntax-operations
              • Function-definition-list->header-list
              • Type-definition-list->name-list
              • Initializer-list->value-list
              • Function-header-list->name-list
              • Typed-variable-list->type-list
              • Typed-variable-list->name-list
              • Branch-list->condition-list
              • Alternative-list->name-list
              • Function-specifier
              • Expression-variable-list
              • Type-subset
              • Field-list->type-list
              • Field-list->name-list
              • Function-specification
              • Identifier
              • Toplevel
              • Function-definer
              • Function-header
              • Type-definer
              • Literal
              • Type-product
              • Function-definition
              • Type-sum
              • Maybe-expression
              • Transform-argument-value
              • Transform
              • Theorem
              • Quantifier
              • Maybe-function-specification
              • Maybe-typed-variable
              • Maybe-type-definition
              • Maybe-function-header
              • Maybe-function-definition
              • Maybe-type-sum
              • Maybe-type-subset
              • Maybe-type-product
              • Maybe-type-definer
              • Maybe-theorem
              • Maybe-type
              • Initializer
              • Type-definition
              • Alternative
              • Unary-op
              • Typed-variable
              • Branch
                • Branch-equiv
                  • Make-branch
                  • Branch->condition
                  • Change-branch
                  • Branch->action
                  • Branchp
                  • Branch-fix
                  • Branch-count
                • Field
                • Transform-argument
                • Type-recursion
                • Program
                • Function-recursion
                • Typed-variable-list
                • Toplevel-name
                • Toplevel-list
                • Initializer-list
                • Expression-fixtypes
                  • Expression
                  • Initializer
                  • Branch
                    • Branch-equiv
                      • Make-branch
                      • Branch->condition
                      • Change-branch
                      • Branch->action
                      • Branchp
                      • Branch-fix
                      • Branch-count
                    • Initializer-list
                    • Expression-list
                    • Branch-list
                  • Toplevel-fn-names
                  • Lookup-transform-argument
                  • Function-definition-names
                  • Type-definition-list
                  • Transform-argument-list
                  • Function-header-list
                  • Function-definition-list
                  • Alternative-list
                  • Type-list
                  • Identifier-set
                  • Identifier-list
                  • Field-list
                  • Expression-list
                  • Branch-list
                  • Extract-default-param-alist
                  • Create-arg-defaults-table
                • Outcome
                • Abstract-syntax-operations
                • Outcome-list
                • Outcomes
              • Process-syntheto-toplevel
              • Shallow-embedding
            • File-io-light
            • Cryptography
            • Number-theory
            • Lists-light
            • Axe
            • Builtins
            • Solidity
            • Helpers
            • Htclient
            • Typed-lists-light
            • Arithmetic-light
          • X86isa
          • Axe
          • Execloader
        • Math
        • Testing-utilities
      • Branch

      Branch-equiv

      Basic equivalence relation for branch structures.

      Definitions and Theorems

      Function: branch-equiv$inline

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

      Theorem: branch-equiv-is-an-equivalence

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

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

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

      Theorem: branch-fix-under-branch-equiv

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

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

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

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

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

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

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

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

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