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

Innermost 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
Forward Instantiation Transformation
       →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))


Strategy:

innermost




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

CONCAT(cons(u, v), y) -> CONCAT(v, y)
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
Forward Instantiation Transformation
       →DP Problem 2
Nar


Dependency Pair:

CONCAT(cons(u, cons(u'', v'')), y'') -> CONCAT(cons(u'', 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))


Strategy:

innermost




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

CONCAT(cons(u, cons(u'', v'')), y'') -> CONCAT(cons(u'', v''), y'')
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 4
Argument Filtering and Ordering
       →DP Problem 2
Nar


Dependency Pair:

CONCAT(cons(u, cons(u''0, cons(u'''', v''''))), y'''') -> CONCAT(cons(u''0, cons(u'''', 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))


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(cons(x1, x2))=  1 + x1 + x2  
  POL(CONCAT(x1, x2))=  1 + x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
CONCAT(x1, x2) -> CONCAT(x1, x2)
cons(x1, x2) -> cons(x1, x2)


   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 5
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))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →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))


Strategy:

innermost




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
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
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))


Strategy:

innermost




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
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 7
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))


Strategy:

innermost




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
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 8
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))


Strategy:

innermost




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
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 9
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))


Strategy:

innermost




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
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 10
Argument Filtering and 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))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

LESSLEAVES(cons(u, v), cons(cons(u'', leaf), z'')) -> LESSLEAVES(concat(u, v), cons(u'', 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')
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')))


The following usable rules for innermost 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))=  1 + x1 + x2  
  POL(leaf)=  1  
  POL(concat(x1, x2))=  x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
LESSLEAVES(x1, x2) -> LESSLEAVES(x1, x2)
cons(x1, x2) -> cons(x1, x2)
concat(x1, x2) -> concat(x1, x2)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 11
Argument Filtering and 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(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'', cons(u', v')), v0'), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', concat(v', v0'))), 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))


Strategy:

innermost




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(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'', cons(u', v')), v0'), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', concat(v', v0'))), concat(w, z))


The following usable rules for innermost 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))=  1 + x1 + x2  
  POL(leaf)=  1  
  POL(concat(x1, x2))=  x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
LESSLEAVES(x1, x2) -> LESSLEAVES(x1, x2)
cons(x1, x2) -> cons(x1, x2)
concat(x1, x2) -> concat(x1, x2)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 12
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))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:09 minutes