Term Rewriting System R:
[y, u, v, w, z]
concat(leaf, y) -> y
concat(cons(u, v), y) -> cons(u, concat(v, y))
lessleaves(x, leaf) -> false
lessleaves(leaf, cons(w, z)) -> true
lessleaves(cons(u, v), cons(w, z)) -> lessleaves(concat(u, v), concat(w, z))

Termination of R to be shown.

R
Dependency Pair Analysis

R contains the following Dependency Pairs:

CONCAT(cons(u, v), y) -> CONCAT(v, y)
LESSLEAVES(cons(u, v), cons(w, z)) -> LESSLEAVES(concat(u, v), concat(w, z))
LESSLEAVES(cons(u, v), cons(w, z)) -> CONCAT(u, v)
LESSLEAVES(cons(u, v), cons(w, z)) -> CONCAT(w, z)

Furthermore, R contains two SCCs.

R
DPs
→DP Problem 1
Polynomial Ordering
→DP Problem 2
Polo

Dependency Pair:

CONCAT(cons(u, v), y) -> CONCAT(v, y)

Rules:

concat(leaf, y) -> y
concat(cons(u, v), y) -> cons(u, concat(v, y))
lessleaves(x, leaf) -> false
lessleaves(leaf, cons(w, z)) -> true
lessleaves(cons(u, v), cons(w, z)) -> lessleaves(concat(u, v), concat(w, z))

The following dependency pair can be strictly oriented:

CONCAT(cons(u, v), y) -> CONCAT(v, y)

Additionally, the following rules can be oriented:

concat(leaf, y) -> y
concat(cons(u, v), y) -> cons(u, concat(v, y))
lessleaves(x, leaf) -> false
lessleaves(leaf, cons(w, z)) -> true
lessleaves(cons(u, v), cons(w, z)) -> lessleaves(concat(u, v), concat(w, z))

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(cons(x1, x2)) =  1 + x2 POL(x) =  0 POL(false) =  0 POL(true) =  0 POL(leaf) =  0 POL(less_leaves(x1, x2)) =  0 POL(concat(x1, x2)) =  x1 + x2 POL(CONCAT(x1, x2)) =  x1

resulting in one new DP problem.

R
DPs
→DP Problem 1
Polo
→DP Problem 3
Dependency Graph
→DP Problem 2
Polo

Dependency Pair:

Rules:

concat(leaf, y) -> y
concat(cons(u, v), y) -> cons(u, concat(v, y))
lessleaves(x, leaf) -> false
lessleaves(leaf, cons(w, z)) -> true
lessleaves(cons(u, v), cons(w, z)) -> lessleaves(concat(u, v), concat(w, z))

Using the Dependency Graph resulted in no new DP problems.

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Polynomial Ordering

Dependency Pair:

LESSLEAVES(cons(u, v), cons(w, z)) -> LESSLEAVES(concat(u, v), concat(w, z))

Rules:

concat(leaf, y) -> y
concat(cons(u, v), y) -> cons(u, concat(v, y))
lessleaves(x, leaf) -> false
lessleaves(leaf, cons(w, z)) -> true
lessleaves(cons(u, v), cons(w, z)) -> lessleaves(concat(u, v), concat(w, z))

The following dependency pair can be strictly oriented:

LESSLEAVES(cons(u, v), cons(w, z)) -> LESSLEAVES(concat(u, v), concat(w, z))

Additionally, the following rules can be oriented:

concat(leaf, y) -> y
concat(cons(u, v), y) -> cons(u, concat(v, y))
lessleaves(x, leaf) -> false
lessleaves(leaf, cons(w, z)) -> true
lessleaves(cons(u, v), cons(w, z)) -> lessleaves(concat(u, v), concat(w, z))

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(cons(x1, x2)) =  1 + x1 + x2 POL(x) =  0 POL(false) =  0 POL(LESS_LEAVES(x1, x2)) =  x1 POL(true) =  0 POL(leaf) =  0 POL(less_leaves(x1, x2)) =  0 POL(concat(x1, x2)) =  x1 + x2

resulting in one new DP problem.

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Polo
→DP Problem 4
Dependency Graph

Dependency Pair:

Rules:

concat(leaf, y) -> y
concat(cons(u, v), y) -> cons(u, concat(v, y))
lessleaves(x, leaf) -> false
lessleaves(leaf, cons(w, z)) -> true
lessleaves(cons(u, v), cons(w, z)) -> lessleaves(concat(u, v), concat(w, z))

Using the Dependency Graph resulted in no new DP problems.

Termination of R successfully shown.
Duration:
0:00 minutes