• 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
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
        • Transformations
        • Language
          • Abstract-syntax
          • Dynamic-semantics
            • Exec
            • Find-fun
            • Init-local
            • Write-vars-values
            • Add-vars-values
            • Add-funs
            • Eoutcome
            • Soutcome
            • Ensure-funscope-disjoint
            • Write-var-value
            • Restrict-vars
            • Add-var-value
            • Funinfo
            • Exec-top-block
            • Values
            • Cstate
            • Funinfo+funenv
            • Read-vars-values
            • Read-var-value
            • Funenv
            • Funscope-for-fundefs
            • Exec-path
            • Path-to-var
            • Funinfo+funenv-result
            • Exec-literal
            • Soutcome-result
            • Mode-set-result
            • Literal-evaluation
            • Funscope-result
            • Funinfo-result
            • Funenv-result
            • Eoutcome-result
            • Cstate-result
            • Paths-to-vars
            • Funinfo-for-fundef
            • Lstate
            • Funscope
              • Funscopep
              • Funscope-fix
              • Funscope-equiv
              • Mode-set
              • Modes
            • Concrete-syntax
            • Static-soundness
            • Static-semantics
            • Errors
          • Yul-json
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Funscope

    Funscope-equiv

    Basic equivalence relation for funscope structures.

    Definitions and Theorems

    Function: funscope-equiv$inline

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

    Theorem: funscope-equiv-is-an-equivalence

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

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

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

    Theorem: funscope-fix-under-funscope-equiv

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

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

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

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

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

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

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

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

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