Skip to content

Free variables and bound variables

The distinction between variable occurrences whose values are supplied by an external assignment and occurrences captured by a quantifier, lambda or other binder within an expression.

Version
v2 · 2026-09-19 · History
Domain-specific #
4614
Domain group
Humanities
Origin domain
Philosophy
Subdomains
Logic, Variable Binding → Philosophy

Core Idea

A bound variable occurrence lies within the scope of a binder for that variable, while a free occurrence is not bound in the expression and depends on external interpretation. Parsing establishes binder scope; substitution supplies free values while alpha-renaming and capture-avoidance preserve which occurrences a binder controls. The abstraction is therefore identified by a declared carrier, a transformation or constraint over that carrier, and an invariant that tells an analyst whether the named structure is genuinely present.

The load-bearing residual is not the broad topic of logic. It is scope-sensitive dependency distinction underlying open versus closed expressions. That residual remains recognizable when examples, notation, scale, or implementation change, but it disappears if the carrier is mistyped, the condition that binding is determined occurrence by occurrence from syntactic scope, not from the variable's printed name alone fails, a neighboring object is substituted, or notation and topical resemblance replace the constitutive test.

How would you explain it like I'm…

Tied Words and Loose Words

Some words in a sentence get their meaning from inside the sentence, and some need someone outside to tell you. In 'Every kid washed their hands,' the word 'their' is tied to 'every kid' right there. In 'She washed her hands,' you have to ask: who is she?

Tied and Loose Letters

In logic and math, letters like x stand in for things. A bound x is controlled by a part of the expression that introduces it, like 'for every x' or 'there is an x', so the expression itself says how x is used. A free x has no such introducer, so its meaning has to come from outside, like someone telling you what x is. Whether an x is free or bound depends on where that particular x sits, not just on its letter. The same letter can be bound in one spot and free in another.

Scope-Bound vs Free Occurrences

A binder is a symbol such as 'for all x' or 'there exists x' that controls a stretch of an expression called its scope. An occurrence of x inside the scope of a binder for x is bound; an occurrence outside every such scope is free and must be given a value by an outside interpretation. Expressions with free variables are 'open' (like 'x > 3', which is neither true nor false until x is fixed), while those with none are 'closed'. The status is decided occurrence by occurrence: in 'x > 0 and for all x, x = x', the first x is free and the others are bound. Because of this, you can rename a bound variable consistently without changing meaning, but you cannot casually swap in values without checking scope.

 

Free and bound variables distinguish occurrences of a variable by their syntactic relation to binders such as quantifiers or lambda abstraction. Parsing fixes each binder's scope; an occurrence within the scope of a binder for the same variable is bound, and otherwise it is free and its value depends on an external assignment or interpretation. This yields the open/closed distinction: only closed expressions have truth values independent of variable assignment. Substitution replaces free occurrences with terms, but it must be capture-avoiding, so that a free variable in the substituted term does not accidentally fall under a binder inside the target. Alpha-renaming of bound variables preserves meaning precisely because it preserves which occurrences each binder controls. The key constraint is that binding is a property of occurrences determined by scope, not of the printed variable name: the same letter can be free in one place and bound in another. Getting this wrong produces invalid substitutions and fallacious inferences.

Scope of Application

Free variables and bound variables belongs to logic and is useful where the analyst can specify a formal expression, variable occurrences, binders and their scope, an environment or assignment, substitution, alpha-renaming and capture avoidance, then evaluate binding is determined occurrence by occurrence from syntactic scope, not from the variable's printed name alone. The scope is broad within that domain but bounded by the need for binding is determined occurrence by occurrence from syntactic scope, not from the variable's printed name alone. The entry records a descriptive analytical identity; practical use requires the governing domain's evidence, standards, and safety obligations.

Clarity

The abstraction clarifies a crowded vocabulary by making binding is determined occurrence by occurrence from syntactic scope, not from the variable's printed name alone the center of the account. A claim should name the carrier, the governing operation or relation, the applicable assumptions, and the recognition test. A bare label is insufficient because the name Free variables and bound variables can be used for a formal identity, an implementation, or a neighboring result unless carrier and convention are stated.

Manages Complexity

Without the abstraction, an analyst must reason directly over many local details: the carrier roles, admissibility assumptions, competing conventions, derived invariants, boundary cases, and proof or validation obligations specific to Free variables and bound variables. Free variables and bound variables compresses them into the roles in the structural signature. That compression permits comparison across instances without erasing the variables that determine validity. It also exposes which details may be varied safely and which are constitutive.

Abstract Reasoning

  1. Identify the carrier. State what the elements, states, objects, or observations are: a formal expression, variable occurrences, binders and their scope, an environment or assignment, substitution, alpha-renaming and capture avoidance. Reject examples whose alleged carrier belongs to a different problem.
  2. Lock the constitutive rule. Express binding is determined occurrence by occurrence from syntactic scope, not from the variable's printed name alone independently of one notation or implementation.

Knowledge Transfer

Knowledge transfers strongly among subfields of logic because they reuse a formal expression, variable occurrences, binders and their scope, an environment or assignment, substitution, alpha-renaming and capture avoidance, Parsing establishes binder scope; substitution supplies free values while alpha-renaming and capture-avoidance preserve which occurrences a binder controls., and type the carrier, state every parameter and convention in the definition, test that binding is determined occurrence by occurrence from syntactic scope, not from the variable's printed name alone, compare the nearest accepted identity, and report counterexamples, uncertainty, and limiting cases.

Relationships to Other Abstractions

Local relationship map for Free variables and bound variablesParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Free variables andbound variablesDOMAINPrime abstraction: Context — is a kind ofContextPRIME

Current abstraction Free variables and bound variables Domain-specific

Parents (1) — outgoing typed relations

  • Free variables and bound variables is a kind of Context Prime

    An occurrence's status depends on its syntactic binder context and scope.

Hierarchy path (1) — routes to 1 parentless root

  • Free variables and bound variables → is a kind of Context

Neighborhood in Abstraction Space

Free variables and bound variables sits in a crowded region of the domain-specific corpus (24th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Programming Language Concepts & Notation (24 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25