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
Polynomial Ordering


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))





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 using the Ce-refinement 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)=  0  
  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
Polo
           →DP Problem 2
Polynomial Ordering


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)


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 using the Ce-refinement 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))=  x1 + x2  
  POL(reverse2)=  0  

resulting in one new DP problem.



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


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))


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(cons, x), l)


Additionally, the following usable rules using the Ce-refinement 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)=  0  
  POL(compose)=  0  
  POL(app(x1, x2))=  x1 + x2  
  POL(APP(x1, x2))=  1 + x1  
  POL(reverse2)=  1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →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 using the Ce-refinement 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)=  0  
  POL(compose)=  0  
  POL(app(x1, x2))=  x1 + x2  
  POL(APP(x1, x2))=  1 + x1  
  POL(reverse2)=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →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