nLab beta-reduction

Redirected from "beta-reduced".
-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

logicset theory (internal logic of)category theorytype theory
propositionsetobjecttype
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels

semantics

β\beta-reduction

Idea

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

“Definition”

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

s βts \to_\beta t

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

Function types

The most common (and original) example is when TT is a function type ABA \to B.

In this case, the constructor of ABA \to B is a λ\lambda-expression: given a term bb of type BB containing a free variable xx of type AA, then λx.b\lambda x.\, b is a term of type ABA \to B.

The eliminator of ABA \to B says that given a term ff of type ABA \to B and a term aa of type AA, we can apply ff to aa to obtain a term f(a)f(a) of type BB.

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

See lambda calculus for more.

Product types

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

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

Informal usage

Informally, one sometimes speaks of a “β\beta-reduction” of a definition or a proof to mean the elimination of levels of abstraction. For instance, if Theorem A is proven by invoking the existence of a green widget, which is proven by Lemma B, then a β\beta-reduced proof of Theorem A would proceed instead by using the specific green widget constructed in the proof of Lemma B.

It makes some sense to call this β\beta-reduction because under propositions as types, the proof of Lemma B would be a term lemmab:B\lemmab:B, whereas the proof of Theorem A would be an application (λx.theorema)(b)(\lambda x.\theorema)(b), where theorema\theorema is the proof of Theorem A using an unspecified green widget xx. This application (λx.theorema)(lemmab)(\lambda x.\theorema)(lemmab) can then be literally β\beta-reduced, in the above sense, to theorem[lemmab/x]\theorem[lemmab/x], in which the specific green widget constructed in the proof of Lemma B is used instead of the unspecified one xx.

Last revised on April 11, 2024 at 02:08:30. See the history of this page for a list of all contributions to it.