Chapter 8ARS & Confluenceslides.en.pdf:372

Newman's Lemma

Weak confluence + termination ⇒ confluence

Theorem 3.9Newman's Lemma
Concept

Newman's Lemma (Theorem 3.9) is the single most useful theorem about ARSs:

If an ARS is weakly confluent and terminating, then it is confluent.

In symbols:

weakly confluentterminatingconfluent\text{weakly confluent} \land \text{terminating} \Rightarrow \text{confluent}

Why this is a big deal. Proving confluence directly requires checking the
diamond for ALL pairs b,cb, c reachable from any aa in ANY number of steps.
That's an infinite condition. Weak confluence only requires checking pairs that
are one step away from aa. Combined with termination, you can use induction on
the length of reduction sequences to lift "local" to "global".

The proof sketch (induction on the number of steps from aa to cc):

- Base: aca \to^* c in 0 steps means c=ac = a. Trivial.
- Inductive step: assume it works for one fewer step. If aca \to^* c in
kk steps, factor the last step: acca \to^* c' \to c. By IH, bb and cc'
have a common reduct. Then cc' and cc (one step) join by weak confluence.
Transitivity of "having a common reduct" closes the diamond.

Practical impact. To prove your rewrite system gives unique answers:
1. Prove termination (often by a well-founded measure).
2. Prove weak confluence (only check one-step divergences).
3. Conclude confluence by Newman's Lemma.

This pattern appears in theorem provers, programming language semantics, and
the metatheory of λ\lambda-calculus.

Idea 3: Develop as low as possible in the graph

Idea 3 (slides 367). When stating or proving anything, push it as low in the theory graph as possible — i.e., state it in the most general structure that still supports it.

Why? Because a theorem proved at a low node automatically propagates to all nodes above it (via the 'copy along any edge' principle from Idea 2). Stating a theorem too high is wasteful: you re-prove it for every specialisation.

Example. Associativity of ++. It is true at any node that has a binary operation. So we should prove it once at the lowest such node — say at Semigroup (where the operation is associative) — and inherit it up to Monoid, Group, AbelianGroup, etc.

Anti-pattern. Proving associativity separately for every concrete group (Z\mathbb{Z}, Q\mathbb{Q}, R\mathbb{R}, modular arithmetic, ...) instead of once at Semigroup. This is the 'exponential blowup' that 'object-oriented math' prevents.

Theory graph for graphs and trees

The graph-theoretic concepts form their own theory graph, parallel to the algebra graph:

Magma
  |
 Univ (universe)
  |
 Magma ───────────── PSet (powerset)
  |                    |
 UAG (undirected,     Forest
  |   attributed     /     \
 UGraph             Tree    DAG
  |                 |       |
DiGraph            Graph ───── Graph (with cycles)

Where:
- Magma S,\langle S, \circ \rangle — a set with a binary operation.
- PSet — a set with a unary predicate.
- Forest — a directed acyclic graph where each node has at most one parent.
- Tree — a forest with a distinguished root.
- DAG — directed acyclic graph (sharing allowed).
- UGraph / DiGraph / UAG — undirected / directed / attributed.

Inheritance along edges copies axioms (e.g. DAG → Tree adds the 'one parent' rule; DAG → Forest adds acyclicity; UGraph → DiGraph adds edge direction).

Definitions like root (the unique source in a tree), path (a sequence of adjacent edges), cycle (a path returning to start), and in-degree (number of incoming edges) all live at the appropriate node and propagate down the graph.

Structural induction on DAGs

A DAG (directed acyclic graph) G=V,EG = \langle V, E \rangle has a finite number of vertices. We can do induction on V|V| (the size of the DAG).

Theorem. Every DAG has a vertex with in-degree 0 (a 'source').

Proof by induction on V|V|.
- Base V=0|V| = 0: Empty DAG has no vertices, so the statement is vacuously true (no vertex to violate the claim).
- Base V=1|V| = 1: The single vertex has in-degree 0. ✓
- Step V=k+1|V| = k + 1: Assume the claim holds for all DAGs with k\leq k vertices. Take a DAG GG with k+1k + 1 vertices.
- Case 1: Some vertex vv has in-degree 0. Done.
- Case 2: Every vertex has in-degree 1\geq 1. Then we can 'peel off' a maximal vertex (one with no outgoing edges — every DAG has one, since otherwise we'd have an infinite descent). Removing vv gives a smaller DAG GG' with kk vertices. By IH, GG' has a source uu with in-degree 0 in GG'. Either uu is a source in GG too (no edge was added incident to uu), or u=vu = v. But uu has in-degree 0 in GG' — meaning no other vertex points to it. Contradiction with Case 2 unless uu is also a source in GG. So uu is a source in GG. ✓

Reading. The trick: pick a sink (out-degree 0, no outgoing edges). Such a vertex exists in every non-empty DAG because otherwise an infinite walk would exist (which would force a cycle). Removing the sink gives a strictly smaller DAG, so the IH applies.

Topological sort corollary. Iteratively removing sources produces a linear ordering of the vertices — a topological sort. This is what tsort does in graph algorithms.

Worked example
Step 0 of 2
Practice — score 100% to advance
Multiple choice
Q1
What does Newman's Lemma say?
Q2
Why is Newman's Lemma useful?
Q3
What is the inductive quantity in the proof?
Q4
Without termination, weak confluence does NOT imply confluence because…
Q5
The 'develop as low as possible' principle says we should:
Q6
To prove every DAG has a source, we induct on:
Fill in the blank
Q1
In the graph theory graph, a ___ is a forest with a distinguished root.
Q2
Iteratively removing sources from a DAG produces a ___.
Order the steps
Arrange these proof steps in the correct order using the arrows.
1
Step 3. Apply Newman's Lemma: termination + weak confluence ⟹ confluence
2
Step 2. Prove weak confluence: every one-step divergence bacb \leftarrow a \to c joins in finitely many steps
3
Step 1. Prove the ARS is terminating (using a well-founded measure)
4
Conclusion. Every reduction sequence reaches the SAME normal form
Loading…