• 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
          • Clean-params
          • Blankargs
          • Inline-mods
          • Expr-simp
          • Trunc
          • Always-top
            • Edgesynth
              • Vl-edgesynth-stmt-p
              • Vl-edgetable-p
              • Vl-always-edgesynth
              • Vl-edgesynth-merge-data-ifs
              • Vl-assignstmtlist->controls
              • Vl-assignstmtlist->lhses
              • Vl-assignstmtlist->rhses
              • Vl-edgesynth-flatten-data-ifs
              • Vl-edgesynth-pattern-match
              • 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-edgesynth-make-data-inputs
                • Vl-edgesynth-make-clock-inputs
                • Vl-edgesynth-stmt-clklift
                • Vl-edgesynth-blockelim
                • Vl-alwayslist-edgesynth
                • Vl-edgesynth-create
                • Vl-edgesynth-classify-iftest
                • Vl-module-edgesynth
                • Vl-edgesynth-normalize-ifs
                • Vl-edgesynth-delays-okp
                • Vl-edgesynth-stmt-assigns
                • Vl-make-edgetable
                • Vl-edgesynth-sort-edges
                • Vl-modulelist-edgesynth
                • Vl-modulelist-edgesynth-aux
                • Vl-assignstmtlist-p
                • Vl-edgesynth-edgelist-p
                • Vl-assigncontrols-p
                • Vl-edgesynth-stmt-conditions
                • Vl-edgesynth-edge-p
                • Vl-design-edgesynth
                • Vl-edgesynth-get-delay
                • Vl-edgesynth-iftype-p
                • Edge-tables
              • Stmtrewrite
              • Cblock
              • Vl-always-convert-regports
              • Vl-always-convert-regs
              • Stmttemps
              • Edgesplit
              • Vl-always-check-reg
              • Vl-convert-regs
              • Latchsynth
              • Vl-always-check-regs
              • Vl-match-always-at-some-edges
              • Unelse
              • Vl-always-convert-reg
              • Vl-design-always-backend
              • Vl-stmt-guts
              • Vl-always-convert-regport
              • Vl-always-scary-regs
              • Eliminitial
              • Ifmerge
              • Vl-edge-control-p
              • Elimalways
            • 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
    • 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)))