Try   HackMD

Abstract Reduction Systems 4: Termination (Finitely Branching Systems)

We continue from the previous lecture.

Definition: An ARS

(A,→), or sometimes its relation
→
, is called finitely branching if for all
x
there are only finitely many
y
such that
x→y
.

Theorem: Let

(A,→) be a finitely branching ARS. The ARS is terminating if and only if there is a measure function
ϕ:A→N
.

Proof: "if" has been discussed in a previous lecture.

"only if:" That is the interesting direction here.

Let us first look at an argument as you might find it in a textbook.[1]

We have to find a measure function

ϕ:A→N. Define
ϕ(a)=|{b∈A∣a⟶∗b}|
. This is well-defined since
{b∈A∣a⟶∗b}
is finite due to
A
being finitely branching and terminating. It remains to show that
a→b
implies
Ï•(a)>Ï•(b)
. Since
⟶∗
is transitive, we have
ϕ(a)≥ϕ(b)
. Now suppose
Ï•(a)=Ï•(b)
. Then
b⟶∗a
in contradiction to
(A,→)
being terminating.

Sometimes a more concise write-up can be easier to understand than an argument that provides all details. On the other hand, one cannot claim to fully understand an argument without being able to provide all details. I show you how such a more detailed write-up could look like.[2] It is also an opportunity to learn the patterns that are used in proofs. And it is closer to what we have done in class.

Show: If

A is finitely branching and terminating, then there is a measure function
ϕ:A→N
.

Assume that

A is finitely branching and terminating.
Show that there is a measure function
ϕ:A→N
. [3][4]

Define

ϕ(a)=|{b∈A∣a⟶∗b}|. [5]
Show that
a→b⇒ϕ(a)>ϕ(b)
.

Assume

a→b.
Show
Ï•(a)>Ï•(b)
.
This, in turn, means that we have to show the following two statements.[6]

(One)

{c∈A∣a⟶∗c}⊇{d∈A∣b⟶∗d} [7]
This follows from
⟶∗
being transitive.[8]

(Two) There is

x∈{c∈A∣a⟶∗c} and
x∉{d∈A∣b⟶∗d}
.
To show that such an
x
exists means to show that
there is
x∈A
such that
a⟶∗x
and not
b⟶∗x
.

Define

x=a.[9] We need to check two statements.

(First) Show:

a⟶∗a.
This follows because
⟶∗
is reflexive by definition.

(Second) Show: not

b⟶∗a.
We argue by contradiction.[10]

Assume

b⟶∗a.
Then[11]
a⟶+a
.[12]
Which contradicts that
(A,→)
is terminating.

We showed (Second): not

b⟶∗a.

We showed (First) and (Second).

We showed (Two).

We showed

a→b⇒ϕ(a)>ϕ(b).

We showed

Ï•(a)>Ï•(b).

We showed that there is a measure function

ϕ:A→N.

We showed the theorem.

We will have a look at the logic behind this argument in the next lecture.


  1. See also Lemma 2.2.3 in Baader-Nipkow. ↩︎

  2. I would not normally use indentation as below, but markdown conveniently provides this feature and I thought maybe it helps. ↩︎

  3. We need an idea. In class, we drew a picture, picking an element

    a∈A, and drawing an example relation
    →
    . After a while we found the idea that it follows from finitely branching and terminating that there are only finitely many elements reachable from
    a
    . This gave us the idea to define
    Ï•(a)
    as the number of elements reachable from
    a
    . That is,
    ϕ(a)=|{b∈A∣a⟶∗b}|
    . ↩︎

  4. Defining a function

    Ï• that satisfies
    a→b⇒ϕ(a)>ϕ(b)
    is analogous to implementing a program that satisfies that requirement. But notice how much simpler it is to define
    Ï•
    in mathematical notaion rather than implementing a function that actually computes the set of reachable elements. This is a nice example of the power of mathematics as a specification language. ↩︎

  5. Lemma: If

    (A,→) is finitely branching and terminating, then
    {b∣a⟶∗b}
    is finite for all
    a∈A
    . ↩︎

  6. By definition of

    Ï•. We use that
    |C|>|B|
    if and only if
    Câ«ŒB
    if and only if
    C⊇B
    and
    ∃x∈C.x∉B
    . (We assume here that
    B
    is finite. ) ↩︎

  7. In words: Everything reachable from

    b is reachable from
    a
    . ↩︎

  8. The general pattern to show a statement of the form

    D⊆C is to assume
    d∈D
    and to show
    d∈C
    . Here, we assume
    b⟶∗d
    . We also know
    a→b
    . Then
    a⟶∗d
    by transitivity. ↩︎

  9. How do we find such an

    x? I would suggest to draw a picture of the situation. But also if just make a guess,
    x=a
    is an obvious one to try. ↩︎

  10. The general pattern to prove a negative statement such as "not

    b⟶∗a" is to assume the statement and derive a contradiction. ↩︎

  11. We assumed (see further above) that

    a→b and also assumed that
    b⟶∗a
    . Now use transitivity. ↩︎

  12. The notation

    a⟶+a means exactly that there is cycle from
    a
    to
    a
    . ↩︎