• 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
              • Dynamic-semantics
              • Compilation
              • Static-semantics
                • Type-checking
                • Static-environments
                • Curve-parameterization
                • Function-recursion
                • Struct-recursion
                • Input-checking
                • Program-checking
                  • Api
                  • Lookup-main-function
                  • Api+senv
                    • Api+senv-fix
                    • Api+senv-equiv
                      • Make-api+senv
                      • Change-api+senv
                      • Api+senv->senv
                      • Api+senv->api
                      • Api+senv-p
                    • Check-program
                    • Api+senv-result
                    • Api-result
                  • Type-maps-for-struct-components
                  • Program-and-input-checking
                  • Output-checking
                • 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
    • Api+senv

    Api+senv-equiv

    Basic equivalence relation for api+senv structures.

    Definitions and Theorems

    Function: api+senv-equiv$inline

    (defun api+senv-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (api+senv-p acl2::x)
                                  (api+senv-p acl2::y))))
      (equal (api+senv-fix acl2::x)
             (api+senv-fix acl2::y)))

    Theorem: api+senv-equiv-is-an-equivalence

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

    Theorem: api+senv-equiv-implies-equal-api+senv-fix-1

    (defthm api+senv-equiv-implies-equal-api+senv-fix-1
      (implies (api+senv-equiv acl2::x x-equiv)
               (equal (api+senv-fix acl2::x)
                      (api+senv-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: api+senv-fix-under-api+senv-equiv

    (defthm api+senv-fix-under-api+senv-equiv
      (api+senv-equiv (api+senv-fix acl2::x)
                      acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-api+senv-fix-1-forward-to-api+senv-equiv

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

    Theorem: equal-of-api+senv-fix-2-forward-to-api+senv-equiv

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

    Theorem: api+senv-equiv-of-api+senv-fix-1-forward

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

    Theorem: api+senv-equiv-of-api+senv-fix-2-forward

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