• 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
          • Isodata
            • Isodata-implementation
              • Isodata-event-generation
              • Isodata-fn
              • Isodata-input-processing
                • Isodata-symbol-isomap-alistp
                  • Isodata-isomapp
                  • Isodata-pos-isomap-alistp
                  • Isodata-process-iso
                  • Isodata-process-inputs
                  • Isodata-process-arg/res-list-iso
                  • Isodata-process-isomaps
                  • Isodata-fresh-defiso-thm-names
                  • Isodata-process-arg/res-list
                  • Isodata-process-arg/res-list-iso-list
                  • Isodata-process-res
                  • Isodata-process-old
                  • Isodata-fresh-defiso-name-with-*s-suffix
                  • Isodata-process-newp-of-new-name
                  • Isodata-process-undefined
                  • Isodata-symbol-isomap-alist-stobjp
                  • Isodata-pos-isomap-alist-stobjp
                  • Isodata-isomap-listp
                • Isodata-macro-definition
            • Simplify-defun
            • Tailrec
            • Schemalg
            • Restrict
            • Expdata
            • Casesplit
            • Simplify-term
            • Simplify-defun-sk
            • Parteval
            • Solve
            • Wrap-output
            • Propagate-iso
            • Simplify
            • Finite-difference
            • Drop-irrelevant-params
            • Copy-function
            • Lift-iso
            • Rename-params
            • Utilities
            • Simplify-term-programmatic
            • Simplify-defun-sk-programmatic
            • Simplify-defun-programmatic
            • Simplify-defun+
            • Common-options
            • Common-concepts
          • Error-checking
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Set
          • C
          • 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
    • Isodata-input-processing

    Isodata-symbol-isomap-alistp

    Recognize alists from symbols to isomorphic mapping records.

    This is an ordinary std::defalist.

    Function: isodata-symbol-isomap-alistp

    (defun isodata-symbol-isomap-alistp (x)
      (declare (xargs :guard t))
      (if (consp x)
          (and (consp (car x))
               (symbolp (caar x))
               (isodata-isomapp (cdar x))
               (isodata-symbol-isomap-alistp (cdr x)))
        (null x)))

    Definitions and Theorems

    Function: isodata-symbol-isomap-alistp

    (defun isodata-symbol-isomap-alistp (x)
      (declare (xargs :guard t))
      (if (consp x)
          (and (consp (car x))
               (symbolp (caar x))
               (isodata-isomapp (cdar x))
               (isodata-symbol-isomap-alistp (cdr x)))
        (null x)))

    Theorem: isodata-symbol-isomap-alistp-of-revappend

    (defthm isodata-symbol-isomap-alistp-of-revappend
      (equal (isodata-symbol-isomap-alistp (revappend acl2::x acl2::y))
             (and (isodata-symbol-isomap-alistp (list-fix acl2::x))
                  (isodata-symbol-isomap-alistp acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-remove

    (defthm isodata-symbol-isomap-alistp-of-remove
      (implies (isodata-symbol-isomap-alistp acl2::x)
               (isodata-symbol-isomap-alistp (remove acl2::a acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-last

    (defthm isodata-symbol-isomap-alistp-of-last
      (implies (isodata-symbol-isomap-alistp (double-rewrite acl2::x))
               (isodata-symbol-isomap-alistp (last acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-nthcdr

    (defthm isodata-symbol-isomap-alistp-of-nthcdr
      (implies (isodata-symbol-isomap-alistp (double-rewrite acl2::x))
               (isodata-symbol-isomap-alistp (nthcdr acl2::n acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-butlast

    (defthm isodata-symbol-isomap-alistp-of-butlast
      (implies (isodata-symbol-isomap-alistp (double-rewrite acl2::x))
               (isodata-symbol-isomap-alistp (butlast acl2::x acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-update-nth

    (defthm isodata-symbol-isomap-alistp-of-update-nth
      (implies (isodata-symbol-isomap-alistp (double-rewrite acl2::x))
               (iff (isodata-symbol-isomap-alistp
                         (update-nth acl2::n acl2::y acl2::x))
                    (and (and (consp acl2::y)
                              (symbolp (car acl2::y))
                              (isodata-isomapp (cdr acl2::y)))
                         (or (<= (nfix acl2::n) (len acl2::x))
                             (and (consp nil)
                                  (symbolp (car nil))
                                  (isodata-isomapp (cdr nil)))))))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-repeat

    (defthm isodata-symbol-isomap-alistp-of-repeat
      (iff (isodata-symbol-isomap-alistp (repeat acl2::n acl2::x))
           (or (and (consp acl2::x)
                    (symbolp (car acl2::x))
                    (isodata-isomapp (cdr acl2::x)))
               (zp acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-take

    (defthm isodata-symbol-isomap-alistp-of-take
     (implies (isodata-symbol-isomap-alistp (double-rewrite acl2::x))
              (iff (isodata-symbol-isomap-alistp (take acl2::n acl2::x))
                   (or (and (consp nil)
                            (symbolp (car nil))
                            (isodata-isomapp (cdr nil)))
                       (<= (nfix acl2::n) (len acl2::x)))))
     :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-union-equal

    (defthm isodata-symbol-isomap-alistp-of-union-equal
     (equal
          (isodata-symbol-isomap-alistp (union-equal acl2::x acl2::y))
          (and (isodata-symbol-isomap-alistp (list-fix acl2::x))
               (isodata-symbol-isomap-alistp (double-rewrite acl2::y))))
     :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-intersection-equal-2

    (defthm isodata-symbol-isomap-alistp-of-intersection-equal-2
      (implies (isodata-symbol-isomap-alistp (double-rewrite acl2::y))
               (isodata-symbol-isomap-alistp
                    (intersection-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-intersection-equal-1

    (defthm isodata-symbol-isomap-alistp-of-intersection-equal-1
      (implies (isodata-symbol-isomap-alistp (double-rewrite acl2::x))
               (isodata-symbol-isomap-alistp
                    (intersection-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-set-difference-equal

    (defthm isodata-symbol-isomap-alistp-of-set-difference-equal
      (implies (isodata-symbol-isomap-alistp acl2::x)
               (isodata-symbol-isomap-alistp
                    (set-difference-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-when-subsetp-equal

    (defthm isodata-symbol-isomap-alistp-when-subsetp-equal
      (and (implies (and (subsetp-equal acl2::x acl2::y)
                         (isodata-symbol-isomap-alistp acl2::y))
                    (equal (isodata-symbol-isomap-alistp acl2::x)
                           (true-listp acl2::x)))
           (implies (and (isodata-symbol-isomap-alistp acl2::y)
                         (subsetp-equal acl2::x acl2::y))
                    (equal (isodata-symbol-isomap-alistp acl2::x)
                           (true-listp acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-rcons

    (defthm isodata-symbol-isomap-alistp-of-rcons
      (iff (isodata-symbol-isomap-alistp (rcons acl2::a acl2::x))
           (and (and (consp acl2::a)
                     (symbolp (car acl2::a))
                     (isodata-isomapp (cdr acl2::a)))
                (isodata-symbol-isomap-alistp (list-fix acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-append

    (defthm isodata-symbol-isomap-alistp-of-append
      (equal (isodata-symbol-isomap-alistp (append acl2::a acl2::b))
             (and (isodata-symbol-isomap-alistp (list-fix acl2::a))
                  (isodata-symbol-isomap-alistp acl2::b)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-rev

    (defthm isodata-symbol-isomap-alistp-of-rev
      (equal (isodata-symbol-isomap-alistp (rev acl2::x))
             (isodata-symbol-isomap-alistp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-duplicated-members

    (defthm isodata-symbol-isomap-alistp-of-duplicated-members
      (implies
           (isodata-symbol-isomap-alistp acl2::x)
           (isodata-symbol-isomap-alistp (duplicated-members acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-difference

    (defthm isodata-symbol-isomap-alistp-of-difference
      (implies
           (isodata-symbol-isomap-alistp acl2::x)
           (isodata-symbol-isomap-alistp (difference acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-intersect-2

    (defthm isodata-symbol-isomap-alistp-of-intersect-2
      (implies
           (isodata-symbol-isomap-alistp acl2::y)
           (isodata-symbol-isomap-alistp (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-intersect-1

    (defthm isodata-symbol-isomap-alistp-of-intersect-1
      (implies
           (isodata-symbol-isomap-alistp acl2::x)
           (isodata-symbol-isomap-alistp (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-union

    (defthm isodata-symbol-isomap-alistp-of-union
      (iff (isodata-symbol-isomap-alistp (union acl2::x acl2::y))
           (and (isodata-symbol-isomap-alistp (sfix acl2::x))
                (isodata-symbol-isomap-alistp (sfix acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-mergesort

    (defthm isodata-symbol-isomap-alistp-of-mergesort
      (iff (isodata-symbol-isomap-alistp (mergesort acl2::x))
           (isodata-symbol-isomap-alistp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-delete

    (defthm isodata-symbol-isomap-alistp-of-delete
      (implies (isodata-symbol-isomap-alistp acl2::x)
               (isodata-symbol-isomap-alistp (delete acl2::k acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-insert

    (defthm isodata-symbol-isomap-alistp-of-insert
      (iff (isodata-symbol-isomap-alistp (insert acl2::a acl2::x))
           (and (isodata-symbol-isomap-alistp (sfix acl2::x))
                (and (consp acl2::a)
                     (symbolp (car acl2::a))
                     (isodata-isomapp (cdr acl2::a)))))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-sfix

    (defthm isodata-symbol-isomap-alistp-of-sfix
      (iff (isodata-symbol-isomap-alistp (sfix acl2::x))
           (or (isodata-symbol-isomap-alistp acl2::x)
               (not (setp acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-list-fix

    (defthm isodata-symbol-isomap-alistp-of-list-fix
      (implies (isodata-symbol-isomap-alistp acl2::x)
               (isodata-symbol-isomap-alistp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-when-isodata-symbol-isomap-alistp-compound-recognizer

    (defthm
       true-listp-when-isodata-symbol-isomap-alistp-compound-recognizer
      (implies (isodata-symbol-isomap-alistp acl2::x)
               (true-listp acl2::x))
      :rule-classes :compound-recognizer)

    Theorem: isodata-symbol-isomap-alistp-when-not-consp

    (defthm isodata-symbol-isomap-alistp-when-not-consp
      (implies (not (consp acl2::x))
               (equal (isodata-symbol-isomap-alistp acl2::x)
                      (not acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-cdr-when-isodata-symbol-isomap-alistp

    (defthm
     isodata-symbol-isomap-alistp-of-cdr-when-isodata-symbol-isomap-alistp
     (implies (isodata-symbol-isomap-alistp (double-rewrite acl2::x))
              (isodata-symbol-isomap-alistp (cdr acl2::x)))
     :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-cons

    (defthm isodata-symbol-isomap-alistp-of-cons
      (equal (isodata-symbol-isomap-alistp (cons acl2::a acl2::x))
             (and (and (consp acl2::a)
                       (symbolp (car acl2::a))
                       (isodata-isomapp (cdr acl2::a)))
                  (isodata-symbol-isomap-alistp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-make-fal

    (defthm isodata-symbol-isomap-alistp-of-make-fal
     (implies (and (isodata-symbol-isomap-alistp acl2::x)
                   (isodata-symbol-isomap-alistp acl2::y))
              (isodata-symbol-isomap-alistp (make-fal acl2::x acl2::y)))
     :rule-classes ((:rewrite)))

    Theorem: isodata-isomapp-of-cdr-when-member-equal-of-isodata-symbol-isomap-alistp

    (defthm
     isodata-isomapp-of-cdr-when-member-equal-of-isodata-symbol-isomap-alistp
     (and (implies (and (isodata-symbol-isomap-alistp acl2::x)
                        (member-equal acl2::a acl2::x))
                   (isodata-isomapp (cdr acl2::a)))
          (implies (and (member-equal acl2::a acl2::x)
                        (isodata-symbol-isomap-alistp acl2::x))
                   (isodata-isomapp (cdr acl2::a))))
     :rule-classes ((:rewrite)))

    Theorem: symbolp-of-car-when-member-equal-of-isodata-symbol-isomap-alistp

    (defthm
       symbolp-of-car-when-member-equal-of-isodata-symbol-isomap-alistp
      (and (implies (and (isodata-symbol-isomap-alistp acl2::x)
                         (member-equal acl2::a acl2::x))
                    (symbolp (car acl2::a)))
           (implies (and (member-equal acl2::a acl2::x)
                         (isodata-symbol-isomap-alistp acl2::x))
                    (symbolp (car acl2::a))))
      :rule-classes ((:rewrite)))

    Theorem: consp-when-member-equal-of-isodata-symbol-isomap-alistp

    (defthm consp-when-member-equal-of-isodata-symbol-isomap-alistp
     (implies (and (isodata-symbol-isomap-alistp acl2::x)
                   (member-equal acl2::a acl2::x))
              (consp acl2::a))
     :rule-classes
     ((:rewrite :backchain-limit-lst (0 0))
      (:rewrite
          :backchain-limit-lst (0 0)
          :corollary (implies (if (member-equal acl2::a acl2::x)
                                  (isodata-symbol-isomap-alistp acl2::x)
                                'nil)
                              (consp acl2::a)))))

    Theorem: isodata-symbol-isomap-alistp-of-remove-assoc

    (defthm isodata-symbol-isomap-alistp-of-remove-assoc
      (implies (isodata-symbol-isomap-alistp acl2::x)
               (isodata-symbol-isomap-alistp
                    (remove-assoc-equal acl2::name acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-put-assoc

    (defthm isodata-symbol-isomap-alistp-of-put-assoc
      (implies (and (isodata-symbol-isomap-alistp acl2::x))
               (iff (isodata-symbol-isomap-alistp
                         (put-assoc-equal acl2::name acl2::val acl2::x))
                    (and (symbolp acl2::name)
                         (isodata-isomapp acl2::val))))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-fast-alist-clean

    (defthm isodata-symbol-isomap-alistp-of-fast-alist-clean
     (implies (isodata-symbol-isomap-alistp acl2::x)
              (isodata-symbol-isomap-alistp (fast-alist-clean acl2::x)))
     :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-hons-shrink-alist

    (defthm isodata-symbol-isomap-alistp-of-hons-shrink-alist
      (implies (and (isodata-symbol-isomap-alistp acl2::x)
                    (isodata-symbol-isomap-alistp acl2::y))
               (isodata-symbol-isomap-alistp
                    (hons-shrink-alist acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbol-isomap-alistp-of-hons-acons

    (defthm isodata-symbol-isomap-alistp-of-hons-acons
      (equal (isodata-symbol-isomap-alistp
                  (hons-acons acl2::a acl2::n acl2::x))
             (and (symbolp acl2::a)
                  (isodata-isomapp acl2::n)
                  (isodata-symbol-isomap-alistp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-isomapp-of-cdr-of-hons-assoc-equal-when-isodata-symbol-isomap-alistp

    (defthm
     isodata-isomapp-of-cdr-of-hons-assoc-equal-when-isodata-symbol-isomap-alistp
     (implies
         (isodata-symbol-isomap-alistp acl2::x)
         (iff (isodata-isomapp (cdr (hons-assoc-equal acl2::k acl2::x)))
              (hons-assoc-equal acl2::k acl2::x)))
     :rule-classes ((:rewrite)))

    Theorem: alistp-when-isodata-symbol-isomap-alistp-rewrite

    (defthm alistp-when-isodata-symbol-isomap-alistp-rewrite
      (implies (isodata-symbol-isomap-alistp acl2::x)
               (alistp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: alistp-when-isodata-symbol-isomap-alistp

    (defthm alistp-when-isodata-symbol-isomap-alistp
      (implies (isodata-symbol-isomap-alistp acl2::x)
               (alistp acl2::x))
      :rule-classes :tau-system)

    Theorem: isodata-isomapp-of-cdar-when-isodata-symbol-isomap-alistp

    (defthm isodata-isomapp-of-cdar-when-isodata-symbol-isomap-alistp
      (implies (isodata-symbol-isomap-alistp acl2::x)
               (iff (isodata-isomapp (cdar acl2::x))
                    (consp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: symbolp-of-caar-when-isodata-symbol-isomap-alistp

    (defthm symbolp-of-caar-when-isodata-symbol-isomap-alistp
      (implies (isodata-symbol-isomap-alistp acl2::x)
               (symbolp (caar acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: isodata-symbolp-of-key-of-symbol-isomap-alist

    (defthm isodata-symbolp-of-key-of-symbol-isomap-alist
      (implies (isodata-symbol-isomap-alistp x)
               (symbolp (car (assoc-equal k x)))))

    Theorem: isodata-isomapp-of-val-of-symbol-isomap-alist

    (defthm isodata-isomapp-of-val-of-symbol-isomap-alist
      (implies (and (isodata-symbol-isomap-alistp x)
                    (consp (assoc-equal k x)))
               (isodata-isomapp (cdr (assoc-equal k x)))))