• 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
        • 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-common-code-generation
                  • Atj-gen-value
                  • Atj-chars-to-jhexcodes
                    • Atj-gen-test-value
                    • Atj-gen-test-main-method
                    • Atj-gen-value-flat
                    • Atj-gen-test-values
                    • Atj-gen-jlocvar-indexed
                    • Atj-gen-pkg-method
                    • Atj-gen-symbol
                    • Atj-gen-jstring
                    • Atj-gen-init-method
                    • Atj-gen-char
                    • Atj-gen-string
                    • Atj-gen-pkg-name
                    • Atj-gen-integer
                    • Atj-gen-test-method-name
                    • Atj-gen-paramlist
                    • Atj-gen-pkg-method-name
                    • Atj-gen-run-tests
                    • Atj-gen-jshort-array
                    • Atj-gen-jboolean-array
                    • Atj-gen-test-failures-field
                    • Atj-gen-pkgs
                    • Atj-gen-jlong-array
                    • Atj-gen-jint-array
                    • Atj-gen-jchar-array
                    • Atj-gen-jchar
                    • Atj-gen-jbyte-array
                    • Atj-char-to-jhexcode
                    • Atj-gen-pkg-methods
                    • Atj-gen-number
                    • Atj-gen-symbols
                    • Atj-gen-static-initializer
                    • Atj-gen-rational
                    • Atj-gen-jlong
                    • Atj-gen-jboolean
                    • Atj-gen-jbigint
                    • Atj-gen-jshort
                    • Atj-gen-jint
                    • Atj-gen-jbyte
                    • *atj-gen-pkg-name-alist*
                  • 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
          • Riscv
          • 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-common-code-generation

    Atj-chars-to-jhexcodes

    Lift atj-char-to-jhexcode to lists.

    Signature
    (atj-chars-to-jhexcodes x) → exprs
    Returns
    exprs — Type (jexpr-listp exprs).

    This is an ordinary std::defprojection.

    Definitions and Theorems

    Function: atj-chars-to-jhexcodes-exec

    (defun atj-chars-to-jhexcodes-exec (x acc)
     (declare (xargs :guard (character-listp x)))
     (let ((__function__ 'atj-chars-to-jhexcodes-exec))
      (declare (ignorable __function__))
      (if
       (consp x)
       (atj-chars-to-jhexcodes-exec (cdr x)
                                    (cons (atj-char-to-jhexcode (car x))
                                          acc))
       acc)))

    Function: atj-chars-to-jhexcodes-nrev

    (defun atj-chars-to-jhexcodes-nrev (x acl2::nrev)
     (declare (xargs :stobjs (acl2::nrev)))
     (declare (xargs :guard (character-listp x)))
     (let ((__function__ 'atj-chars-to-jhexcodes-nrev))
      (declare (ignorable __function__))
      (if (atom x)
          (acl2::nrev-fix acl2::nrev)
       (let ((acl2::nrev (acl2::nrev-push (atj-char-to-jhexcode (car x))
                                          acl2::nrev)))
         (atj-chars-to-jhexcodes-nrev (cdr x)
                                      acl2::nrev)))))

    Function: atj-chars-to-jhexcodes

    (defun atj-chars-to-jhexcodes (x)
      (declare (xargs :guard (character-listp x)))
      (let ((__function__ 'atj-chars-to-jhexcodes))
        (declare (ignorable __function__))
        (mbe :logic
             (if (consp x)
                 (cons (atj-char-to-jhexcode (car x))
                       (atj-chars-to-jhexcodes (cdr x)))
               nil)
             :exec
             (if (atom x)
                 nil
               (acl2::with-local-nrev
                    (atj-chars-to-jhexcodes-nrev x acl2::nrev))))))

    Theorem: jexpr-listp-of-atj-chars-to-jhexcodes

    (defthm jexpr-listp-of-atj-chars-to-jhexcodes
      (b* ((exprs (atj-chars-to-jhexcodes x)))
        (jexpr-listp exprs))
      :rule-classes :rewrite)

    Theorem: atj-chars-to-jhexcodes-nrev-removal

    (defthm atj-chars-to-jhexcodes-nrev-removal
      (equal (atj-chars-to-jhexcodes-nrev acl2::x acl2::nrev)
             (append acl2::nrev
                     (atj-chars-to-jhexcodes acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: atj-chars-to-jhexcodes-exec-removal

    (defthm atj-chars-to-jhexcodes-exec-removal
      (equal (atj-chars-to-jhexcodes-exec acl2::x acl2::acc)
             (revappend (atj-chars-to-jhexcodes acl2::x)
                        acl2::acc))
      :rule-classes ((:rewrite)))

    Theorem: atj-chars-to-jhexcodes-of-take

    (defthm atj-chars-to-jhexcodes-of-take
      (implies (<= (nfix acl2::n) (len acl2::x))
               (equal (atj-chars-to-jhexcodes (take acl2::n acl2::x))
                      (take acl2::n
                            (atj-chars-to-jhexcodes acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: set-equiv-congruence-over-atj-chars-to-jhexcodes

    (defthm set-equiv-congruence-over-atj-chars-to-jhexcodes
      (implies (set-equiv acl2::x acl2::y)
               (set-equiv (atj-chars-to-jhexcodes acl2::x)
                          (atj-chars-to-jhexcodes acl2::y)))
      :rule-classes ((:congruence)))

    Theorem: subsetp-of-atj-chars-to-jhexcodes-when-subsetp

    (defthm subsetp-of-atj-chars-to-jhexcodes-when-subsetp
      (implies (subsetp acl2::x acl2::y)
               (subsetp (atj-chars-to-jhexcodes acl2::x)
                        (atj-chars-to-jhexcodes acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: member-of-atj-char-to-jhexcode-in-atj-chars-to-jhexcodes

    (defthm member-of-atj-char-to-jhexcode-in-atj-chars-to-jhexcodes
      (implies (member acl2::k acl2::x)
               (member (atj-char-to-jhexcode acl2::k)
                       (atj-chars-to-jhexcodes acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: atj-chars-to-jhexcodes-of-rev

    (defthm atj-chars-to-jhexcodes-of-rev
      (equal (atj-chars-to-jhexcodes (rev acl2::x))
             (rev (atj-chars-to-jhexcodes acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: atj-chars-to-jhexcodes-of-list-fix

    (defthm atj-chars-to-jhexcodes-of-list-fix
      (equal (atj-chars-to-jhexcodes (list-fix acl2::x))
             (atj-chars-to-jhexcodes acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: atj-chars-to-jhexcodes-of-append

    (defthm atj-chars-to-jhexcodes-of-append
      (equal (atj-chars-to-jhexcodes (append acl2::a acl2::b))
             (append (atj-chars-to-jhexcodes acl2::a)
                     (atj-chars-to-jhexcodes acl2::b)))
      :rule-classes ((:rewrite)))

    Theorem: cdr-of-atj-chars-to-jhexcodes

    (defthm cdr-of-atj-chars-to-jhexcodes
      (equal (cdr (atj-chars-to-jhexcodes acl2::x))
             (atj-chars-to-jhexcodes (cdr acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: car-of-atj-chars-to-jhexcodes

    (defthm car-of-atj-chars-to-jhexcodes
      (equal (car (atj-chars-to-jhexcodes acl2::x))
             (and (consp acl2::x)
                  (atj-char-to-jhexcode (car acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: atj-chars-to-jhexcodes-under-iff

    (defthm atj-chars-to-jhexcodes-under-iff
      (iff (atj-chars-to-jhexcodes acl2::x)
           (consp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: consp-of-atj-chars-to-jhexcodes

    (defthm consp-of-atj-chars-to-jhexcodes
      (equal (consp (atj-chars-to-jhexcodes acl2::x))
             (consp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: len-of-atj-chars-to-jhexcodes

    (defthm len-of-atj-chars-to-jhexcodes
      (equal (len (atj-chars-to-jhexcodes acl2::x))
             (len acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-of-atj-chars-to-jhexcodes

    (defthm true-listp-of-atj-chars-to-jhexcodes
      (true-listp (atj-chars-to-jhexcodes acl2::x))
      :rule-classes :type-prescription)

    Theorem: atj-chars-to-jhexcodes-when-not-consp

    (defthm atj-chars-to-jhexcodes-when-not-consp
      (implies (not (consp acl2::x))
               (equal (atj-chars-to-jhexcodes acl2::x)
                      nil))
      :rule-classes ((:rewrite)))

    Theorem: atj-chars-to-jhexcodes-of-cons

    (defthm atj-chars-to-jhexcodes-of-cons
      (equal (atj-chars-to-jhexcodes (cons acl2::a acl2::b))
             (cons (atj-char-to-jhexcode acl2::a)
                   (atj-chars-to-jhexcodes acl2::b)))
      :rule-classes ((:rewrite)))