nLab
beta-reduction

Context

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism = propositions as types +programs as proofs +relation type theory/category theory

logiccategory theorytype theory
trueterminal object/(-2)-truncated objecth-level 0-type/unit type
falseinitial objectempty type
proposition(-1)-truncated objecth-level 1-type/h-prop
proofgeneralized elementprogram
conjunctionproductproduct type
disjunctioncoproduct ((-1)-truncation of)sum type (bracket type of)
implicationinternal homfunction type
negationinternal hom into initial objectfunction type into empty type
universal quantificationdependent productdependent product type
existential quantificationdependent sum ((-1)-truncation of)dependent sum type (bracket type of)
equivalencepath space objectidentity type
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
completely presented setdiscrete object/0-truncated objecth-level 2-type/preset/h-set
setinternal 0-groupoidBishop set/setoid
universeobject classifiertype of types
modalityclosure operator monadmodal type theory, monad (in computer science)

homotopy levels

semantics

β-reduction

Idea

In type theory, β-reduction is a process of “computation”, which generally replaces more complicated terms with simpler ones. It was originally identified in the lambda-calculus, where it contrasts with α-equivalence and η-expansion; this is the version described below for function types. The analogous reduction for inductive types may also be known as ι-reduction.

“Definition”

In its most general form, β-reduction consists of rules which specify, for any given type T, if we apply an “eliminator” for T to the result of a “constructor” for T, how to “evaluate” the result. We write

s βts \to_\beta t

if the term s beta-reduces to the term t. Sometimes we write s β *t if this reduction takes n steps (leaving off the * to denote n=1). The relation “reduces to” generates an equivalence relation on the set of terms called beta equivalence and often denoted s= βt or s βt.

Function types

The most common (and original) example is when T is a function type AB.

In this case, the constructor of AB is a λ-expression: given a term b of type B containing a free variable x of type A, then λx.b is a term of type AB.

The eliminator of AB says that given a term f of type AB and a term a of type A, we can apply f to a to obtain a term f(a) of type B.

Now if we first construct a term λx.b:AB, and then apply this term to a:A, we obtain a term (λx.b)(a):B. The rule of β-reduction then tells us that this term evaluates or computes or reduces to b[a/x], the result of substituting the term a for the variable x in the term b.

See lambda calculus for more.

Product types

Although function types are the most publicized notion of β-reduction, basically all types in type theory have a form of it. For instance, in the negative presentation of a product type A×B, the constructor is an ordered pair (a,b):A×B, while the eliminators are projections π 1 and π 2 which yield elements of A or B.

The beta reduction rules then say that if we first apply a constructor (a,b), then apply an eliminator to this, the resulting terms π 1(a,b) and π 2(a,b) compute to a and b respectively.

Revised on August 13, 2012 22:07:38 by Mike Shulman (71.136.235.154)