In dependent type theory, a dependent type is a type whose specification may vary with a value, and can be viewed as analogous to an
indexed family of sets. Let \mathcal{U} denote a universe of types, and write A:\mathcal{U} to indicate that A is a type in \mathcal{U}. For a term a of type A, write a:A. A dependent
family of types over A is written B:A\to\mathcal{U}, meaning that to each term a:A the family assigns a type B(a):\mathcal{U}. Thus, given A:\mathcal{U} and B:A\to\mathcal{U}, the expression B(a) denotes a type that depends on the particular value a. In standard terminology, this is described by saying that the type B(a) varies with a.
Π type A function whose type of return value varies with its argument (i.e. there is no fixed
codomain) is a
dependent function and the type of this function is called
dependent product type,
pi-type (
type) or
dependent function type. For a more concrete example, taking A to again be type of unsigned integers from 0 to 255, and B(a) to again be equal to X_a for 256 more arbitrary X_a, then \sum_{x:A} B(x) devolves into the sum X_0+X_1+X_2+\ldots+X_{253}+X_{254}+X_{255}.
Example as existential quantification Let A:\mathcal{U} be some type, and let B:A\to\mathcal{U}. By the Curry–Howard correspondence, B can be interpreted as a logical
predicate on terms of A. For a given a : A, whether the type B(a) is inhabited indicates whether a satisfies this predicate. The correspondence can be extended to existential quantification and dependent pairs: the proposition \exists{a}{\in}A\,B(a) is true
if and only if the type \sum_{a:A}B(a) is inhabited. For example, m:\mathbb{N} is less than or equal to n:\mathbb{N} if and only if there exists another natural number k:\mathbb{N} such that m + k = n. In logic, this statement is codified by existential quantification: m\le n \iff \exists{k}{\in}\mathbb{N}\,m+k=n. This proposition corresponds to the dependent pair type: \sum_{k:\mathbb{N}} m+k=n. That is, a proof of the statement that m is less than or equal to n is a pair that contains both a non-negative number k, which is the difference between m and n, and a proof of the equality m + k = n. ==Systems of the lambda cube==