Definition
A bound variable in an Expression is a variable whose scope is limited by a binding construct such as a lambda abstraction, quantifier, or other binder within that expression.
A variable is bound if it is introduced and given meaning by a construct like , , , or within the expression.
Examples
In the expression :
- is bound by the lambda abstraction
- is free (not bound within this expression)
In the expression :
- is bound by the dependent product
- may appear free in , but is bound in the overall expression
In the expression :
- is bound by the outer lambda
- is bound by the inner lambda
- Both bindings create nested scopes
Binding Constructs
Common binding constructs in Type Theory:
- Lambda abstraction: binds in
- Dependent product: binds in
- Dependent sum: binds in
- Universal quantification: binds in
- Existential quantification: binds in
- Let expressions: binds in
Scope
The Scope of a bound variable is the region of the expression where the binding is active. Variables can be shadowed when inner bindings use the same name as outer bindings.
In :
- The inner shadows the outer binding
- The first occurrence of in refers to the inner binding
- The final refers to the outer binding
Alpha Equivalence
Bound variables can be renamed consistently without changing the meaning of an expression. This property is called alpha equivalence:
provided does not appear free in . For example, .
Relationship to Substitution
Substitution only affects free variables. When substituting for in , the bound is not replaced. This is why , not .
Care must be taken during substitution to avoid variable capture, where a free variable would incorrectly become bound.
Related Concepts
- Free Variable: The dual concept, variables not bound in an expression
- Scope: The region where a variable binding is active
- Substitution: Operation that replaces free variables while respecting bindings
- Lambda Calculus: Formal system with explicit variable binding
- Expression: The context in which variables appear
- Dependent Product: A type with variable binding