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

Innermost 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
Forward Instantiation Transformation


Dependency Pairs:

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


Strategy:

innermost




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

APP(app(app(compose, f), g), x) -> APP(f, x)
three new Dependency Pairs are created:

APP(app(app(compose, app(app(compose, f''), g'')), g), x'') -> APP(app(app(compose, f''), g''), x'')
APP(app(app(compose, reverse), g), x') -> APP(reverse, x')
APP(app(app(compose, app(reverse2, app(app(cons, x''), xs''))), g), x0) -> APP(app(reverse2, app(app(cons, x''), xs'')), x0)

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(app(compose, app(reverse2, app(app(cons, x''), xs''))), g), x0) -> APP(app(reverse2, app(app(cons, x''), xs'')), x0)
APP(app(app(compose, reverse), g), x') -> APP(reverse, x')
APP(app(app(compose, app(app(compose, f''), g'')), g), x'') -> APP(app(app(compose, f''), g''), x'')
APP(reverse, l) -> APP(app(reverse2, l), nil)
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))


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


Additionally, the following usable rules for innermost 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
FwdInst
           →DP Problem 2
Polo
             ...
               →DP Problem 3
Dependency Graph


Dependency Pairs:

APP(app(app(compose, app(reverse2, app(app(cons, x''), xs''))), g), x0) -> APP(app(reverse2, app(app(cons, x''), xs'')), x0)
APP(app(app(compose, reverse), g), x') -> APP(reverse, x')
APP(app(app(compose, app(app(compose, f''), g'')), g), x'') -> APP(app(app(compose, f''), g''), 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))


Strategy:

innermost




Using the Dependency Graph the DP problem was split into 1 DP problems.


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


Dependency Pairs:

APP(app(app(compose, app(app(compose, f''), g'')), g), x'') -> APP(app(app(compose, f''), g''), 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))
APP(app(app(compose, app(reverse2, app(app(cons, x''), xs''))), g), x0) -> APP(app(reverse2, app(app(cons, x''), xs'')), x0)


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


Strategy:

innermost




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 for innermost 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
FwdInst
           →DP Problem 2
Polo
             ...
               →DP Problem 5
Dependency Graph


Dependency Pairs:

APP(app(app(compose, app(app(compose, f''), g'')), g), x'') -> APP(app(app(compose, f''), g''), x'')
APP(app(app(compose, f), g), x) -> APP(g, app(f, x))
APP(app(app(compose, app(reverse2, app(app(cons, x''), xs''))), g), x0) -> APP(app(reverse2, app(app(cons, x''), xs'')), x0)


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


Strategy:

innermost




Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 2
Polo
             ...
               →DP Problem 6
Polynomial Ordering


Dependency Pairs:

APP(app(app(compose, f), g), x) -> APP(g, app(f, x))
APP(app(app(compose, app(app(compose, f''), g'')), g), x'') -> APP(app(app(compose, f''), g''), 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))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

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


Additionally, the following usable rules for innermost 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  
  POL(reverse2)=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 2
Polo
             ...
               →DP Problem 7
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))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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