Term Rewriting System R:
[Y, U, V, X, 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
Nar

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)

There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(cons(x1, x2)) =  1 + 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
Nar

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
Narrowing Transformation

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))

On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

LESSLEAVES(cons(U, V), cons(W, Z)) -> LESSLEAVES(concat(U, V), concat(W, Z))
four new Dependency Pairs are created:

LESSLEAVES(cons(leaf, V'), cons(W, Z)) -> LESSLEAVES(V', concat(W, Z))
LESSLEAVES(cons(cons(U'', V''), V0), cons(W, Z)) -> LESSLEAVES(cons(U'', concat(V'', V0)), concat(W, Z))
LESSLEAVES(cons(U, V), cons(leaf, Z')) -> LESSLEAVES(concat(U, V), Z')
LESSLEAVES(cons(U, V), cons(cons(U'', V''), Z')) -> LESSLEAVES(concat(U, V), cons(U'', concat(V'', Z')))

The transformation is resulting in one new DP problem:

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Nar
→DP Problem 4
Narrowing Transformation

Dependency Pairs:

LESSLEAVES(cons(U, V), cons(cons(U'', V''), Z')) -> LESSLEAVES(concat(U, V), cons(U'', concat(V'', Z')))
LESSLEAVES(cons(U, V), cons(leaf, Z')) -> LESSLEAVES(concat(U, V), Z')
LESSLEAVES(cons(cons(U'', V''), V0), cons(W, Z)) -> LESSLEAVES(cons(U'', concat(V'', V0)), concat(W, Z))
LESSLEAVES(cons(leaf, V'), cons(W, Z)) -> LESSLEAVES(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))

On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

LESSLEAVES(cons(leaf, V'), cons(W, Z)) -> LESSLEAVES(V', concat(W, Z))
two new Dependency Pairs are created:

LESSLEAVES(cons(leaf, V'), cons(leaf, Z')) -> LESSLEAVES(V', Z')
LESSLEAVES(cons(leaf, V'), cons(cons(U', V''), Z')) -> LESSLEAVES(V', cons(U', concat(V'', Z')))

The transformation is resulting in one new DP problem:

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Nar
→DP Problem 4
Nar
...
→DP Problem 5
Narrowing Transformation

Dependency Pairs:

LESSLEAVES(cons(leaf, V'), cons(cons(U', V''), Z')) -> LESSLEAVES(V', cons(U', concat(V'', Z')))
LESSLEAVES(cons(leaf, V'), cons(leaf, Z')) -> LESSLEAVES(V', Z')
LESSLEAVES(cons(U, V), cons(leaf, Z')) -> LESSLEAVES(concat(U, V), Z')
LESSLEAVES(cons(cons(U'', V''), V0), cons(W, Z)) -> LESSLEAVES(cons(U'', concat(V'', V0)), concat(W, Z))
LESSLEAVES(cons(U, V), cons(cons(U'', V''), Z')) -> LESSLEAVES(concat(U, V), cons(U'', concat(V'', 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))

On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

LESSLEAVES(cons(cons(U'', V''), V0), cons(W, Z)) -> LESSLEAVES(cons(U'', concat(V'', V0)), concat(W, Z))
four new Dependency Pairs are created:

LESSLEAVES(cons(cons(U'', leaf), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', V0'), concat(W, Z))
LESSLEAVES(cons(cons(U'', cons(U', V')), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', cons(U', concat(V', V0'))), concat(W, Z))
LESSLEAVES(cons(cons(U'', V''), V0), cons(leaf, Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), Z')
LESSLEAVES(cons(cons(U'', V''), V0), cons(cons(U', V'), Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), cons(U', concat(V', Z')))

The transformation is resulting in one new DP problem:

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Nar
→DP Problem 4
Nar
...
→DP Problem 6
Narrowing Transformation

Dependency Pairs:

LESSLEAVES(cons(cons(U'', V''), V0), cons(cons(U', V'), Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), cons(U', concat(V', Z')))
LESSLEAVES(cons(cons(U'', V''), V0), cons(leaf, Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), Z')
LESSLEAVES(cons(cons(U'', cons(U', V')), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', cons(U', concat(V', V0'))), concat(W, Z))
LESSLEAVES(cons(cons(U'', leaf), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', V0'), concat(W, Z))
LESSLEAVES(cons(leaf, V'), cons(leaf, Z')) -> LESSLEAVES(V', Z')
LESSLEAVES(cons(U, V), cons(cons(U'', V''), Z')) -> LESSLEAVES(concat(U, V), cons(U'', concat(V'', Z')))
LESSLEAVES(cons(U, V), cons(leaf, Z')) -> LESSLEAVES(concat(U, V), Z')
LESSLEAVES(cons(leaf, V'), cons(cons(U', V''), Z')) -> LESSLEAVES(V', cons(U', concat(V'', 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))

On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

LESSLEAVES(cons(U, V), cons(leaf, Z')) -> LESSLEAVES(concat(U, V), Z')
two new Dependency Pairs are created:

LESSLEAVES(cons(leaf, V'), cons(leaf, Z')) -> LESSLEAVES(V', Z')
LESSLEAVES(cons(cons(U'', V''), V0), cons(leaf, Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), Z')

The transformation is resulting in one new DP problem:

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Nar
→DP Problem 4
Nar
...
→DP Problem 7
Narrowing Transformation

Dependency Pairs:

LESSLEAVES(cons(cons(U'', V''), V0), cons(leaf, Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), Z')
LESSLEAVES(cons(leaf, V'), cons(leaf, Z')) -> LESSLEAVES(V', Z')
LESSLEAVES(cons(cons(U'', V''), V0), cons(leaf, Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), Z')
LESSLEAVES(cons(cons(U'', cons(U', V')), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', cons(U', concat(V', V0'))), concat(W, Z))
LESSLEAVES(cons(cons(U'', leaf), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', V0'), concat(W, Z))
LESSLEAVES(cons(leaf, V'), cons(cons(U', V''), Z')) -> LESSLEAVES(V', cons(U', concat(V'', Z')))
LESSLEAVES(cons(leaf, V'), cons(leaf, Z')) -> LESSLEAVES(V', Z')
LESSLEAVES(cons(U, V), cons(cons(U'', V''), Z')) -> LESSLEAVES(concat(U, V), cons(U'', concat(V'', Z')))
LESSLEAVES(cons(cons(U'', V''), V0), cons(cons(U', V'), Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), cons(U', concat(V', 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))

On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

LESSLEAVES(cons(U, V), cons(cons(U'', V''), Z')) -> LESSLEAVES(concat(U, V), cons(U'', concat(V'', Z')))
four new Dependency Pairs are created:

LESSLEAVES(cons(leaf, V'), cons(cons(U'', V''), Z')) -> LESSLEAVES(V', cons(U'', concat(V'', Z')))
LESSLEAVES(cons(cons(U''', V'''), V0), cons(cons(U'', V''), Z')) -> LESSLEAVES(cons(U''', concat(V''', V0)), cons(U'', concat(V'', Z')))
LESSLEAVES(cons(U, V), cons(cons(U'', leaf), Z'')) -> LESSLEAVES(concat(U, V), cons(U'', Z''))
LESSLEAVES(cons(U, V), cons(cons(U'', cons(U''', V''')), Z'')) -> LESSLEAVES(concat(U, V), cons(U'', cons(U''', concat(V''', Z''))))

The transformation is resulting in one new DP problem:

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Nar
→DP Problem 4
Nar
...
→DP Problem 8
Polynomial Ordering

Dependency Pairs:

LESSLEAVES(cons(U, V), cons(cons(U'', cons(U''', V''')), Z'')) -> LESSLEAVES(concat(U, V), cons(U'', cons(U''', concat(V''', Z''))))
LESSLEAVES(cons(U, V), cons(cons(U'', leaf), Z'')) -> LESSLEAVES(concat(U, V), cons(U'', Z''))
LESSLEAVES(cons(cons(U''', V'''), V0), cons(cons(U'', V''), Z')) -> LESSLEAVES(cons(U''', concat(V''', V0)), cons(U'', concat(V'', Z')))
LESSLEAVES(cons(leaf, V'), cons(cons(U'', V''), Z')) -> LESSLEAVES(V', cons(U'', concat(V'', Z')))
LESSLEAVES(cons(leaf, V'), cons(leaf, Z')) -> LESSLEAVES(V', Z')
LESSLEAVES(cons(cons(U'', V''), V0), cons(cons(U', V'), Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), cons(U', concat(V', Z')))
LESSLEAVES(cons(cons(U'', V''), V0), cons(leaf, Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), Z')
LESSLEAVES(cons(cons(U'', cons(U', V')), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', cons(U', concat(V', V0'))), concat(W, Z))
LESSLEAVES(cons(cons(U'', leaf), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', V0'), concat(W, Z))
LESSLEAVES(cons(leaf, V'), cons(cons(U', V''), Z')) -> LESSLEAVES(V', cons(U', concat(V'', Z')))
LESSLEAVES(cons(leaf, V'), cons(leaf, Z')) -> LESSLEAVES(V', Z')
LESSLEAVES(cons(cons(U'', V''), V0), cons(leaf, Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), 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 pairs can be strictly oriented:

LESSLEAVES(cons(leaf, V'), cons(cons(U'', V''), Z')) -> LESSLEAVES(V', cons(U'', concat(V'', Z')))
LESSLEAVES(cons(leaf, V'), cons(leaf, Z')) -> LESSLEAVES(V', Z')
LESSLEAVES(cons(cons(U'', leaf), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', V0'), concat(W, Z))
LESSLEAVES(cons(leaf, V'), cons(cons(U', V''), Z')) -> LESSLEAVES(V', cons(U', concat(V'', Z')))

Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

concat(leaf, Y) -> Y
concat(cons(U, V), Y) -> cons(U, concat(V, Y))

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(cons(x1, x2)) =  x1 + x2 POL(leaf) =  1 POL(concat(x1, x2)) =  x1 + x2 POL(LESSLEAVES(x1, x2)) =  x1

resulting in one new DP problem.

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Nar
→DP Problem 4
Nar
...
→DP Problem 9
Polynomial Ordering

Dependency Pairs:

LESSLEAVES(cons(U, V), cons(cons(U'', cons(U''', V''')), Z'')) -> LESSLEAVES(concat(U, V), cons(U'', cons(U''', concat(V''', Z''))))
LESSLEAVES(cons(U, V), cons(cons(U'', leaf), Z'')) -> LESSLEAVES(concat(U, V), cons(U'', Z''))
LESSLEAVES(cons(cons(U''', V'''), V0), cons(cons(U'', V''), Z')) -> LESSLEAVES(cons(U''', concat(V''', V0)), cons(U'', concat(V'', Z')))
LESSLEAVES(cons(cons(U'', V''), V0), cons(cons(U', V'), Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), cons(U', concat(V', Z')))
LESSLEAVES(cons(cons(U'', V''), V0), cons(leaf, Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), Z')
LESSLEAVES(cons(cons(U'', cons(U', V')), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', cons(U', concat(V', V0'))), concat(W, Z))
LESSLEAVES(cons(cons(U'', V''), V0), cons(leaf, Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), 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 pairs can be strictly oriented:

LESSLEAVES(cons(U, V), cons(cons(U'', cons(U''', V''')), Z'')) -> LESSLEAVES(concat(U, V), cons(U'', cons(U''', concat(V''', Z''))))
LESSLEAVES(cons(U, V), cons(cons(U'', leaf), Z'')) -> LESSLEAVES(concat(U, V), cons(U'', Z''))
LESSLEAVES(cons(cons(U''', V'''), V0), cons(cons(U'', V''), Z')) -> LESSLEAVES(cons(U''', concat(V''', V0)), cons(U'', concat(V'', Z')))
LESSLEAVES(cons(cons(U'', V''), V0), cons(cons(U', V'), Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), cons(U', concat(V', Z')))
LESSLEAVES(cons(cons(U'', V''), V0), cons(leaf, Z')) -> LESSLEAVES(cons(U'', concat(V'', V0)), Z')
LESSLEAVES(cons(cons(U'', cons(U', V')), V0'), cons(W, Z)) -> LESSLEAVES(cons(U'', cons(U', concat(V', V0'))), concat(W, Z))

Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

concat(leaf, Y) -> Y
concat(cons(U, V), Y) -> cons(U, concat(V, Y))

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(cons(x1, x2)) =  1 + x1 + x2 POL(leaf) =  0 POL(concat(x1, x2)) =  x1 + x2 POL(LESSLEAVES(x1, x2)) =  x1

resulting in one new DP problem.

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Nar
→DP Problem 4
Nar
...
→DP Problem 10
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:01 minutes