• 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
          • Atc
          • Transformation-tools
          • Language
          • Representation
            • Representation-of-integer-operations
            • Atc-arrays
            • Representation-of-integers
              • Def-integer-values
              • Ushort-list-from-integer-list
              • Ullong-list-from-integer-list
              • Sshort-list-from-integer-list
              • Sllong-list-from-integer-list
              • Integer-list-from-ushort-list
              • Integer-list-from-ullong-list
              • Integer-list-from-sshort-list
              • Integer-list-from-sllong-list
              • Ulong-list-from-integer-list
              • Uchar-list-from-integer-list
              • Slong-list-from-integer-list
              • Schar-list-from-integer-list
              • Integer-list-from-ulong-list
              • Integer-list-from-uchar-list
              • Integer-list-from-slong-list
              • Integer-list-from-schar-list
              • Uint-list-from-integer-list
              • Sint-list-from-integer-list
              • Integer-list-from-uint-list
              • Integer-list-from-sint-list
              • Cinteger
              • Sintp
              • Ullongp
              • Ucharp
              • Ushortp
              • Ulongp
              • Uintp
              • Sllongp
              • Slongp
              • Sshortp
              • Scharp
              • Integer-from-sshort
              • Integer-from-sllong
              • Integer-from-sint
              • Integer-from-slong
              • Integer-from-schar
              • Integer-type-to-fixtype
              • Integer-from-ushort
              • Integer-from-ullong
              • Integer-from-uchar
              • Integer-from-cinteger
              • Integer-from-ulong
              • Integer-from-uint
              • Def-integer-values-loop
              • Sint-from-integer
              • Sint
              • Fixtype-to-integer-type
              • Uchar-from-integer
              • Ushort-from-integer-mod
              • Ushort-from-integer
              • Ulong-from-integer-mod
              • Ulong-from-integer
              • Ullong-from-integer-mod
              • Ullong-from-integer
              • Uchar-from-integer-mod
              • Sshort-from-integer
              • Slong-from-integer
              • Sllong-from-integer
              • Schar-from-integer
              • Uint-from-integer-mod
              • Uint-from-integer
              • Uchar
              • Schar
              • Ushort
              • Ulong
              • Ullong
              • Sshort
              • Slong
              • Sllong
              • Ullong-fix
              • Uint
              • Uchar-fix
              • Sint-fix
              • Ushort-fix
              • Ulong-fix
              • Uint-fix
              • Sshort-fix
              • Slong-fix
              • Sllong-fix
              • Schar-fix
              • Ushort-list
              • Ulong-list
              • Ullong-list
              • Uint-list
              • Uchar-list
              • Sshort-list
                • Sshort-list-fix
                • Sshort-list-equiv
                • Sshort-listp
                  • Sshort-listp-basics
                • Slong-list
                • Sllong-list
                • Sint-list
                • Schar-list
                • Integer-type-to/from-fixtype-theorems
                • *nonchar-integer-fixtypes*
              • Representation-of-integer-conversions
              • Pointed-integers
              • Shallow-deep-embedding-relation
            • 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
    • Sshort-listp

    Sshort-listp-basics

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

    Definitions and Theorems

    Theorem: sshort-listp-of-cons

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

    Theorem: sshort-listp-of-cdr-when-sshort-listp

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

    Theorem: sshort-listp-when-not-consp

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

    Theorem: sshortp-of-car-when-sshort-listp

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

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

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

    Theorem: sshort-listp-of-list-fix

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

    Theorem: sshort-listp-of-sfix

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

    Theorem: sshort-listp-of-insert

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

    Theorem: sshort-listp-of-delete

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

    Theorem: sshort-listp-of-mergesort

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

    Theorem: sshort-listp-of-union

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

    Theorem: sshort-listp-of-intersect-1

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

    Theorem: sshort-listp-of-intersect-2

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

    Theorem: sshort-listp-of-difference

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

    Theorem: sshort-listp-of-duplicated-members

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

    Theorem: sshort-listp-of-rev

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

    Theorem: sshort-listp-of-append

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

    Theorem: sshort-listp-of-rcons

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

    Theorem: sshortp-when-member-equal-of-sshort-listp

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

    Theorem: sshort-listp-when-subsetp-equal

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

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

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

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

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

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

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

    Theorem: sshort-listp-of-union-equal

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

    Theorem: sshort-listp-of-take

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

    Theorem: sshort-listp-of-repeat

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

    Theorem: sshortp-of-nth-when-sshort-listp

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

    Theorem: sshort-listp-of-update-nth

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

    Theorem: sshort-listp-of-butlast

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

    Theorem: sshort-listp-of-nthcdr

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

    Theorem: sshort-listp-of-last

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

    Theorem: sshort-listp-of-remove

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

    Theorem: sshort-listp-of-revappend

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