• 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
        • Transforms
          • Unparameterization
          • Elaborate
          • Addnames
          • Annotate
            • Increment-elim
            • Make-implicit-wires
              • Shadowcheck
                • Vl-shadowcheck-genelement
                • Vl-shadowcheck-reference-name
                • Vl-shadowcheck-declare-name
                • Deltemps
                • Vl-shadowcheck-modelement
                • Vl-lexscope
                • Vl-shadowcheck-reference-scopeexpr
                • Vl-shadowcheck-reference-names
                • Vl-shadowcheck-declare-names
                • Vl-shadowcheck-paramtype
                • Vl-shadowcheck-fun/task-loaditems
                • Vl-shadowcheck-fun/task-loaditem
                • Vl-shadowcheck-fundecl
                • Vl-shadowcheck-declare-typedefs
                • Vl-shadowcheck-blockitemlist
                • Vl-shadowcheck-portdecllist
                • Vl-shadowcheck-paramdecls
                • Vl-shadowcheck-dpiimports
                • Vl-shadowcheck-taskdecls
                • Vl-shadowcheck-taskdecl
                • Vl-shadowcheck-push-scope
                • Vl-shadowcheck-blockitem
                • Vl-shadowcheck-vardecls
                • Vl-shadowcheck-vardecl
                • Vl-shadowcheck-typedef
                • Vl-shadowcheck-portdecl
                • Vl-shadowcheck-paramdecl
                • Vl-shadowcheck-modport
                • Vl-shadowcheck-modinst
                • Vl-shadowcheck-imports
                • Vl-shadowcheck-import
                • Vl-shadowcheck-gateinst
                • Vl-shadowcheck-fundecls
                • Vl-shadowcheck-dpiimport
                • Vl-shadowcheck-ports
                • Vl-shadowcheck-port
                • Vl-shadowcheck-initial
                • Vl-shadowcheck-assign
                • Vl-shadowcheck-always
                • Vl-shadowcheck-final
                • Vl-shadowcheck-alias
                • Vl-shadowcheck-state
                • Vl-shadowcheck-module
                • Vl-shadowcheck-interface
                • Vl-shadowcheck-interfaces
                • Vl-shadowcheck-modules
                • Vl-packagemap-find-packages-for-name
                • Vl-shadowcheck-design
                • Vl-lexscopes
                • Vl-expr->maybe-subtype
                • Vl-shadowcheck-pop-scope
                • Nameclash
                • Vl-portdecl-or-blockitem
                • Vl-lexscope-decls
                • Vl-packagemap
                • Vl-portdecl-or-blockitem-list
                  • Vl-portdecl-or-blockitem-list-fix
                    • Vl-portdecl-or-blockitem-list-equiv
                    • Vl-portdecl-or-blockitem-list-p
                • Implicit-wires-minutia
                • Implicit-wires-generate-scoping
                • Vl-genbase-make-implicit-wires
                • Vl-expr-names-for-implicit
                • Vl-make-implicit-wires-main
                • Vl-implicitst
                • Vl-make-port-implicit-wires
                • Vl-import-update-implicit
                • Vl-blockitemlist-update-implicit
                • Vl-blockitem-update-implicit
                • Vl-make-ordinary-implicit-wires
                • Vl-remove-declared-wires
                • Vl-implicitsts-restore-fast-alists
                • Vl-genblock-under-cond-make-implicit-wires
                • Vl-collect-exprs-for-implicit-wires-from-namedargs
                • Vl-genblock-make-implicit-wires
                • Vl-collect-exprs-for-implicit-wires-from-portargs
                • Vl-collect-exprs-for-implicit-wires-from-namedarg
                • Vl-gateinst-exprs-for-implicit-wires
                • Vl-modinst-exprs-for-implicit-wires
                • Vl-genelementlist-make-implicit-wires
                • Vl-packagemap-find-name
              • Basic-bind-elim
              • Argresolve
              • Basicsanity
              • Portdecl-sign
              • Enum-names
              • Port-resolve
              • Udp-elim
              • Vl-annotate-design
              • Vl-annotate-module
            • Clean-warnings
            • Eliminitial
            • Custom-transform-hooks
            • Problem-modules
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-portdecl-or-blockitem-list

    Vl-portdecl-or-blockitem-list-fix

    (vl-portdecl-or-blockitem-list-fix x) is a usual fty list fixing function.

    Signature
    (vl-portdecl-or-blockitem-list-fix x) → fty::newx
    Arguments
    x — Guard (vl-portdecl-or-blockitem-list-p x).
    Returns
    fty::newx — Type (vl-portdecl-or-blockitem-list-p fty::newx).

    In the logic, we apply vl-portdecl-or-blockitem-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-portdecl-or-blockitem-list-fix$inline

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

    Theorem: vl-portdecl-or-blockitem-list-p-of-vl-portdecl-or-blockitem-list-fix

    (defthm
     vl-portdecl-or-blockitem-list-p-of-vl-portdecl-or-blockitem-list-fix
     (b* ((fty::newx (vl-portdecl-or-blockitem-list-fix$inline x)))
       (vl-portdecl-or-blockitem-list-p fty::newx))
     :rule-classes :rewrite)

    Theorem: vl-portdecl-or-blockitem-list-fix-when-vl-portdecl-or-blockitem-list-p

    (defthm
     vl-portdecl-or-blockitem-list-fix-when-vl-portdecl-or-blockitem-list-p
     (implies (vl-portdecl-or-blockitem-list-p x)
              (equal (vl-portdecl-or-blockitem-list-fix x)
                     x)))

    Function: vl-portdecl-or-blockitem-list-equiv$inline

    (defun vl-portdecl-or-blockitem-list-equiv$inline (acl2::x acl2::y)
     (declare
         (xargs :guard (and (vl-portdecl-or-blockitem-list-p acl2::x)
                            (vl-portdecl-or-blockitem-list-p acl2::y))))
     (equal (vl-portdecl-or-blockitem-list-fix acl2::x)
            (vl-portdecl-or-blockitem-list-fix acl2::y)))

    Theorem: vl-portdecl-or-blockitem-list-equiv-is-an-equivalence

    (defthm vl-portdecl-or-blockitem-list-equiv-is-an-equivalence
      (and (booleanp (vl-portdecl-or-blockitem-list-equiv x y))
           (vl-portdecl-or-blockitem-list-equiv x x)
           (implies (vl-portdecl-or-blockitem-list-equiv x y)
                    (vl-portdecl-or-blockitem-list-equiv y x))
           (implies (and (vl-portdecl-or-blockitem-list-equiv x y)
                         (vl-portdecl-or-blockitem-list-equiv y z))
                    (vl-portdecl-or-blockitem-list-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: vl-portdecl-or-blockitem-list-equiv-implies-equal-vl-portdecl-or-blockitem-list-fix-1

    (defthm
     vl-portdecl-or-blockitem-list-equiv-implies-equal-vl-portdecl-or-blockitem-list-fix-1
     (implies (vl-portdecl-or-blockitem-list-equiv acl2::x x-equiv)
              (equal (vl-portdecl-or-blockitem-list-fix acl2::x)
                     (vl-portdecl-or-blockitem-list-fix x-equiv)))
     :rule-classes (:congruence))

    Theorem: vl-portdecl-or-blockitem-list-fix-under-vl-portdecl-or-blockitem-list-equiv

    (defthm
     vl-portdecl-or-blockitem-list-fix-under-vl-portdecl-or-blockitem-list-equiv
     (vl-portdecl-or-blockitem-list-equiv
          (vl-portdecl-or-blockitem-list-fix acl2::x)
          acl2::x)
     :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-vl-portdecl-or-blockitem-list-fix-1-forward-to-vl-portdecl-or-blockitem-list-equiv

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

    Theorem: equal-of-vl-portdecl-or-blockitem-list-fix-2-forward-to-vl-portdecl-or-blockitem-list-equiv

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

    Theorem: vl-portdecl-or-blockitem-list-equiv-of-vl-portdecl-or-blockitem-list-fix-1-forward

    (defthm
     vl-portdecl-or-blockitem-list-equiv-of-vl-portdecl-or-blockitem-list-fix-1-forward
     (implies (vl-portdecl-or-blockitem-list-equiv
                   (vl-portdecl-or-blockitem-list-fix acl2::x)
                   acl2::y)
              (vl-portdecl-or-blockitem-list-equiv acl2::x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: vl-portdecl-or-blockitem-list-equiv-of-vl-portdecl-or-blockitem-list-fix-2-forward

    (defthm
     vl-portdecl-or-blockitem-list-equiv-of-vl-portdecl-or-blockitem-list-fix-2-forward
     (implies (vl-portdecl-or-blockitem-list-equiv
                   acl2::x
                   (vl-portdecl-or-blockitem-list-fix acl2::y))
              (vl-portdecl-or-blockitem-list-equiv acl2::x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: car-of-vl-portdecl-or-blockitem-list-fix-x-under-vl-portdecl-or-blockitem-equiv

    (defthm
     car-of-vl-portdecl-or-blockitem-list-fix-x-under-vl-portdecl-or-blockitem-equiv
     (vl-portdecl-or-blockitem-equiv
          (car (vl-portdecl-or-blockitem-list-fix acl2::x))
          (car acl2::x)))

    Theorem: car-vl-portdecl-or-blockitem-list-equiv-congruence-on-x-under-vl-portdecl-or-blockitem-equiv

    (defthm
     car-vl-portdecl-or-blockitem-list-equiv-congruence-on-x-under-vl-portdecl-or-blockitem-equiv
     (implies (vl-portdecl-or-blockitem-list-equiv acl2::x x-equiv)
              (vl-portdecl-or-blockitem-equiv (car acl2::x)
                                              (car x-equiv)))
     :rule-classes :congruence)

    Theorem: cdr-of-vl-portdecl-or-blockitem-list-fix-x-under-vl-portdecl-or-blockitem-list-equiv

    (defthm
     cdr-of-vl-portdecl-or-blockitem-list-fix-x-under-vl-portdecl-or-blockitem-list-equiv
     (vl-portdecl-or-blockitem-list-equiv
          (cdr (vl-portdecl-or-blockitem-list-fix acl2::x))
          (cdr acl2::x)))

    Theorem: cdr-vl-portdecl-or-blockitem-list-equiv-congruence-on-x-under-vl-portdecl-or-blockitem-list-equiv

    (defthm
     cdr-vl-portdecl-or-blockitem-list-equiv-congruence-on-x-under-vl-portdecl-or-blockitem-list-equiv
     (implies (vl-portdecl-or-blockitem-list-equiv acl2::x x-equiv)
              (vl-portdecl-or-blockitem-list-equiv (cdr acl2::x)
                                                   (cdr x-equiv)))
     :rule-classes :congruence)

    Theorem: cons-of-vl-portdecl-or-blockitem-fix-x-under-vl-portdecl-or-blockitem-list-equiv

    (defthm
     cons-of-vl-portdecl-or-blockitem-fix-x-under-vl-portdecl-or-blockitem-list-equiv
     (vl-portdecl-or-blockitem-list-equiv
          (cons (vl-portdecl-or-blockitem-fix acl2::x)
                acl2::y)
          (cons acl2::x acl2::y)))

    Theorem: cons-vl-portdecl-or-blockitem-equiv-congruence-on-x-under-vl-portdecl-or-blockitem-list-equiv

    (defthm
     cons-vl-portdecl-or-blockitem-equiv-congruence-on-x-under-vl-portdecl-or-blockitem-list-equiv
     (implies
          (vl-portdecl-or-blockitem-equiv acl2::x x-equiv)
          (vl-portdecl-or-blockitem-list-equiv (cons acl2::x acl2::y)
                                               (cons x-equiv acl2::y)))
     :rule-classes :congruence)

    Theorem: cons-of-vl-portdecl-or-blockitem-list-fix-y-under-vl-portdecl-or-blockitem-list-equiv

    (defthm
     cons-of-vl-portdecl-or-blockitem-list-fix-y-under-vl-portdecl-or-blockitem-list-equiv
     (vl-portdecl-or-blockitem-list-equiv
          (cons acl2::x
                (vl-portdecl-or-blockitem-list-fix acl2::y))
          (cons acl2::x acl2::y)))

    Theorem: cons-vl-portdecl-or-blockitem-list-equiv-congruence-on-y-under-vl-portdecl-or-blockitem-list-equiv

    (defthm
     cons-vl-portdecl-or-blockitem-list-equiv-congruence-on-y-under-vl-portdecl-or-blockitem-list-equiv
     (implies
          (vl-portdecl-or-blockitem-list-equiv acl2::y y-equiv)
          (vl-portdecl-or-blockitem-list-equiv (cons acl2::x acl2::y)
                                               (cons acl2::x y-equiv)))
     :rule-classes :congruence)

    Theorem: consp-of-vl-portdecl-or-blockitem-list-fix

    (defthm consp-of-vl-portdecl-or-blockitem-list-fix
      (equal (consp (vl-portdecl-or-blockitem-list-fix acl2::x))
             (consp acl2::x)))

    Theorem: vl-portdecl-or-blockitem-list-fix-of-cons

    (defthm vl-portdecl-or-blockitem-list-fix-of-cons
      (equal (vl-portdecl-or-blockitem-list-fix (cons a x))
             (cons (vl-portdecl-or-blockitem-fix a)
                   (vl-portdecl-or-blockitem-list-fix x))))

    Theorem: len-of-vl-portdecl-or-blockitem-list-fix

    (defthm len-of-vl-portdecl-or-blockitem-list-fix
      (equal (len (vl-portdecl-or-blockitem-list-fix acl2::x))
             (len acl2::x)))

    Theorem: vl-portdecl-or-blockitem-list-fix-of-append

    (defthm vl-portdecl-or-blockitem-list-fix-of-append
      (equal (vl-portdecl-or-blockitem-list-fix (append std::a std::b))
             (append (vl-portdecl-or-blockitem-list-fix std::a)
                     (vl-portdecl-or-blockitem-list-fix std::b))))

    Theorem: vl-portdecl-or-blockitem-list-fix-of-repeat

    (defthm vl-portdecl-or-blockitem-list-fix-of-repeat
     (equal (vl-portdecl-or-blockitem-list-fix (repeat acl2::n acl2::x))
            (repeat acl2::n
                    (vl-portdecl-or-blockitem-fix acl2::x))))

    Theorem: nth-of-vl-portdecl-or-blockitem-list-fix

    (defthm nth-of-vl-portdecl-or-blockitem-list-fix
      (equal (nth acl2::n
                  (vl-portdecl-or-blockitem-list-fix acl2::x))
             (if (< (nfix acl2::n) (len acl2::x))
                 (vl-portdecl-or-blockitem-fix (nth acl2::n acl2::x))
               nil)))

    Theorem: vl-portdecl-or-blockitem-list-equiv-implies-vl-portdecl-or-blockitem-list-equiv-append-1

    (defthm
     vl-portdecl-or-blockitem-list-equiv-implies-vl-portdecl-or-blockitem-list-equiv-append-1
     (implies (vl-portdecl-or-blockitem-list-equiv acl2::x fty::x-equiv)
              (vl-portdecl-or-blockitem-list-equiv
                   (append acl2::x acl2::y)
                   (append fty::x-equiv acl2::y)))
     :rule-classes (:congruence))

    Theorem: vl-portdecl-or-blockitem-list-equiv-implies-vl-portdecl-or-blockitem-list-equiv-append-2

    (defthm
     vl-portdecl-or-blockitem-list-equiv-implies-vl-portdecl-or-blockitem-list-equiv-append-2
     (implies (vl-portdecl-or-blockitem-list-equiv acl2::y fty::y-equiv)
              (vl-portdecl-or-blockitem-list-equiv
                   (append acl2::x acl2::y)
                   (append acl2::x fty::y-equiv)))
     :rule-classes (:congruence))

    Theorem: vl-portdecl-or-blockitem-list-equiv-implies-vl-portdecl-or-blockitem-list-equiv-nthcdr-2

    (defthm
     vl-portdecl-or-blockitem-list-equiv-implies-vl-portdecl-or-blockitem-list-equiv-nthcdr-2
     (implies
         (vl-portdecl-or-blockitem-list-equiv acl2::l l-equiv)
         (vl-portdecl-or-blockitem-list-equiv (nthcdr acl2::n acl2::l)
                                              (nthcdr acl2::n l-equiv)))
     :rule-classes (:congruence))

    Theorem: vl-portdecl-or-blockitem-list-equiv-implies-vl-portdecl-or-blockitem-list-equiv-take-2

    (defthm
     vl-portdecl-or-blockitem-list-equiv-implies-vl-portdecl-or-blockitem-list-equiv-take-2
     (implies
          (vl-portdecl-or-blockitem-list-equiv acl2::l l-equiv)
          (vl-portdecl-or-blockitem-list-equiv (take acl2::n acl2::l)
                                               (take acl2::n l-equiv)))
     :rule-classes (:congruence))