• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
          • Atj
            • Atj-implementation
              • Atj-types
              • Atj-java-primitive-array-model
              • Atj-java-abstract-syntax
              • Atj-input-processing
              • Atj-java-pretty-printer
              • Atj-code-generation
                • Atj-gen-test-method
                • Atj-shallow-code-generation
                  • Atj-gen-shallow-term-fns
                  • String-jmethodlist-alistp
                    • Atj-gen-shallow-fndef-method
                    • String-jfieldlist-alistp
                    • Atj-gen-shallow-test-code
                    • Atj-adapt-expr-to-type
                    • Atj-gen-shallow-fn-call
                    • Atj-check-marked-annotated-mv-let-call
                    • Atj-gen-shallow-main-class
                    • Atj-gen-shallow-fnnative-method
                    • Atj-gen-shallow-synonym-method
                    • Atj-gen-shallow-if-call
                    • Atj-gen-shallow-and-call
                    • Atj-gen-shallow-pkg-methods
                    • Atj-convert-expr-to-jprim
                    • Atj-gen-shallow-or-call
                    • Atj-convert-expr-from-jprimarr-method
                    • Atj-adapt-expr-to-types
                    • Atj-gen-shallow-all-pkg-methods
                    • Atj-convert-expr-to-jprimarr-method
                    • Atj-gen-shallow-fndef-all-methods
                    • Atj-convert-expr-from-jprim
                    • Atj-gen-shallow-mv-class
                    • Atj-gen-shallow-main-cunit
                    • Atj-gen-shallow-fndef-methods
                    • Atj-gen-shallow-mv-class-name
                    • Atj-shallow-fns-that-may-throw
                    • Atj-gen-shallow-term
                    • Atj-gen-shallow-let-bindings
                    • Atj-gen-shallow-fn-methods
                    • Atj-gen-shallow-jprimarr-new-init-call
                    • Atj-gen-shallow-fnname
                    • Atj-gen-shallow-all-fn-methods
                    • Atj-gen-shallow-not-call
                    • Atj-fnnative-method-name
                    • Atj-gen-shallow-mv-let
                    • Atj-gen-shallow-jprim-constr-call
                    • Atj-gen-shallow-jprimarr-write-call
                    • Atj-gen-shallow-fnnative-all-methods
                    • Atj-gen-shallow-pkg-class
                    • Atj-gen-shallow-jprimarr-length-call
                    • Atj-gen-shallow-pkg-fields
                    • Atj-all-mv-output-types
                    • Atj-gen-shallow-mv-call
                    • Atj-gen-shallow-jprim-binop-call
                    • Atj-gen-shallow-jprim-conv-call
                    • Atj-gen-shallow-primarray-write-method
                    • Atj-gen-shallow-mv-fields
                    • Atj-gen-shallow-jprimarr-read-call
                    • Atj-gen-shallow-jprimarr-new-len-call
                    • Atj-gen-shallow-jprimarr-conv-tolist-call
                    • Atj-gen-shallow-jprimarr-conv-fromlist-call
                    • Atj-gen-shallow-synonym-all-methods
                    • Atj-gen-shallow-jprim-deconstr-call
                    • Atj-gen-shallow-all-pkg-fields
                    • Atj-gen-shallow-test-code-asgs
                    • Atj-gen-shallow-lambda
                    • Atj-gen-shallow-jprim-unop-call
                    • Atj-jprim-binop-fn-to-jbinop
                    • Atj-gen-shallow-mv-asgs
                    • Atj-gen-shallow-env-class
                    • Atj-gen-shallow-mv-params
                    • Atj-gen-shallow-fnnative-methods
                    • Atj-gen-shallow-pkg-classes
                    • Atj-gen-shallow-env-cunit
                    • Atj-gen-shallow-all-synonym-methods
                    • Atj-convert-expr-to-jprimarr
                    • Atj-convert-expr-from-jprimarr
                    • Atj-jprim-constr-fn-of-qconst-to-expr
                    • Atj-gen-shallow-test-code-mv-asgs
                    • Atj-gen-shallow-synonym-methods
                    • Atj-gen-shallow-synonym-method-params
                    • Atj-convert-expr-to-jprimarr-method-name
                    • Atj-convert-expr-from-jprimarr-method-name
                    • Atj-jexpr-list-to-3-jexprs
                    • Atj-jblock-list-to-3-jblocks
                    • Atj-gen-shallow-test-code-comps
                    • Atj-jprim-conv-fn-to-jtype
                    • Atj-gen-shallow-terms
                    • Atj-gen-shallow-mv-field-name
                    • Atj-adapt-exprs-to-types
                    • Atj-jblock-list-to-2-jblocks
                    • Atj-gen-shallow-primarray-write-methods
                    • Atj-gen-shallow-mv-classes
                    • Atj-gen-shallow-jtype
                    • Atj-gen-shallow-build-method
                    • Atj-jexpr-list-to-2-jexprs
                    • Atj-jprimarr-write-to-method-name
                    • Atj-gen-shallow-all-jprimarr-conv-methods
                    • Atj-jprimarr-new-len-fn-to-comp-jtype
                    • Atj-jprimarr-new-init-fn-to-comp-jtype
                    • Atj-jprim-unop-fn-to-junop
                    • *atj-gen-cond-exprs*
                    • Atj-primarray-write-method-name
                    • Atj-gen-shallow-jprimarr-fromlist-methods
                    • Atj-gen-shallow-jprimarr-tolist-methods
                    • Atj-gen-shallow-mv-classes-guard
                    • *atj-mv-singleton-field-name*
                    • *atj-mv-factory-method-name*
                  • Atj-common-code-generation
                  • Atj-shallow-quoted-constant-generation
                  • Atj-pre-translation
                  • Atj-gen-everything
                  • Atj-name-translation
                  • Atj-gen-test-cunit
                  • Atj-gen-test-class
                  • Atj-gen-main-file
                  • Atj-post-translation
                  • Atj-deep-code-generation
                  • Atj-gen-test-methods
                  • Atj-gen-test-file
                  • Atj-gen-env-file
                  • Atj-gen-output-subdir
                • Atj-java-primitives
                • Atj-java-primitive-arrays
                • Atj-type-macros
                • Atj-java-syntax-operations
                • Atj-fn
                • Atj-library-extensions
                • Atj-java-input-types
                • Atj-test-structures
                • Aij-notions
                • Atj-macro-definition
              • Atj-tutorial
            • Aij
            • Language
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Atj-shallow-code-generation

    String-jmethodlist-alistp

    Alists from package names (strings) to lists of Java methods.

    This is an ordinary std::defalist.

    Function: string-jmethodlist-alistp

    (defun string-jmethodlist-alistp (x)
      (declare (xargs :guard t))
      (if (consp x)
          (and (consp (car x))
               (stringp (caar x))
               (jmethod-listp (cdar x))
               (string-jmethodlist-alistp (cdr x)))
        (null x)))

    Definitions and Theorems

    Function: string-jmethodlist-alistp

    (defun string-jmethodlist-alistp (x)
      (declare (xargs :guard t))
      (if (consp x)
          (and (consp (car x))
               (stringp (caar x))
               (jmethod-listp (cdar x))
               (string-jmethodlist-alistp (cdr x)))
        (null x)))

    Theorem: string-jmethodlist-alistp-of-revappend

    (defthm string-jmethodlist-alistp-of-revappend
      (equal (string-jmethodlist-alistp (revappend acl2::x acl2::y))
             (and (string-jmethodlist-alistp (list-fix acl2::x))
                  (string-jmethodlist-alistp acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-remove

    (defthm string-jmethodlist-alistp-of-remove
      (implies (string-jmethodlist-alistp acl2::x)
               (string-jmethodlist-alistp (remove acl2::a acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-last

    (defthm string-jmethodlist-alistp-of-last
      (implies (string-jmethodlist-alistp (double-rewrite acl2::x))
               (string-jmethodlist-alistp (last acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-nthcdr

    (defthm string-jmethodlist-alistp-of-nthcdr
      (implies (string-jmethodlist-alistp (double-rewrite acl2::x))
               (string-jmethodlist-alistp (nthcdr acl2::n acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-butlast

    (defthm string-jmethodlist-alistp-of-butlast
      (implies (string-jmethodlist-alistp (double-rewrite acl2::x))
               (string-jmethodlist-alistp (butlast acl2::x acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-update-nth

    (defthm string-jmethodlist-alistp-of-update-nth
     (implies
      (string-jmethodlist-alistp (double-rewrite acl2::x))
      (iff
        (string-jmethodlist-alistp (update-nth acl2::n acl2::y acl2::x))
        (and (and (consp acl2::y)
                  (stringp (car acl2::y))
                  (jmethod-listp (cdr acl2::y)))
             (or (<= (nfix acl2::n) (len acl2::x))
                 (and (consp nil)
                      (stringp (car nil))
                      (jmethod-listp (cdr nil)))))))
     :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-repeat

    (defthm string-jmethodlist-alistp-of-repeat
      (iff (string-jmethodlist-alistp (repeat acl2::n acl2::x))
           (or (and (consp acl2::x)
                    (stringp (car acl2::x))
                    (jmethod-listp (cdr acl2::x)))
               (zp acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-take

    (defthm string-jmethodlist-alistp-of-take
      (implies (string-jmethodlist-alistp (double-rewrite acl2::x))
               (iff (string-jmethodlist-alistp (take acl2::n acl2::x))
                    (or (and (consp nil)
                             (stringp (car nil))
                             (jmethod-listp (cdr nil)))
                        (<= (nfix acl2::n) (len acl2::x)))))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-union-equal

    (defthm string-jmethodlist-alistp-of-union-equal
      (equal (string-jmethodlist-alistp (union-equal acl2::x acl2::y))
             (and (string-jmethodlist-alistp (list-fix acl2::x))
                  (string-jmethodlist-alistp (double-rewrite acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-intersection-equal-2

    (defthm string-jmethodlist-alistp-of-intersection-equal-2
     (implies
       (string-jmethodlist-alistp (double-rewrite acl2::y))
       (string-jmethodlist-alistp (intersection-equal acl2::x acl2::y)))
     :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-intersection-equal-1

    (defthm string-jmethodlist-alistp-of-intersection-equal-1
     (implies
       (string-jmethodlist-alistp (double-rewrite acl2::x))
       (string-jmethodlist-alistp (intersection-equal acl2::x acl2::y)))
     :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-set-difference-equal

    (defthm string-jmethodlist-alistp-of-set-difference-equal
      (implies (string-jmethodlist-alistp acl2::x)
               (string-jmethodlist-alistp
                    (set-difference-equal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-when-subsetp-equal

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

    Theorem: string-jmethodlist-alistp-of-rcons

    (defthm string-jmethodlist-alistp-of-rcons
      (iff (string-jmethodlist-alistp (rcons acl2::a acl2::x))
           (and (and (consp acl2::a)
                     (stringp (car acl2::a))
                     (jmethod-listp (cdr acl2::a)))
                (string-jmethodlist-alistp (list-fix acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-append

    (defthm string-jmethodlist-alistp-of-append
      (equal (string-jmethodlist-alistp (append acl2::a acl2::b))
             (and (string-jmethodlist-alistp (list-fix acl2::a))
                  (string-jmethodlist-alistp acl2::b)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-rev

    (defthm string-jmethodlist-alistp-of-rev
      (equal (string-jmethodlist-alistp (rev acl2::x))
             (string-jmethodlist-alistp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-duplicated-members

    (defthm string-jmethodlist-alistp-of-duplicated-members
      (implies (string-jmethodlist-alistp acl2::x)
               (string-jmethodlist-alistp (duplicated-members acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-difference

    (defthm string-jmethodlist-alistp-of-difference
      (implies (string-jmethodlist-alistp acl2::x)
               (string-jmethodlist-alistp (difference acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-intersect-2

    (defthm string-jmethodlist-alistp-of-intersect-2
      (implies (string-jmethodlist-alistp acl2::y)
               (string-jmethodlist-alistp (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-intersect-1

    (defthm string-jmethodlist-alistp-of-intersect-1
      (implies (string-jmethodlist-alistp acl2::x)
               (string-jmethodlist-alistp (intersect acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-union

    (defthm string-jmethodlist-alistp-of-union
      (iff (string-jmethodlist-alistp (union acl2::x acl2::y))
           (and (string-jmethodlist-alistp (sfix acl2::x))
                (string-jmethodlist-alistp (sfix acl2::y))))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-mergesort

    (defthm string-jmethodlist-alistp-of-mergesort
      (iff (string-jmethodlist-alistp (mergesort acl2::x))
           (string-jmethodlist-alistp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-delete

    (defthm string-jmethodlist-alistp-of-delete
      (implies (string-jmethodlist-alistp acl2::x)
               (string-jmethodlist-alistp (delete acl2::k acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-insert

    (defthm string-jmethodlist-alistp-of-insert
      (iff (string-jmethodlist-alistp (insert acl2::a acl2::x))
           (and (string-jmethodlist-alistp (sfix acl2::x))
                (and (consp acl2::a)
                     (stringp (car acl2::a))
                     (jmethod-listp (cdr acl2::a)))))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-sfix

    (defthm string-jmethodlist-alistp-of-sfix
      (iff (string-jmethodlist-alistp (sfix acl2::x))
           (or (string-jmethodlist-alistp acl2::x)
               (not (setp acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-list-fix

    (defthm string-jmethodlist-alistp-of-list-fix
      (implies (string-jmethodlist-alistp acl2::x)
               (string-jmethodlist-alistp (list-fix acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-when-string-jmethodlist-alistp-compound-recognizer

    (defthm
          true-listp-when-string-jmethodlist-alistp-compound-recognizer
      (implies (string-jmethodlist-alistp acl2::x)
               (true-listp acl2::x))
      :rule-classes :compound-recognizer)

    Theorem: string-jmethodlist-alistp-when-not-consp

    (defthm string-jmethodlist-alistp-when-not-consp
      (implies (not (consp acl2::x))
               (equal (string-jmethodlist-alistp acl2::x)
                      (not acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-cdr-when-string-jmethodlist-alistp

    (defthm
        string-jmethodlist-alistp-of-cdr-when-string-jmethodlist-alistp
      (implies (string-jmethodlist-alistp (double-rewrite acl2::x))
               (string-jmethodlist-alistp (cdr acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-cons

    (defthm string-jmethodlist-alistp-of-cons
      (equal (string-jmethodlist-alistp (cons acl2::a acl2::x))
             (and (and (consp acl2::a)
                       (stringp (car acl2::a))
                       (jmethod-listp (cdr acl2::a)))
                  (string-jmethodlist-alistp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-make-fal

    (defthm string-jmethodlist-alistp-of-make-fal
      (implies (and (string-jmethodlist-alistp acl2::x)
                    (string-jmethodlist-alistp acl2::y))
               (string-jmethodlist-alistp (make-fal acl2::x acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: jmethod-listp-of-cdr-when-member-equal-of-string-jmethodlist-alistp

    (defthm
     jmethod-listp-of-cdr-when-member-equal-of-string-jmethodlist-alistp
     (and (implies (and (string-jmethodlist-alistp acl2::x)
                        (member-equal acl2::a acl2::x))
                   (jmethod-listp (cdr acl2::a)))
          (implies (and (member-equal acl2::a acl2::x)
                        (string-jmethodlist-alistp acl2::x))
                   (jmethod-listp (cdr acl2::a))))
     :rule-classes ((:rewrite)))

    Theorem: stringp-of-car-when-member-equal-of-string-jmethodlist-alistp

    (defthm
          stringp-of-car-when-member-equal-of-string-jmethodlist-alistp
      (and (implies (and (string-jmethodlist-alistp acl2::x)
                         (member-equal acl2::a acl2::x))
                    (stringp (car acl2::a)))
           (implies (and (member-equal acl2::a acl2::x)
                         (string-jmethodlist-alistp acl2::x))
                    (stringp (car acl2::a))))
      :rule-classes ((:rewrite)))

    Theorem: consp-when-member-equal-of-string-jmethodlist-alistp

    (defthm consp-when-member-equal-of-string-jmethodlist-alistp
      (implies (and (string-jmethodlist-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)
                                    (string-jmethodlist-alistp acl2::x)
                                  'nil)
                                (consp acl2::a)))))

    Theorem: string-jmethodlist-alistp-of-remove-assoc

    (defthm string-jmethodlist-alistp-of-remove-assoc
      (implies (string-jmethodlist-alistp acl2::x)
               (string-jmethodlist-alistp
                    (remove-assoc-equal acl2::name acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: jmethod-listp-of-cdr-of-assoc-when-string-jmethodlist-alistp

    (defthm jmethod-listp-of-cdr-of-assoc-when-string-jmethodlist-alistp
      (implies (string-jmethodlist-alistp acl2::x)
               (jmethod-listp (cdr (assoc-equal acl2::k acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-put-assoc

    (defthm string-jmethodlist-alistp-of-put-assoc
      (implies (and (string-jmethodlist-alistp acl2::x))
               (iff (string-jmethodlist-alistp
                         (put-assoc-equal acl2::name acl2::val acl2::x))
                    (and (stringp acl2::name)
                         (jmethod-listp acl2::val))))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-fast-alist-clean

    (defthm string-jmethodlist-alistp-of-fast-alist-clean
      (implies (string-jmethodlist-alistp acl2::x)
               (string-jmethodlist-alistp (fast-alist-clean acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-hons-shrink-alist

    (defthm string-jmethodlist-alistp-of-hons-shrink-alist
     (implies
        (and (string-jmethodlist-alistp acl2::x)
             (string-jmethodlist-alistp acl2::y))
        (string-jmethodlist-alistp (hons-shrink-alist acl2::x acl2::y)))
     :rule-classes ((:rewrite)))

    Theorem: string-jmethodlist-alistp-of-hons-acons

    (defthm string-jmethodlist-alistp-of-hons-acons
     (equal
        (string-jmethodlist-alistp (hons-acons acl2::a acl2::n acl2::x))
        (and (stringp acl2::a)
             (jmethod-listp acl2::n)
             (string-jmethodlist-alistp acl2::x)))
     :rule-classes ((:rewrite)))

    Theorem: jmethod-listp-of-cdr-of-hons-assoc-equal-when-string-jmethodlist-alistp

    (defthm
     jmethod-listp-of-cdr-of-hons-assoc-equal-when-string-jmethodlist-alistp
     (implies (string-jmethodlist-alistp acl2::x)
              (jmethod-listp (cdr (hons-assoc-equal acl2::k acl2::x))))
     :rule-classes ((:rewrite)))

    Theorem: alistp-when-string-jmethodlist-alistp-rewrite

    (defthm alistp-when-string-jmethodlist-alistp-rewrite
      (implies (string-jmethodlist-alistp acl2::x)
               (alistp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: alistp-when-string-jmethodlist-alistp

    (defthm alistp-when-string-jmethodlist-alistp
      (implies (string-jmethodlist-alistp acl2::x)
               (alistp acl2::x))
      :rule-classes :tau-system)

    Theorem: stringp-of-caar-when-string-jmethodlist-alistp

    (defthm stringp-of-caar-when-string-jmethodlist-alistp
      (implies (string-jmethodlist-alistp acl2::x)
               (iff (stringp (caar acl2::x))
                    (consp acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: jmethod-listp-of-cdar-when-string-jmethodlist-alistp

    (defthm jmethod-listp-of-cdar-when-string-jmethodlist-alistp
      (implies (string-jmethodlist-alistp acl2::x)
               (jmethod-listp (cdar acl2::x)))
      :rule-classes ((:rewrite)))