ArticleslgStudy

mathematics

Simply typed lambda calculus

Simply typed lambda calculus is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Simply typed lambda calculus rather than just read about it. In short: The simply typed lambda calculus (⁠ λ → {\displaystyle \lambda ^{\to }} ⁠), a form of type theory, is a typed interpretation of the lambda calculus with only one type constructor (⁠ → {\displaystyle \to } ⁠) that builds function types. It is the canonical and simplest example of a typed lambda calculus.

Key takeaways

  • Simply typed lambda calculus belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Simply typed lambda calculus to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Simply typed lambda calculus from memory before moving on to harder problems.

Reference excerpt

The simply typed lambda calculus (⁠ λ → {\displaystyle \lambda ^{\to }} ⁠), a form of type theory, is a typed interpretation of the lambda calculus with only one type constructor (⁠ → {\displaystyle \to } ⁠) that builds function types. It is the canonical and simplest example of a typed lambda calculus. The simply typed lambda calculus was originally introduced by Alonzo Church in 1940 as an attempt to avoid paradoxical use of the untyped lambda calculus. The term simple type is also used to refer to extensions of the simply typed lambda calculus with constructs such as products, coproducts or natural numbers (System T) or even full recursion (like PCF). In contrast, systems that introduce polymorphic types (like System F) or dependent types (like the Logical Framework) are not considered simply typed. The simple types, except for full recursion, are still considered simple because the Church encodings of such structures can be done using only → {\displaystyle \to } and suitable type variables, while polymorphism and dependency cannot.

Syntax In the 1930s Alonzo Church sought to use the logistic method: his lambda calculus, as a formal language based on symbolic expressions, consisted of a denumerably infinite series of axioms and variables, but also a finite set of primitive symbols, denoting abstraction and scope, as well as four constants: negation, disjunction, universal quantification, and selection respectively; and also, a finite set of rules I to VI. This finite set of rules included rule V modus ponens as well as IV and VI for substitution and generalization respectively. Rules I to III are known as alpha, beta, and eta conversion in the lambda calculus. Church sought to use English only as a syntax language (that is, a metamathematical language) for describing symbolic expressions with no interpretations. In 1940 Church settled on a subscript notation for denoting the type in a symbolic expression. In his presentation, Church used only two base types: o {\displaystyle o} for "the type of propositions" and ι {\displaystyle \iota } for "the type of individuals". The type o {\displaystyle o} has no term constants, whereas ι {\displaystyle \iota } has one term constant. Frequently the calculus with only one base type, usually ⁠ o {\displaystyle o} ⁠, is considered. The Greek letter subscripts ⁠ α {\displaystyle \alpha } ⁠, ⁠ β {\displaystyle \beta } ⁠, etc. denote type variables; the parenthesized subscripted ( α β ) {\displaystyle (\alpha \beta )} denotes the function type ⁠ β → α {\displaystyle \beta \to \alpha } ⁠. Church 1940 p.58 used 'arrow or ⁠ → {\displaystyle \to } ⁠' to denote stands for, or is an abbreviation for. By the 1970s stand-alone arrow notation was in use; for example in this article non-subscripted symbols σ {\displaystyle \sigma } and τ {\displaystyle \tau } can range over types. The infinite number of axioms were then seen to be a consequence of applying rules I to VI to the types (see Peano axioms). Informally, the function type σ → τ {\displaystyle \sigma \to \tau } refers to the type of functions that, given an input of type ⁠ σ {\displaystyle \sigma } ⁠, produce an output of type ⁠ τ {\displaystyle \tau } ⁠. By convention, → {\displaystyle \to } associates to the right: σ → τ → ρ {\displaystyle \sigma \to \tau \to \rho } is read as ⁠ σ → ( τ → ρ ) {\displaystyle \sigma \to (\tau \to \rho )} ⁠. To define the types, a set of base types, ⁠ B {\displaystyle B} ⁠, must first be defined. These are sometimes called atomic types or type constants. With this fixed, the syntax of types is:

τ : := τ → τ ∣ T w h e r e T ∈ B . {\displaystyle \tau \;{{:}{:=}}\;\tau \to \tau \mid T\quad \mathrm {where} \quad T\in B.}

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Simply typed lambda calculus

Start with the simplest possible case. Write down what Simply typed lambda calculus claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Simply typed lambda calculus before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Simply typed lambda calculus ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Simply typed lambda calculus

In research
Simply typed lambda calculus appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Simply typed lambda calculus in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Simply typed lambda calculus is common in secondary-school and first-year university syllabi. It links to neighbouring topics Lambda calculus, Theory of computation, Type theory, so understanding it makes those chapters shorter.
In everyday life
Look for Simply typed lambda calculus outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Simply typed lambda calculus in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Simply typed lambda calculus means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Simply typed lambda calculus out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Simply typed lambda calculus in simple terms?

The simply typed lambda calculus (⁠ λ → {\displaystyle \lambda ^{\to }} ⁠), a form of type theory, is a typed interpretation of the lambda calculus with only one type constructor (⁠ → {\displaystyle \to } ⁠) that builds function types. It is the canonical and simplest example of a typed lambda calc…

Why does Simply typed lambda calculus matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Simply typed lambda calculus?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Simply typed lambda calculus.

Tags

  • Lambda calculus
  • Theory of computation
  • Type theory

Keep exploring