Foundational Types
Some of Lean's types are not defined in any Lean source files (even the prelude
) since they come from its foundational type theory. This page provides basic documentation for these types.
For a more in-depth explanation of Lean's type theory, refer to TPiL.
Sort u
Sort u
is the type of types in Lean, and Sort u : Sort (u + 1)
.
Instances For
Type u
Type u
is notation for Sort (u + 1)
.
Instances For
- CategoryTheory.Bundled.coeSort
- CategoryTheory.Cat.instCoeSortType
- CategoryTheory.HasForget.types
- CategoryTheory.Limits.Types.hasColimitsOfShape
- CategoryTheory.Limits.Types.hasColimitsOfSize
- CategoryTheory.Limits.Types.hasLimitsOfShape
- CategoryTheory.Limits.Types.hasLimitsOfSize
- CategoryTheory.Limits.Types.instHasImageMapsType
- CategoryTheory.Limits.Types.instHasImagesType
- CategoryTheory.Limits.Types.instHasProductsType
- CategoryTheory.Limits.Types.instHasPullbacksType
- CategoryTheory.Limits.Types.instHasPushoutsType
- CategoryTheory.Quiv.instCoeSortType
- CategoryTheory.ReflQuiv.instCoeSortType
- CategoryTheory.instHasFunctorialSurjectiveInjectiveFactorizationTypeHomObjForget
- CategoryTheory.instSplitEpiCategoryType
- CategoryTheory.types
- CategoryTheory.typesChosenFiniteProducts
- FinPartOrd.instCoeSortType
- Finset.instCoeSortType
- FintypeCat.instCoeSort
- Lat.instCoeSortType
- LinOrd.instCoeSortType
- NonemptyFinLinOrd.instCoeSortType
- PartOrd.instCoeSortType
- Preord.instCoeSortType
- Set.instCoeSortType
- SetLike.instCoeSortType
Prop
Prop
is notation for Sort 0
.
Instances For
- Plausible.Prop.sampleableExt
- Prop.fintype
- Prop.hasCompl
- Prop.instBooleanAlgebra
- Prop.instBoundedOrder
- Prop.instCompleteAtomicBooleanAlgebra
- Prop.instCompleteBooleanAlgebra
- Prop.instCompleteLattice
- Prop.instCompleteLinearOrder
- Prop.instDistribLattice
- Prop.instFinite
- Prop.instHeytingAlgebra
- Prop.instIsSimpleOrderProp
- Prop.instWellFoundedGT
- Prop.instWellFoundedLT
- Prop.le
- Prop.le_isTotal
- Prop.linearOrder
- Prop.partialOrder
- boolToProp
- boolToSort
- decPropToBool
- iff_isEquiv
- instInhabitedProp
- instNontrivialProp
Pi types, (a : α) → β a
The type of dependent functions is known as a pi type. Non-dependent functions and implications are a special case.
Note that these can also be written with the alternative notations:
∀ a : α, β a
, conventionally used whereβ a : Prop
.(a : α) → β a
α → γ
, possible only ifβ a = γ
for alla
.
Lean also permits ASCII-only spellings of the three variants:
forall a : A, B a
, for∀ a : α, β a
(a : A) -> B a
, for(a : α) → β a
A -> B
, forα → β
Note that despite not itself being a function, (→)
is available as infix notation for
fun α β, α → β
.