Term Rewriting System R:
[f, x, xs, y, ys]
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(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(app(maxlist, x), app(app(cons, y), ys)) -> app(app(if, app(app(le, x), y)), app(app(maxlist, y), ys))
app(app(maxlist, x), nil) -> x
app(height, app(app(node, x), xs)) -> app(s, app(app(maxlist, 0), app(app(map, height), xs)))

Innermost 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(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(le, app(s, x)), app(s, y)) -> APP(le, x)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(if, app(app(le, x), y)), app(app(maxlist, y), ys))
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(if, app(app(le, x), y))
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(le, x), y)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(le, x)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(maxlist, y), ys)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(maxlist, y)
APP(height, app(app(node, x), xs)) -> APP(s, app(app(maxlist, 0), app(app(map, height), xs)))
APP(height, app(app(node, x), xs)) -> APP(app(maxlist, 0), app(app(map, height), xs))
APP(height, app(app(node, x), xs)) -> APP(maxlist, 0)
APP(height, app(app(node, x), xs)) -> APP(app(map, height), xs)
APP(height, app(app(node, x), xs)) -> APP(map, height)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

APP(height, app(app(node, x), xs)) -> APP(app(map, height), xs)
APP(height, app(app(node, x), xs)) -> APP(app(maxlist, 0), app(app(map, height), xs))
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(maxlist, y), ys)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(le, x), y)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(if, app(app(le, x), y)), app(app(maxlist, y), ys))
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
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)
APP(app(map, f), app(app(cons, x), xs)) -> APP(app(cons, app(f, x)), app(app(map, f), xs))


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(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(app(maxlist, x), app(app(cons, y), ys)) -> app(app(if, app(app(le, x), y)), app(app(maxlist, y), ys))
app(app(maxlist, x), nil) -> x
app(height, app(app(node, x), xs)) -> app(s, app(app(maxlist, 0), app(app(map, height), xs)))


Strategy:

innermost




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

APP(app(map, f), app(app(cons, x), xs)) -> APP(app(cons, app(f, x)), app(app(map, f), xs))
10 new Dependency Pairs are created:

APP(app(map, app(map, f'')), app(app(cons, nil), xs)) -> APP(app(cons, nil), app(app(map, app(map, f'')), xs))
APP(app(map, app(map, f'')), app(app(cons, app(app(cons, x''), xs'')), xs)) -> APP(app(cons, app(app(cons, app(f'', x'')), app(app(map, f''), xs''))), app(app(map, app(map, f'')), xs))
APP(app(map, app(le, 0)), app(app(cons, x'), xs)) -> APP(app(cons, true), app(app(map, app(le, 0)), xs))
APP(app(map, app(le, app(s, x''))), app(app(cons, 0), xs)) -> APP(app(cons, false), app(app(map, app(le, app(s, x''))), xs))
APP(app(map, app(le, app(s, x''))), app(app(cons, app(s, y')), xs)) -> APP(app(cons, app(app(le, x''), y')), app(app(map, app(le, app(s, x''))), xs))
APP(app(map, app(maxlist, x'')), app(app(cons, app(app(cons, y'), ys')), xs)) -> APP(app(cons, app(app(if, app(app(le, x''), y')), app(app(maxlist, y'), ys'))), app(app(map, app(maxlist, x'')), xs))
APP(app(map, app(maxlist, x'')), app(app(cons, nil), xs)) -> APP(app(cons, x''), app(app(map, app(maxlist, x'')), xs))
APP(app(map, height), app(app(cons, app(app(node, x''), xs'')), xs)) -> APP(app(cons, app(s, app(app(maxlist, 0), app(app(map, height), xs'')))), app(app(map, height), xs))
APP(app(map, f''), app(app(cons, x), nil)) -> APP(app(cons, app(f'', x)), nil)
APP(app(map, f''), app(app(cons, x), app(app(cons, x''), xs''))) -> APP(app(cons, app(f'', x)), app(app(cons, app(f'', x'')), app(app(map, f''), xs'')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(map, f''), app(app(cons, x), app(app(cons, x''), xs''))) -> APP(app(cons, app(f'', x)), app(app(cons, app(f'', x'')), app(app(map, f''), xs'')))
APP(app(map, height), app(app(cons, app(app(node, x''), xs'')), xs)) -> APP(app(cons, app(s, app(app(maxlist, 0), app(app(map, height), xs'')))), app(app(map, height), xs))
APP(app(map, app(maxlist, x'')), app(app(cons, nil), xs)) -> APP(app(cons, x''), app(app(map, app(maxlist, x'')), xs))
APP(app(map, app(maxlist, x'')), app(app(cons, app(app(cons, y'), ys')), xs)) -> APP(app(cons, app(app(if, app(app(le, x''), y')), app(app(maxlist, y'), ys'))), app(app(map, app(maxlist, x'')), xs))
APP(app(map, app(le, app(s, x''))), app(app(cons, app(s, y')), xs)) -> APP(app(cons, app(app(le, x''), y')), app(app(map, app(le, app(s, x''))), xs))
APP(app(map, app(le, app(s, x''))), app(app(cons, 0), xs)) -> APP(app(cons, false), app(app(map, app(le, app(s, x''))), xs))
APP(app(map, app(le, 0)), app(app(cons, x'), xs)) -> APP(app(cons, true), app(app(map, app(le, 0)), xs))
APP(height, app(app(node, x), xs)) -> APP(app(maxlist, 0), app(app(map, height), xs))
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(maxlist, y), ys)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(le, x), y)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(if, app(app(le, x), y)), app(app(maxlist, y), ys))
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(map, app(map, f'')), app(app(cons, app(app(cons, x''), xs'')), xs)) -> APP(app(cons, app(app(cons, app(f'', x'')), app(app(map, f''), xs''))), app(app(map, app(map, f'')), 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)
APP(height, app(app(node, x), xs)) -> APP(app(map, height), xs)


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(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(app(maxlist, x), app(app(cons, y), ys)) -> app(app(if, app(app(le, x), y)), app(app(maxlist, y), ys))
app(app(maxlist, x), nil) -> x
app(height, app(app(node, x), xs)) -> app(s, app(app(maxlist, 0), app(app(map, height), xs)))


Strategy:

innermost




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

APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(if, app(app(le, x), y)), app(app(maxlist, y), ys))
five new Dependency Pairs are created:

APP(app(maxlist, 0), app(app(cons, y''), ys)) -> APP(app(if, true), app(app(maxlist, y''), ys))
APP(app(maxlist, app(s, x'')), app(app(cons, 0), ys)) -> APP(app(if, false), app(app(maxlist, 0), ys))
APP(app(maxlist, app(s, x'')), app(app(cons, app(s, y'')), ys)) -> APP(app(if, app(app(le, x''), y'')), app(app(maxlist, app(s, y'')), ys))
APP(app(maxlist, x), app(app(cons, y0), app(app(cons, y''), ys''))) -> APP(app(if, app(app(le, x), y0)), app(app(if, app(app(le, y0), y'')), app(app(maxlist, y''), ys'')))
APP(app(maxlist, x), app(app(cons, y'), nil)) -> APP(app(if, app(app(le, x), y')), y')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 3
Narrowing Transformation


Dependency Pairs:

APP(app(maxlist, x), app(app(cons, y'), nil)) -> APP(app(if, app(app(le, x), y')), y')
APP(app(maxlist, x), app(app(cons, y0), app(app(cons, y''), ys''))) -> APP(app(if, app(app(le, x), y0)), app(app(if, app(app(le, y0), y'')), app(app(maxlist, y''), ys'')))
APP(app(maxlist, app(s, x'')), app(app(cons, app(s, y'')), ys)) -> APP(app(if, app(app(le, x''), y'')), app(app(maxlist, app(s, y'')), ys))
APP(app(maxlist, app(s, x'')), app(app(cons, 0), ys)) -> APP(app(if, false), app(app(maxlist, 0), ys))
APP(app(maxlist, 0), app(app(cons, y''), ys)) -> APP(app(if, true), app(app(maxlist, y''), ys))
APP(app(map, height), app(app(cons, app(app(node, x''), xs'')), xs)) -> APP(app(cons, app(s, app(app(maxlist, 0), app(app(map, height), xs'')))), app(app(map, height), xs))
APP(app(map, app(maxlist, x'')), app(app(cons, nil), xs)) -> APP(app(cons, x''), app(app(map, app(maxlist, x'')), xs))
APP(app(map, app(maxlist, x'')), app(app(cons, app(app(cons, y'), ys')), xs)) -> APP(app(cons, app(app(if, app(app(le, x''), y')), app(app(maxlist, y'), ys'))), app(app(map, app(maxlist, x'')), xs))
APP(app(map, app(le, app(s, x''))), app(app(cons, app(s, y')), xs)) -> APP(app(cons, app(app(le, x''), y')), app(app(map, app(le, app(s, x''))), xs))
APP(app(map, app(le, app(s, x''))), app(app(cons, 0), xs)) -> APP(app(cons, false), app(app(map, app(le, app(s, x''))), xs))
APP(app(map, app(le, 0)), app(app(cons, x'), xs)) -> APP(app(cons, true), app(app(map, app(le, 0)), xs))
APP(height, app(app(node, x), xs)) -> APP(app(map, height), xs)
APP(height, app(app(node, x), xs)) -> APP(app(maxlist, 0), app(app(map, height), xs))
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(maxlist, y), ys)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(le, x), y)
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(map, app(map, f'')), app(app(cons, app(app(cons, x''), xs'')), xs)) -> APP(app(cons, app(app(cons, app(f'', x'')), app(app(map, f''), xs''))), app(app(map, app(map, f'')), 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)
APP(app(map, f''), app(app(cons, x), app(app(cons, x''), xs''))) -> APP(app(cons, app(f'', x)), app(app(cons, app(f'', x'')), app(app(map, f''), xs'')))


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(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(app(maxlist, x), app(app(cons, y), ys)) -> app(app(if, app(app(le, x), y)), app(app(maxlist, y), ys))
app(app(maxlist, x), nil) -> x
app(height, app(app(node, x), xs)) -> app(s, app(app(maxlist, 0), app(app(map, height), xs)))


Strategy:

innermost




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

APP(height, app(app(node, x), xs)) -> APP(app(maxlist, 0), app(app(map, height), xs))
two new Dependency Pairs are created:

APP(height, app(app(node, x), nil)) -> APP(app(maxlist, 0), nil)
APP(height, app(app(node, x), app(app(cons, x''), xs''))) -> APP(app(maxlist, 0), app(app(cons, app(height, x'')), app(app(map, height), xs'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 4
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

APP(height, app(app(node, x), app(app(cons, x''), xs''))) -> APP(app(maxlist, 0), app(app(cons, app(height, x'')), app(app(map, height), xs'')))
APP(app(maxlist, x), app(app(cons, y0), app(app(cons, y''), ys''))) -> APP(app(if, app(app(le, x), y0)), app(app(if, app(app(le, y0), y'')), app(app(maxlist, y''), ys'')))
APP(app(maxlist, app(s, x'')), app(app(cons, app(s, y'')), ys)) -> APP(app(if, app(app(le, x''), y'')), app(app(maxlist, app(s, y'')), ys))
APP(app(maxlist, app(s, x'')), app(app(cons, 0), ys)) -> APP(app(if, false), app(app(maxlist, 0), ys))
APP(app(maxlist, 0), app(app(cons, y''), ys)) -> APP(app(if, true), app(app(maxlist, y''), ys))
APP(app(map, f''), app(app(cons, x), app(app(cons, x''), xs''))) -> APP(app(cons, app(f'', x)), app(app(cons, app(f'', x'')), app(app(map, f''), xs'')))
APP(app(map, height), app(app(cons, app(app(node, x''), xs'')), xs)) -> APP(app(cons, app(s, app(app(maxlist, 0), app(app(map, height), xs'')))), app(app(map, height), xs))
APP(app(map, app(maxlist, x'')), app(app(cons, nil), xs)) -> APP(app(cons, x''), app(app(map, app(maxlist, x'')), xs))
APP(app(map, app(maxlist, x'')), app(app(cons, app(app(cons, y'), ys')), xs)) -> APP(app(cons, app(app(if, app(app(le, x''), y')), app(app(maxlist, y'), ys'))), app(app(map, app(maxlist, x'')), xs))
APP(app(map, app(le, app(s, x''))), app(app(cons, app(s, y')), xs)) -> APP(app(cons, app(app(le, x''), y')), app(app(map, app(le, app(s, x''))), xs))
APP(app(map, app(le, app(s, x''))), app(app(cons, 0), xs)) -> APP(app(cons, false), app(app(map, app(le, app(s, x''))), xs))
APP(app(map, app(le, 0)), app(app(cons, x'), xs)) -> APP(app(cons, true), app(app(map, app(le, 0)), xs))
APP(height, app(app(node, x), xs)) -> APP(app(map, height), xs)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(maxlist, y), ys)
APP(app(maxlist, x), app(app(cons, y), ys)) -> APP(app(le, x), y)
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(map, app(map, f'')), app(app(cons, app(app(cons, x''), xs'')), xs)) -> APP(app(cons, app(app(cons, app(f'', x'')), app(app(map, f''), xs''))), app(app(map, app(map, f'')), 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)
APP(app(maxlist, x), app(app(cons, y'), nil)) -> APP(app(if, app(app(le, x), y')), y')


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(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(app(maxlist, x), app(app(cons, y), ys)) -> app(app(if, app(app(le, x), y)), app(app(maxlist, y), ys))
app(app(maxlist, x), nil) -> x
app(height, app(app(node, x), xs)) -> app(s, app(app(maxlist, 0), app(app(map, height), xs)))


Strategy:

innermost



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