• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
          • Occform
          • Oprewrite
          • Expand-functions
          • Delayredux
          • Unparameterization
          • Caseelim
          • Split
          • Selresolve
          • Weirdint-elim
          • Vl-delta
          • Replicate-insts
          • Rangeresolve
          • Propagate
          • Clean-selects
            • Vl-plainarglist-clean-selects
            • Vl-namedarglist-clean-selects
            • Vl-gateinstlist-clean-selects
              • Vl-modinstlist-clean-selects
              • Vl-initiallist-clean-selects
              • Vl-modulelist-clean-selects
              • Vl-assignlist-clean-selects
              • Vl-alwayslist-clean-selects
              • Vl-portlist-clean-selects
              • Vl-stmt-clean-selects
              • Vl-module-clean-selects
              • Vl-plainarg-clean-selects
              • Vl-namedarg-clean-selects
              • Vl-gateinst-clean-selects
              • Vl-arguments-clean-selects
              • Vl-port-clean-selects
              • Vl-modinst-clean-selects
              • Vl-maybe-expr-clean-selects
              • Vl-initial-clean-selects
              • Vl-assign-clean-selects
              • Vl-always-clean-selects
              • Vl-design-clean-selects
            • Clean-params
            • Blankargs
            • Inline-mods
            • Expr-simp
            • Trunc
            • Always-top
            • Gatesplit
            • Gate-elim
            • Expression-optimization
            • Elim-supplies
            • Wildelim
            • Drop-blankports
            • Clean-warnings
            • Addinstnames
            • Custom-transform-hooks
            • Annotate
            • Latchcode
            • Elim-unused-vars
            • Problem-modules
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Clean-selects

    Vl-gateinstlist-clean-selects

    (vl-gateinstlist-clean-selects x ss) maps vl-gateinst-clean-selects across a list.

    Signature
    (vl-gateinstlist-clean-selects x ss) → new-x
    Arguments
    x — Guard (vl-gateinstlist-p x).
    ss — Guard (vl-scopestack-p ss).
    Returns
    new-x — Type (vl-gateinstlist-p new-x).

    This is an ordinary defprojection.

    Definitions and Theorems

    Function: vl-gateinstlist-clean-selects-exec

    (defun vl-gateinstlist-clean-selects-exec (x ss acc)
      (declare (xargs :guard (and (vl-gateinstlist-p x)
                                  (vl-scopestack-p ss))))
      (declare (xargs :guard t))
      (let ((__function__ 'vl-gateinstlist-clean-selects-exec))
        (declare (ignorable __function__))
        (if (consp x)
            (vl-gateinstlist-clean-selects-exec
                 (cdr x)
                 ss
                 (cons (vl-gateinst-clean-selects (car x) ss)
                       acc))
          acc)))

    Function: vl-gateinstlist-clean-selects-nrev

    (defun vl-gateinstlist-clean-selects-nrev (x ss nrev)
      (declare (xargs :stobjs (nrev)))
      (declare (xargs :guard (and (vl-gateinstlist-p x)
                                  (vl-scopestack-p ss))))
      (declare (xargs :guard t))
      (let ((__function__ 'vl-gateinstlist-clean-selects-nrev))
        (declare (ignorable __function__))
        (if (atom x)
            (nrev-fix nrev)
          (let ((nrev (nrev-push (vl-gateinst-clean-selects (car x) ss)
                                 nrev)))
            (vl-gateinstlist-clean-selects-nrev (cdr x)
                                                ss nrev)))))

    Function: vl-gateinstlist-clean-selects

    (defun vl-gateinstlist-clean-selects (x ss)
      (declare (xargs :guard (and (vl-gateinstlist-p x)
                                  (vl-scopestack-p ss))))
      (declare (xargs :guard t))
      (let ((__function__ 'vl-gateinstlist-clean-selects))
        (declare (ignorable __function__))
        (mbe :logic
             (if (consp x)
                 (cons (vl-gateinst-clean-selects (car x) ss)
                       (vl-gateinstlist-clean-selects (cdr x)
                                                      ss))
               nil)
             :exec
             (if (atom x)
                 nil
               (with-local-nrev
                    (vl-gateinstlist-clean-selects-nrev x ss nrev))))))

    Theorem: vl-gateinstlist-p-of-vl-gateinstlist-clean-selects

    (defthm vl-gateinstlist-p-of-vl-gateinstlist-clean-selects
      (b* ((new-x (vl-gateinstlist-clean-selects x ss)))
        (vl-gateinstlist-p new-x))
      :rule-classes :rewrite)

    Theorem: vl-gateinstlist-clean-selects-of-vl-gateinstlist-fix-x

    (defthm vl-gateinstlist-clean-selects-of-vl-gateinstlist-fix-x
      (equal (vl-gateinstlist-clean-selects (vl-gateinstlist-fix x)
                                            ss)
             (vl-gateinstlist-clean-selects x ss)))

    Theorem: vl-gateinstlist-clean-selects-vl-gateinstlist-equiv-congruence-on-x

    (defthm
     vl-gateinstlist-clean-selects-vl-gateinstlist-equiv-congruence-on-x
     (implies (vl-gateinstlist-equiv x x-equiv)
              (equal (vl-gateinstlist-clean-selects x ss)
                     (vl-gateinstlist-clean-selects x-equiv ss)))
     :rule-classes :congruence)

    Theorem: vl-gateinstlist-clean-selects-of-vl-scopestack-fix-ss

    (defthm vl-gateinstlist-clean-selects-of-vl-scopestack-fix-ss
      (equal (vl-gateinstlist-clean-selects x (vl-scopestack-fix ss))
             (vl-gateinstlist-clean-selects x ss)))

    Theorem: vl-gateinstlist-clean-selects-vl-scopestack-equiv-congruence-on-ss

    (defthm
     vl-gateinstlist-clean-selects-vl-scopestack-equiv-congruence-on-ss
     (implies (vl-scopestack-equiv ss ss-equiv)
              (equal (vl-gateinstlist-clean-selects x ss)
                     (vl-gateinstlist-clean-selects x ss-equiv)))
     :rule-classes :congruence)

    Theorem: vl-gateinstlist-clean-selects-of-update-nth

    (defthm vl-gateinstlist-clean-selects-of-update-nth
     (implies
        (<= (nfix acl2::n) (len acl2::x))
        (equal (vl-gateinstlist-clean-selects
                    (update-nth acl2::n acl2::v acl2::x)
                    ss)
               (update-nth acl2::n
                           (vl-gateinst-clean-selects acl2::v ss)
                           (vl-gateinstlist-clean-selects acl2::x ss))))
     :rule-classes ((:rewrite)))

    Theorem: vl-gateinstlist-clean-selects-of-revappend

    (defthm vl-gateinstlist-clean-selects-of-revappend
      (equal (vl-gateinstlist-clean-selects (revappend acl2::x acl2::y)
                                            ss)
             (revappend (vl-gateinstlist-clean-selects acl2::x ss)
                        (vl-gateinstlist-clean-selects acl2::y ss)))
      :rule-classes ((:rewrite)))

    Theorem: nthcdr-of-vl-gateinstlist-clean-selects

    (defthm nthcdr-of-vl-gateinstlist-clean-selects
      (equal (nthcdr acl2::n
                     (vl-gateinstlist-clean-selects acl2::x ss))
             (vl-gateinstlist-clean-selects (nthcdr acl2::n acl2::x)
                                            ss))
      :rule-classes ((:rewrite)))

    Theorem: nth-of-vl-gateinstlist-clean-selects

    (defthm nth-of-vl-gateinstlist-clean-selects
      (equal (nth acl2::n
                  (vl-gateinstlist-clean-selects acl2::x ss))
             (and (< (nfix acl2::n) (len acl2::x))
                  (vl-gateinst-clean-selects (nth acl2::n acl2::x)
                                             ss)))
      :rule-classes ((:rewrite)))

    Theorem: vl-gateinstlist-clean-selects-nrev-removal

    (defthm vl-gateinstlist-clean-selects-nrev-removal
      (equal (vl-gateinstlist-clean-selects-nrev acl2::x ss nrev)
             (append nrev
                     (vl-gateinstlist-clean-selects acl2::x ss)))
      :rule-classes ((:rewrite)))

    Theorem: vl-gateinstlist-clean-selects-exec-removal

    (defthm vl-gateinstlist-clean-selects-exec-removal
      (equal (vl-gateinstlist-clean-selects-exec acl2::x ss acl2::acc)
             (revappend (vl-gateinstlist-clean-selects acl2::x ss)
                        acl2::acc))
      :rule-classes ((:rewrite)))

    Theorem: vl-gateinstlist-clean-selects-of-take

    (defthm vl-gateinstlist-clean-selects-of-take
      (implies
           (<= (nfix acl2::n) (len acl2::x))
           (equal (vl-gateinstlist-clean-selects (take acl2::n acl2::x)
                                                 ss)
                  (take acl2::n
                        (vl-gateinstlist-clean-selects acl2::x ss))))
      :rule-classes ((:rewrite)))

    Theorem: set-equiv-congruence-over-vl-gateinstlist-clean-selects

    (defthm set-equiv-congruence-over-vl-gateinstlist-clean-selects
      (implies (set-equiv acl2::x acl2::y)
               (set-equiv (vl-gateinstlist-clean-selects acl2::x ss)
                          (vl-gateinstlist-clean-selects acl2::y ss)))
      :rule-classes ((:congruence)))

    Theorem: subsetp-of-vl-gateinstlist-clean-selects-when-subsetp

    (defthm subsetp-of-vl-gateinstlist-clean-selects-when-subsetp
      (implies (subsetp acl2::x acl2::y)
               (subsetp (vl-gateinstlist-clean-selects acl2::x ss)
                        (vl-gateinstlist-clean-selects acl2::y ss)))
      :rule-classes ((:rewrite)))

    Theorem: member-of-vl-gateinst-clean-selects-in-vl-gateinstlist-clean-selects

    (defthm
     member-of-vl-gateinst-clean-selects-in-vl-gateinstlist-clean-selects
     (implies (member acl2::k acl2::x)
              (member (vl-gateinst-clean-selects acl2::k ss)
                      (vl-gateinstlist-clean-selects acl2::x ss)))
     :rule-classes ((:rewrite)))

    Theorem: vl-gateinstlist-clean-selects-of-rev

    (defthm vl-gateinstlist-clean-selects-of-rev
      (equal (vl-gateinstlist-clean-selects (rev acl2::x)
                                            ss)
             (rev (vl-gateinstlist-clean-selects acl2::x ss)))
      :rule-classes ((:rewrite)))

    Theorem: vl-gateinstlist-clean-selects-of-list-fix

    (defthm vl-gateinstlist-clean-selects-of-list-fix
      (equal (vl-gateinstlist-clean-selects (list-fix acl2::x)
                                            ss)
             (vl-gateinstlist-clean-selects acl2::x ss))
      :rule-classes ((:rewrite)))

    Theorem: vl-gateinstlist-clean-selects-of-append

    (defthm vl-gateinstlist-clean-selects-of-append
      (equal (vl-gateinstlist-clean-selects (append acl2::a acl2::b)
                                            ss)
             (append (vl-gateinstlist-clean-selects acl2::a ss)
                     (vl-gateinstlist-clean-selects acl2::b ss)))
      :rule-classes ((:rewrite)))

    Theorem: cdr-of-vl-gateinstlist-clean-selects

    (defthm cdr-of-vl-gateinstlist-clean-selects
      (equal (cdr (vl-gateinstlist-clean-selects acl2::x ss))
             (vl-gateinstlist-clean-selects (cdr acl2::x)
                                            ss))
      :rule-classes ((:rewrite)))

    Theorem: car-of-vl-gateinstlist-clean-selects

    (defthm car-of-vl-gateinstlist-clean-selects
      (equal (car (vl-gateinstlist-clean-selects acl2::x ss))
             (and (consp acl2::x)
                  (vl-gateinst-clean-selects (car acl2::x)
                                             ss)))
      :rule-classes ((:rewrite)))

    Theorem: vl-gateinstlist-clean-selects-under-iff

    (defthm vl-gateinstlist-clean-selects-under-iff
      (iff (vl-gateinstlist-clean-selects acl2::x ss)
           (consp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: consp-of-vl-gateinstlist-clean-selects

    (defthm consp-of-vl-gateinstlist-clean-selects
      (equal (consp (vl-gateinstlist-clean-selects acl2::x ss))
             (consp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: len-of-vl-gateinstlist-clean-selects

    (defthm len-of-vl-gateinstlist-clean-selects
      (equal (len (vl-gateinstlist-clean-selects acl2::x ss))
             (len acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-of-vl-gateinstlist-clean-selects

    (defthm true-listp-of-vl-gateinstlist-clean-selects
      (true-listp (vl-gateinstlist-clean-selects acl2::x ss))
      :rule-classes :type-prescription)

    Theorem: vl-gateinstlist-clean-selects-when-not-consp

    (defthm vl-gateinstlist-clean-selects-when-not-consp
      (implies (not (consp acl2::x))
               (equal (vl-gateinstlist-clean-selects acl2::x ss)
                      nil))
      :rule-classes ((:rewrite)))

    Theorem: vl-gateinstlist-clean-selects-of-cons

    (defthm vl-gateinstlist-clean-selects-of-cons
      (equal (vl-gateinstlist-clean-selects (cons acl2::a acl2::b)
                                            ss)
             (cons (vl-gateinst-clean-selects acl2::a ss)
                   (vl-gateinstlist-clean-selects acl2::b ss)))
      :rule-classes ((:rewrite)))