Term Rewriting System R:
[f, x, xs, ys, yss, xss]
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(append, xs), nil) -> xs
app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(zip, nil), yss) -> yss
app(app(zip, xss), nil) -> xss
app(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> app(app(cons, app(app(append, xs), ys)), app(app(zip, xss), yss))
app(app(combine, xs), nil) -> xs
app(app(combine, xs), app(app(cons, ys), yss)) -> app(app(combine, app(app(zip, xs), ys)), yss)
app(levels, app(app(node, x), xs)) -> app(app(cons, app(app(cons, x), nil)), app(app(combine, nil), app(app(map, levels), xs)))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(map, f), app(app(cons, x), xs)) -> APP(app(cons, app(f, x)), app(app(map, f), xs))
APP(app(map, f), app(app(cons, x), xs)) -> APP(cons, app(f, x))
APP(app(map, f), app(app(cons, x), xs)) -> APP(f, x)
APP(app(map, f), app(app(cons, x), xs)) -> APP(app(map, f), xs)
APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(cons, x), app(app(append, xs), ys))
APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(append, xs), ys)
APP(app(append, app(app(cons, x), xs)), ys) -> APP(append, xs)
APP(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> APP(app(cons, app(app(append, xs), ys)), app(app(zip, xss), yss))
APP(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> APP(cons, app(app(append, xs), ys))
APP(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> APP(app(append, xs), ys)
APP(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> APP(append, xs)
APP(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> APP(app(zip, xss), yss)
APP(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> APP(zip, xss)
APP(app(combine, xs), app(app(cons, ys), yss)) -> APP(app(combine, app(app(zip, xs), ys)), yss)
APP(app(combine, xs), app(app(cons, ys), yss)) -> APP(combine, app(app(zip, xs), ys))
APP(app(combine, xs), app(app(cons, ys), yss)) -> APP(app(zip, xs), ys)
APP(app(combine, xs), app(app(cons, ys), yss)) -> APP(zip, xs)
APP(levels, app(app(node, x), xs)) -> APP(app(cons, app(app(cons, x), nil)), app(app(combine, nil), app(app(map, levels), xs)))
APP(levels, app(app(node, x), xs)) -> APP(cons, app(app(cons, x), nil))
APP(levels, app(app(node, x), xs)) -> APP(app(cons, x), nil)
APP(levels, app(app(node, x), xs)) -> APP(cons, x)
APP(levels, app(app(node, x), xs)) -> APP(app(combine, nil), app(app(map, levels), xs))
APP(levels, app(app(node, x), xs)) -> APP(combine, nil)
APP(levels, app(app(node, x), xs)) -> APP(app(map, levels), xs)
APP(levels, app(app(node, x), xs)) -> APP(map, levels)

Furthermore, R contains four SCCs.


   R
DPs
       →DP Problem 1
Size-Change Principle
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP


Dependency Pair:

APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(append, xs), ys)


Rules:


app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(append, xs), nil) -> xs
app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(zip, nil), yss) -> yss
app(app(zip, xss), nil) -> xss
app(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> app(app(cons, app(app(append, xs), ys)), app(app(zip, xss), yss))
app(app(combine, xs), nil) -> xs
app(app(combine, xs), app(app(cons, ys), yss)) -> app(app(combine, app(app(zip, xs), ys)), yss)
app(levels, app(app(node, x), xs)) -> app(app(cons, app(app(cons, x), nil)), app(app(combine, nil), app(app(map, levels), xs)))





The original DP problem is in applicative form. Its DPs and usable rules are the following.

APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(append, xs), ys)

none


It is proper and hence, it can be A-transformed which results in the DP problem

APPEND(cons(x, xs), ys) -> APPEND(xs, ys)

none


We number the DPs as follows:
  1. APPEND(cons(x, xs), ys) -> APPEND(xs, ys)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2=2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
cons(x1, x2) -> cons(x1, x2)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Size-Change Principle
       →DP Problem 3
SCP
       →DP Problem 4
SCP


Dependency Pair:

APP(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> APP(app(zip, xss), yss)


Rules:


app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(append, xs), nil) -> xs
app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(zip, nil), yss) -> yss
app(app(zip, xss), nil) -> xss
app(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> app(app(cons, app(app(append, xs), ys)), app(app(zip, xss), yss))
app(app(combine, xs), nil) -> xs
app(app(combine, xs), app(app(cons, ys), yss)) -> app(app(combine, app(app(zip, xs), ys)), yss)
app(levels, app(app(node, x), xs)) -> app(app(cons, app(app(cons, x), nil)), app(app(combine, nil), app(app(map, levels), xs)))





The original DP problem is in applicative form. Its DPs and usable rules are the following.

APP(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> APP(app(zip, xss), yss)

none


It is proper and hence, it can be A-transformed which results in the DP problem

ZIP(cons(xs, xss), cons(ys, yss)) -> ZIP(xss, yss)

none


We number the DPs as follows:
  1. ZIP(cons(xs, xss), cons(ys, yss)) -> ZIP(xss, yss)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
cons(x1, x2) -> cons(x1, x2)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
Size-Change Principle
       →DP Problem 4
SCP


Dependency Pair:

APP(app(combine, xs), app(app(cons, ys), yss)) -> APP(app(combine, app(app(zip, xs), ys)), yss)


Rules:


app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(append, xs), nil) -> xs
app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(zip, nil), yss) -> yss
app(app(zip, xss), nil) -> xss
app(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> app(app(cons, app(app(append, xs), ys)), app(app(zip, xss), yss))
app(app(combine, xs), nil) -> xs
app(app(combine, xs), app(app(cons, ys), yss)) -> app(app(combine, app(app(zip, xs), ys)), yss)
app(levels, app(app(node, x), xs)) -> app(app(cons, app(app(cons, x), nil)), app(app(combine, nil), app(app(map, levels), xs)))





The original DP problem is in applicative form. Its DPs and usable rules are the following.

APP(app(combine, xs), app(app(cons, ys), yss)) -> APP(app(combine, app(app(zip, xs), ys)), yss)


app(app(zip, nil), yss) -> yss
app(app(zip, xss), nil) -> xss
app(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> app(app(cons, app(app(append, xs), ys)), app(app(zip, xss), yss))
app(app(append, xs), nil) -> xs
app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))


It is proper and hence, it can be A-transformed which results in the DP problem

COMBINE(xs, cons(ys, yss)) -> COMBINE(zip(xs, ys), yss)


zip(nil, yss) -> yss
zip(xss, nil) -> xss
zip(cons(xs, xss), cons(ys, yss)) -> cons(append(xs, ys), zip(xss, yss))
append(xs, nil) -> xs
append(nil, ys) -> ys
append(cons(x, xs), ys) -> cons(x, append(xs, ys))


We number the DPs as follows:
  1. COMBINE(xs, cons(ys, yss)) -> COMBINE(zip(xs, ys), yss)
and get the following Size-Change Graph(s):
{1} , {1}
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
cons(x1, x2) -> cons(x1, x2)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
Size-Change Principle


Dependency Pairs:

APP(levels, app(app(node, x), xs)) -> APP(app(map, levels), xs)
APP(app(map, f), app(app(cons, x), xs)) -> APP(app(map, f), xs)
APP(app(map, f), app(app(cons, x), xs)) -> APP(f, x)


Rules:


app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(append, xs), nil) -> xs
app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(zip, nil), yss) -> yss
app(app(zip, xss), nil) -> xss
app(app(zip, app(app(cons, xs), xss)), app(app(cons, ys), yss)) -> app(app(cons, app(app(append, xs), ys)), app(app(zip, xss), yss))
app(app(combine, xs), nil) -> xs
app(app(combine, xs), app(app(cons, ys), yss)) -> app(app(combine, app(app(zip, xs), ys)), yss)
app(levels, app(app(node, x), xs)) -> app(app(cons, app(app(cons, x), nil)), app(app(combine, nil), app(app(map, levels), xs)))





We number the DPs as follows:
  1. APP(levels, app(app(node, x), xs)) -> APP(app(map, levels), xs)
  2. APP(app(map, f), app(app(cons, x), xs)) -> APP(app(map, f), xs)
  3. APP(app(map, f), app(app(cons, x), xs)) -> APP(f, x)
and get the following Size-Change Graph(s):
{1} , {1}
2>2
{2} , {2}
1=1
2>2
{3} , {3}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{2} , {2}
1=1
2>2
{3} , {3}
1>1
2>2
{3} , {1}
2>2
{1} , {3}
2>2
{2} , {3}
1>1
2>2
{3} , {2}
1>1
2>2
{3} , {3}
2>2
{2} , {1}
2>2
{3} , {2}
2>2
{2} , {2}
1>1
2>2
{2} , {2}
2>2
{2} , {3}
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
trivial

We obtain no new DP problems.

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