Term Rewriting System R:
[x, y, p, xs]
app(app(app(if, true), x), y) -> x
app(app(app(if, true), x), y) -> y
app(app(takeWhile, p), nil) -> nil
app(app(takeWhile, p), app(app(cons, x), xs)) -> app(app(app(if, app(p, x)), app(app(cons, x), app(app(takeWhile, p), xs))), nil)
app(app(dropWhile, p), nil) -> nil
app(app(dropWhile, p), app(app(cons, x), xs)) -> app(app(app(if, app(p, x)), app(app(dropWhile, p), xs)), app(app(cons, x), xs))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(takeWhile, p), app(app(cons, x), xs)) -> APP(app(app(if, app(p, x)), app(app(cons, x), app(app(takeWhile, p), xs))), nil)
APP(app(takeWhile, p), app(app(cons, x), xs)) -> APP(app(if, app(p, x)), app(app(cons, x), app(app(takeWhile, p), xs)))
APP(app(takeWhile, p), app(app(cons, x), xs)) -> APP(if, app(p, x))
APP(app(takeWhile, p), app(app(cons, x), xs)) -> APP(p, x)
APP(app(takeWhile, p), app(app(cons, x), xs)) -> APP(app(cons, x), app(app(takeWhile, p), xs))
APP(app(takeWhile, p), app(app(cons, x), xs)) -> APP(app(takeWhile, p), xs)
APP(app(dropWhile, p), app(app(cons, x), xs)) -> APP(app(app(if, app(p, x)), app(app(dropWhile, p), xs)), app(app(cons, x), xs))
APP(app(dropWhile, p), app(app(cons, x), xs)) -> APP(app(if, app(p, x)), app(app(dropWhile, p), xs))
APP(app(dropWhile, p), app(app(cons, x), xs)) -> APP(if, app(p, x))
APP(app(dropWhile, p), app(app(cons, x), xs)) -> APP(p, x)
APP(app(dropWhile, p), app(app(cons, x), xs)) -> APP(app(dropWhile, p), xs)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Size-Change Principle


Dependency Pairs:

APP(app(dropWhile, p), app(app(cons, x), xs)) -> APP(app(dropWhile, p), xs)
APP(app(dropWhile, p), app(app(cons, x), xs)) -> APP(p, x)
APP(app(takeWhile, p), app(app(cons, x), xs)) -> APP(app(takeWhile, p), xs)
APP(app(takeWhile, p), app(app(cons, x), xs)) -> APP(p, x)


Rules:


app(app(app(if, true), x), y) -> x
app(app(app(if, true), x), y) -> y
app(app(takeWhile, p), nil) -> nil
app(app(takeWhile, p), app(app(cons, x), xs)) -> app(app(app(if, app(p, x)), app(app(cons, x), app(app(takeWhile, p), xs))), nil)
app(app(dropWhile, p), nil) -> nil
app(app(dropWhile, p), app(app(cons, x), xs)) -> app(app(app(if, app(p, x)), app(app(dropWhile, p), xs)), app(app(cons, x), xs))





We number the DPs as follows:
  1. APP(app(dropWhile, p), app(app(cons, x), xs)) -> APP(app(dropWhile, p), xs)
  2. APP(app(dropWhile, p), app(app(cons, x), xs)) -> APP(p, x)
  3. APP(app(takeWhile, p), app(app(cons, x), xs)) -> APP(app(takeWhile, p), xs)
  4. APP(app(takeWhile, p), app(app(cons, x), xs)) -> APP(p, x)
and get the following Size-Change Graph(s):
{1} , {1}
1=1
2>2
{2} , {2}
1>1
2>2
{3} , {3}
1=1
2>2
{4} , {4}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{3} , {3}
1=1
2>2
{1} , {1}
1=1
2>2
{2} , {2}
1>1
2>2
{4} , {4}
1>1
2>2
{4} , {2}
1>1
2>2
{2} , {4}
1>1
2>2
{1} , {2}
1>1
2>2
{3} , {4}
1>1
2>2
{4} , {3}
1>1
2>2
{2} , {1}
1>1
2>2
{1} , {1}
1>1
2>2
{3} , {3}
1>1
2>2
{1} , {4}
1>1
2>2
{3} , {2}
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:
trivial

We obtain no new DP problems.

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