• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
                • Expression
                • Syntax-abstraction
                • Statement
                • Files
                • Input-files
                • Identifiers
                • Types
                  • Type-option
                  • Name+type
                  • Type-option-set-result
                  • Type-option-result
                  • Type-map-result
                  • Type-list-result
                  • Name+type-result
                  • Type-result
                  • Type-identifiers
                  • Type-primitivep
                  • Type-arithmeticp
                  • Type-namedp
                  • Type-integerp
                  • Type-map
                  • Type-option-set
                  • Type/typelist
                    • Type
                      • Type-case
                      • Typep
                      • Type-equiv
                      • Type-internal-named
                      • Type-external-named
                      • Type-unsigned
                      • Type-tuple
                      • Type-signed
                      • Type-kind
                      • Type-unit
                      • Type-string
                      • Type-scalar
                      • Type-group
                      • Type-field
                      • Type-bool
                      • Type-address
                      • Type-fix
                      • Type-count
                    • Type-list
                • Struct-init
                • Branch
                • Statements
                • Format-strings
                • Input-syntax-abstraction
                • Expressions
                • Output-files
                • Addresses
                • Literals
                • Characters
                • Expression-list
                • Statement-list
                • Output-syntax-abstraction
                • Struct-init-list
                • Branch-list
                • Annotations
                • Abstract-syntax-trees
                • Symbols
                • Keywords
                • Programs
                • Packages
                • Bit-sizes
              • Dynamic-semantics
              • Compilation
              • Static-semantics
              • Concrete-syntax
      • Bigmems
      • Builtins
      • Execloader
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Type/typelist

Type

Fixtype of Leo types.

This is a tagged union type, introduced by fty::deftagsum.

Member Tags → Types
:bool → type-bool
:unsigned → type-unsigned
:signed → type-signed
:field → type-field
:group → type-group
:scalar → type-scalar
:address → type-address
:string → type-string
:internal-named → type-internal-named
:external-named → type-external-named
:unit → type-unit
:tuple → type-tuple

These are the primitive types, identifiers (used as types), and the tuple types.

Tuple types have two or more components, but we do not require that here. We can formulate and prove that invariant separately. Keeping the abstract syntax of types more general also facilitates a possible future extension of Leo in which tuple types with one component are actually allowed.

Instead of a zero-element tuple type, we have a primitive unit type.

Subtopics

Type-case
Case macro for the different kinds of type structures.
Typep
Recognizer for type structures.
Type-equiv
Basic equivalence relation for type structures.
Type-internal-named
Type-external-named
Type-unsigned
Type-tuple
Type-signed
Type-kind
Get the kind (tag) of a type structure.
Type-unit
Type-string
Type-scalar
Type-group
Type-field
Type-bool
Type-address
Type-fix
Fixing function for type structures.
Type-count
Measure for recurring over type structures.