• 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
            • Printer
            • Output-files
            • Abstract-syntax-operations
            • Implementation-environments
            • Abstract-syntax
            • Concrete-syntax
            • Disambiguation
              • Disambiguator
                • Dimb-exprs/decls/stmts
                • Dimb-make/adjust-expr-cast
                • Dimb-make/adjust-expr-binary
                • Dimb-params-to-names
                • Dimb-fundef
                • Dimb-cast/call-to-call
                • Dimb-transunit
                • Dimb-dirdeclor
                • Dimb-transunit-ensemble
                • Dimb-make/adjust-expr-unary
                • Dimb-expr
                • Dimb-amb-declor/absdeclor
                • Dimb-cast/call-to-cast
                • Dimb-cast/addsub-to-cast
                • Dimb-cast/addsub-to-addsub
                • Dimb-add-ident
                • Dimb-kind
                • Dimb-amb-expr/tyname
                • Dimb-cast/logand-to-logand
                • Dimb-cast/and-to-cast
                • Dimb-extdecl-list
                • Dimb-cast/mul-to-cast
                • Dimb-cast/logand-to-cast
                • Dimb-extdecl
                • Dimb-cast/mul-to-mul
                • Dimb-cast/and-to-and
                • Dimb-declor
                • Dimb-kind-option
                • Dimb-type-spec
                • Dimb-add-ident-objfun-file-scope
                • Dimb-make/adjust-expr-label-addr
                • Dimb-param-declor
                • Dimb-lookup-ident
                • Dimb-decl-spec
                • Dimb-add-idents-objfun
                • Dimb-add-ident-objfun
                • Dimb-param-declon
                • Dimb-amb-decl/stmt
                • Dimb-table
                  • Dimb-tablep
                    • Dimb-tablep-basics
                    • Dimb-table-fix
                    • Dimb-table-equiv
                  • Dimb-pop-scope
                  • Dimb-initdeclor
                  • Dimb-stmt
                  • Dimb-push-scope
                  • Dimb-comp-stmt
                  • Dimb-declor-option
                  • Dimb-enum-spec
                  • Dimb-decl
                  • Dimb-struct-declor
                  • Dimb-scope
                  • Dimb-initdeclor-list
                  • Dimb-decl-spec-list
                  • Dimb-absdeclor
                  • Dimb-dirabsdeclor
                  • Dimb-align-spec
                  • Dimb-struni-spec
                  • Dimb-init-table
                  • Dimb-spec/qual-list
                  • Dimb-spec/qual
                  • Irr-dimb-table
                  • Irr-dimb-kind
                  • Dimb-param-declon-list
                  • Dimb-enumer-list
                  • Dimb-enumer
                  • Dimb-dirabsdeclor-option
                  • Dimb-block-item
                  • Dimb-struct-declor-list
                  • Dimb-struct-declon-list
                  • Dimb-struct-declon
                  • Dimb-statassert
                  • Dimb-label
                  • Dimb-desiniter-list
                  • Dimb-desiniter
                  • Dimb-decl-list
                  • Dimb-const-expr-option
                  • Dimb-absdeclor-option
                  • Dimb-member-designor
                  • Dimb-initer-option
                  • Dimb-genassoc-list
                  • Dimb-genassoc
                  • Dimb-expr-option
                  • Dimb-expr-list
                  • Dimb-designor-list
                  • Dimb-designor
                  • Dimb-const-expr
                  • Dimb-block-item-list
                  • Dimb-tyname
                  • Dimb-initer
                • Unambiguity
              • 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
    • Dimb-tablep

    Dimb-tablep-basics

    Basic theorems about dimb-tablep, generated by std::deflist.

    Definitions and Theorems

    Theorem: dimb-tablep-of-cons

    (defthm dimb-tablep-of-cons
      (equal (dimb-tablep (cons acl2::a acl2::x))
             (and (dimb-scopep acl2::a)
                  (dimb-tablep acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-cdr-when-dimb-tablep

    (defthm dimb-tablep-of-cdr-when-dimb-tablep
      (implies (dimb-tablep (double-rewrite acl2::x))
               (dimb-tablep (cdr acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-when-not-consp

    (defthm dimb-tablep-when-not-consp
      (implies (not (consp acl2::x))
               (equal (dimb-tablep acl2::x)
                      (not acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-car-when-dimb-tablep

    (defthm dimb-scopep-of-car-when-dimb-tablep
      (implies (dimb-tablep acl2::x)
               (dimb-scopep (car acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-when-dimb-tablep-compound-recognizer

    (defthm true-listp-when-dimb-tablep-compound-recognizer
      (implies (dimb-tablep acl2::x)
               (true-listp acl2::x))
      :rule-classes :compound-recognizer)

    Theorem: dimb-tablep-of-list-fix

    (defthm dimb-tablep-of-list-fix
      (implies (dimb-tablep acl2::x)
               (dimb-tablep (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-sfix

    (defthm dimb-tablep-of-sfix
      (iff (dimb-tablep (sfix acl2::x))
           (or (dimb-tablep acl2::x)
               (not (setp acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-insert

    (defthm dimb-tablep-of-insert
      (iff (dimb-tablep (insert acl2::a acl2::x))
           (and (dimb-tablep (sfix acl2::x))
                (dimb-scopep acl2::a)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-delete

    (defthm dimb-tablep-of-delete
      (implies (dimb-tablep acl2::x)
               (dimb-tablep (delete acl2::k acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-mergesort

    (defthm dimb-tablep-of-mergesort
      (iff (dimb-tablep (mergesort acl2::x))
           (dimb-tablep (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-union

    (defthm dimb-tablep-of-union
      (iff (dimb-tablep (union acl2::x acl2::y))
           (and (dimb-tablep (sfix acl2::x))
                (dimb-tablep (sfix acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-intersect-1

    (defthm dimb-tablep-of-intersect-1
      (implies (dimb-tablep acl2::x)
               (dimb-tablep (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-intersect-2

    (defthm dimb-tablep-of-intersect-2
      (implies (dimb-tablep acl2::y)
               (dimb-tablep (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-difference

    (defthm dimb-tablep-of-difference
      (implies (dimb-tablep acl2::x)
               (dimb-tablep (difference acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-duplicated-members

    (defthm dimb-tablep-of-duplicated-members
      (implies (dimb-tablep acl2::x)
               (dimb-tablep (duplicated-members acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-rev

    (defthm dimb-tablep-of-rev
      (equal (dimb-tablep (rev acl2::x))
             (dimb-tablep (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-append

    (defthm dimb-tablep-of-append
      (equal (dimb-tablep (append acl2::a acl2::b))
             (and (dimb-tablep (list-fix acl2::a))
                  (dimb-tablep acl2::b)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-rcons

    (defthm dimb-tablep-of-rcons
      (iff (dimb-tablep (rcons acl2::a acl2::x))
           (and (dimb-scopep acl2::a)
                (dimb-tablep (list-fix acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-when-member-equal-of-dimb-tablep

    (defthm dimb-scopep-when-member-equal-of-dimb-tablep
      (and (implies (and (member-equal acl2::a acl2::x)
                         (dimb-tablep acl2::x))
                    (dimb-scopep acl2::a))
           (implies (and (dimb-tablep acl2::x)
                         (member-equal acl2::a acl2::x))
                    (dimb-scopep acl2::a)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-when-subsetp-equal

    (defthm dimb-tablep-when-subsetp-equal
      (and (implies (and (subsetp-equal acl2::x acl2::y)
                         (dimb-tablep acl2::y))
                    (equal (dimb-tablep acl2::x)
                           (true-listp acl2::x)))
           (implies (and (dimb-tablep acl2::y)
                         (subsetp-equal acl2::x acl2::y))
                    (equal (dimb-tablep acl2::x)
                           (true-listp acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-set-difference-equal

    (defthm dimb-tablep-of-set-difference-equal
      (implies (dimb-tablep acl2::x)
               (dimb-tablep (set-difference-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-intersection-equal-1

    (defthm dimb-tablep-of-intersection-equal-1
      (implies (dimb-tablep (double-rewrite acl2::x))
               (dimb-tablep (intersection-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-intersection-equal-2

    (defthm dimb-tablep-of-intersection-equal-2
      (implies (dimb-tablep (double-rewrite acl2::y))
               (dimb-tablep (intersection-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-union-equal

    (defthm dimb-tablep-of-union-equal
      (equal (dimb-tablep (union-equal acl2::x acl2::y))
             (and (dimb-tablep (list-fix acl2::x))
                  (dimb-tablep (double-rewrite acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-take

    (defthm dimb-tablep-of-take
      (implies (dimb-tablep (double-rewrite acl2::x))
               (iff (dimb-tablep (take acl2::n acl2::x))
                    (or (dimb-scopep nil)
                        (<= (nfix acl2::n) (len acl2::x)))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-repeat

    (defthm dimb-tablep-of-repeat
      (iff (dimb-tablep (repeat acl2::n acl2::x))
           (or (dimb-scopep acl2::x) (zp acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-scopep-of-nth-when-dimb-tablep

    (defthm dimb-scopep-of-nth-when-dimb-tablep
      (implies (dimb-tablep acl2::x)
               (dimb-scopep (nth acl2::n acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-update-nth

    (defthm dimb-tablep-of-update-nth
      (implies (dimb-tablep (double-rewrite acl2::x))
               (iff (dimb-tablep (update-nth acl2::n acl2::y acl2::x))
                    (and (dimb-scopep acl2::y)
                         (or (<= (nfix acl2::n) (len acl2::x))
                             (dimb-scopep nil)))))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-butlast

    (defthm dimb-tablep-of-butlast
      (implies (dimb-tablep (double-rewrite acl2::x))
               (dimb-tablep (butlast acl2::x acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-nthcdr

    (defthm dimb-tablep-of-nthcdr
      (implies (dimb-tablep (double-rewrite acl2::x))
               (dimb-tablep (nthcdr acl2::n acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-last

    (defthm dimb-tablep-of-last
      (implies (dimb-tablep (double-rewrite acl2::x))
               (dimb-tablep (last acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-remove

    (defthm dimb-tablep-of-remove
      (implies (dimb-tablep acl2::x)
               (dimb-tablep (remove acl2::a acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: dimb-tablep-of-revappend

    (defthm dimb-tablep-of-revappend
      (equal (dimb-tablep (revappend acl2::x acl2::y))
             (and (dimb-tablep (list-fix acl2::x))
                  (dimb-tablep acl2::y)))
      :rule-classes ((:rewrite)))