• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
          • Scopestack
          • Filtering-by-name
          • Vl-namefactory
          • Substitution
          • Allexprs
          • Hid-tools
            • Following-hids
              • Vl-follow-hidexpr
              • Vl-partselect-type-top-dimension-replacement
              • Vl-hidindex-datatype-resolve-dims
              • Vl-follow-hidexpr-error
              • Vl-follow-hidexpr-dimscheck
              • Vl-index-find-type
              • Vl-follow-hidexpr-dimcheck
              • Vl-partselect-expr-type
              • Vl-ss-find-hidexpr-range!!
              • Vl-hidstep
                • Vl-hidstep-fix
                  • Vl-hidstep-equiv
                  • Make-vl-hidstep
                  • Vl-hidstep->item
                  • Change-vl-hidstep
                  • Vl-hidstep->ss
                  • Vl-hidstep-p
                • Vl-ss-find-hidexpr-range
                • Vl-genarrayblocklist-find-block
                • Vl-flatten-hidindex
                • Vl-hidexpr-resolved-p
                • Vl-flatten-hidexpr
                • Vl-hidindex-resolved-p
                • Vl-hidtrace
              • Vl-hidexpr-traverse-datatype
              • Abstract-hids
              • Vl-hidexpr-find-type
            • Vl-consteval
            • Range-tools
            • Lvalexprs
            • Hierarchy
            • Finding-by-name
            • Expr-tools
            • Expr-slicing
            • Stripping-functions
            • Stmt-tools
            • Modnamespace
            • Vl-parse-expr-from-str
            • Welltyped
            • Reordering-by-name
            • Flat-warnings
            • Genblob
            • Expr-building
            • Datatype-tools
            • Syscalls
            • Relocate
            • Expr-cleaning
            • Namemangle
            • Caremask
            • Port-tools
            • Lvalues
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-hidstep

    Vl-hidstep-fix

    Fixing function for vl-hidstep structures.

    Signature
    (vl-hidstep-fix x) → new-x
    Arguments
    x — Guard (vl-hidstep-p x).
    Returns
    new-x — Type (vl-hidstep-p new-x).

    Definitions and Theorems

    Function: vl-hidstep-fix$inline

    (defun vl-hidstep-fix$inline (x)
      (declare (xargs :guard (vl-hidstep-p x)))
      (let ((__function__ 'vl-hidstep-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((item (vl-scopeitem-fix (std::prod-car (cdr x))))
                  (ss (vl-scopestack-fix (std::prod-cdr (cdr x)))))
               (cons :vl-hidstep (std::prod-cons item ss)))
             :exec x)))

    Theorem: vl-hidstep-p-of-vl-hidstep-fix

    (defthm vl-hidstep-p-of-vl-hidstep-fix
      (b* ((new-x (vl-hidstep-fix$inline x)))
        (vl-hidstep-p new-x))
      :rule-classes :rewrite)

    Theorem: vl-hidstep-fix-when-vl-hidstep-p

    (defthm vl-hidstep-fix-when-vl-hidstep-p
      (implies (vl-hidstep-p x)
               (equal (vl-hidstep-fix x) x)))

    Function: vl-hidstep-equiv$inline

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

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

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

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

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

    Theorem: vl-hidstep-fix-under-vl-hidstep-equiv

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

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

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

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

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

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

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

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

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