---
title: "Type Soundness: Progress and Preservation"
description: "A language is defined by a small-step semantics saying how a program takes one step. Soundness is two lemmas over that definition: a well-typed program is never stuck, and taking a step preserves its "
canonical: https://lightmysky.com/learn/computing/type-soundness-progress-and-preservation-mt_nAAHVPNaVJ
source: https://lightmysky.com/learn/computing/type-soundness-progress-and-preservation-mt_nAAHVPNaVJ.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Type Soundness: Progress and Preservation

A language is defined by a small-step semantics saying how a program takes one step. Soundness is two lemmas over that definition: a well-typed program is never stuck, and taking a step preserves its type. Together they say the errors the type system rules out cannot occur at run time.

Subject: Computing · Area: Computer Systems · Ages 23 to 24
Page: https://lightmysky.com/learn/computing/type-soundness-progress-and-preservation-mt_nAAHVPNaVJ

## Ready when they can

- Read a small-step rule and say what it asserts about one step of evaluation
- State progress and preservation and say what each rules out on its own
- Give a language feature that breaks soundness and say which lemma it breaks

## Lesson: Why well-typed programs cannot go wrong

A language is defined by small-step rules, where each rule says how one program takes one step. When you read a rule, you learn exactly what a single step of running looks like.

Soundness is two promises. Progress says a well-typed program is never stuck: it can always take another step or it is already a value. Preservation says taking a step keeps the type: the new program has the same type as before.

**Example.** A null reference can be well-typed yet have nowhere to go when the program uses it. The program stops without being a value, so it is stuck. That breaks progress, the promise that typed programs never get stuck.

**Tip.** Each promise rules out its own failure alone: progress rules out getting stuck, preservation rules out changing type mid-run. Together they say the errors the type system forbids cannot happen while your program runs.

**Recap.** Progress keeps typed programs moving, preservation keeps their type steady, and together they keep forbidden errors away.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Lexing and Parsing: From Text to a Syntax Tree](https://lightmysky.com/learn/computing/lexing-and-parsing-from-text-to-a-syntax-tree-mt_-ZlCxZ3SOh)
- [Hoare Logic and Proving a Program Meets Its Specification](https://lightmysky.com/learn/computing/hoare-logic-and-proving-a-program-meets-its-specification-mt_bJZnbBrUIP)
- [Semantic Analysis and the Intermediate Representation](https://lightmysky.com/learn/computing/semantic-analysis-and-the-intermediate-representation-mt_f2z_WQxfiw)
