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
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(LESS_LEAVES(x1, x2))=  x1  
  POL(leaf)=  1  
  POL(concat(x1, x2))=  x1 + x2  

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(LESS_LEAVES(x1, x2))=  x1  
  POL(leaf)=  0  
  POL(concat(x1, x2))=  x1 + x2  

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