Rewriting Part 1. Abstract Reduction Temur Kutsia RISC, JKU Linz - - PowerPoint PPT Presentation

rewriting
SMART_READER_LITE
LIVE PREVIEW

Rewriting Part 1. Abstract Reduction Temur Kutsia RISC, JKU Linz - - PowerPoint PPT Presentation

Rewriting Part 1. Abstract Reduction Temur Kutsia RISC, JKU Linz Literature Franz Baader and Tobias Nipkow. Term Rewriting and All That. Cambridge University Press, 1998. Books home page: http://www21.in.tum.de/nipkow/TRaAT/


slide-1
SLIDE 1

Rewriting

Part 1. Abstract Reduction Temur Kutsia RISC, JKU Linz

slide-2
SLIDE 2

Literature

▸ Franz Baader and Tobias Nipkow. Term Rewriting and All

  • That. Cambridge University Press, 1998.

▸ Book’s home page:

http://www21.in.tum.de/˜nipkow/TRaAT/

▸ Resources about rewriting: http://rewriting.loria.fr/

slide-3
SLIDE 3

Motivation Abstract Reduction Systems

slide-4
SLIDE 4

Equational Reasoning

▸ Restricted class of languages: The only predicate symbol is

equality ≈.

▸ Reasoning with equations:

▸ derive consequences of given equations, ▸ find values for variables that satisfy a given equation.

▸ At the heart of many problems in mathematics and computer

science.

slide-5
SLIDE 5

Example: Addition of Natural Numbers

▸ Equations (identities):

x + 0 ≈ x x + s(y) ≈ s(x + y)

▸ How to calculate s(0) + s(s(0))?

slide-6
SLIDE 6

Example: Addition of Natural Numbers

▸ Orient equations, obtaining rewriting rules. ▸ Apply the rules to transform expressions.

slide-7
SLIDE 7

Example: Addition of Natural Numbers

▸ Orient equations, obtaining rewriting rules. ▸ Apply the rules to transform expressions. ▸ Rewrite rules:

x + 0 → x (R1) x + s(y) → s(x + y) (R2)

▸ Rewriting s(0) + s(s(0)):

slide-8
SLIDE 8

Example: Addition of Natural Numbers

▸ Orient equations, obtaining rewriting rules. ▸ Apply the rules to transform expressions. ▸ Rewrite rules:

x + 0 → x (R1) x + s(y) → s(x + y) (R2)

▸ Rewriting s(0) + s(s(0)):

s(0) + s(s(0)) → (by R2, with x ↦ s(0),y ↦ s(0))

slide-9
SLIDE 9

Example: Addition of Natural Numbers

▸ Orient equations, obtaining rewriting rules. ▸ Apply the rules to transform expressions. ▸ Rewrite rules:

x + 0 → x (R1) x + s(y) → s(x + y) (R2)

▸ Rewriting s(0) + s(s(0)):

s(0) + s(s(0)) → (by R2, with x ↦ s(0),y ↦ s(0)) s(s(0) + s(0)) → (by R2, with x ↦ s(0),y ↦ 0)

slide-10
SLIDE 10

Example: Addition of Natural Numbers

▸ Orient equations, obtaining rewriting rules. ▸ Apply the rules to transform expressions. ▸ Rewrite rules:

x + 0 → x (R1) x + s(y) → s(x + y) (R2)

▸ Rewriting s(0) + s(s(0)):

s(0) + s(s(0)) → (by R2, with x ↦ s(0),y ↦ s(0)) s(s(0) + s(0)) → (by R2, with x ↦ s(0),y ↦ 0) s(s(s(0) + 0)) → (by R1, with x ↦ s(0))

slide-11
SLIDE 11

Example: Addition of Natural Numbers

▸ Orient equations, obtaining rewriting rules. ▸ Apply the rules to transform expressions. ▸ Rewrite rules:

x + 0 → x (R1) x + s(y) → s(x + y) (R2)

▸ Rewriting s(0) + s(s(0)):

s(0) + s(s(0)) → (by R2, with x ↦ s(0),y ↦ s(0)) s(s(0) + s(0)) → (by R2, with x ↦ s(0),y ↦ 0) s(s(s(0) + 0)) → (by R1, with x ↦ s(0)) s(s(s(0)))

slide-12
SLIDE 12

What is Rewriting

▸ Process of transforming one expression into another. ▸ Rules describe how one expression can be rewritten into

another.

slide-13
SLIDE 13

Identities and Rewriting

▸ Rewriting as a computational mechanism:

▸ Apply given equations in one direction, as rewrite rules. ▸ Compute normal forms. ▸ Close relationship with functional programming. ▸ Example: symbolic differentiation.

slide-14
SLIDE 14

Identities and Rewriting

▸ Rewriting as a computational mechanism:

▸ Apply given equations in one direction, as rewrite rules. ▸ Compute normal forms. ▸ Close relationship with functional programming. ▸ Example: symbolic differentiation.

▸ Rewriting as a deduction mechanism:

▸ Apply given equations in both directions. ▸ Define equivalence classes of terms. ▸ Equational reasoning. ▸ Example: group theory.

slide-15
SLIDE 15

Symbolic Differentiation

▸ Expressions: Terms built over variables (u,v,...) and the

following function symbols:

▸ constants 0,1 (numbers), ▸ constants X,Y (indeterminates), ▸ unary symbol DX (partial derivative with respect to X), ▸ binary symbols +,∗.

slide-16
SLIDE 16

Symbolic Differentiation

▸ Expressions: Terms built over variables (u,v,...) and the

following function symbols:

▸ constants 0,1 (numbers), ▸ constants X,Y (indeterminates), ▸ unary symbol DX (partial derivative with respect to X), ▸ binary symbols +,∗.

▸ Examples of terms:

▸ (X + X) ∗ Y + 1. ▸ DX(u ∗ v). ▸ (X + Y ) ∗ DX(X ∗ Y ).

slide-17
SLIDE 17

Symbolic Differentiation

▸ Expressions: Terms built over variables (u,v,...) and the

following function symbols:

▸ constants 0,1 (numbers), ▸ constants X,Y (indeterminates), ▸ unary symbol DX (partial derivative with respect to X), ▸ binary symbols +,∗.

▸ Examples of terms:

▸ (X + X) ∗ Y + 1. ▸ DX(u ∗ v). ▸ (X + Y ) ∗ DX(X ∗ Y ).

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

slide-18
SLIDE 18

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X)

slide-19
SLIDE 19

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X)

(R4)

slide-20
SLIDE 20

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X)

(R4)

(X ∗ DX(X))) + (DX(X) ∗ X)

slide-21
SLIDE 21

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X)

(R4)

(X ∗ DX(X))) + (DX(X) ∗ X) (X ∗ 1) + (DX(X) ∗ X)

(R1)

slide-22
SLIDE 22

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X)

(R4) (R1)

(X ∗ 1) + (DX(X) ∗ X)

slide-23
SLIDE 23

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X)

(R4) (R1)

(X ∗ 1) + (DX(X) ∗ X)

slide-24
SLIDE 24

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X)

(R4) (R1)

(X ∗ 1) + (DX(X) ∗ X) (X ∗ 1) + (1 ∗ X)

(R1)

slide-25
SLIDE 25

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X)

(R4) (R1)

(X ∗ 1) + (DX(X) ∗ X)

(R1)

(X ∗ 1) + (1 ∗ X)

slide-26
SLIDE 26

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X)

(R4) (R1)

(X ∗ 1) + (DX(X) ∗ X)

(R1)

(X ∗ 1) + (1 ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X)

slide-27
SLIDE 27

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X)

(R4) (R1)

(X ∗ 1) + (DX(X) ∗ X)

(R1)

(X ∗ 1) + (1 ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X) (X ∗ DX(X)) + (1 ∗ X)

(R1)

slide-28
SLIDE 28

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X)

(R4) (R1)

(X ∗ 1) + (DX(X) ∗ X)

(R1)

(X ∗ 1) + (1 ∗ X) (X ∗ DX(X)) + (1 ∗ X)

(R1)

slide-29
SLIDE 29

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X)

(R4) (R1)

(X ∗ 1) + (DX(X) ∗ X)

(R1)

(X ∗ 1) + (1 ∗ X)

(R1)

(X ∗ DX(X)) + (1 ∗ X)

slide-30
SLIDE 30

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X)

(R4) (R1)

(X ∗ 1) + (DX(X) ∗ X)

(R1) (R1)

(X ∗ DX(X)) + (1 ∗ X) (X ∗ 1) + (1 ∗ X)

(R1)

slide-31
SLIDE 31

Symbolic Differentiation

▸ Rewrite rules:

DX(X) → 1 (R1) DX(Y ) → 0 (R2) DX(u + v) → DX(u) + DX(v) (R3) DX(u ∗ v) → (u ∗ DX(v)) + (DX(u) ∗ v) (R4)

▸ Differentiate DX(X ∗ X):

DX(X ∗ X) (X ∗ DX(X))) + (DX(X) ∗ X)

(R4) (R1)

(X ∗ 1) + (DX(X) ∗ X)

(R1)

(X ∗ 1) + (1 ∗ X) (X ∗ DX(X)) + (1 ∗ X)

(R1) (R1)

slide-32
SLIDE 32

Properties of Term Rewriting Systems

The symbolic differentiation example can be used to illustrate two most important properties of TRSs:

slide-33
SLIDE 33

Properties of Term Rewriting Systems

The symbolic differentiation example can be used to illustrate two most important properties of TRSs:

  • 1. Termination:

▸ Is it always the case that after finitely many rule applications

we reach an expression to which no more rules apply (normal form)?

▸ For symbolic differentiation rules this is the case. ▸ But how to prove it? ▸ An example of non-terminating rule: u + v → v + u

slide-34
SLIDE 34

Properties of Term Rewriting Systems

The symbolic differentiation example can be used to illustrate two most important properties of TRSs:

slide-35
SLIDE 35

Properties of Term Rewriting Systems

The symbolic differentiation example can be used to illustrate two most important properties of TRSs:

  • 2. Confluence:

▸ If there are different ways of applying rules to a given term t,

leading to different terms t1 and t2, can they be reduced by rule applications to a common term?

▸ For symbolic differentiation rules this is the case. ▸ But how to prove it?

slide-36
SLIDE 36

Properties of Term Rewriting Systems

▸ Adding the rule u + 0 → u (R5) destroys confluence:

DX(X + 0) DX(X)

(R5)

1

(R1)

DX(X) + DX(0)

(R3)

1 + DX(0)

(R1) ▸ Confluence can be regained by adding DX(0) → 0

(completion).

slide-37
SLIDE 37

Group Theory

▸ Terms are built over variables and the following function

symbols:

▸ binary ○, ▸ unary i, ▸ constant 0.

▸ Examples of terms:

▸ x ○ (y ○ i(y)) ▸ (0 ○ x) ○ i(0) ▸ i(x ○ y)

▸ Identities (aka group axioms), defining groups:

Associativity of ○ (x ○ y) ○ z ≈ x ○ (y ○ z) (G1) e left unit e ○ x ≈ x (G2) i left inverse i(x) ○ x ≈ e (G3)

slide-38
SLIDE 38

Group Theory

▸ Identities can be applied in both directions. ▸ Word problem for identities:

▸ Given a set of identities E and two terms s and t. ▸ Is it possible to transform s into t, using the identities in E as

rewrite rules applied in both directions?

▸ For instance, is it possible to transform e into x ○ i(x), i.e., is

the left inverse also a right-inverse?

slide-39
SLIDE 39

Group Theory

(x ○ y) ○ z ≈ x ○ (y ○ z) (G1) e ○ x ≈ x (G2) i(x) ○ x ≈ e (G3) Transform e into x ○ i(x): e ≈G3 i(x ○ i(x)) ○ (x ○ i(x)) ≈G2 i(x ○ i(x)) ○ (x ○ (e ○ i(x))) ≈G3 i(x ○ i(x)) ○ (x ○ ((i(x) ○ x) ○ i(x))) ≈G1 i(x ○ i(x)) ○ ((x ○ (i(x) ○ x)) ○ i(x)) ≈G1 i(x ○ i(x)) ○ (((x ○ i(x)) ○ x) ○ i(x)) ≈G1 i(x ○ i(x)) ○ ((x ○ i(x)) ○ (x ○ i(x))) ≈G1 (i(x ○ i(x)) ○ (x ○ i(x))) ○ (x ○ i(x)) ≈G3 e ○ (x ○ i(x)) ≈G2 x ○ i(x)

slide-40
SLIDE 40

Solving Word Problems by Rewriting?

▸ Is there a simpler way to solve word problems? ▸ Try to solve it by rewriting (uni-directional application of

identities): s ˆ s ∗ t ˆ t ∗ =

▸ Reduce s and t to normal forms ˆ

s and ˆ t.

▸ Check whether ˆ

s = ˆ t, i.e., syntactically equal. (= is the meta-equality.)

slide-41
SLIDE 41

Solving Word Problems by Rewriting?

▸ Is there a simpler way to solve word problems? ▸ Try to solve it by rewriting (uni-directional application of

identities): s ˆ s ∗ t ˆ t ∗ =

▸ Reduce s and t to normal forms ˆ

s and ˆ t.

▸ Check whether ˆ

s = ˆ t, i.e., syntactically equal. (= is the meta-equality.)

▸ But... it would only work if normal forms exist and are unique.

slide-42
SLIDE 42

Solving Word Problems by Rewriting?

▸ In the group theory example, e and x ○ i(x) are equivalent,

but it can not be decided by (left-to-right) rewriting: Both terms are in the normal form.

▸ Uniqueness of normal forms is violated: non-confluence. ▸ Normal forms may not exist: The process of reducing a term

may lead to an infinite chain of transformations: non-termination.

slide-43
SLIDE 43

Solving Word Problems by Rewriting?

▸ In the group theory example, e and x ○ i(x) are equivalent,

but it can not be decided by (left-to-right) rewriting: Both terms are in the normal form.

▸ Uniqueness of normal forms is violated: non-confluence. ▸ Normal forms may not exist: The process of reducing a term

may lead to an infinite chain of transformations: non-termination.

▸ Termination and confluence ensure existence and uniqueness

  • f normal forms.
slide-44
SLIDE 44

Solving Word Problems by Rewriting?

▸ In the group theory example, e and x ○ i(x) are equivalent,

but it can not be decided by (left-to-right) rewriting: Both terms are in the normal form.

▸ Uniqueness of normal forms is violated: non-confluence. ▸ Normal forms may not exist: The process of reducing a term

may lead to an infinite chain of transformations: non-termination.

▸ Termination and confluence ensure existence and uniqueness

  • f normal forms.

▸ If a given set of identities leads to non-confluent system, we

will try to apply the idea of completion to extend the rewrite system to a confluent one.

slide-45
SLIDE 45

Motivation Abstract Reduction Systems

slide-46
SLIDE 46

Abstract vs Concrete

Concrete rewrite formalisms:

▸ string rewriting ▸ term rewriting ▸ graph rewriting ▸ λ calculus ▸ etc.

Abstract reduction:

▸ No structure on objects to be rewritten. ▸ Abstract treatment of reductions.

slide-47
SLIDE 47

Abstract Reduction Systems

▸ Abstract reduction system (ARS): A pair (A,→), where

▸ A is a set, ▸ the reduction → is a binary relation on A: → ⊆ A × A.

▸ Write a → b for (a,b) ∈→.

slide-48
SLIDE 48

Abstract Reduction System: Example

▸ A = {a,b,c,d,e,f,g} ▸ →= { (a,e),(b,a),(b,c),(c,d),(c,f)

(e,b),(e,g),(f,e),(f,g) } a b c d e f g

slide-49
SLIDE 49

Equivalence and Reduction

Again, two views at reductions.

  • 1. Directed computation: Follow the reductions, trying to

compute a normal form: a0 → a1 → ⋯

  • 2. View → as description of

← →.

▸ a

← → b means there is a path between a and b, with arrows traversed in both directions: a ← c → d ← b

▸ Goal: Decide whether a

← → b.

▸ Bidirectional rewriting is expensive. ▸ Unidirectional rewriting with subsequent comparison of normal

form works if the reduction system is confluent and terminating.

Termination, confluence: central topics.

slide-50
SLIDE 50

Basic notions

  • 1. Composition of two relations.
  • 2. Given two relations R ⊆ A × B and S ⊆ B × C, their

composition is defined by R ○ S ∶= {(x,z) ∣ ∃y ∈ B. (x,y) ∈ R ∧ (y,z) ∈ S}

slide-51
SLIDE 51

Abstract Reduction System: Example

a b c d e f g

slide-52
SLIDE 52

Abstract Reduction System: Example

d g a e b c f

▸ Finite rewrite sequence: a → e → b → c → f

slide-53
SLIDE 53

Abstract Reduction System: Example

b c d e f g a

▸ Finite rewrite sequence: a → e → b → c → f ▸ Empty rewrite sequence: a

slide-54
SLIDE 54

Abstract Reduction System: Example

b c d f g a e b

▸ Finite rewrite sequence: a → e → b → c → f ▸ Empty rewrite sequence: a ▸ Infinite rewrite sequence: a → e → b → a → ⋯

slide-55
SLIDE 55

Relations Derived from →

  • → ∶= {(x,x) ∣ x ∈ A}

identity

i+1

  • → ∶=

i

  • → ○ →

(i + 1)-fold composition, i ≥ 0

+

  • → ∶= ∪i>0

i

transitive closure

  • → ∶=

+

  • → ∪

reflexive transitive closure

=

  • → ∶= → ∪

reflexive closure

−1

  • → ∶= {(y,x) ∣ (x,y) ∈ →}

inverse ← ∶=

−1

inverse ↔ ∶= → ∪ ← symmetric closure

+

← → ∶= (↔)+ transitive symmetric closure

← → ∶= (↔)∗ reflexive transitive symmetric closure

slide-56
SLIDE 56

Terminology

▸ If x ∗

  • → y then we say:

▸ x rewrites to y, or ▸ there is some finite path from x to y, or ▸ y is a reduct of x.

slide-57
SLIDE 57

Terminology

▸ If x ∗

  • → y then we say:

▸ x rewrites to y, or ▸ there is some finite path from x to y, or ▸ y is a reduct of x.

a b c d e f g

slide-58
SLIDE 58

Terminology

▸ If x ∗

  • → y then we say:

▸ x rewrites to y, or ▸ there is some finite path from x to y, or ▸ y is a reduct of x.

d g a e b c f a

  • → f
slide-59
SLIDE 59

Terminology

▸ x is reducible iff there exists y such that x → y.

slide-60
SLIDE 60

Terminology

▸ x is reducible iff there exists y such that x → y. ▸ x is in normal form (irreducible) iff x is not reducible.

slide-61
SLIDE 61

Terminology

▸ x is reducible iff there exists y such that x → y. ▸ x is in normal form (irreducible) iff x is not reducible. ▸ y is a normal form of x iff x ∗

  • → y and y is in normal form.
slide-62
SLIDE 62

Terminology

▸ x is reducible iff there exists y such that x → y. ▸ x is in normal form (irreducible) iff x is not reducible. ▸ y is a normal form of x iff x ∗

  • → y and y is in normal form.

▸ We write x !

  • → y if y is a normal form of x.

▸ If x has a unique normal form, it is denoted by x ↓.

slide-63
SLIDE 63

Terminology

▸ x is reducible iff there exists y such that x → y. ▸ x is in normal form (irreducible) iff x is not reducible. ▸ y is a normal form of x iff x ∗

  • → y and y is in normal form.

▸ We write x !

  • → y if y is a normal form of x.

▸ If x has a unique normal form, it is denoted by x ↓.

a b c d e f g a,b,c,e,f are reducible

slide-64
SLIDE 64

Terminology

▸ x is reducible iff there exists y such that x → y. ▸ x is in normal form (irreducible) iff x is not reducible. ▸ y is a normal form of x iff x ∗

  • → y and y is in normal form.

▸ We write x !

  • → y if y is a normal form of x.

▸ If x has a unique normal form, it is denoted by x ↓.

a b c d e f g d,g are in a normal form

slide-65
SLIDE 65

Terminology

▸ x is reducible iff there exists y such that x → y. ▸ x is in normal form (irreducible) iff x is not reducible. ▸ y is a normal form of x iff x ∗

  • → y and y is in normal form.

▸ We write x !

  • → y if y is a normal form of x.

▸ If x has a unique normal form, it is denoted by x ↓.

a b c d e f g b

!

  • → d

b

!

  • → g

g

!

  • → g
slide-66
SLIDE 66

Terminology

▸ y is direct successor of x iff x → y.

slide-67
SLIDE 67

Terminology

▸ y is direct successor of x iff x → y. ▸ y is successor of x iff x +

  • → y.
slide-68
SLIDE 68

Terminology

▸ y is direct successor of x iff x → y. ▸ y is successor of x iff x +

  • → y.

▸ x and y are convertible iff x ∗

← → y.

slide-69
SLIDE 69

Terminology

▸ y is direct successor of x iff x → y. ▸ y is successor of x iff x +

  • → y.

▸ x and y are convertible iff x ∗

← → y.

▸ x and y are joinable iff there exists z such that x ∗

  • → z

← y.

slide-70
SLIDE 70

Terminology

▸ y is direct successor of x iff x → y. ▸ y is successor of x iff x +

  • → y.

▸ x and y are convertible iff x ∗

← → y.

▸ x and y are joinable iff there exists z such that x ∗

  • → z

← y.

▸ We write x ↓ y iff x and y are joinable.

slide-71
SLIDE 71

Terminology

▸ y is direct successor of x iff x → y. ▸ y is successor of x iff x +

  • → y.

▸ x and y are convertible iff x ∗

← → y.

▸ x and y are joinable iff there exists z such that x ∗

  • → z

← y.

▸ We write x ↓ y iff x and y are joinable.

a b c d e f g e ↓ f, f ↓ d, a ↓ f, not g ↓ d

slide-72
SLIDE 72

Terminology

▸ y is direct successor of x iff x → y. ▸ y is successor of x iff x +

  • → y.

▸ x and y are convertible iff x ∗

← → y.

▸ x and y are joinable iff there exists z such that x ∗

  • → z

← y.

▸ We write x ↓ y iff x and y are joinable.

a b c d e f g g

← → d

slide-73
SLIDE 73

Example

slide-74
SLIDE 74

Central Notions

Definition 1.1

A relation → is called Church-Rosser (CR) iff x

← → y implies x ↓ y.

slide-75
SLIDE 75

Central Notions

Definition 1.1

A relation → is called Church-Rosser (CR) iff x

← → y implies x ↓ y. Graphically: x y z ∗ ∗ ∗ Solid arrows represent universal and dashed arrows existential quantification: ∀x,y. x

← → y ⇒ ∃z. x

  • → z ∧ y

  • → z.
slide-76
SLIDE 76

Central Notions: Church-Rosser

Definition 1.2

A relation → is called confluent (C) iff y1

← x

  • → y2 implies y1 ↓ y2.
slide-77
SLIDE 77

Central Notions: Church-Rosser

Definition 1.2

A relation → is called confluent (C) iff y1

← x

  • → y2 implies y1 ↓ y2.

Graphically: x y2 y1 z ∗ ∗ ∗ ∗ Solid arrows represent universal and dashed arrows existential quantification: ∀x,y1,y2. y1

← x

  • → y2 ⇒ ∃z. y1

  • → z

← y2.

slide-78
SLIDE 78

Central Notions: Local Confluence

Definition 1.3

A relation → is called locally confluent (LC) iff y1 ← x → y2 implies y1 ↓ y2.

slide-79
SLIDE 79

Central Notions: Local Confluence

Definition 1.3

A relation → is called locally confluent (LC) iff y1 ← x → y2 implies y1 ↓ y2. Graphically: x y2 y1 z ∗ ∗ Solid arrows represent universal and dashed arrows existential quantification: ∀x,y1,y2. y1 ← x → y2 ⇒ ∃z. y1

  • → z

← y2.

slide-80
SLIDE 80

Central Notions: T, N, UN, Convergence

Definition 1.4

A relation → is called

▸ terminating (T) iff there is no infinite descending chain

a0 → a1 → ⋯.

▸ normalizing (N) iff every element has a normal form. ▸ uniquely normalizing (UN) iff every element has at most one

normal form.

▸ convergent iff it is both confluent and terminating.

slide-81
SLIDE 81

Central Notions: T, N, UN, Convergence

Definition 1.4

A relation → is called

▸ terminating (T) iff there is no infinite descending chain

a0 → a1 → ⋯.

▸ normalizing (N) iff every element has a normal form. ▸ uniquely normalizing (UN) iff every element has at most one

normal form.

▸ convergent iff it is both confluent and terminating.

Alternative terminology:

▸ Strongly normalizing: terminating. ▸ Weakly normalizing: normalizing.

slide-82
SLIDE 82

Central Notions: CR Reformulated

▸ Obviously, x ↓ y implies x ∗

← → y.

▸ Therefore, the Church-Rosser property can be formulated as

the equivalence:

▸ → is called Church-Rosser iff

x

← → y iff x ↓ y.

slide-83
SLIDE 83

Properties

1. T

N

slide-84
SLIDE 84

Properties

1. T

N 2. T / ⇐

  • N
slide-85
SLIDE 85

Properties

1. T

N 2. T / ⇐

  • N

a b

slide-86
SLIDE 86

Properties

1. T

N 2. T / ⇐

  • N

a b 3. CR ⇐ ⇒

← → = ↓

slide-87
SLIDE 87

Properties

1. T

N 2. T / ⇐

  • N

a b 3. CR ⇐ ⇒

← → = ↓ 4. CR

UN

slide-88
SLIDE 88

Properties

1. T

N 2. T / ⇐

  • N

a b 3. CR ⇐ ⇒

← → = ↓ 4. CR

UN 5. CR / ⇐

  • UN
slide-89
SLIDE 89

Properties

1. T

N 2. T / ⇐

  • N

a b 3. CR ⇐ ⇒

← → = ↓ 4. CR

UN 5. CR / ⇐

  • UN

a b c

slide-90
SLIDE 90

Properties

1. T

N 2. T / ⇐

  • N

a b 3. CR ⇐ ⇒

← → = ↓ 4. CR

UN 5. CR / ⇐

  • UN

a b c 6. N ∧ UN

C

slide-91
SLIDE 91

Properties

1. T

N 2. T / ⇐

  • N

a b 3. CR ⇐ ⇒

← → = ↓ 4. CR

UN 5. CR / ⇐

  • UN

a b c 6. N ∧ UN

C 7. C

LC

slide-92
SLIDE 92

Properties

1. T

N 2. T / ⇐

  • N

a b 3. CR ⇐ ⇒

← → = ↓ 4. CR

UN 5. CR / ⇐

  • UN

a b c 6. N ∧ UN

C 7. C

LC 8. C / ⇐

  • LC
slide-93
SLIDE 93

Properties

1. T

N 2. T / ⇐

  • N

a b 3. CR ⇐ ⇒

← → = ↓ 4. CR

UN 5. CR / ⇐

  • UN

a b c 6. N ∧ UN

C 7. C

LC 8. C / ⇐

  • LC

a b c d

slide-94
SLIDE 94

Properties

▸ Recall what we were looking for. ▸ Ability to check equivalence by the search of a common

reduct.

▸ This is exactly the Church-Rosser property. ▸ How does it relate to confluence and termination?

slide-95
SLIDE 95

Church-Rosser and Confluence

▸ The Church-Rosser property and confluence coincide. ▸ CR

⇒ C is immediate.

▸ CR ⇐

C has a nice diagrammatic proof:

slide-96
SLIDE 96

Central Notions: Semi-Confluence

Definition 1.5

A relation → is called semi-confluent (SC) iff y1 ← x

  • → y2 implies y1 ↓ y2.
slide-97
SLIDE 97

Central Notions: Semi-Confluence

Definition 1.5

A relation → is called semi-confluent (SC) iff y1 ← x

  • → y2 implies y1 ↓ y2.

Graphically: x y2 y1 z ∗ ∗ ∗ Solid arrows represent universal and dashed arrows existential quantification: ∀x,y1,y2. y1 ← x

  • → y2 ⇒ ∃z. y1

  • → z

← y2.

slide-98
SLIDE 98

CR, C, SC, LC

x y z ∗ ∗ ∗ CR x y2 y1 z ∗ ∗ ∗ ∗ C x y2 y1 z ∗ ∗ ∗ SC x y2 y1 z ∗ ∗ LC

slide-99
SLIDE 99

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.
slide-100
SLIDE 100

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(1 ⇒ 2)

slide-101
SLIDE 101

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(1 ⇒ 2)

▸ Assume → is CR and y1 ∗

← x

  • → y2. Show y1 ↓ y2.
slide-102
SLIDE 102

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(1 ⇒ 2)

▸ Assume → is CR and y1 ∗

← x

  • → y2. Show y1 ↓ y2.

▸ y1 ∗

← x

  • → y2 implies y1

← → y2.

slide-103
SLIDE 103

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(1 ⇒ 2)

▸ Assume → is CR and y1 ∗

← x

  • → y2. Show y1 ↓ y2.

▸ y1 ∗

← x

  • → y2 implies y1

← → y2.

▸ CR implies y1 ↓ y2.

slide-104
SLIDE 104

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.
slide-105
SLIDE 105

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(2 ⇒ 3)

slide-106
SLIDE 106

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(2 ⇒ 3)

▸ Semi-confluence is a special case of confluence.

slide-107
SLIDE 107

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.
slide-108
SLIDE 108

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1)

slide-109
SLIDE 109

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1)

▸ Assume → is SC and x ∗

← → y. Show x ↓ y.

slide-110
SLIDE 110

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1)

▸ Assume → is SC and x ∗

← → y. Show x ↓ y.

▸ Induction on the length of the chain x ∗

← → y.

slide-111
SLIDE 111

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1)

▸ Assume → is SC and x ∗

← → y. Show x ↓ y.

▸ Induction on the length of the chain x ∗

← → y.

▸ Base case: x = y. Trivial.

slide-112
SLIDE 112

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1)

▸ Assume → is SC and x ∗

← → y. Show x ↓ y.

▸ Induction on the length of the chain x ∗

← → y.

▸ Base case: x = y. Trivial. ▸ Assume x ∗

← → y′ ↔ y. Show x ↓ y.

slide-113
SLIDE 113

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1)

▸ Assume → is SC and x ∗

← → y. Show x ↓ y.

▸ Induction on the length of the chain x ∗

← → y.

▸ Base case: x = y. Trivial. ▸ Assume x ∗

← → y′ ↔ y. Show x ↓ y.

▸ By IH, x ↓ y′, i.e. x ∗

  • → z

← y′ for some z.

slide-114
SLIDE 114

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.
slide-115
SLIDE 115

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1) (Cont.)

slide-116
SLIDE 116

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1) (Cont.)

▸ Show x ↓ y by case distinction on y′ ↔ y.

slide-117
SLIDE 117

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1) (Cont.)

▸ Show x ↓ y by case distinction on y′ ↔ y. ▸ y′ ← y: x ↓ y follows directly from x ↓ y′:

x y′ y ∗ ∗ ∗ IH

slide-118
SLIDE 118

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1) (Cont.)

▸ Show x ↓ y by case distinction on y′ ↔ y.

slide-119
SLIDE 119

Church-Rosser, Confluence, and Semi-Confluence

Theorem 1.1

The following conditions are equivalent:

  • 1. → has the Chursh-Rosser property.
  • 2. → is confluent.
  • 3. → is semi-confluent.

Proof.

(3 ⇒ 1) (Cont.)

▸ Show x ↓ y by case distinction on y′ ↔ y. ▸ y′ → y: Semi-confluence implies z ↓ y and, hence x ↓ y:

x y′ y z ∗ ∗ ∗ ∗ ∗ IH SC

slide-120
SLIDE 120

Corollaries

▸ If → is confluent and x ∗

← → y then

  • 1. x

  • → y if y is in a normal form, and
  • 2. x = y if both x and y are in a normal form.

▸ Hence, for confluent relations, convertibility is equivalent to

joinability.

▸ Without termination, joinability can not be decided.

slide-121
SLIDE 121

Corollaries

▸ If → is confluent, then every element has at most one normal

form (C ⇒ UN)

▸ If → is normalizing and confluent, then every element has

exactly one normal form. Hence, for confluent and normalizing reductions the notation x ↓ is well-defined.

slide-122
SLIDE 122

Goal-Directed Equivalence Test

Theorem 1.2

If → is confluent and normalizing, then

▸ every element x has a unique normal form x ↓, ▸ x ∗

← → y iff x ↓= y ↓. Normalization requires breadth-first search for normal forms.

slide-123
SLIDE 123

Goal-Directed Equivalence Test

Theorem 1.2

If → is confluent and normalizing, then

▸ every element x has a unique normal form x ↓, ▸ x ∗

← → y iff x ↓= y ↓. Normalization requires breadth-first search for normal forms.

Theorem 1.3

If → is confluent and terminating, then

▸ every element x has a unique normal form x ↓, ▸ x ∗

← → y iff x ↓= y ↓. Termination permits depth-first search for normal forms.

slide-124
SLIDE 124

Confluence and Termination

▸ How to show confluence and termination of an ARS?

slide-125
SLIDE 125

Showing Termination

▸ Idea: Embedding the reduction into a well-founded order.

slide-126
SLIDE 126

Showing Termination

▸ Idea: Embedding the reduction into a well-founded order. ▸ Well-founded order (B,>): No infinite descending chain

b0 > b1 > b2 > ⋯ in B.

slide-127
SLIDE 127

Showing Termination

Examples of well-founded orders:

▸ (N,>): The set of natural numbers with the standard

  • rdering.

▸ (N ∖ {0},>): The set of positive integers where a > b iff b ∣ a

and b ≠ a.

▸ ({a,b,c}∗,>): The set of finite words over a fixed alphabet,

where w1 > w2 iff w2 is a proper substring of w1.

slide-128
SLIDE 128

Showing Termination

Examples of well-founded orders:

▸ (N,>): The set of natural numbers with the standard

  • rdering.

▸ (N ∖ {0},>): The set of positive integers where a > b iff b ∣ a

and b ≠ a.

▸ ({a,b,c}∗,>): The set of finite words over a fixed alphabet,

where w1 > w2 iff w2 is a proper substring of w1. Examples of non-well-founded orders:

▸ (Z,>): The set of integers with the standard ordering. ▸ (Q+ 0,>): The set of non-negative rationals with the standard

  • rdering.

▸ ({a,b,c}∗,>): The set of finite words over a fixed alphabet,

where > is the lexicographic ordering, e.g. a > ab > abb > ⋯.

slide-129
SLIDE 129

Showing Termination

Theorem 1.4

Let (A,→) be an ARS. Then → is terminating iff there exists a well-founded order (B,>) and a mapping ϕ ∶ A → B such that a1 → a2 implies ϕ(a1) > ϕ(a2).

slide-130
SLIDE 130

Showing Confluence (for a Terminating Relation)

Lemma 1.1 (Newman’s Lemma)

If → is terminating and locally confluent, then it is confluent.

slide-131
SLIDE 131

Showing Confluence (for a Terminating Relation)

Lemma 1.1 (Newman’s Lemma)

If → is terminating and locally confluent, then it is confluent.

Proof.

▸ Use well-founded induction. Let (A,→) be an ARS. Then

WFI is the inference rule: ∀x ∈ A.(∀y ∈ A.(x

+

  • → y ⇒ P(y)) ⇒ P(x))

∀x ∈ A.P(x) (WFI) where P is some property of elements of A.

▸ Reads: To prove P(x) for all x ∈ A, try to prove P(x) under

the assumption that P(y) holds for all successors y of x.

▸ Holds when → is terminating.

slide-132
SLIDE 132

Showing Confluence (for a Terminating Relation)

Lemma 1.1 (Newman’s Lemma)

If → is terminating and locally confluent, then it is confluent.

  • Proof. (Cont.)
slide-133
SLIDE 133

Showing Confluence (for a Terminating Relation)

Lemma 1.1 (Newman’s Lemma)

If → is terminating and locally confluent, then it is confluent.

  • Proof. (Cont.)

▸ Let P be

P(x) = ∀y,z. y

← x

  • → z ⇒ y ↓ z.

Obviously, → is confluent if P(x) holds for all x ∈ A.

slide-134
SLIDE 134

Showing Confluence (for a Terminating Relation)

Lemma 1.1 (Newman’s Lemma)

If → is terminating and locally confluent, then it is confluent.

  • Proof. (Cont.)

▸ Let P be

P(x) = ∀y,z. y

← x

  • → z ⇒ y ↓ z.

Obviously, → is confluent if P(x) holds for all x ∈ A.

▸ Show P(x) under the assumption P(t) for all x +

  • → t.
slide-135
SLIDE 135

Showing Confluence (for a Terminating Relation)

Lemma 1.1 (Newman’s Lemma)

If → is terminating and locally confluent, then it is confluent.

  • Proof. (Cont.)

▸ Let P be

P(x) = ∀y,z. y

← x

  • → z ⇒ y ↓ z.

Obviously, → is confluent if P(x) holds for all x ∈ A.

▸ Show P(x) under the assumption P(t) for all x +

  • → t.

▸ Fix x,y,z arbitrarily. Assume y ∗

← x

  • → z. Prove y ↓ z.
slide-136
SLIDE 136

Showing Confluence (for a Terminating Relation)

Lemma 1.1 (Newman’s Lemma)

If → is terminating and locally confluent, then it is confluent.

  • Proof. (Cont.)

▸ Let P be

P(x) = ∀y,z. y

← x

  • → z ⇒ y ↓ z.

Obviously, → is confluent if P(x) holds for all x ∈ A.

▸ Show P(x) under the assumption P(t) for all x +

  • → t.

▸ Fix x,y,z arbitrarily. Assume y ∗

← x

  • → z. Prove y ↓ z.

▸ Case 1: x = y or y = x. Trivial.

slide-137
SLIDE 137

Showing Confluence (for a Terminating Relation)

Lemma 1.1 (Newman’s Lemma)

If → is terminating and locally confluent, then it is confluent.

  • Proof. (Cont.)
slide-138
SLIDE 138

Showing Confluence (for a Terminating Relation)

Lemma 1.1 (Newman’s Lemma)

If → is terminating and locally confluent, then it is confluent.

  • Proof. (Cont.)

▸ Case 2: x → y1 ∗

  • → y and x → z1

  • → z.
slide-139
SLIDE 139

Showing Confluence (for a Terminating Relation)

Lemma 1.1 (Newman’s Lemma)

If → is terminating and locally confluent, then it is confluent.

  • Proof. (Cont.)

▸ Case 2: x → y1 ∗

  • → y and x → z1

  • → z.

x z1 z y1 y u v ∗ ∗ ∗ ∗ w ∗ ∗ ∗ ∗ IH IH LC

slide-140
SLIDE 140

Showing Confluence (Termination Not Required)

Definition 1.6

A relation → is called strongly confluent (StC) iff ∀x,y1,y2. y1 ← x → y2 ⇒ ∃z. y1

  • → z

=

← y2. Remark: The definition is symmetric: y1 ← x → y2 must imply both y1

  • → z1

=

← y2 and y1

  • → z2

=

← y2 for suitably chosen z1 and z2.

slide-141
SLIDE 141

Showing Confluence (Termination Not Required)

Definition 1.6

A relation → is called strongly confluent (StC) iff ∀x,y1,y2. y1 ← x → y2 ⇒ ∃z. y1

  • → z

=

← y2. Remark: The definition is symmetric: y1 ← x → y2 must imply both y1

  • → z1

=

← y2 and y1

  • → z2

=

← y2 for suitably chosen z1 and z2. Graphically: x y2 y1 z ∗ = Solid arrows represent universal and dashed arrows existential quantification.

slide-142
SLIDE 142

C, SC, LC, StC

x y2 y1 z ∗ ∗ ∗ ∗ C x y2 y1 z ∗ ∗ ∗ SC x y2 y1 z ∗ ∗ LC x y2 y1 z ∗ = StC

slide-143
SLIDE 143

Showing Confluence (Termination Not Required)

Theorem 1.5

Any strongly confluent relation is semi-confluent (and, thus, confluent).

Proof.

x x2 y1 y2 ∗ = StC xn−1 yn−1 xn yn ∗ = = StC

slide-144
SLIDE 144

Showing Confluence (Termination Not Required)

▸ StC is a pretty strong property. ▸ Trying to show strong confluence of → would not be practical.

slide-145
SLIDE 145

Showing Confluence (Termination Not Required)

▸ StC is a pretty strong property. ▸ Trying to show strong confluence of → would not be practical. ▸ The trick to show confluence of → is not to prove its strong

confluence, but to define a StC relation →s such that

  • →s =

  • →.
slide-146
SLIDE 146

Showing Confluence (Termination Not Required)

▸ StC is a pretty strong property. ▸ Trying to show strong confluence of → would not be practical. ▸ The trick to show confluence of → is not to prove its strong

confluence, but to define a StC relation →s such that

  • →s =

  • →.

▸ If ∗

  • →1 =

  • →2, then →1 is confluent iff →2 is confluent.

▸ Hence, if ∗

  • →s =

  • →, then StC(→s) ⇒ C(→s) ⇔ C(→).
slide-147
SLIDE 147

Showing Confluence (Termination Not Required)

▸ StC is a pretty strong property. ▸ Trying to show strong confluence of → would not be practical. ▸ The trick to show confluence of → is not to prove its strong

confluence, but to define a StC relation →s such that

  • →s =

  • →.

▸ If ∗

  • →1 =

  • →2, then →1 is confluent iff →2 is confluent.

▸ Hence, if ∗

  • →s =

  • →, then StC(→s) ⇒ C(→s) ⇔ C(→).

▸ To simplify the search of →s, the condition can be weakened

due to following easy lemma: If →1 ⊆ →2 ⊆

  • →1, then

  • →1 =

  • →2.
slide-148
SLIDE 148

Showing Confluence (Termination Not Required)

Summarizing the ideas from the previous slide:

Theorem 1.6

If → ⊆ →s ⊆

  • → and →s is strongly confluent, then → is confluent.
slide-149
SLIDE 149

Showing Confluence (Termination Not Required)

The theorem can be made stronger, considering the diamond property:

Definition 1.7

A relation → has the diamond property iff ∀x,y1,y2. y1 ← x → y2 ⇒ ∃z. y1 → z ← y2.

slide-150
SLIDE 150

Showing Confluence (Termination Not Required)

The theorem can be made stronger, considering the diamond property:

Definition 1.7

A relation → has the diamond property iff ∀x,y1,y2. y1 ← x → y2 ⇒ ∃z. y1 → z ← y2. Graphically: x y2 y1 z

slide-151
SLIDE 151

Showing Confluence (Termination Not Required)

The diamond property implies strong confluence, therefore:

Theorem 1.7

If → ⊆ →d ⊆

  • → and →d has the diamond property, then → is

confluent.

slide-152
SLIDE 152

Confluence by Commutation

▸ Confluence proofs can be localized by splitting a reduction up

into several smaller reductions and showing their confluence separately.

▸ An additional property, commuting, should be satisfied.

slide-153
SLIDE 153

Confluence by Commutation

▸ Confluence proofs can be localized by splitting a reduction up

into several smaller reductions and showing their confluence separately.

▸ An additional property, commuting, should be satisfied.

Definition 1.8

Two relations →1 and →2 commute iff ∀x,y1,y2. y1

← 1 x

  • →2 y2 ⇒ ∃z. y1

  • →2 z

← 1 y2. x y2 y1 z ∗ ∗ ∗ ∗ 2 2 1 1

slide-154
SLIDE 154

Confluence by Commutation

Lemma 1.2 (Commutative Union Lemma)

If →1 and →2 are confluent and commute, then →1 ∪ →2 is also confluent.

slide-155
SLIDE 155

Confluence by Commutation

Lemma 1.2 (Commutative Union Lemma)

If →1 and →2 are confluent and commute, then →1 ∪ →2 is also confluent.

Proof.

▸ ∗

  • →1 ○

  • →2 has the diamond property:
slide-156
SLIDE 156

Confluence by Commutation

Lemma 1.3 (Commutative Union Lemma)

If →1 and →2 are confluent and commute, then →1 ∪ →2 is also confluent.

slide-157
SLIDE 157

Confluence by Commutation

Lemma 1.3 (Commutative Union Lemma)

If →1 and →2 are confluent and commute, then →1 ∪ →2 is also confluent.

  • Proof. (Cont.)

▸ The following inclusions hold:

→1 ∪ →2 ⊆

  • →1 ○

  • →2 ⊆ (→1 ∪ →2)∗.

▸ By Theorem 1.7, →1 ∪ →2 is confluent.