• 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
          • Preprocessor
          • Vl-loadconfig
          • Lexer
            • Lex-strings
            • Lex-identifiers
            • Vl-typo-uppercase-p
            • Vl-typo-number-p
            • Vl-typo-lowercase-p
            • Lex-numbers
            • Chartypes
            • Vl-lex
            • Defchar
            • Tokens
              • Vl-inttoken-p
              • Vl-plaintoken-p
              • Vl-token->etext
              • Vl-token->type
              • Vl-token-p
              • Vl-idtoken-p
              • Vl-timetoken-p
              • Vl-stringtoken-p
              • Vl-kill-whitespace-and-comments
              • Vl-tokenlist->etext
              • Vl-extinttoken-p
              • Vl-sysidtoken-p
              • Vl-realtoken-p
              • Vl-tokenlist-p
                • Vl-tokenlist-p-basics
                • Vl-tokenlist->string-with-spaces
                • Vl-idtoken-list-p
                • Vl-token->loc
                • Vl-plaintokentypelist-p
                • Vl-tokenlistlist-p
                • Vl-token->string
              • Lex-keywords
              • Lexstate
              • Make-test-tokens
              • Lexer-utils
              • Lex-comments
              • Vl-typo-uppercase-list-p
              • Vl-typo-lowercase-list-p
              • Vl-typo-number-list-p
            • Vl-loadstate
            • Parser
            • Vl-load-merge-descriptions
            • Scope-of-defines
            • Vl-load-file
            • Vl-flush-out-descriptions
            • Vl-description
            • Vl-loadresult
            • Vl-read-file
            • Vl-find-basename/extension
            • Vl-find-file
            • Vl-read-files
            • Extended-characters
            • Vl-load
            • Vl-load-main
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-load-descriptions
            • Vl-load-files
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-descriptionlist
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-tokenlist-p

    Vl-tokenlist-p-basics

    Basic theorems about vl-tokenlist-p, generated by deflist.

    Definitions and Theorems

    Theorem: vl-tokenlist-p-of-cons

    (defthm vl-tokenlist-p-of-cons
      (equal (vl-tokenlist-p (cons acl2::a acl2::x))
             (and (vl-token-p acl2::a)
                  (vl-tokenlist-p acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-cdr-when-vl-tokenlist-p

    (defthm vl-tokenlist-p-of-cdr-when-vl-tokenlist-p
      (implies (vl-tokenlist-p (double-rewrite acl2::x))
               (vl-tokenlist-p (cdr acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-when-not-consp

    (defthm vl-tokenlist-p-when-not-consp
      (implies (not (consp acl2::x))
               (vl-tokenlist-p acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: vl-token-p-of-car-when-vl-tokenlist-p

    (defthm vl-token-p-of-car-when-vl-tokenlist-p
      (implies (vl-tokenlist-p acl2::x)
               (iff (vl-token-p (car acl2::x))
                    (consp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-append

    (defthm vl-tokenlist-p-of-append
      (equal (vl-tokenlist-p (append acl2::a acl2::b))
             (and (vl-tokenlist-p acl2::a)
                  (vl-tokenlist-p acl2::b)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-list-fix

    (defthm vl-tokenlist-p-of-list-fix
      (equal (vl-tokenlist-p (list-fix acl2::x))
             (vl-tokenlist-p acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-sfix

    (defthm vl-tokenlist-p-of-sfix
      (iff (vl-tokenlist-p (sfix acl2::x))
           (or (vl-tokenlist-p acl2::x)
               (not (setp acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-insert

    (defthm vl-tokenlist-p-of-insert
      (iff (vl-tokenlist-p (insert acl2::a acl2::x))
           (and (vl-tokenlist-p (sfix acl2::x))
                (vl-token-p acl2::a)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-delete

    (defthm vl-tokenlist-p-of-delete
      (implies (vl-tokenlist-p acl2::x)
               (vl-tokenlist-p (delete acl2::k acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-mergesort

    (defthm vl-tokenlist-p-of-mergesort
      (iff (vl-tokenlist-p (mergesort acl2::x))
           (vl-tokenlist-p (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-union

    (defthm vl-tokenlist-p-of-union
      (iff (vl-tokenlist-p (union acl2::x acl2::y))
           (and (vl-tokenlist-p (sfix acl2::x))
                (vl-tokenlist-p (sfix acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-intersect-1

    (defthm vl-tokenlist-p-of-intersect-1
      (implies (vl-tokenlist-p acl2::x)
               (vl-tokenlist-p (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-intersect-2

    (defthm vl-tokenlist-p-of-intersect-2
      (implies (vl-tokenlist-p acl2::y)
               (vl-tokenlist-p (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-difference

    (defthm vl-tokenlist-p-of-difference
      (implies (vl-tokenlist-p acl2::x)
               (vl-tokenlist-p (difference acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-duplicated-members

    (defthm vl-tokenlist-p-of-duplicated-members
      (implies (vl-tokenlist-p acl2::x)
               (vl-tokenlist-p (duplicated-members acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-rev

    (defthm vl-tokenlist-p-of-rev
      (equal (vl-tokenlist-p (rev acl2::x))
             (vl-tokenlist-p (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-rcons

    (defthm vl-tokenlist-p-of-rcons
      (iff (vl-tokenlist-p (acl2::rcons acl2::a acl2::x))
           (and (vl-token-p acl2::a)
                (vl-tokenlist-p (list-fix acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: vl-token-p-when-member-equal-of-vl-tokenlist-p

    (defthm vl-token-p-when-member-equal-of-vl-tokenlist-p
      (and (implies (and (member-equal acl2::a acl2::x)
                         (vl-tokenlist-p acl2::x))
                    (vl-token-p acl2::a))
           (implies (and (vl-tokenlist-p acl2::x)
                         (member-equal acl2::a acl2::x))
                    (vl-token-p acl2::a)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-when-subsetp-equal

    (defthm vl-tokenlist-p-when-subsetp-equal
      (and (implies (and (subsetp-equal acl2::x acl2::y)
                         (vl-tokenlist-p acl2::y))
                    (vl-tokenlist-p acl2::x))
           (implies (and (vl-tokenlist-p acl2::y)
                         (subsetp-equal acl2::x acl2::y))
                    (vl-tokenlist-p acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-set-equiv-congruence

    (defthm vl-tokenlist-p-set-equiv-congruence
      (implies (set-equiv acl2::x acl2::y)
               (equal (vl-tokenlist-p acl2::x)
                      (vl-tokenlist-p acl2::y)))
      :rule-classes :congruence)

    Theorem: vl-tokenlist-p-of-set-difference-equal

    (defthm vl-tokenlist-p-of-set-difference-equal
      (implies (vl-tokenlist-p acl2::x)
               (vl-tokenlist-p (set-difference-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-intersection-equal-1

    (defthm vl-tokenlist-p-of-intersection-equal-1
      (implies (vl-tokenlist-p (double-rewrite acl2::x))
               (vl-tokenlist-p (intersection-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-intersection-equal-2

    (defthm vl-tokenlist-p-of-intersection-equal-2
      (implies (vl-tokenlist-p (double-rewrite acl2::y))
               (vl-tokenlist-p (intersection-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-union-equal

    (defthm vl-tokenlist-p-of-union-equal
      (equal (vl-tokenlist-p (union-equal acl2::x acl2::y))
             (and (vl-tokenlist-p (list-fix acl2::x))
                  (vl-tokenlist-p (double-rewrite acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-take

    (defthm vl-tokenlist-p-of-take
      (implies (vl-tokenlist-p (double-rewrite acl2::x))
               (iff (vl-tokenlist-p (take acl2::n acl2::x))
                    (or (vl-token-p nil)
                        (<= (nfix acl2::n) (len acl2::x)))))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-repeat

    (defthm vl-tokenlist-p-of-repeat
      (iff (vl-tokenlist-p (repeat acl2::n acl2::x))
           (or (vl-token-p acl2::x) (zp acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: vl-token-p-of-nth-when-vl-tokenlist-p

    (defthm vl-token-p-of-nth-when-vl-tokenlist-p
      (implies (vl-tokenlist-p acl2::x)
               (iff (vl-token-p (nth acl2::n acl2::x))
                    (< (nfix acl2::n) (len acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-update-nth

    (defthm vl-tokenlist-p-of-update-nth
     (implies (vl-tokenlist-p (double-rewrite acl2::x))
              (iff (vl-tokenlist-p (update-nth acl2::n acl2::y acl2::x))
                   (and (vl-token-p acl2::y)
                        (or (<= (nfix acl2::n) (len acl2::x))
                            (vl-token-p nil)))))
     :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-butlast

    (defthm vl-tokenlist-p-of-butlast
      (implies (vl-tokenlist-p (double-rewrite acl2::x))
               (vl-tokenlist-p (butlast acl2::x acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-nthcdr

    (defthm vl-tokenlist-p-of-nthcdr
      (implies (vl-tokenlist-p (double-rewrite acl2::x))
               (vl-tokenlist-p (nthcdr acl2::n acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-last

    (defthm vl-tokenlist-p-of-last
      (implies (vl-tokenlist-p (double-rewrite acl2::x))
               (vl-tokenlist-p (last acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-remove

    (defthm vl-tokenlist-p-of-remove
      (implies (vl-tokenlist-p acl2::x)
               (vl-tokenlist-p (remove acl2::a acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: vl-tokenlist-p-of-revappend

    (defthm vl-tokenlist-p-of-revappend
      (equal (vl-tokenlist-p (revappend acl2::x acl2::y))
             (and (vl-tokenlist-p (list-fix acl2::x))
                  (vl-tokenlist-p acl2::y)))
      :rule-classes ((:rewrite)))