• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
            • Vl-interfaceportlist->ifnames
            • Vl-blockscope
            • Vl-scope-find-item
            • Vl-scopestack-find-item/ss/package
            • Vl-importlist-find-explicit-item
            • Vl-scopestack-find-item/context
            • Vl-importlist-find-implicit-item
            • Vl-import-stars-find-item
            • Vl-scopeinfo
            • Vl-importlist->explicit-item-alist
            • Vl-scopestack-find-definition/ss
            • Vl-scopeitem
              • Vl-scopeitem-p
              • Vl-scopeitem-fix
              • Vl-maybe-scopeitem
              • Vl-scopeitem-equiv
              • Vl-scopeitem-alist-count
              • Vl-scopeitem-alist
              • Vl-scopeitemlist
                • Vl-scopeitemlist-fix
                  • Vl-scopeitemlist-equiv
                  • Vl-scopeitemlist-p
              • Vl-scopestack-find-package/ss
              • Vl-scopestack
              • Vl-scopeinfo-find-item
              • Vl-scopestack-find-item/ss
              • Vl-scopestack-find-class/ss
              • Scopestack-constants
              • Vl-scope-namespace
              • Vl-maybe-scope
              • Vl-importresult
              • Vl-scopestack-push
              • Vl-import-stars-itemnames
              • Vl-scope->scopeinfo
              • Vl-scope-find-item-fast
              • Vl-interface-scope-find-item
              • Vl-genblob-scope-find-item
              • Vl-module-scope-find-item
              • Vl-design-scope-find-definition
              • Vl-scopestack-find-item
              • Vl-scopestack-find-definition
              • Vl-scopeinfo->itemnames
              • Vl-scope-find-portdecl
              • Vl-scope-find-definition
              • Vl-package-scope-find-item
              • Vl-interface-scope-find-portdecl
              • Vl-genblob-scope-find-portdecl
              • Vl-design-scope-find-item
              • Vl-blockscope-scope-find-item
              • Vl-scopestack-find-package
              • Vl-scope-find-package
              • Vl-module-scope-find-portdecl
              • Vl-design-scope-find-package
              • Vl-design-scope-find-class
              • Vl-class-scope-find-item
              • Vl-scopestack-find-class
              • Vl-scope-find-class
              • Vl-scopestack->hashkey
              • Vl-scope-find-portdecl-fast
              • Vl-package-scope-item-alist-top
              • Vl-scopestack->path-aux
              • Vl-scopedef
              • Vl-scope-portdecl-alist
              • Vl-scope-package-alist
              • Vl-scope-find-definition-fast
              • Vl-scope-definition-alist
              • Vl-scope-find-package-fast
              • Vl-scope-find-class-fast
              • Vl-scope-class-alist
              • Vl-scopestack->path
              • Vl-scopestack->design
              • Vl-scopeitem->name
              • Vl-scope
              • Vl-scopestack-init
              • Vl-importlist->star-packages
              • Vl-scopestack-pop
              • Vl-scopestack-nesting-level
              • Vl-scopestack->toplevel
              • Vl-scope->scopetype
              • Vl-scope->id
              • Vl-design-scope-package-alist-top
              • Vl-bindlist->modinsts
              • Vl-scopestack-toplevel-p
              • Vl-scopestacks-free
              • Vl-importresult-alist
            • Hid-tools
            • 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-scopeitemlist

    Vl-scopeitemlist-fix

    (vl-scopeitemlist-fix x) is a usual fty list fixing function.

    Signature
    (vl-scopeitemlist-fix x) → fty::newx
    Arguments
    x — Guard (vl-scopeitemlist-p x).
    Returns
    fty::newx — Type (vl-scopeitemlist-p fty::newx).

    In the logic, we apply vl-scopeitem-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.

    Definitions and Theorems

    Function: vl-scopeitemlist-fix$inline

    (defun vl-scopeitemlist-fix$inline (x)
      (declare (xargs :guard (vl-scopeitemlist-p x)))
      (let ((__function__ 'vl-scopeitemlist-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 x
               (cons (vl-scopeitem-fix (car x))
                     (vl-scopeitemlist-fix (cdr x))))
             :exec x)))

    Theorem: vl-scopeitemlist-p-of-vl-scopeitemlist-fix

    (defthm vl-scopeitemlist-p-of-vl-scopeitemlist-fix
      (b* ((fty::newx (vl-scopeitemlist-fix$inline x)))
        (vl-scopeitemlist-p fty::newx))
      :rule-classes :rewrite)

    Theorem: vl-scopeitemlist-fix-when-vl-scopeitemlist-p

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

    Function: vl-scopeitemlist-equiv$inline

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

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

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

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

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

    Theorem: vl-scopeitemlist-fix-under-vl-scopeitemlist-equiv

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

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

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

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

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

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

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

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

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

    Theorem: car-of-vl-scopeitemlist-fix-x-under-vl-scopeitem-equiv

    (defthm car-of-vl-scopeitemlist-fix-x-under-vl-scopeitem-equiv
      (vl-scopeitem-equiv (car (vl-scopeitemlist-fix acl2::x))
                          (car acl2::x)))

    Theorem: car-vl-scopeitemlist-equiv-congruence-on-x-under-vl-scopeitem-equiv

    (defthm
     car-vl-scopeitemlist-equiv-congruence-on-x-under-vl-scopeitem-equiv
     (implies (vl-scopeitemlist-equiv acl2::x x-equiv)
              (vl-scopeitem-equiv (car acl2::x)
                                  (car x-equiv)))
     :rule-classes :congruence)

    Theorem: cdr-of-vl-scopeitemlist-fix-x-under-vl-scopeitemlist-equiv

    (defthm cdr-of-vl-scopeitemlist-fix-x-under-vl-scopeitemlist-equiv
      (vl-scopeitemlist-equiv (cdr (vl-scopeitemlist-fix acl2::x))
                              (cdr acl2::x)))

    Theorem: cdr-vl-scopeitemlist-equiv-congruence-on-x-under-vl-scopeitemlist-equiv

    (defthm
     cdr-vl-scopeitemlist-equiv-congruence-on-x-under-vl-scopeitemlist-equiv
     (implies (vl-scopeitemlist-equiv acl2::x x-equiv)
              (vl-scopeitemlist-equiv (cdr acl2::x)
                                      (cdr x-equiv)))
     :rule-classes :congruence)

    Theorem: cons-of-vl-scopeitem-fix-x-under-vl-scopeitemlist-equiv

    (defthm cons-of-vl-scopeitem-fix-x-under-vl-scopeitemlist-equiv
      (vl-scopeitemlist-equiv (cons (vl-scopeitem-fix acl2::x)
                                    acl2::y)
                              (cons acl2::x acl2::y)))

    Theorem: cons-vl-scopeitem-equiv-congruence-on-x-under-vl-scopeitemlist-equiv

    (defthm
     cons-vl-scopeitem-equiv-congruence-on-x-under-vl-scopeitemlist-equiv
     (implies (vl-scopeitem-equiv acl2::x x-equiv)
              (vl-scopeitemlist-equiv (cons acl2::x acl2::y)
                                      (cons x-equiv acl2::y)))
     :rule-classes :congruence)

    Theorem: cons-of-vl-scopeitemlist-fix-y-under-vl-scopeitemlist-equiv

    (defthm cons-of-vl-scopeitemlist-fix-y-under-vl-scopeitemlist-equiv
      (vl-scopeitemlist-equiv
           (cons acl2::x (vl-scopeitemlist-fix acl2::y))
           (cons acl2::x acl2::y)))

    Theorem: cons-vl-scopeitemlist-equiv-congruence-on-y-under-vl-scopeitemlist-equiv

    (defthm
     cons-vl-scopeitemlist-equiv-congruence-on-y-under-vl-scopeitemlist-equiv
     (implies (vl-scopeitemlist-equiv acl2::y y-equiv)
              (vl-scopeitemlist-equiv (cons acl2::x acl2::y)
                                      (cons acl2::x y-equiv)))
     :rule-classes :congruence)

    Theorem: consp-of-vl-scopeitemlist-fix

    (defthm consp-of-vl-scopeitemlist-fix
      (equal (consp (vl-scopeitemlist-fix acl2::x))
             (consp acl2::x)))

    Theorem: vl-scopeitemlist-fix-of-cons

    (defthm vl-scopeitemlist-fix-of-cons
      (equal (vl-scopeitemlist-fix (cons a x))
             (cons (vl-scopeitem-fix a)
                   (vl-scopeitemlist-fix x))))

    Theorem: len-of-vl-scopeitemlist-fix

    (defthm len-of-vl-scopeitemlist-fix
      (equal (len (vl-scopeitemlist-fix acl2::x))
             (len acl2::x)))

    Theorem: vl-scopeitemlist-fix-of-append

    (defthm vl-scopeitemlist-fix-of-append
      (equal (vl-scopeitemlist-fix (append std::a std::b))
             (append (vl-scopeitemlist-fix std::a)
                     (vl-scopeitemlist-fix std::b))))

    Theorem: vl-scopeitemlist-fix-of-repeat

    (defthm vl-scopeitemlist-fix-of-repeat
      (equal (vl-scopeitemlist-fix (repeat acl2::n acl2::x))
             (repeat acl2::n (vl-scopeitem-fix acl2::x))))

    Theorem: nth-of-vl-scopeitemlist-fix

    (defthm nth-of-vl-scopeitemlist-fix
      (equal (nth acl2::n (vl-scopeitemlist-fix acl2::x))
             (if (< (nfix acl2::n) (len acl2::x))
                 (vl-scopeitem-fix (nth acl2::n acl2::x))
               nil)))

    Theorem: vl-scopeitemlist-equiv-implies-vl-scopeitemlist-equiv-append-1

    (defthm
         vl-scopeitemlist-equiv-implies-vl-scopeitemlist-equiv-append-1
      (implies (vl-scopeitemlist-equiv acl2::x fty::x-equiv)
               (vl-scopeitemlist-equiv (append acl2::x acl2::y)
                                       (append fty::x-equiv acl2::y)))
      :rule-classes (:congruence))

    Theorem: vl-scopeitemlist-equiv-implies-vl-scopeitemlist-equiv-append-2

    (defthm
         vl-scopeitemlist-equiv-implies-vl-scopeitemlist-equiv-append-2
      (implies (vl-scopeitemlist-equiv acl2::y fty::y-equiv)
               (vl-scopeitemlist-equiv (append acl2::x acl2::y)
                                       (append acl2::x fty::y-equiv)))
      :rule-classes (:congruence))

    Theorem: vl-scopeitemlist-equiv-implies-vl-scopeitemlist-equiv-nthcdr-2

    (defthm
         vl-scopeitemlist-equiv-implies-vl-scopeitemlist-equiv-nthcdr-2
      (implies (vl-scopeitemlist-equiv acl2::l l-equiv)
               (vl-scopeitemlist-equiv (nthcdr acl2::n acl2::l)
                                       (nthcdr acl2::n l-equiv)))
      :rule-classes (:congruence))

    Theorem: vl-scopeitemlist-equiv-implies-vl-scopeitemlist-equiv-take-2

    (defthm vl-scopeitemlist-equiv-implies-vl-scopeitemlist-equiv-take-2
      (implies (vl-scopeitemlist-equiv acl2::l l-equiv)
               (vl-scopeitemlist-equiv (take acl2::n acl2::l)
                                       (take acl2::n l-equiv)))
      :rule-classes (:congruence))