Term Rewriting System R:
[x, y, n, u, v, w, z]
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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:

MINUS(s(x), s(y)) -> MINUS(x, y)
QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y))
QUOT(s(x), s(y)) -> MINUS(x, y)
APP(add(n, x), y) -> APP(x, y)
REVERSE(add(n, x)) -> APP(reverse(x), add(n, nil))
REVERSE(add(n, x)) -> REVERSE(x)
SHUFFLE(add(n, x)) -> SHUFFLE(reverse(x))
SHUFFLE(add(n, x)) -> REVERSE(x)
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 seven SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Remaining


Dependency Pair:

MINUS(s(x), s(y)) -> MINUS(x, y)


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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:

MINUS(s(x), s(y)) -> MINUS(x, y)


There are no usable rules using the Ce-refinement that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
MINUS(x1, x2) -> MINUS(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 8
Dependency Graph
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Remaining


Dependency Pair:


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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
AFS
       →DP Problem 2
Argument Filtering and Ordering
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Remaining


Dependency Pair:

APP(add(n, x), y) -> APP(x, y)


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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:

APP(add(n, x), y) -> APP(x, y)


There are no usable rules using the Ce-refinement that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
APP(x1, x2) -> APP(x1, x2)
add(x1, x2) -> add(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 9
Dependency Graph
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Remaining


Dependency Pair:


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Argument Filtering and Ordering
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Remaining


Dependency Pair:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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 using the Ce-refinement that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 10
Dependency Graph
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Remaining


Dependency Pair:


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
Argument Filtering and Ordering
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Remaining


Dependency Pair:

QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y))


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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:

QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y))


The following usable rules using the Ce-refinement can be oriented:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)


Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
QUOT(x1, x2) -> QUOT(x1, x2)
s(x1) -> s(x1)
minus(x1, x2) -> x1


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
           →DP Problem 11
Dependency Graph
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Remaining


Dependency Pair:


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
Argument Filtering and Ordering
       →DP Problem 6
Nar
       →DP Problem 7
Remaining


Dependency Pair:

REVERSE(add(n, x)) -> REVERSE(x)


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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:

REVERSE(add(n, x)) -> REVERSE(x)


There are no usable rules using the Ce-refinement that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
REVERSE(x1) -> REVERSE(x1)
add(x1, x2) -> add(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
           →DP Problem 12
Dependency Graph
       →DP Problem 6
Nar
       →DP Problem 7
Remaining


Dependency Pair:


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pair:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Narrowing Transformation
       →DP Problem 7
Remaining


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:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 14
Narrowing Transformation
       →DP Problem 7
Remaining


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:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 15
Narrowing Transformation
       →DP Problem 7
Remaining


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:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 16
Narrowing Transformation
       →DP Problem 7
Remaining


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:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 17
Narrowing Transformation
       →DP Problem 7
Remaining


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:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', leaf), v0'), cons(w, z)) -> LESSLEAVES(cons(u'', v0'), concat(w, z))
two new Dependency Pairs are created:

LESSLEAVES(cons(cons(u'', leaf), v0'), cons(leaf, z')) -> LESSLEAVES(cons(u'', v0'), z')
LESSLEAVES(cons(cons(u'', leaf), v0'), cons(cons(u', v'), z')) -> LESSLEAVES(cons(u'', v0'), cons(u', concat(v', z')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 18
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', cons(u', v')), v0'), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', concat(v', v0'))), concat(w, z))
four new Dependency Pairs are created:

LESSLEAVES(cons(cons(u'', cons(u', leaf)), v0''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', v0'')), concat(w, z))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, v''))), v0''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, concat(v'', v0'')))), concat(w, z))
LESSLEAVES(cons(cons(u'', cons(u', v')), v0'), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', concat(v', v0'))), z')
LESSLEAVES(cons(cons(u'', cons(u', v')), v0'), cons(cons(u0, v''), z')) -> LESSLEAVES(cons(u'', cons(u', concat(v', v0'))), cons(u0, concat(v'', z')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 19
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', leaf), z'')) -> LESSLEAVES(concat(u, v), cons(u'', z''))
two new Dependency Pairs are created:

LESSLEAVES(cons(leaf, v'), cons(cons(u'', leaf), z'')) -> LESSLEAVES(v', cons(u'', z''))
LESSLEAVES(cons(cons(u''', v''), v0), cons(cons(u'', leaf), z'')) -> LESSLEAVES(cons(u''', concat(v'', v0)), cons(u'', z''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 20
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', cons(u''', v''')), z'')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', concat(v''', z''))))
four new Dependency Pairs are created:

LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', v''')), z'')) -> LESSLEAVES(v', cons(u'', cons(u''', concat(v''', z''))))
LESSLEAVES(cons(cons(u'0, v''), v0), cons(cons(u'', cons(u''', v''')), z'')) -> LESSLEAVES(cons(u'0, concat(v'', v0)), cons(u'', cons(u''', concat(v''', z''))))
LESSLEAVES(cons(u, v), cons(cons(u'', cons(u''', leaf)), z''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', z''')))
LESSLEAVES(cons(u, v), cons(cons(u'', cons(u''', cons(u'0, v''))), z''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, concat(v'', z''')))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 21
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', cons(u', leaf)), v0''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', v0'')), concat(w, z))
two new Dependency Pairs are created:

LESSLEAVES(cons(cons(u'', cons(u', leaf)), v0''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', v0'')), z')
LESSLEAVES(cons(cons(u'', cons(u', leaf)), v0''), cons(cons(u0, v'), z')) -> LESSLEAVES(cons(u'', cons(u', v0'')), cons(u0, concat(v', z')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 22
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', cons(u', cons(u0, v''))), v0''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, concat(v'', v0'')))), concat(w, z))
four new Dependency Pairs are created:

LESSLEAVES(cons(cons(u'', cons(u', cons(u0, leaf))), v0'''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, v0'''))), concat(w, z))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, v')))), v0'''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, concat(v', v0'''))))), concat(w, z))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, v''))), v0''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, concat(v'', v0'')))), z')
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, v''))), v0''), cons(cons(u1, v'), z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, concat(v'', v0'')))), cons(u1, concat(v', z')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 23
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', cons(u''', leaf)), z''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', z''')))
two new Dependency Pairs are created:

LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', leaf)), z''')) -> LESSLEAVES(v', cons(u'', cons(u''', z''')))
LESSLEAVES(cons(cons(u'0, v''), v0), cons(cons(u'', cons(u''', leaf)), z''')) -> LESSLEAVES(cons(u'0, concat(v'', v0)), cons(u'', cons(u''', z''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 24
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', cons(u''', cons(u'0, v''))), z''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, concat(v'', z''')))))
four new Dependency Pairs are created:

LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', cons(u'0, v''))), z''')) -> LESSLEAVES(v', cons(u'', cons(u''', cons(u'0, concat(v'', z''')))))
LESSLEAVES(cons(cons(u'1, v'''), v0), cons(cons(u'', cons(u''', cons(u'0, v''))), z''')) -> LESSLEAVES(cons(u'1, concat(v''', v0)), cons(u'', cons(u''', cons(u'0, concat(v'', z''')))))
LESSLEAVES(cons(u, v), cons(cons(u'', cons(u''', cons(u'0, leaf))), z'''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, z''''))))
LESSLEAVES(cons(u, v), cons(cons(u'', cons(u''', cons(u'0, cons(u'1, v''')))), z'''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, cons(u'1, concat(v''', z''''))))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 25
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', cons(u', cons(u0, leaf))), v0'''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, v0'''))), concat(w, z))
two new Dependency Pairs are created:

LESSLEAVES(cons(cons(u'', cons(u', cons(u0, leaf))), v0'''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, v0'''))), z')
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, leaf))), v0'''), cons(cons(u1, v'), z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, v0'''))), cons(u1, concat(v', z')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 26
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', cons(u', cons(u0, cons(u1, v')))), v0'''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, concat(v', v0'''))))), concat(w, z))
four new Dependency Pairs are created:

LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, leaf)))), v0''''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, v0'''')))), concat(w, z))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, cons(u2, v''))))), v0''''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, cons(u2, concat(v'', v0'''')))))), concat(w, z))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, v')))), v0'''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, concat(v', v0'''))))), z')
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, v')))), v0'''), cons(cons(u2, v''), z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, concat(v', v0'''))))), cons(u2, concat(v'', z')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 27
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, v')))), v0'''), cons(cons(u2, v''), z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, concat(v', v0'''))))), cons(u2, concat(v'', z')))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, v')))), v0'''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, concat(v', v0'''))))), z')
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, cons(u2, v''))))), v0''''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, cons(u2, concat(v'', v0'''')))))), concat(w, z))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, leaf)))), v0''''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, v0'''')))), concat(w, z))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, leaf))), v0'''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, v0'''))), z')
LESSLEAVES(cons(u, v), cons(cons(u'', cons(u''', cons(u'0, cons(u'1, v''')))), z'''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, cons(u'1, concat(v''', z''''))))))
LESSLEAVES(cons(u, v), cons(cons(u'', cons(u''', cons(u'0, leaf))), z'''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, z''''))))
LESSLEAVES(cons(cons(u'1, v'''), v0), cons(cons(u'', cons(u''', cons(u'0, v''))), z''')) -> LESSLEAVES(cons(u'1, concat(v''', v0)), cons(u'', cons(u''', cons(u'0, concat(v'', z''')))))
LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', cons(u'0, v''))), z''')) -> LESSLEAVES(v', cons(u'', cons(u''', cons(u'0, concat(v'', z''')))))
LESSLEAVES(cons(cons(u'0, v''), v0), cons(cons(u'', cons(u''', leaf)), z''')) -> LESSLEAVES(cons(u'0, concat(v'', v0)), cons(u'', cons(u''', z''')))
LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', leaf)), z''')) -> LESSLEAVES(v', cons(u'', cons(u''', z''')))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, v''))), v0''), cons(cons(u1, v'), z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, concat(v'', v0'')))), cons(u1, concat(v', z')))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, v''))), v0''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, concat(v'', v0'')))), z')
LESSLEAVES(cons(cons(u'', cons(u', leaf)), v0''), cons(cons(u0, v'), z')) -> LESSLEAVES(cons(u'', cons(u', v0'')), cons(u0, concat(v', z')))
LESSLEAVES(cons(cons(u'', cons(u', leaf)), v0''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', v0'')), z')
LESSLEAVES(cons(cons(u'0, v''), v0), cons(cons(u'', cons(u''', v''')), z'')) -> LESSLEAVES(cons(u'0, concat(v'', v0)), cons(u'', cons(u''', concat(v''', z''))))
LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', v''')), z'')) -> LESSLEAVES(v', cons(u'', cons(u''', concat(v''', z''))))
LESSLEAVES(cons(cons(u''', v''), v0), cons(cons(u'', leaf), z'')) -> LESSLEAVES(cons(u''', concat(v'', v0)), cons(u'', z''))
LESSLEAVES(cons(leaf, v'), cons(cons(u'', leaf), z'')) -> LESSLEAVES(v', cons(u'', z''))
LESSLEAVES(cons(cons(u'', cons(u', v')), v0'), cons(cons(u0, v''), z')) -> LESSLEAVES(cons(u'', cons(u', concat(v', v0'))), cons(u0, concat(v'', z')))
LESSLEAVES(cons(cons(u'', cons(u', v')), v0'), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', concat(v', v0'))), z')
LESSLEAVES(cons(cons(u'', leaf), v0'), cons(cons(u', v'), z')) -> LESSLEAVES(cons(u'', v0'), cons(u', concat(v', z')))
LESSLEAVES(cons(cons(u'', leaf), v0'), cons(leaf, z')) -> LESSLEAVES(cons(u'', v0'), 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(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(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(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'', cons(u', cons(u0, leaf))), v0'''), cons(cons(u1, v'), z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, v0'''))), cons(u1, concat(v', z')))


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', cons(u''', cons(u'0, leaf))), z'''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, z''''))))
two new Dependency Pairs are created:

LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', cons(u'0, leaf))), z'''')) -> LESSLEAVES(v', cons(u'', cons(u''', cons(u'0, z''''))))
LESSLEAVES(cons(cons(u'1, v''), v0), cons(cons(u'', cons(u''', cons(u'0, leaf))), z'''')) -> LESSLEAVES(cons(u'1, concat(v'', v0)), cons(u'', cons(u''', cons(u'0, z''''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 28
Narrowing Transformation
       →DP Problem 7
Remaining


Dependency Pairs:

LESSLEAVES(cons(cons(u'1, v''), v0), cons(cons(u'', cons(u''', cons(u'0, leaf))), z'''')) -> LESSLEAVES(cons(u'1, concat(v'', v0)), cons(u'', cons(u''', cons(u'0, z''''))))
LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', cons(u'0, leaf))), z'''')) -> LESSLEAVES(v', cons(u'', cons(u''', cons(u'0, z''''))))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, v')))), v0'''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, concat(v', v0'''))))), z')
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, cons(u2, v''))))), v0''''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, cons(u2, concat(v'', v0'''')))))), concat(w, z))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, cons(u1, leaf)))), v0''''), cons(w, z)) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, v0'''')))), concat(w, z))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, leaf))), v0'''), cons(cons(u1, v'), z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, v0'''))), cons(u1, concat(v', z')))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, leaf))), v0'''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, v0'''))), z')
LESSLEAVES(cons(u, v), cons(cons(u'', cons(u''', cons(u'0, cons(u'1, v''')))), z'''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, cons(u'1, concat(v''', z''''))))))
LESSLEAVES(cons(cons(u'1, v'''), v0), cons(cons(u'', cons(u''', cons(u'0, v''))), z''')) -> LESSLEAVES(cons(u'1, concat(v''', v0)), cons(u'', cons(u''', cons(u'0, concat(v'', z''')))))
LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', cons(u'0, v''))), z''')) -> LESSLEAVES(v', cons(u'', cons(u''', cons(u'0, concat(v'', z''')))))
LESSLEAVES(cons(cons(u'0, v''), v0), cons(cons(u'', cons(u''', leaf)), z''')) -> LESSLEAVES(cons(u'0, concat(v'', v0)), cons(u'', cons(u''', z''')))
LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', leaf)), z''')) -> LESSLEAVES(v', cons(u'', cons(u''', z''')))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, v''))), v0''), cons(cons(u1, v'), z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, concat(v'', v0'')))), cons(u1, concat(v', z')))
LESSLEAVES(cons(cons(u'', cons(u', cons(u0, v''))), v0''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, concat(v'', v0'')))), z')
LESSLEAVES(cons(cons(u'', cons(u', leaf)), v0''), cons(cons(u0, v'), z')) -> LESSLEAVES(cons(u'', cons(u', v0'')), cons(u0, concat(v', z')))
LESSLEAVES(cons(cons(u'', cons(u', leaf)), v0''), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', v0'')), z')
LESSLEAVES(cons(cons(u'0, v''), v0), cons(cons(u'', cons(u''', v''')), z'')) -> LESSLEAVES(cons(u'0, concat(v'', v0)), cons(u'', cons(u''', concat(v''', z''))))
LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', v''')), z'')) -> LESSLEAVES(v', cons(u'', cons(u''', concat(v''', z''))))
LESSLEAVES(cons(cons(u''', v''), v0), cons(cons(u'', leaf), z'')) -> LESSLEAVES(cons(u''', concat(v'', v0)), cons(u'', z''))
LESSLEAVES(cons(leaf, v'), cons(cons(u'', leaf), z'')) -> LESSLEAVES(v', cons(u'', z''))
LESSLEAVES(cons(cons(u'', cons(u', v')), v0'), cons(cons(u0, v''), z')) -> LESSLEAVES(cons(u'', cons(u', concat(v', v0'))), cons(u0, concat(v'', z')))
LESSLEAVES(cons(cons(u'', cons(u', v')), v0'), cons(leaf, z')) -> LESSLEAVES(cons(u'', cons(u', concat(v', v0'))), z')
LESSLEAVES(cons(cons(u'', leaf), v0'), cons(cons(u', v'), z')) -> LESSLEAVES(cons(u'', v0'), cons(u', concat(v', z')))
LESSLEAVES(cons(cons(u'', leaf), v0'), cons(leaf, z')) -> LESSLEAVES(cons(u'', v0'), 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(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(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(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'', cons(u', cons(u0, cons(u1, v')))), v0'''), cons(cons(u2, v''), z')) -> LESSLEAVES(cons(u'', cons(u', cons(u0, cons(u1, concat(v', v0'''))))), cons(u2, concat(v'', z')))


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
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'', cons(u''', cons(u'0, cons(u'1, v''')))), z'''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, cons(u'1, concat(v''', z''''))))))
four new Dependency Pairs are created:

LESSLEAVES(cons(leaf, v'), cons(cons(u'', cons(u''', cons(u'0, cons(u'1, v''')))), z'''')) -> LESSLEAVES(v', cons(u'', cons(u''', cons(u'0, cons(u'1, concat(v''', z''''))))))
LESSLEAVES(cons(cons(u'2, v''), v0), cons(cons(u'', cons(u''', cons(u'0, cons(u'1, v''')))), z'''')) -> LESSLEAVES(cons(u'2, concat(v'', v0)), cons(u'', cons(u''', cons(u'0, cons(u'1, concat(v''', z''''))))))
LESSLEAVES(cons(u, v), cons(cons(u'', cons(u''', cons(u'0, cons(u'1, leaf)))), z''''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, cons(u'1, z''''')))))
LESSLEAVES(cons(u, v), cons(cons(u'', cons(u''', cons(u'0, cons(u'1, cons(u'2, v''))))), z''''')) -> LESSLEAVES(concat(u, v), cons(u'', cons(u''', cons(u'0, cons(u'1, cons(u'2, concat(v'', z''''')))))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Remaining Obligation(s)




The following remains to be proven:


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Remaining Obligation(s)




The following remains to be proven:

Termination of R could not be shown.
Duration:
0:09 minutes