• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
          • Syntax-for-tools
          • Atc
          • Language
          • Representation
            • Representation-of-integer-operations
            • Atc-arrays
              • Atc-def-integer-arrays
              • Ushort-array-write
              • Ushort-array-integer-write
              • Ulong-array-integer-write
              • Ullong-array-write
              • Ullong-array-integer-write
              • Uchar-array-integer-write
              • Sshort-array-write
              • Sshort-array-integer-write
              • Slong-array-integer-write
              • Sllong-array-write
              • Sllong-array-integer-write
              • Schar-array-integer-write
              • Ulong-array-write
              • Uchar-array-write
              • Slong-array-write
              • Schar-array-write
              • Uint-array-write
              • Uint-array-integer-write
              • Sint-array-write
              • Sint-array-integer-write
              • Ushort-array
              • Ullong-array
              • Sshort-array
              • Sllong-array
              • Ulong-array
              • Uint-array
              • Uchar-array
              • Slong-array
              • Sint-array
              • Schar-array
              • Ushort-array-integer-read
              • Ushort-array-integer-index-okp
              • Ullong-array-integer-read
              • Ullong-array-integer-index-okp
              • Sshort-array-integer-read
              • Sshort-array-integer-index-okp
              • Sllong-array-integer-read
              • Sllong-array-integer-index-okp
              • Ulong-array-integer-read
              • Ulong-array-integer-index-okp
              • Ullong-array-read
                • Uint-array-integer-read
                • Uint-array-integer-index-okp
                • Uchar-array-integer-read
                • Uchar-array-integer-index-okp
                • Slong-array-integer-read
                • Slong-array-integer-index-okp
                • Sllong-array-read
                • Sint-array-integer-read
                • Sint-array-integer-index-okp
                • Schar-array-integer-read
                • Schar-array-integer-index-okp
                • Ushort-array-read
                • Ushort-array-index-okp
                • Ulong-array-read
                • Ulong-array-index-okp
                • Ullong-array-index-okp
                • Uint-array-read
                • Uchar-array-read
                • Uchar-array-index-okp
                • Sshort-array-read
                • Sshort-array-index-okp
                • Slong-array-read
                • Slong-array-index-okp
                • Sllong-array-index-okp
                • Sint-array-read
                • Schar-array-read
                • Schar-array-index-okp
                • Uint-array-index-okp
                • Sint-array-index-okp
                • Ushort-array-of
                • Ullong-array-of
                • Uchar-array-length
                • Sshort-array-of
                • Sllong-array-of
                • Ulong-array-of
                • Uint-array-of
                • Uchar-array-of
                • Slong-array-of
                • Sint-array-of
                • Schar-array-of
                • Ushort-array-length
                • Ulong-array-length
                • Ullong-array-length
                • Sshort-array-length
                • Sllong-array-length
                • Uint-array-length
                • Slong-array-length
                • Sint-array-length
                • Schar-array-length
                • Atc-def-integer-arrays-loop
              • Representation-of-integers
              • Representation-of-integer-conversions
              • Pointed-integers
              • Shallow-deep-embedding-relation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • 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
    • Atc-arrays

    Ullong-array-read

    Read an element from an array of type unsigned long long, using a C integer index.

    Signature
    (ullong-array-read array index) → element
    Arguments
    array — Guard (ullong-arrayp array).
    index — Guard (cintegerp index).
    Returns
    element — Type (ullongp element).

    Definitions and Theorems

    Function: ullong-array-read

    (defun ullong-array-read (array index)
      (declare (xargs :guard (and (ullong-arrayp array)
                                  (cintegerp index))))
      (declare (xargs :guard (ullong-array-index-okp array index)))
      (let ((__function__ 'ullong-array-read))
        (declare (ignorable __function__))
        (ullong-fix (nth (integer-from-cinteger index)
                         (ullong-array->elements array)))))

    Theorem: ullongp-of-ullong-array-read

    (defthm ullongp-of-ullong-array-read
      (b* ((element (ullong-array-read array index)))
        (ullongp element))
      :rule-classes :rewrite)

    Theorem: ullong-array-read-alt-def

    (defthm ullong-array-read-alt-def
      (implies (and (ullong-arrayp array)
                    (cintegerp index)
                    (ullong-array-index-okp array index))
               (equal (ullong-array-read array index)
                      (value-array-read (integer-from-cinteger index)
                                        array))))

    Theorem: ullong-array-read-of-ullong-array-fix-array

    (defthm ullong-array-read-of-ullong-array-fix-array
      (equal (ullong-array-read (ullong-array-fix array)
                                index)
             (ullong-array-read array index)))

    Theorem: ullong-array-read-ullong-array-equiv-congruence-on-array

    (defthm ullong-array-read-ullong-array-equiv-congruence-on-array
      (implies (ullong-array-equiv array array-equiv)
               (equal (ullong-array-read array index)
                      (ullong-array-read array-equiv index)))
      :rule-classes :congruence)

    Theorem: ullong-array-read-of-cinteger-fix-index

    (defthm ullong-array-read-of-cinteger-fix-index
      (equal (ullong-array-read array (cinteger-fix index))
             (ullong-array-read array index)))

    Theorem: ullong-array-read-cinteger-equiv-congruence-on-index

    (defthm ullong-array-read-cinteger-equiv-congruence-on-index
      (implies (cinteger-equiv index index-equiv)
               (equal (ullong-array-read array index)
                      (ullong-array-read array index-equiv)))
      :rule-classes :congruence)