import DocGen4.Output.Template import DocGen4.Output.Inductive namespace DocGen4.Output open scoped DocGen4.Jsx def foundationalTypes : BaseHtmlM Html := templateLiftExtends (baseHtml "Foundational Types") do pure <|

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).

{← instancesForToHtml `_builtin_sortu}

Type u

Type u is notation for Sort (u + 1).

{← instancesForToHtml `_builtin_typeu}

Prop

Prop is notation for Sort 0.

{← instancesForToHtml `_builtin_prop}

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:

Lean also permits ASCII-only spellings of the three variants:

Note that despite not itself being a function, (→) is available as infix notation for {"λ α β, α → β"}.

-- TODO: instances for pi types
end DocGen4.Output