• 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
            • Backref-alist-p
              • Backref-alist-fix
              • Backref-alist-equiv
            • Named-captures-bindings
            • Captures-bindings
            • Matchstatelist
            • 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
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Backref-alist

    Backref-alist-p

    Recognizer for backref-alist.

    Signature
    (backref-alist-p x) → *

    Definitions and Theorems

    Function: backref-alist-p

    (defun backref-alist-p (x)
      (declare (xargs :guard t))
      (let ((__function__ 'backref-alist-p))
        (declare (ignorable __function__))
        (if (atom x)
            (eq x nil)
          (and (consp (car x))
               (backref-p (cdar x))
               (backref-alist-p (cdr x))))))

    Theorem: backref-alist-p-of-undup

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

    Theorem: backref-alist-p-of-union-equal

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

    Theorem: backref-alist-p-of-intersection-equal-2

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

    Theorem: backref-alist-p-of-intersection-equal-1

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

    Theorem: backref-alist-p-of-set-difference-equal

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

    Theorem: backref-alist-p-when-subsetp-equal

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

    Theorem: backref-alist-p-of-rcons

    (defthm backref-alist-p-of-rcons
      (iff (backref-alist-p (rcons acl2::a acl2::x))
           (and (and (consp acl2::a)
                     (backref-p (cdr acl2::a)))
                (backref-alist-p (list-fix acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: backref-alist-p-of-append

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

    Theorem: backref-alist-p-of-rev

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

    Theorem: backref-alist-p-of-list-fix

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

    Theorem: true-listp-when-backref-alist-p-compound-recognizer

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

    Theorem: backref-alist-p-when-not-consp

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

    Theorem: backref-alist-p-of-cdr-when-backref-alist-p

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

    Theorem: backref-alist-p-of-cons

    (defthm backref-alist-p-of-cons
      (equal (backref-alist-p (cons acl2::a acl2::x))
             (and (and (consp acl2::a)
                       (backref-p (cdr acl2::a)))
                  (backref-alist-p acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: backref-alist-p-of-remove-assoc

    (defthm backref-alist-p-of-remove-assoc
     (implies (backref-alist-p acl2::x)
              (backref-alist-p (remove-assoc-equal acl2::name acl2::x)))
     :rule-classes ((:rewrite)))

    Theorem: backref-alist-p-of-put-assoc

    (defthm backref-alist-p-of-put-assoc
     (implies
      (and (backref-alist-p acl2::x))
      (iff
        (backref-alist-p (put-assoc-equal acl2::name acl2::val acl2::x))
        (and t (backref-p acl2::val))))
     :rule-classes ((:rewrite)))

    Theorem: backref-alist-p-of-fast-alist-clean

    (defthm backref-alist-p-of-fast-alist-clean
      (implies (backref-alist-p acl2::x)
               (backref-alist-p (fast-alist-clean acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: backref-alist-p-of-hons-shrink-alist

    (defthm backref-alist-p-of-hons-shrink-alist
      (implies (and (backref-alist-p acl2::x)
                    (backref-alist-p acl2::y))
               (backref-alist-p (hons-shrink-alist acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: backref-alist-p-of-hons-acons

    (defthm backref-alist-p-of-hons-acons
      (equal (backref-alist-p (hons-acons acl2::a acl2::n acl2::x))
             (and t (backref-p acl2::n)
                  (backref-alist-p acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: backref-p-of-cdr-of-hons-assoc-equal-when-backref-alist-p

    (defthm backref-p-of-cdr-of-hons-assoc-equal-when-backref-alist-p
      (implies (backref-alist-p acl2::x)
               (iff (backref-p (cdr (hons-assoc-equal acl2::k acl2::x)))
                    (or (hons-assoc-equal acl2::k acl2::x)
                        (backref-p nil))))
      :rule-classes ((:rewrite)))

    Theorem: alistp-when-backref-alist-p-rewrite

    (defthm alistp-when-backref-alist-p-rewrite
      (implies (backref-alist-p acl2::x)
               (alistp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: alistp-when-backref-alist-p

    (defthm alistp-when-backref-alist-p
      (implies (backref-alist-p acl2::x)
               (alistp acl2::x))
      :rule-classes :tau-system)

    Theorem: backref-p-of-cdar-when-backref-alist-p

    (defthm backref-p-of-cdar-when-backref-alist-p
      (implies (backref-alist-p acl2::x)
               (iff (backref-p (cdar acl2::x))
                    (or (consp acl2::x) (backref-p nil))))
      :rule-classes ((:rewrite)))