• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
          • *vl-1-bit-approx-mux*
          • *vl-1-bit-mux*
          • Nedgeflop
            • Vl-make-same-bitselect-from-each
              • Vl-primitive-mkports
              • Vl-nedgeflop-ifstmt
              • Vl-make-1-bit-n-edge-flop
              • Vl-make-nedgeflop-insts
              • Vl-nedgeflop-always
              • Vl-nedgeflop-clkedge-assigns
              • Vl-nedgeflop-update-sexpr
              • Vl-nedgeflop-e-wires
              • Vl-make-delay-assigns
              • Vl-nedgeflop-posedge-clks
              • Vl-nedgeflop-data-mux
              • Vl-nedgeflop-some-edge-sexpr
              • Vl-modinsts-add-atts
              • Vl-nedgeflop-or-edges
            • Vl-primitive-mkport
            • *vl-1-bit-assign*
            • *vl-1-bit-zmux*
            • Vl-primitive-mkwire
            • *vl-1-bit-bufif1*
            • *vl-1-bit-bufif0*
            • *vl-1-bit-delay-1*
            • *vl-1-bit-ceq*
            • *vl-1-bit-buf*
            • *vl-1-bit-rcmos*
            • *vl-1-bit-latch*
            • *vl-1-bit-cmos*
            • *vl-1-bit-power*
            • *vl-1-bit-rpmos*
            • *vl-1-bit-rnmos*
            • *vl-1-bit-pmos*
            • *vl-1-bit-nmos*
            • *vl-1-bit-ground*
            • *vl-1-bit-tranif1*
            • *vl-1-bit-tranif0*
            • *vl-1-bit-rtranif1*
            • *vl-1-bit-rtranif0*
            • *vl-1-bit-rtran*
            • *vl-1-bit-tran*
            • *vl-1-bit-notif1*
            • *vl-1-bit-notif0*
            • *vl-1-bit-and*
            • *vl-1-bit-xor*
            • *vl-1-bit-xnor*
            • *vl-1-bit-pullup*
            • *vl-1-bit-pulldown*
            • *vl-1-bit-or*
            • *vl-1-bit-not*
            • *vl-1-bit-nor*
            • *vl-1-bit-nand*
            • *vl-1-bit-z*
            • *vl-1-bit-x*
            • *vl-1-bit-t*
            • *vl-1-bit-f*
          • Use-set
          • Syntax
          • Getting-started
          • Utilities
          • Loader
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Nedgeflop

    Vl-make-same-bitselect-from-each

    (vl-make-same-bitselect-from-each x index) maps vl-make-bitselect across a list.

    Signature
    (vl-make-same-bitselect-from-each x index) → *

    This is an ordinary defprojection.

    Definitions and Theorems

    Function: vl-make-same-bitselect-from-each-exec

    (defun vl-make-same-bitselect-from-each-exec (x index acc)
      (declare (xargs :guard (and (vl-exprlist-p x) (natp index))))
      (let ((__function__ 'vl-make-same-bitselect-from-each-exec))
        (declare (ignorable __function__))
        (if (consp x)
            (vl-make-same-bitselect-from-each-exec
                 (cdr x)
                 index
                 (cons (vl-make-bitselect (car x) index)
                       acc))
          acc)))

    Function: vl-make-same-bitselect-from-each-nrev

    (defun vl-make-same-bitselect-from-each-nrev (x index nrev)
      (declare (xargs :stobjs (nrev)))
      (declare (xargs :guard (and (vl-exprlist-p x) (natp index))))
      (let ((__function__ 'vl-make-same-bitselect-from-each-nrev))
        (declare (ignorable __function__))
        (if (atom x)
            (nrev-fix nrev)
          (let ((nrev (nrev-push (vl-make-bitselect (car x) index)
                                 nrev)))
            (vl-make-same-bitselect-from-each-nrev (cdr x)
                                                   index nrev)))))

    Function: vl-make-same-bitselect-from-each

    (defun vl-make-same-bitselect-from-each (x index)
     (declare (xargs :guard (and (vl-exprlist-p x) (natp index))))
     (let ((__function__ 'vl-make-same-bitselect-from-each))
      (declare (ignorable __function__))
      (mbe
        :logic
        (if (consp x)
            (cons (vl-make-bitselect (car x) index)
                  (vl-make-same-bitselect-from-each (cdr x)
                                                    index))
          nil)
        :exec
        (if (atom x)
            nil
          (with-local-nrev
               (vl-make-same-bitselect-from-each-nrev x index nrev))))))

    Theorem: vl-make-same-bitselect-from-each-of-update-nth

    (defthm vl-make-same-bitselect-from-each-of-update-nth
     (implies
      (<= (nfix acl2::n) (len acl2::x))
      (equal
         (vl-make-same-bitselect-from-each
              (update-nth acl2::n acl2::v acl2::x)
              index)
         (update-nth acl2::n
                     (vl-make-bitselect acl2::v index)
                     (vl-make-same-bitselect-from-each acl2::x index))))
     :rule-classes ((:rewrite)))

    Theorem: vl-make-same-bitselect-from-each-of-revappend

    (defthm vl-make-same-bitselect-from-each-of-revappend
      (equal
           (vl-make-same-bitselect-from-each (revappend acl2::x acl2::y)
                                             index)
           (revappend (vl-make-same-bitselect-from-each acl2::x index)
                      (vl-make-same-bitselect-from-each acl2::y index)))
      :rule-classes ((:rewrite)))

    Theorem: nthcdr-of-vl-make-same-bitselect-from-each

    (defthm nthcdr-of-vl-make-same-bitselect-from-each
      (equal (nthcdr acl2::n
                     (vl-make-same-bitselect-from-each acl2::x index))
             (vl-make-same-bitselect-from-each (nthcdr acl2::n acl2::x)
                                               index))
      :rule-classes ((:rewrite)))

    Theorem: nth-of-vl-make-same-bitselect-from-each

    (defthm nth-of-vl-make-same-bitselect-from-each
      (equal (nth acl2::n
                  (vl-make-same-bitselect-from-each acl2::x index))
             (and (< (nfix acl2::n) (len acl2::x))
                  (vl-make-bitselect (nth acl2::n acl2::x)
                                     index)))
      :rule-classes ((:rewrite)))

    Theorem: vl-make-same-bitselect-from-each-nrev-removal

    (defthm vl-make-same-bitselect-from-each-nrev-removal
      (equal (vl-make-same-bitselect-from-each-nrev acl2::x index nrev)
             (append nrev
                     (vl-make-same-bitselect-from-each acl2::x index)))
      :rule-classes ((:rewrite)))

    Theorem: vl-make-same-bitselect-from-each-exec-removal

    (defthm vl-make-same-bitselect-from-each-exec-removal
     (equal
         (vl-make-same-bitselect-from-each-exec acl2::x index acl2::acc)
         (revappend (vl-make-same-bitselect-from-each acl2::x index)
                    acl2::acc))
     :rule-classes ((:rewrite)))

    Theorem: vl-make-same-bitselect-from-each-of-take

    (defthm vl-make-same-bitselect-from-each-of-take
     (implies
        (<= (nfix acl2::n) (len acl2::x))
        (equal (vl-make-same-bitselect-from-each (take acl2::n acl2::x)
                                                 index)
               (take acl2::n
                     (vl-make-same-bitselect-from-each acl2::x index))))
     :rule-classes ((:rewrite)))

    Theorem: set-equiv-congruence-over-vl-make-same-bitselect-from-each

    (defthm set-equiv-congruence-over-vl-make-same-bitselect-from-each
      (implies
           (set-equiv acl2::x acl2::y)
           (set-equiv (vl-make-same-bitselect-from-each acl2::x index)
                      (vl-make-same-bitselect-from-each acl2::y index)))
      :rule-classes ((:congruence)))

    Theorem: subsetp-of-vl-make-same-bitselect-from-each-when-subsetp

    (defthm subsetp-of-vl-make-same-bitselect-from-each-when-subsetp
      (implies
           (subsetp acl2::x acl2::y)
           (subsetp (vl-make-same-bitselect-from-each acl2::x index)
                    (vl-make-same-bitselect-from-each acl2::y index)))
      :rule-classes ((:rewrite)))

    Theorem: member-of-vl-make-bitselect-in-vl-make-same-bitselect-from-each

    (defthm
        member-of-vl-make-bitselect-in-vl-make-same-bitselect-from-each
     (implies (member acl2::k acl2::x)
              (member (vl-make-bitselect acl2::k index)
                      (vl-make-same-bitselect-from-each acl2::x index)))
     :rule-classes ((:rewrite)))

    Theorem: vl-make-same-bitselect-from-each-of-rev

    (defthm vl-make-same-bitselect-from-each-of-rev
      (equal (vl-make-same-bitselect-from-each (rev acl2::x)
                                               index)
             (rev (vl-make-same-bitselect-from-each acl2::x index)))
      :rule-classes ((:rewrite)))

    Theorem: vl-make-same-bitselect-from-each-of-list-fix

    (defthm vl-make-same-bitselect-from-each-of-list-fix
      (equal (vl-make-same-bitselect-from-each (list-fix acl2::x)
                                               index)
             (vl-make-same-bitselect-from-each acl2::x index))
      :rule-classes ((:rewrite)))

    Theorem: vl-make-same-bitselect-from-each-of-append

    (defthm vl-make-same-bitselect-from-each-of-append
      (equal (vl-make-same-bitselect-from-each (append acl2::a acl2::b)
                                               index)
             (append (vl-make-same-bitselect-from-each acl2::a index)
                     (vl-make-same-bitselect-from-each acl2::b index)))
      :rule-classes ((:rewrite)))

    Theorem: cdr-of-vl-make-same-bitselect-from-each

    (defthm cdr-of-vl-make-same-bitselect-from-each
      (equal (cdr (vl-make-same-bitselect-from-each acl2::x index))
             (vl-make-same-bitselect-from-each (cdr acl2::x)
                                               index))
      :rule-classes ((:rewrite)))

    Theorem: car-of-vl-make-same-bitselect-from-each

    (defthm car-of-vl-make-same-bitselect-from-each
      (equal (car (vl-make-same-bitselect-from-each acl2::x index))
             (and (consp acl2::x)
                  (vl-make-bitselect (car acl2::x)
                                     index)))
      :rule-classes ((:rewrite)))

    Theorem: vl-make-same-bitselect-from-each-under-iff

    (defthm vl-make-same-bitselect-from-each-under-iff
      (iff (vl-make-same-bitselect-from-each acl2::x index)
           (consp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: consp-of-vl-make-same-bitselect-from-each

    (defthm consp-of-vl-make-same-bitselect-from-each
      (equal (consp (vl-make-same-bitselect-from-each acl2::x index))
             (consp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: len-of-vl-make-same-bitselect-from-each

    (defthm len-of-vl-make-same-bitselect-from-each
      (equal (len (vl-make-same-bitselect-from-each acl2::x index))
             (len acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-of-vl-make-same-bitselect-from-each

    (defthm true-listp-of-vl-make-same-bitselect-from-each
      (true-listp (vl-make-same-bitselect-from-each acl2::x index))
      :rule-classes :type-prescription)

    Theorem: vl-make-same-bitselect-from-each-when-not-consp

    (defthm vl-make-same-bitselect-from-each-when-not-consp
      (implies (not (consp acl2::x))
               (equal (vl-make-same-bitselect-from-each acl2::x index)
                      nil))
      :rule-classes ((:rewrite)))

    Theorem: vl-make-same-bitselect-from-each-of-cons

    (defthm vl-make-same-bitselect-from-each-of-cons
      (equal (vl-make-same-bitselect-from-each (cons acl2::a acl2::b)
                                               index)
             (cons (vl-make-bitselect acl2::a index)
                   (vl-make-same-bitselect-from-each acl2::b index)))
      :rule-classes ((:rewrite)))

    Theorem: vl-exprlist-p-of-vl-make-same-bitselect-from-each

    (defthm vl-exprlist-p-of-vl-make-same-bitselect-from-each
      (implies
           (force (vl-exprlist-p x))
           (vl-exprlist-p (vl-make-same-bitselect-from-each x index))))

    Theorem: vl-exprlist->finalwidths-of-vl-make-same-bitselect-from-each

    (defthm vl-exprlist->finalwidths-of-vl-make-same-bitselect-from-each
      (equal (vl-exprlist->finalwidths
                  (vl-make-same-bitselect-from-each x index))
             (replicate (len x) 1)))

    Theorem: vl-exprlist->finaltypes-of-vl-make-same-bitselect-from-each

    (defthm vl-exprlist->finaltypes-of-vl-make-same-bitselect-from-each
      (equal (vl-exprlist->finaltypes
                  (vl-make-same-bitselect-from-each x index))
             (replicate (len x) :vl-unsigned)))