• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
        • Deftagsum
        • Defprod
        • Defflexsum
        • Defbitstruct
        • Deflist
        • Defalist
        • Defbyte
        • Defresult
        • Deffixequiv
        • Deffixtype
        • Defoption
        • Fty-discipline
        • Fold
        • Specific-types
        • Fty-extensions
        • Defsubtype
        • Deftypes
        • Defset
        • Defflatsum
        • Deflist-of-len
        • Defomap
        • Defbytelist
          • Defbytelist-standard-instances
            • Ubyte8-list
            • Ubyte4-list
            • Ubyte32-list
            • Ubyte256-list
              • Ubyte256-list-fix
              • Ubyte256-list-equiv
              • Ubyte256-listp
                • Ubyte256-listp-basics
              • Ubyte128-list
              • Ubyte64-list
              • Ubyte3-list
              • Ubyte2-list
              • Ubyte16-list
              • Ubyte11-list
              • Ubyte1-list
              • Sbyte8-list
              • Sbyte64-list
              • Sbyte4-list
              • Sbyte32-list
              • Sbyte3-list
              • Sbyte256-list
              • Sbyte2-list
              • Sbyte16-list
              • Sbyte128-list
              • Sbyte1-list
              • Defubytelist
              • Defsbytelist
            • Defbytelist-implementation
          • Fty::basetypes
          • Defvisitors
          • Deffixtype-alias
          • Deffixequiv-sk
          • Defunit
          • Multicase
          • Deffixequiv-mutual
          • Fty::baselists
          • Def-enumcase
          • Defmap
        • Apt
        • Std/util
        • Defdata
        • Defrstobj
        • Seq
        • Match-tree
        • Defrstobj
        • With-supporters
        • Def-partial-measure
        • Template-subst
        • Soft
        • Defthm-domain
        • Event-macros
        • Def-universal-equiv
        • Def-saved-obligs
        • With-supporters-after
        • Definec
        • Sig
        • Outer-local
        • Data-structures
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Ubyte256-listp

    Ubyte256-listp-basics

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

    Definitions and Theorems

    Theorem: ubyte256-listp-of-cons

    (defthm ubyte256-listp-of-cons
      (equal (ubyte256-listp (cons a x))
             (and (ubyte256p a) (ubyte256-listp x)))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256-listp-of-cdr-when-ubyte256-listp

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

    Theorem: ubyte256-listp-when-not-consp

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

    Theorem: ubyte256p-of-car-when-ubyte256-listp

    (defthm ubyte256p-of-car-when-ubyte256-listp
      (implies (ubyte256-listp x)
               (iff (ubyte256p (car x)) (consp x)))
      :rule-classes ((:rewrite)))

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

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

    Theorem: ubyte256-listp-of-list-fix

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

    Theorem: ubyte256-listp-of-sfix

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

    Theorem: ubyte256-listp-of-insert

    (defthm ubyte256-listp-of-insert
      (iff (ubyte256-listp (set::insert a x))
           (and (ubyte256-listp (set::sfix x))
                (ubyte256p a)))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256-listp-of-delete

    (defthm ubyte256-listp-of-delete
      (implies (ubyte256-listp x)
               (ubyte256-listp (set::delete k x)))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256-listp-of-mergesort

    (defthm ubyte256-listp-of-mergesort
      (iff (ubyte256-listp (set::mergesort x))
           (ubyte256-listp (list-fix x)))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256-listp-of-union

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

    Theorem: ubyte256-listp-of-intersect-1

    (defthm ubyte256-listp-of-intersect-1
      (implies (ubyte256-listp x)
               (ubyte256-listp (set::intersect x y)))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256-listp-of-intersect-2

    (defthm ubyte256-listp-of-intersect-2
      (implies (ubyte256-listp y)
               (ubyte256-listp (set::intersect x y)))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256-listp-of-difference

    (defthm ubyte256-listp-of-difference
      (implies (ubyte256-listp x)
               (ubyte256-listp (set::difference x y)))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256-listp-of-duplicated-members

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

    Theorem: ubyte256-listp-of-rev

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

    Theorem: ubyte256-listp-of-append

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

    Theorem: ubyte256-listp-of-rcons

    (defthm ubyte256-listp-of-rcons
      (iff (ubyte256-listp (rcons a x))
           (and (ubyte256p a)
                (ubyte256-listp (list-fix x))))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256p-when-member-equal-of-ubyte256-listp

    (defthm ubyte256p-when-member-equal-of-ubyte256-listp
      (and (implies (and (member-equal a x)
                         (ubyte256-listp x))
                    (ubyte256p a))
           (implies (and (ubyte256-listp x)
                         (member-equal a x))
                    (ubyte256p a)))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256-listp-when-subsetp-equal

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

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

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

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

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

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

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

    Theorem: ubyte256-listp-of-union-equal

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

    Theorem: ubyte256-listp-of-take

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

    Theorem: ubyte256-listp-of-repeat

    (defthm ubyte256-listp-of-repeat
      (iff (ubyte256-listp (repeat n x))
           (or (ubyte256p x) (zp n)))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256p-of-nth-when-ubyte256-listp

    (defthm ubyte256p-of-nth-when-ubyte256-listp
      (implies (ubyte256-listp x)
               (iff (ubyte256p (nth n x))
                    (< (nfix n) (len x))))
      :rule-classes ((:rewrite)))

    Theorem: ubyte256-listp-of-update-nth

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

    Theorem: ubyte256-listp-of-butlast

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

    Theorem: ubyte256-listp-of-nthcdr

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

    Theorem: ubyte256-listp-of-last

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

    Theorem: ubyte256-listp-of-remove

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

    Theorem: ubyte256-listp-of-revappend

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