• 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
                  • 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

    Type-equiv

    Basic equivalence relation for type structures.

    Definitions and Theorems

    Function: type-equiv$inline

    (defun type-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (typep acl2::x) (typep acl2::y))))
      (equal (type-fix acl2::x)
             (type-fix acl2::y)))

    Theorem: type-equiv-is-an-equivalence

    (defthm type-equiv-is-an-equivalence
      (and (booleanp (type-equiv x y))
           (type-equiv x x)
           (implies (type-equiv x y)
                    (type-equiv y x))
           (implies (and (type-equiv x y) (type-equiv y z))
                    (type-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: type-equiv-implies-equal-type-fix-1

    (defthm type-equiv-implies-equal-type-fix-1
      (implies (type-equiv acl2::x x-equiv)
               (equal (type-fix acl2::x)
                      (type-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: type-fix-under-type-equiv

    (defthm type-fix-under-type-equiv
      (type-equiv (type-fix acl2::x) acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-type-fix-1-forward-to-type-equiv

    (defthm equal-of-type-fix-1-forward-to-type-equiv
      (implies (equal (type-fix acl2::x) acl2::y)
               (type-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-type-fix-2-forward-to-type-equiv

    (defthm equal-of-type-fix-2-forward-to-type-equiv
      (implies (equal acl2::x (type-fix acl2::y))
               (type-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: type-equiv-of-type-fix-1-forward

    (defthm type-equiv-of-type-fix-1-forward
      (implies (type-equiv (type-fix acl2::x) acl2::y)
               (type-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: type-equiv-of-type-fix-2-forward

    (defthm type-equiv-of-type-fix-2-forward
      (implies (type-equiv acl2::x (type-fix acl2::y))
               (type-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)