ArticleslgStudy

mathematics

Calculus of constructions

Calculus of constructions 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 Calculus of constructions rather than just read about it. In short: In mathematical logic and computer science, the calculus of constructions (CoC) is a type theory created by Thierry Coquand. It can serve as both a typed programming language and as constructive foundation for mathematics.

Key takeaways

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

Reference excerpt

In mathematical logic and computer science, the calculus of constructions (CoC) is a type theory created by Thierry Coquand. It can serve as both a typed programming language and as constructive foundation for mathematics. For this second reason, the CoC and its variants have been the basis for Rocq and other proof assistants. Some of its variants include the calculus of inductive constructions (which adds inductive types), the calculus of (co)inductive constructions (which adds coinduction), and the predicative calculus of inductive constructions (which removes some impredicativity).

General traits The CoC is a higher-order typed lambda calculus, initially developed by Thierry Coquand. It is well known for being at the top of Barendregt's lambda cube. It is possible within CoC to define functions from terms to terms, terms to types, types to types, and from types to terms. The CoC is strongly normalizing, and hence consistent.

Usage The CoC has been developed alongside the Rocq proof assistant. As features were added (or possible liabilities removed) to the theory, they became available in Rocq. Variants of the CoC are used in other proof assistants, such as Matita and Lean.

The basics of the calculus of constructions The calculus of constructions can be considered an extension of the Curry–Howard isomorphism. The Curry–Howard isomorphism associates a term in the simply typed lambda calculus with each natural-deduction proof in intuitionistic propositional logic. The calculus of constructions extends this isomorphism to proofs in the full intuitionistic predicate calculus, which includes proofs of quantified statements (which we will also call "propositions").

Terms A term in the calculus of constructions is constructed using the following rules:

𝐓 is a term (also called type); 𝐏 is a term (also called prop, the type of all propositions); Variables (x,y,…) are terms; If A and B are terms, then so is (AB); If A and B are terms and x is a variable, then the following are also terms: (λx:A.B), (∀x:A.B). In other words, the term syntax, in Backus–Naur form, is then: e::=𝐓∣𝐏∣x∣ee∣λx:e.e∣∀x:e.e The calculus of constructions has five kinds of objects:

proofs, which are terms whose types are propositions; propositions, which are also known as small types; predicates, which are functions that return propositions; large types, which are the types of predicates (𝐏 is an example of a large type); 𝐓 itself, which is the type of large types.

β-equivalence As with the untyped lambda calculus, the calculus of constructions uses a basic notion of equivalence of terms, known as β-equivalence. This captures the meaning of λ-abstraction: (λx:A.B)N=βB(x:=N) β-equivalence is a congruence relation for the calculus of constructions, in the sense that

Judgments The calculus of constructions allows proving typing judgments: x1:A1,x2:A2,…⊢t:B, which can be read as the implication

The valid judgments for the calculus of constructions are derivable from a set of inference rules. In the following, we use Γ and Γ′ to mean a sequence of type assignments x1:A1,x2:A2,…; A,B,C,D to mean terms; and K,L to mean either 𝐏 or 𝐓. We shall write B[x:=N] to mean the result of substituting the term N for the free variable x in the term B. An inference rule is written in the form Γ⊢A:BΓ′⊢C:D, which means

Inference rules for the calculus of constructions Γ⊢𝐏:𝐓 Γ⊢A:KΓ,x:A,Γ′⊢x:A Γ⊢A:KΓ,x:A⊢B:LΓ⊢(∀x:A.B):L Γ⊢A:KΓ,x:A⊢N:BΓ⊢(λx:A.N):(∀x:A.B) Γ⊢M:(∀x:A.B)Γ⊢N:AΓ⊢MN:B[x:=N] Γ⊢M:AA=βBΓ⊢B:KΓ⊢M:B

Defining logical operators The calculus of constructions has very few basic operators: the only logical operator for forming propositions is ∀. However, this one operator is sufficient to define all the other logical operators: A⇒B≡∀x:A.B(x∉B)A∧B≡∀C:𝐏.(A⇒B⇒C)⇒CA∨B≡∀C:𝐏.(A⇒C)⇒(B⇒C)⇒C¬A≡∀C:𝐏.(A⇒C)∃x:A.B≡∀C:𝐏.(∀x:A.(B⇒C))⇒C

Defining data types The basic data types used in computer science can be defined within the calculus of constructions:

Booleans ∀A:𝐏.A⇒A⇒A Naturals ∀A:𝐏.(A⇒A)⇒A⇒A Product A×B A∧B Disjoint union A+B A∨B Booleans and Naturals are defined in the same way as in Church encoding. However, added problems arise from propositional extensionality and proof irrelevance.

See also Pure type system Lambda cube System F Dependent type Intuitionistic type theory Homotopy type theory

References

Worked examples

Example 1 — a first encounter with Calculus of constructions

Start with the simplest possible case. Write down what Calculus of constructions 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 Calculus of constructions 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 Calculus of constructions 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 Calculus of constructions

In research
Calculus of constructions 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 Calculus of constructions 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
Calculus of constructions is common in secondary-school and first-year university syllabi. It links to neighbouring topics Dependently typed programming, Lambda calculus, Type theory, so understanding it makes those chapters shorter.
In everyday life
Look for Calculus of constructions 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Calculus of constructions” →

How to study Calculus of constructions in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Calculus of constructions 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 Calculus of constructions out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Calculus of constructions in simple terms?

In mathematical logic and computer science, the calculus of constructions (CoC) is a type theory created by Thierry Coquand. It can serve as both a typed programming language and as constructive foundation for mathematics.

Why does Calculus of constructions 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 Calculus of constructions?

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 Calculus of constructions.

Tags

  • Dependently typed programming
  • Lambda calculus
  • Type theory

Keep exploring