• 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
              • Abstract-syntax-trees
                • Expr
                • Type-spec
                • Exprs/decls/stmts
                • Binop
                • Stmt
                • Unop
                • Amb-expr/tyname
                • Dirdeclor
                • Asm-stmt
                • Dec/oct/hex-const
                • Simple-escape
                • Fsuffix
                • Attrib
                • Ident
                • Amb-decl/stmt
                • Dirabsdeclor
                • Type-qual
                • Decl-spec
                • Fundef
                • Struct-declon
                • Asm-name-spec
                • Amb-declor/absdeclor
                • Struni-spec
                • Param-declor
                • Declor
                • Stor-spec
                • Transunit-ensemble
                • Initdeclor
                • Absdeclor
                • Tyname
                • Keyword-uscores
                • Label
                • Align-spec
                • Expr-option
                • Spec/qual
                • Lsuffix
                • Hex-frac-const
                • Desiniter
                • Param-declon
                • Iconst
                • Dirabsdeclor-option
                • Dec-frac-const
                • Dec-core-fconst
                • Comp-stmt
                • Extdecl
                • Const-expr-option
                • Amb?-declor/absdeclor
                • Isuffix
                • Hex-core-fconst
                • Attrib-spec
                • Struct-declor
                • Escape
                • Decl
                • Amb?-expr/tyname
                • Initer
                • Ident-option
                • Bin-expo
                • Absdeclor-option
                • Statassert
                • Member-designor
                • Initer-option
                • Enum-spec
                • Declor-option
                • Const
                • Block-item
                • Hex-quad
                • Eprefix
                • Const-expr
                • Oct-escape
                • Inc/dec-op
                • Fun-spec
                • Dec-expo
                • Cprefix-option
                • Asm-name-spec-option
                • Amb?-decl/stmt
                • S-char
                • Isuffix-option
                • Genassoc
                • Fsuffix-option
                • Fconst
                • Eprefix-option
                • Dec-expo-option
                • Cprefix
                • C-char
                • Type-spec-option
                • Sign-option
                • Sign
                • Q-char
                • Iconst-option
                • H-char
                • Fundef-option
                • Asm-output
                • Asm-input
                • Designor
                • Const-option
                • Usuffix
                • Univ-char-name
                • Hprefix
                • Enumer
                • Attrib-name
                • Transunit
                • Asm-qual
                • Typequal/attribspec
                • Stringlit
                • Dec-expo-prefix
                • Bin-expo-prefix
                • Header-name
                • Cconst
                • Expr/tyname
                • Decl/stmt
                • Declor/absdeclor
                • Asm-clobber
                • Typequal/attribspec-list
                • Decl-spec-list
                • Stringlit-list
                • Spec/qual-list
                • Inc/dec-op-list
                • Desiniter-list
                • Attrib-spec-list
                • S-char-list
                • Q-char-list
                • Param-declon-list
                • H-char-list
                • Decl-list
                • C-char-list
                • Typequal/attribspec-list-list
                • Struct-declor-list
                • Struct-declon-list
                • Initdeclor-list
                • Genassoc-list
                • Extdecl-list
                  • Extdecl-list-fix
                  • Extdecl-listp
                    • Extdecl-listp-basics
                    • Extdecl-list-equiv
                  • Block-item-list
                  • Enumer-list
                  • Ident-list
                  • Filepath-transunit-map
                  • Expr-list
                  • Asm-qual-list
                  • Asm-output-list
                  • Asm-input-list
                  • Asm-clobber-list
                  • Type-spec-list
                  • Stor-spec-list
                  • Ident-set
                  • Ident-option-set
                  • Ident-list-list
                  • Eprefix-option-list
                  • Designor-list
                  • Attrib-list
                • Abstract-syntax-irrelevants
                • Type-specifier-lists
                • Ascii-identifiers
                • Abstraction-mapping
                • Standard
                • Storage-specifier-lists
                • Code-ensembles
                • Purity
                • Make-self-code-ensemble
              • 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
    • Extdecl-listp

    Extdecl-listp-basics

    Basic theorems about extdecl-listp, generated by std::deflist.

    Definitions and Theorems

    Theorem: extdecl-listp-of-cons

    (defthm extdecl-listp-of-cons
      (equal (extdecl-listp (cons acl2::a acl2::x))
             (and (extdeclp acl2::a)
                  (extdecl-listp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-of-cdr-when-extdecl-listp

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

    Theorem: extdecl-listp-when-not-consp

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

    Theorem: extdeclp-of-car-when-extdecl-listp

    (defthm extdeclp-of-car-when-extdecl-listp
      (implies (extdecl-listp acl2::x)
               (iff (extdeclp (car acl2::x))
                    (consp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-when-extdecl-listp-compound-recognizer

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

    Theorem: extdecl-listp-of-list-fix

    (defthm extdecl-listp-of-list-fix
      (implies (extdecl-listp acl2::x)
               (extdecl-listp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-of-sfix

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

    Theorem: extdecl-listp-of-insert

    (defthm extdecl-listp-of-insert
      (iff (extdecl-listp (insert acl2::a acl2::x))
           (and (extdecl-listp (sfix acl2::x))
                (extdeclp acl2::a)))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-of-delete

    (defthm extdecl-listp-of-delete
      (implies (extdecl-listp acl2::x)
               (extdecl-listp (delete acl2::k acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-of-mergesort

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

    Theorem: extdecl-listp-of-union

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

    Theorem: extdecl-listp-of-intersect-1

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

    Theorem: extdecl-listp-of-intersect-2

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

    Theorem: extdecl-listp-of-difference

    (defthm extdecl-listp-of-difference
      (implies (extdecl-listp acl2::x)
               (extdecl-listp (difference acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-of-duplicated-members

    (defthm extdecl-listp-of-duplicated-members
      (implies (extdecl-listp acl2::x)
               (extdecl-listp (duplicated-members acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-of-rev

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

    Theorem: extdecl-listp-of-append

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

    Theorem: extdecl-listp-of-rcons

    (defthm extdecl-listp-of-rcons
      (iff (extdecl-listp (rcons acl2::a acl2::x))
           (and (extdeclp acl2::a)
                (extdecl-listp (list-fix acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: extdeclp-when-member-equal-of-extdecl-listp

    (defthm extdeclp-when-member-equal-of-extdecl-listp
      (and (implies (and (member-equal acl2::a acl2::x)
                         (extdecl-listp acl2::x))
                    (extdeclp acl2::a))
           (implies (and (extdecl-listp acl2::x)
                         (member-equal acl2::a acl2::x))
                    (extdeclp acl2::a)))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-when-subsetp-equal

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

    Theorem: extdecl-listp-of-set-difference-equal

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

    Theorem: extdecl-listp-of-intersection-equal-1

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

    Theorem: extdecl-listp-of-intersection-equal-2

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

    Theorem: extdecl-listp-of-union-equal

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

    Theorem: extdecl-listp-of-take

    (defthm extdecl-listp-of-take
      (implies (extdecl-listp (double-rewrite acl2::x))
               (iff (extdecl-listp (take acl2::n acl2::x))
                    (or (extdeclp nil)
                        (<= (nfix acl2::n) (len acl2::x)))))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-of-repeat

    (defthm extdecl-listp-of-repeat
      (iff (extdecl-listp (repeat acl2::n acl2::x))
           (or (extdeclp acl2::x) (zp acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: extdeclp-of-nth-when-extdecl-listp

    (defthm extdeclp-of-nth-when-extdecl-listp
      (implies (extdecl-listp acl2::x)
               (iff (extdeclp (nth acl2::n acl2::x))
                    (< (nfix acl2::n) (len acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-of-update-nth

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

    Theorem: extdecl-listp-of-butlast

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

    Theorem: extdecl-listp-of-nthcdr

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

    Theorem: extdecl-listp-of-last

    (defthm extdecl-listp-of-last
      (implies (extdecl-listp (double-rewrite acl2::x))
               (extdecl-listp (last acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-of-remove

    (defthm extdecl-listp-of-remove
      (implies (extdecl-listp acl2::x)
               (extdecl-listp (remove acl2::a acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: extdecl-listp-of-revappend

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