• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
          • Scopestack
          • Hid-tools
            • Vl-follow-hidexpr
            • Vl-index-expr-typetrace
            • Vl-follow-scopeexpr
            • Vl-follow-hidexpr-dimscheck
            • Vl-datatype-resolve-selects
            • Vl-datatype-remove-dim
            • Vl-operandinfo
            • Vl-follow-hidexpr-dimcheck
            • Vl-follow-data-selects
            • Vl-follow-hidexpr-error
            • Vl-hidstep
            • Vl-scopestack-find-item/ss/path
            • Vl-follow-array-indices
            • Vl-scopecontext
              • Vl-scopecontext-fix
              • Vl-scopecontext-case
              • Vl-scopecontext-equiv
                • Vl-scopecontext-p
                • Vl-scopecontext-local
                • Vl-scopecontext-package
                • Vl-scopecontext-module
                • Vl-scopecontext-interface
                • Vl-scopecontext-class
                • Vl-scopecontext-kind
                • Vl-scopecontext-root
              • Vl-datatype-set-unsigned
              • Vl-selstep
              • Vl-scopestack-find-elabpath
              • Vl-hid-prefix-for-subhid
              • Vl-find-structmember
              • Vl-select
              • Vl-scopeexpr-replace-hid
              • Vl-genblocklist-find-block
              • Vl-partselect-width
              • Vl-seltrace->indices
              • Vl-datatype->structmembers
              • Vl-hidexpr-resolved-p
              • Vl-operandinfo->indices
              • Vl-flatten-hidindex
              • Vl-subhid-p
              • Vl-seltrace-usertypes-ok
              • Vl-flatten-hidexpr
              • Vl-scopeexpr->hid
              • Vl-seltrace-index-count
              • Vl-operandinfo-usertypes-ok
              • Vl-operandinfo-index-count
              • Vl-datatype-dims-count
              • Vl-scopeexpr-index-count
              • Vl-hidexpr-index-count
              • Vl-usertype-lookup
              • Vl-hidindex-resolved-p
              • Vl-scopeexpr-resolved-p
              • Vl-selstep-usertypes-ok
              • Vl-hidtrace
              • Vl-seltrace
              • Vl-scopedef-interface-p
            • Filtering-by-name
            • Vl-interface-mocktype
            • Stripping-functions
            • Genblob
            • Expr-tools
            • Extract-vl-types
            • Hierarchy
            • Range-tools
            • Finding-by-name
            • Stmt-tools
            • Modnamespace
            • Flat-warnings
            • Reordering-by-name
            • Datatype-tools
            • Syscalls
            • Allexprs
            • Lvalues
            • Port-tools
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-scopecontext

    Vl-scopecontext-equiv

    Basic equivalence relation for vl-scopecontext structures.

    Definitions and Theorems

    Function: vl-scopecontext-equiv$inline

    (defun vl-scopecontext-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (vl-scopecontext-p acl2::x)
                                  (vl-scopecontext-p acl2::y))))
      (equal (vl-scopecontext-fix acl2::x)
             (vl-scopecontext-fix acl2::y)))

    Theorem: vl-scopecontext-equiv-is-an-equivalence

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

    Theorem: vl-scopecontext-equiv-implies-equal-vl-scopecontext-fix-1

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

    Theorem: vl-scopecontext-fix-under-vl-scopecontext-equiv

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

    Theorem: equal-of-vl-scopecontext-fix-1-forward-to-vl-scopecontext-equiv

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

    Theorem: equal-of-vl-scopecontext-fix-2-forward-to-vl-scopecontext-equiv

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

    Theorem: vl-scopecontext-equiv-of-vl-scopecontext-fix-1-forward

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

    Theorem: vl-scopecontext-equiv-of-vl-scopecontext-fix-2-forward

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