• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
          • Syntax-for-tools
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Compilation-database
              • Comp-db-entry
              • Comp-db-arg
              • Json-to-comp-db-entry
              • Json-to-comp-db-entry-list
              • To-preprocess-db
              • To-preprocess-map
              • Comp-db-arguments-absolute-dirs
              • Comp-db-keep-only-preprocessor-args
              • Json-to-comp-db
              • Json-to-comp-db-arguments
              • Comp-db-relativize-keys
              • Json-to-comp-db-get-exec-and-arguments
              • Preprocess-map-from-comp-file
              • Json-to-comp-db-exec-and-arguments
              • Relativize-path
              • Comp-db-arguments-keep-only-preprocessor-args
              • Comp-db-arguments-escape-for-shell
              • Parse-comp-db
              • Json-to-comp-db-get-directory
              • Json-to-comp-db-get-output
              • Json-to-comp-db-get-file
              • Comp-db-drop-shared
              • Comp-db-drop-non-c
              • Comp-db-arg-list-to-string-list
              • Comp-db-absolute-dirs
              • Comp-db-escape-for-shell
              • Json-to-comp-db-try-parse-short-option
              • Preprocess-db-to-map
              • Comp-db-arg-to-string
              • Comp-db
              • Json-to-comp-db-try-parse-equal-arg
              • Defpreprocess-map-fn
              • String-escape-for-shell
              • Comp-db-arg-list
                • Comp-db-arg-list-fix
                • Comp-db-arg-list-equiv
                • Comp-db-arg-listp
                  • Comp-db-arg-listp-basics
                • Irr-comp-db-arg
                • Show-warnings
                • *cc-options-space-sep*
                • *cc-options-equal-sep*
                • *cc-options-dir*
              • Printer
              • Output-files
              • Abstract-syntax-operations
              • Implementation-environments
              • Abstract-syntax
              • Concrete-syntax
              • Disambiguation
              • Validation
              • Gcc-builtins
              • Preprocessing
              • Parsing
            • Atc
            • Transformation-tools
            • Language
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Comp-db-arg-listp

    Comp-db-arg-listp-basics

    Basic theorems about comp-db-arg-listp, generated by std::deflist.

    Definitions and Theorems

    Theorem: comp-db-arg-listp-of-cons

    (defthm comp-db-arg-listp-of-cons
      (equal (comp-db-arg-listp (cons acl2::a acl2::x))
             (and (comp-db-argp acl2::a)
                  (comp-db-arg-listp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-cdr-when-comp-db-arg-listp

    (defthm comp-db-arg-listp-of-cdr-when-comp-db-arg-listp
      (implies (comp-db-arg-listp (double-rewrite acl2::x))
               (comp-db-arg-listp (cdr acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-when-not-consp

    (defthm comp-db-arg-listp-when-not-consp
      (implies (not (consp acl2::x))
               (equal (comp-db-arg-listp acl2::x)
                      (not acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-argp-of-car-when-comp-db-arg-listp

    (defthm comp-db-argp-of-car-when-comp-db-arg-listp
      (implies (comp-db-arg-listp acl2::x)
               (iff (comp-db-argp (car acl2::x))
                    (consp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-when-comp-db-arg-listp-compound-recognizer

    (defthm true-listp-when-comp-db-arg-listp-compound-recognizer
      (implies (comp-db-arg-listp acl2::x)
               (true-listp acl2::x))
      :rule-classes :compound-recognizer)

    Theorem: comp-db-arg-listp-of-list-fix

    (defthm comp-db-arg-listp-of-list-fix
      (implies (comp-db-arg-listp acl2::x)
               (comp-db-arg-listp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-sfix

    (defthm comp-db-arg-listp-of-sfix
      (iff (comp-db-arg-listp (sfix acl2::x))
           (or (comp-db-arg-listp acl2::x)
               (not (setp acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-insert

    (defthm comp-db-arg-listp-of-insert
      (iff (comp-db-arg-listp (insert acl2::a acl2::x))
           (and (comp-db-arg-listp (sfix acl2::x))
                (comp-db-argp acl2::a)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-delete

    (defthm comp-db-arg-listp-of-delete
      (implies (comp-db-arg-listp acl2::x)
               (comp-db-arg-listp (delete acl2::k acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-mergesort

    (defthm comp-db-arg-listp-of-mergesort
      (iff (comp-db-arg-listp (mergesort acl2::x))
           (comp-db-arg-listp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-union

    (defthm comp-db-arg-listp-of-union
      (iff (comp-db-arg-listp (union acl2::x acl2::y))
           (and (comp-db-arg-listp (sfix acl2::x))
                (comp-db-arg-listp (sfix acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-intersect-1

    (defthm comp-db-arg-listp-of-intersect-1
      (implies (comp-db-arg-listp acl2::x)
               (comp-db-arg-listp (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-intersect-2

    (defthm comp-db-arg-listp-of-intersect-2
      (implies (comp-db-arg-listp acl2::y)
               (comp-db-arg-listp (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-difference

    (defthm comp-db-arg-listp-of-difference
      (implies (comp-db-arg-listp acl2::x)
               (comp-db-arg-listp (difference acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-duplicated-members

    (defthm comp-db-arg-listp-of-duplicated-members
      (implies (comp-db-arg-listp acl2::x)
               (comp-db-arg-listp (duplicated-members acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-rev

    (defthm comp-db-arg-listp-of-rev
      (equal (comp-db-arg-listp (rev acl2::x))
             (comp-db-arg-listp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-append

    (defthm comp-db-arg-listp-of-append
      (equal (comp-db-arg-listp (append acl2::a acl2::b))
             (and (comp-db-arg-listp (list-fix acl2::a))
                  (comp-db-arg-listp acl2::b)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-rcons

    (defthm comp-db-arg-listp-of-rcons
      (iff (comp-db-arg-listp (rcons acl2::a acl2::x))
           (and (comp-db-argp acl2::a)
                (comp-db-arg-listp (list-fix acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-argp-when-member-equal-of-comp-db-arg-listp

    (defthm comp-db-argp-when-member-equal-of-comp-db-arg-listp
      (and (implies (and (member-equal acl2::a acl2::x)
                         (comp-db-arg-listp acl2::x))
                    (comp-db-argp acl2::a))
           (implies (and (comp-db-arg-listp acl2::x)
                         (member-equal acl2::a acl2::x))
                    (comp-db-argp acl2::a)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-when-subsetp-equal

    (defthm comp-db-arg-listp-when-subsetp-equal
      (and (implies (and (subsetp-equal acl2::x acl2::y)
                         (comp-db-arg-listp acl2::y))
                    (equal (comp-db-arg-listp acl2::x)
                           (true-listp acl2::x)))
           (implies (and (comp-db-arg-listp acl2::y)
                         (subsetp-equal acl2::x acl2::y))
                    (equal (comp-db-arg-listp acl2::x)
                           (true-listp acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-set-difference-equal

    (defthm comp-db-arg-listp-of-set-difference-equal
      (implies
           (comp-db-arg-listp acl2::x)
           (comp-db-arg-listp (set-difference-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-intersection-equal-1

    (defthm comp-db-arg-listp-of-intersection-equal-1
      (implies (comp-db-arg-listp (double-rewrite acl2::x))
               (comp-db-arg-listp (intersection-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-intersection-equal-2

    (defthm comp-db-arg-listp-of-intersection-equal-2
      (implies (comp-db-arg-listp (double-rewrite acl2::y))
               (comp-db-arg-listp (intersection-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-union-equal

    (defthm comp-db-arg-listp-of-union-equal
      (equal (comp-db-arg-listp (union-equal acl2::x acl2::y))
             (and (comp-db-arg-listp (list-fix acl2::x))
                  (comp-db-arg-listp (double-rewrite acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-take

    (defthm comp-db-arg-listp-of-take
      (implies (comp-db-arg-listp (double-rewrite acl2::x))
               (iff (comp-db-arg-listp (take acl2::n acl2::x))
                    (or (comp-db-argp nil)
                        (<= (nfix acl2::n) (len acl2::x)))))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-repeat

    (defthm comp-db-arg-listp-of-repeat
      (iff (comp-db-arg-listp (repeat acl2::n acl2::x))
           (or (comp-db-argp acl2::x)
               (zp acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-argp-of-nth-when-comp-db-arg-listp

    (defthm comp-db-argp-of-nth-when-comp-db-arg-listp
      (implies (comp-db-arg-listp acl2::x)
               (iff (comp-db-argp (nth acl2::n acl2::x))
                    (< (nfix acl2::n) (len acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-update-nth

    (defthm comp-db-arg-listp-of-update-nth
      (implies
           (comp-db-arg-listp (double-rewrite acl2::x))
           (iff (comp-db-arg-listp (update-nth acl2::n acl2::y acl2::x))
                (and (comp-db-argp acl2::y)
                     (or (<= (nfix acl2::n) (len acl2::x))
                         (comp-db-argp nil)))))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-butlast

    (defthm comp-db-arg-listp-of-butlast
      (implies (comp-db-arg-listp (double-rewrite acl2::x))
               (comp-db-arg-listp (butlast acl2::x acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-nthcdr

    (defthm comp-db-arg-listp-of-nthcdr
      (implies (comp-db-arg-listp (double-rewrite acl2::x))
               (comp-db-arg-listp (nthcdr acl2::n acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-last

    (defthm comp-db-arg-listp-of-last
      (implies (comp-db-arg-listp (double-rewrite acl2::x))
               (comp-db-arg-listp (last acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-remove

    (defthm comp-db-arg-listp-of-remove
      (implies (comp-db-arg-listp acl2::x)
               (comp-db-arg-listp (remove acl2::a acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: comp-db-arg-listp-of-revappend

    (defthm comp-db-arg-listp-of-revappend
      (equal (comp-db-arg-listp (revappend acl2::x acl2::y))
             (and (comp-db-arg-listp (list-fix acl2::x))
                  (comp-db-arg-listp acl2::y)))
      :rule-classes ((:rewrite)))