• 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
        • C
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Types
              • Type
                • Typep
                • Type-fix
                • Type-case
                • Type-count
                • Type-equiv
                • Type-array
                  • Make-type-array
                  • Type-array->size
                  • Type-array->of
                    • Change-type-array
                  • Type-kind
                  • Type-struct
                  • Type-pointer
                  • Type-sint
                  • Type-uchar
                  • Type-void
                  • Type-ushort
                  • Type-ulong
                  • Type-ullong
                  • Type-uint
                  • Type-sshort
                  • Type-slong
                  • Type-sllong
                  • Type-schar
                  • Type-char
                • Type-name-list-to-type-list
                • Tyname-to-type
                • Member-type-list->name-list
                • Type-completep
                • Member-type
                • Member-type-add-first
                • Member-type-add-last
                • Init-type
                • Type-option
                • Member-type-lookup
                • Tyspecseq-to-type
                • Member-type-list-option
                • Type-promoted-arithmeticp
                • Type-list-result
                • Member-type-list-result
                • Integer-type-bits-nulfun
                • Init-type-result
                • Type-result
                • Type-nonchar-integerp
                • Type-nonchar-integer-listp
                • Type-arithmetic-listp
                • Type-integer-listp
                • Integer-type-xdoc-string
                • Type-unsigned-integerp
                • Type-signed-integerp
                • Integer-type-minbits
                • Integer-type-bits
                • Type-scalarp
                • Type-integerp
                • Type-arithmeticp
                • Type-realp
                • Type-list
                • *nonchar-integer-types*
                • Member-type-list
                • Ident-type-map
                • Type-set
                • Type-option-set
                • Symbol-type-alist
                • Type-option-list
              • Integer-formats-definitions
              • Computation-states
              • Portable-ascii-identifiers
              • Values
              • Integer-operations
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Insertion-sort
            • Pack
          • 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
    • Type-array

    Type-array->of

    Get the of field from a type-array.

    Signature
    (type-array->of x) → of
    Arguments
    x — Guard (typep x).
    Returns
    of — Type (typep of).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: type-array->of$inline

    (defun type-array->of$inline (x)
      (declare (xargs :guard (typep x)))
      (declare (xargs :guard (equal (type-kind x) :array)))
      (mbe :logic
           (b* ((x (and (equal (type-kind x) :array) x)))
             (type-fix (std::da-nth 0 (cdr x))))
           :exec (std::da-nth 0 (cdr x))))

    Theorem: typep-of-type-array->of

    (defthm typep-of-type-array->of
      (b* ((of (type-array->of$inline x)))
        (typep of))
      :rule-classes :rewrite)

    Theorem: type-array->of$inline-of-type-fix-x

    (defthm type-array->of$inline-of-type-fix-x
      (equal (type-array->of$inline (type-fix x))
             (type-array->of$inline x)))

    Theorem: type-array->of$inline-type-equiv-congruence-on-x

    (defthm type-array->of$inline-type-equiv-congruence-on-x
      (implies (type-equiv x x-equiv)
               (equal (type-array->of$inline x)
                      (type-array->of$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: type-array->of-when-wrong-kind

    (defthm type-array->of-when-wrong-kind
      (implies (not (equal (type-kind x) :array))
               (equal (type-array->of x)
                      (type-fix nil))))