• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
        • Acre-internals
          • Regex
          • Match-string-at
          • Matchstatelist-measure
          • Parse-primitive
          • Matches-remove-zero-length
          • Parse-repeatop
          • Parse-repeatbase
          • Matchstatelist-in-bounds
          • Parse-range
          • Parse-charset-set
          • Parse-charset-atom
          • Match-regex-locs
          • Parse-octal-charcode
          • Parse-k-backref
          • Parse-g-backref
          • Matchstatelist-all-have-backref
          • Parse-repeatmod
          • Parse-charset-elem
          • Parse-charset-aux
          • Parse-hex-charcode
          • Parse-charset
          • Matchstatelist-indices-lte
          • Matchstatelist-indices-gte
          • Match-exact
          • Matches-add-backref
          • Matchresult
          • Preproc-legible-aux
          • Maybe-backref
          • Match-charset
          • Undup-equiv
          • Find-substr
          • Maybe-backref-extract-substr
          • Matchstatelist-min-index
          • Matchstate-in-bounds
          • Match-add-backref
          • Undup
          • Backref-alist-in-bounds
          • Backref
          • Matchstate
          • Matchresult->matched-substr
          • Matchresult->captured-substr!
          • Matchresult->captured-substr
          • Maybe-backref-in-bounds
          • Matchmode
          • Backref-extract-substr
          • Charset-range
          • Matchstate-measure
          • Backref-in-bounds
          • Rev-keys
          • Parse-regex
          • Undup-exec
          • Get-charset
          • Regex-concat2
          • Preproc-legible
          • Matchresult-in-bounds
          • Regex-disjunct2
          • Backref-alist
          • Named-captures-bindings
          • Captures-bindings
          • Matchstatelist
            • Matchstatelist-fix
            • Matchstatelist-equiv
            • Matchstatelist-p
              • Matchstatelist-p-basics
            • Charset-char-regex
            • Repeatmod-p
          • Parse-and-match-regex
          • Match-regex
          • Parse
          • Matchresult->matchedp
          • Match
        • Milawa
        • Smtlink
        • Abnf
        • Vwsim
        • Isar
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • C
        • Proof-checker-array
        • Soft
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Ethereum
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Matchstatelist-p

    Matchstatelist-p-basics

    Basic theorems about matchstatelist-p, generated by std::deflist.

    Definitions and Theorems

    Theorem: matchstatelist-p-of-cons

    (defthm matchstatelist-p-of-cons
      (equal (matchstatelist-p (cons acl2::a acl2::x))
             (and (matchstate-p acl2::a)
                  (matchstatelist-p acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: matchstatelist-p-of-cdr-when-matchstatelist-p

    (defthm matchstatelist-p-of-cdr-when-matchstatelist-p
      (implies (matchstatelist-p (double-rewrite acl2::x))
               (matchstatelist-p (cdr acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: matchstatelist-p-when-not-consp

    (defthm matchstatelist-p-when-not-consp
      (implies (not (consp acl2::x))
               (equal (matchstatelist-p acl2::x)
                      (not acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: matchstate-p-of-car-when-matchstatelist-p

    (defthm matchstate-p-of-car-when-matchstatelist-p
      (implies (matchstatelist-p acl2::x)
               (iff (matchstate-p (car acl2::x))
                    (or (consp acl2::x)
                        (matchstate-p nil))))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-when-matchstatelist-p-compound-recognizer

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

    Theorem: matchstatelist-p-of-list-fix

    (defthm matchstatelist-p-of-list-fix
      (implies (matchstatelist-p acl2::x)
               (matchstatelist-p (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: matchstatelist-p-of-rev

    (defthm matchstatelist-p-of-rev
      (equal (matchstatelist-p (rev acl2::x))
             (matchstatelist-p (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: matchstatelist-p-of-append

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

    Theorem: matchstatelist-p-of-rcons

    (defthm matchstatelist-p-of-rcons
      (iff (matchstatelist-p (rcons acl2::a acl2::x))
           (and (matchstate-p acl2::a)
                (matchstatelist-p (list-fix acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: matchstate-p-when-member-equal-of-matchstatelist-p

    (defthm matchstate-p-when-member-equal-of-matchstatelist-p
      (and (implies (and (member-equal acl2::a acl2::x)
                         (matchstatelist-p acl2::x))
                    (matchstate-p acl2::a))
           (implies (and (matchstatelist-p acl2::x)
                         (member-equal acl2::a acl2::x))
                    (matchstate-p acl2::a)))
      :rule-classes ((:rewrite)))

    Theorem: matchstatelist-p-when-subsetp-equal

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

    Theorem: matchstatelist-p-of-set-difference-equal

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

    Theorem: matchstatelist-p-of-intersection-equal-1

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

    Theorem: matchstatelist-p-of-intersection-equal-2

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

    Theorem: matchstatelist-p-of-union-equal

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

    Theorem: matchstatelist-p-of-undup

    (defthm matchstatelist-p-of-undup
      (implies (matchstatelist-p x)
               (matchstatelist-p (undup x)))
      :rule-classes ((:rewrite)))