• 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
                  • Expr
                  • Type-spec
                  • Stmt
                  • Amb-expr/tyname
                  • Dirdeclor
                  • Asm-stmt
                  • Attrib
                  • Amb-decl/stmt
                  • Dirabsdeclor
                  • Decl-spec
                  • Struct-declon
                  • Amb-declor/absdeclor
                  • Struni-spec
                  • Param-declor
                  • Declor
                  • Initdeclor
                  • Absdeclor
                  • Tyname
                  • Label
                  • Align-spec
                  • Expr-option
                  • Spec/qual
                  • Desiniter
                  • Param-declon
                  • Dirabsdeclor-option
                  • Comp-stmt
                  • Const-expr-option
                  • Attrib-spec
                  • Struct-declor
                  • Decl
                  • Initer
                  • Absdeclor-option
                  • Statassert
                  • Member-designor
                  • Initer-option
                  • Enum-spec
                  • Declor-option
                  • Block-item
                  • Const-expr
                  • Genassoc
                  • Asm-output
                  • Asm-input
                  • Designor
                  • Enumer
                  • Typequal/attribspec
                  • Typequal/attribspec-list
                  • Decl-spec-list
                  • Spec/qual-list
                  • Desiniter-list
                  • Attrib-spec-list
                  • Param-declon-list
                  • Decl-list
                  • Typequal/attribspec-list-list
                  • Struct-declor-list
                  • Struct-declon-list
                    • Struct-declon-listp
                      • Struct-declon-listp-basics
                      • Struct-declon-list-equiv
                      • Struct-declon-list-fix
                    • Initdeclor-list
                    • Genassoc-list
                    • Block-item-list
                    • Enumer-list
                    • Expr-list
                    • Asm-output-list
                    • Asm-input-list
                    • Designor-list
                    • Attrib-list
                  • 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
                    • Struct-declon-listp
                      • Struct-declon-listp-basics
                      • Struct-declon-list-equiv
                      • Struct-declon-list-fix
                    • Initdeclor-list
                    • Genassoc-list
                    • Extdecl-list
                    • 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
      • Struct-declon-listp

      Struct-declon-listp-basics

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

      Definitions and Theorems

      Theorem: struct-declon-listp-of-cons

      (defthm struct-declon-listp-of-cons
        (equal (struct-declon-listp (cons acl2::a acl2::x))
               (and (struct-declonp acl2::a)
                    (struct-declon-listp acl2::x)))
        :rule-classes ((:rewrite)))

      Theorem: struct-declon-listp-of-cdr-when-struct-declon-listp

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

      Theorem: struct-declon-listp-when-not-consp

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

      Theorem: struct-declonp-of-car-when-struct-declon-listp

      (defthm struct-declonp-of-car-when-struct-declon-listp
        (implies (struct-declon-listp acl2::x)
                 (iff (struct-declonp (car acl2::x))
                      (consp acl2::x)))
        :rule-classes ((:rewrite)))

      Theorem: true-listp-when-struct-declon-listp-compound-recognizer

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

      Theorem: struct-declon-listp-of-list-fix

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

      Theorem: struct-declon-listp-of-sfix

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

      Theorem: struct-declon-listp-of-insert

      (defthm struct-declon-listp-of-insert
        (iff (struct-declon-listp (insert acl2::a acl2::x))
             (and (struct-declon-listp (sfix acl2::x))
                  (struct-declonp acl2::a)))
        :rule-classes ((:rewrite)))

      Theorem: struct-declon-listp-of-delete

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

      Theorem: struct-declon-listp-of-mergesort

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

      Theorem: struct-declon-listp-of-union

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

      Theorem: struct-declon-listp-of-intersect-1

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

      Theorem: struct-declon-listp-of-intersect-2

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

      Theorem: struct-declon-listp-of-difference

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

      Theorem: struct-declon-listp-of-duplicated-members

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

      Theorem: struct-declon-listp-of-rev

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

      Theorem: struct-declon-listp-of-append

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

      Theorem: struct-declon-listp-of-rcons

      (defthm struct-declon-listp-of-rcons
        (iff (struct-declon-listp (rcons acl2::a acl2::x))
             (and (struct-declonp acl2::a)
                  (struct-declon-listp (list-fix acl2::x))))
        :rule-classes ((:rewrite)))

      Theorem: struct-declonp-when-member-equal-of-struct-declon-listp

      (defthm struct-declonp-when-member-equal-of-struct-declon-listp
        (and (implies (and (member-equal acl2::a acl2::x)
                           (struct-declon-listp acl2::x))
                      (struct-declonp acl2::a))
             (implies (and (struct-declon-listp acl2::x)
                           (member-equal acl2::a acl2::x))
                      (struct-declonp acl2::a)))
        :rule-classes ((:rewrite)))

      Theorem: struct-declon-listp-when-subsetp-equal

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

      Theorem: struct-declon-listp-of-set-difference-equal

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

      Theorem: struct-declon-listp-of-intersection-equal-1

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

      Theorem: struct-declon-listp-of-intersection-equal-2

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

      Theorem: struct-declon-listp-of-union-equal

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

      Theorem: struct-declon-listp-of-take

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

      Theorem: struct-declon-listp-of-repeat

      (defthm struct-declon-listp-of-repeat
        (iff (struct-declon-listp (repeat acl2::n acl2::x))
             (or (struct-declonp acl2::x)
                 (zp acl2::n)))
        :rule-classes ((:rewrite)))

      Theorem: struct-declonp-of-nth-when-struct-declon-listp

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

      Theorem: struct-declon-listp-of-update-nth

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

      Theorem: struct-declon-listp-of-butlast

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

      Theorem: struct-declon-listp-of-nthcdr

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

      Theorem: struct-declon-listp-of-last

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

      Theorem: struct-declon-listp-of-remove

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

      Theorem: struct-declon-listp-of-revappend

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