Term Rewriting System R:
[f, g, x, l, xs]
app(app(app(compose, f), g), x) -> app(g, app(f, x))
app(reverse, l) -> app(app(reverse2, l), nil)
app(app(reverse2, nil), l) -> l
app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) -> x
app(tl, app(app(cons, x), xs)) -> xs
last -> app(app(compose, hd), reverse)
init -> app(app(compose, reverse), app(app(compose, tl), reverse))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(app(compose, f), g), x) -> APP(g, app(f, x))
APP(app(app(compose, f), g), x) -> APP(f, x)
APP(reverse, l) -> APP(app(reverse2, l), nil)
APP(reverse, l) -> APP(reverse2, l)
APP(app(reverse2, app(app(cons, x), xs)), l) -> APP(app(reverse2, xs), app(app(cons, x), l))
APP(app(reverse2, app(app(cons, x), xs)), l) -> APP(reverse2, xs)
APP(app(reverse2, app(app(cons, x), xs)), l) -> APP(app(cons, x), l)
LAST -> APP(app(compose, hd), reverse)
LAST -> APP(compose, hd)
INIT -> APP(app(compose, reverse), app(app(compose, tl), reverse))
INIT -> APP(compose, reverse)
INIT -> APP(app(compose, tl), reverse)
INIT -> APP(compose, tl)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

APP(app(reverse2, app(app(cons, x), xs)), l) -> APP(app(cons, x), l)
APP(app(reverse2, app(app(cons, x), xs)), l) -> APP(app(reverse2, xs), app(app(cons, x), l))
APP(reverse, l) -> APP(app(reverse2, l), nil)
APP(app(app(compose, f), g), x) -> APP(f, x)
APP(app(app(compose, f), g), x) -> APP(g, app(f, x))


Rules:


app(app(app(compose, f), g), x) -> app(g, app(f, x))
app(reverse, l) -> app(app(reverse2, l), nil)
app(app(reverse2, nil), l) -> l
app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) -> x
app(tl, app(app(cons, x), xs)) -> xs
last -> app(app(compose, hd), reverse)
init -> app(app(compose, reverse), app(app(compose, tl), reverse))





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

APP(app(reverse2, app(app(cons, x), xs)), l) -> APP(app(cons, x), l)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Polynomial Ordering


Dependency Pairs:

APP(reverse, l) -> APP(app(reverse2, l), nil)
APP(app(app(compose, f), g), x) -> APP(f, x)
APP(app(app(compose, f), g), x) -> APP(g, app(f, x))
APP(app(reverse2, app(app(cons, x), xs)), l) -> APP(app(reverse2, xs), app(app(cons, x), l))


Rules:


app(app(app(compose, f), g), x) -> app(g, app(f, x))
app(reverse, l) -> app(app(reverse2, l), nil)
app(app(reverse2, nil), l) -> l
app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) -> x
app(tl, app(app(cons, x), xs)) -> xs
last -> app(app(compose, hd), reverse)
init -> app(app(compose, reverse), app(app(compose, tl), reverse))





The following dependency pairs can be strictly oriented:

APP(app(app(compose, f), g), x) -> APP(f, x)
APP(app(app(compose, f), g), x) -> APP(g, app(f, x))


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

app(app(app(compose, f), g), x) -> app(g, app(f, x))
app(reverse, l) -> app(app(reverse2, l), nil)
app(app(reverse2, nil), l) -> l
app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) -> x
app(tl, app(app(cons, x), xs)) -> xs


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(reverse)=  0  
  POL(cons)=  0  
  POL(hd)=  1  
  POL(nil)=  0  
  POL(tl)=  1  
  POL(compose)=  1  
  POL(app(x1, x2))=  x1 + x2  
  POL(APP(x1, x2))=  1 + x1 + x2  
  POL(reverse2)=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Polo
             ...
               →DP Problem 3
Polynomial Ordering


Dependency Pairs:

APP(reverse, l) -> APP(app(reverse2, l), nil)
APP(app(reverse2, app(app(cons, x), xs)), l) -> APP(app(reverse2, xs), app(app(cons, x), l))


Rules:


app(app(app(compose, f), g), x) -> app(g, app(f, x))
app(reverse, l) -> app(app(reverse2, l), nil)
app(app(reverse2, nil), l) -> l
app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) -> x
app(tl, app(app(cons, x), xs)) -> xs
last -> app(app(compose, hd), reverse)
init -> app(app(compose, reverse), app(app(compose, tl), reverse))





The following dependency pair can be strictly oriented:

APP(reverse, l) -> APP(app(reverse2, l), nil)


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

app(app(app(compose, f), g), x) -> app(g, app(f, x))
app(reverse, l) -> app(app(reverse2, l), nil)
app(app(reverse2, nil), l) -> l
app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) -> x
app(tl, app(app(cons, x), xs)) -> xs


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(reverse)=  1  
  POL(cons)=  0  
  POL(hd)=  1  
  POL(nil)=  0  
  POL(tl)=  1  
  POL(compose)=  0  
  POL(app(x1, x2))=  x1 + x2  
  POL(APP(x1, x2))=  1 + x1 + x2  
  POL(reverse2)=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Polo
             ...
               →DP Problem 4
Polynomial Ordering


Dependency Pair:

APP(app(reverse2, app(app(cons, x), xs)), l) -> APP(app(reverse2, xs), app(app(cons, x), l))


Rules:


app(app(app(compose, f), g), x) -> app(g, app(f, x))
app(reverse, l) -> app(app(reverse2, l), nil)
app(app(reverse2, nil), l) -> l
app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) -> x
app(tl, app(app(cons, x), xs)) -> xs
last -> app(app(compose, hd), reverse)
init -> app(app(compose, reverse), app(app(compose, tl), reverse))





The following dependency pair can be strictly oriented:

APP(app(reverse2, app(app(cons, x), xs)), l) -> APP(app(reverse2, xs), app(app(cons, x), l))


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

app(app(app(compose, f), g), x) -> app(g, app(f, x))
app(reverse, l) -> app(app(reverse2, l), nil)
app(app(reverse2, nil), l) -> l
app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) -> x
app(tl, app(app(cons, x), xs)) -> xs


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(reverse)=  0  
  POL(cons)=  1  
  POL(hd)=  1  
  POL(nil)=  0  
  POL(tl)=  1  
  POL(compose)=  0  
  POL(app(x1, x2))=  x1 + x2  
  POL(APP(x1, x2))=  x1  
  POL(reverse2)=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Polo
             ...
               →DP Problem 5
Dependency Graph


Dependency Pair:


Rules:


app(app(app(compose, f), g), x) -> app(g, app(f, x))
app(reverse, l) -> app(app(reverse2, l), nil)
app(app(reverse2, nil), l) -> l
app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) -> x
app(tl, app(app(cons, x), xs)) -> xs
last -> app(app(compose, hd), reverse)
init -> app(app(compose, reverse), app(app(compose, tl), reverse))





Using the Dependency Graph resulted in no new DP problems.

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