Term Rewriting System R:
[f1, x, f2, y, g1, f3, g2, z, t, l]
app(app(apply, f1), x) -> app(f1, x)
app(id, x) -> x
app(app(app(uncurry, f2), x), y) -> app(app(f2, x), y)
app(app(app(swap, f2), y), x) -> app(app(f2, x), y)
app(app(app(compose, g1), f1), x) -> app(g1, app(f1, x))
app(app(const, x), y) -> x
app(listify, x) -> app(app(cons, x), nil)
app(app(app(app(fold, f3), g2), x), nil) -> x
app(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> app(app(f3, app(g2, z)), app(app(app(app(fold, f3), g2), x), t))
app(sum, l) -> app(app(app(app(fold, add), id), 0), l)
app(app(uncurry, app(app(fold, cons), id)), nil) -> id
append -> app(app(compose, app(app(swap, fold), cons)), id)
reverse -> app(app(uncurry, app(app(fold, app(swap, append)), listify)), nil)
length -> app(app(uncurry, app(app(fold, add), app(cons, 1))), 0)

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(apply, f1), x) -> APP(f1, x)
APP(app(app(uncurry, f2), x), y) -> APP(app(f2, x), y)
APP(app(app(uncurry, f2), x), y) -> APP(f2, x)
APP(app(app(swap, f2), y), x) -> APP(app(f2, x), y)
APP(app(app(swap, f2), y), x) -> APP(f2, x)
APP(app(app(compose, g1), f1), x) -> APP(g1, app(f1, x))
APP(app(app(compose, g1), f1), x) -> APP(f1, x)
APP(listify, x) -> APP(app(cons, x), nil)
APP(listify, x) -> APP(cons, x)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(app(f3, app(g2, z)), app(app(app(app(fold, f3), g2), x), t))
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(f3, app(g2, z))
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(g2, z)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(app(app(app(fold, f3), g2), x), t)
APP(sum, l) -> APP(app(app(app(fold, add), id), 0), l)
APP(sum, l) -> APP(app(app(fold, add), id), 0)
APP(sum, l) -> APP(app(fold, add), id)
APP(sum, l) -> APP(fold, add)
APPEND -> APP(app(compose, app(app(swap, fold), cons)), id)
APPEND -> APP(compose, app(app(swap, fold), cons))
APPEND -> APP(app(swap, fold), cons)
APPEND -> APP(swap, fold)
REVERSE -> APP(app(uncurry, app(app(fold, app(swap, append)), listify)), nil)
REVERSE -> APP(uncurry, app(app(fold, app(swap, append)), listify))
REVERSE -> APP(app(fold, app(swap, append)), listify)
REVERSE -> APP(fold, app(swap, append))
REVERSE -> APP(swap, append)
REVERSE -> APPEND
LENGTH -> APP(app(uncurry, app(app(fold, add), app(cons, 1))), 0)
LENGTH -> APP(uncurry, app(app(fold, add), app(cons, 1)))
LENGTH -> APP(app(fold, add), app(cons, 1))
LENGTH -> APP(fold, add)
LENGTH -> APP(cons, 1)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

APP(sum, l) -> APP(app(fold, add), id)
APP(sum, l) -> APP(app(app(fold, add), id), 0)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(app(app(app(fold, f3), g2), x), t)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(g2, z)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(f3, app(g2, z))
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(app(f3, app(g2, z)), app(app(app(app(fold, f3), g2), x), t))
APP(sum, l) -> APP(app(app(app(fold, add), id), 0), l)
APP(listify, x) -> APP(app(cons, x), nil)
APP(app(app(compose, g1), f1), x) -> APP(f1, x)
APP(app(app(compose, g1), f1), x) -> APP(g1, app(f1, x))
APP(app(app(swap, f2), y), x) -> APP(f2, x)
APP(app(app(swap, f2), y), x) -> APP(app(f2, x), y)
APP(app(app(uncurry, f2), x), y) -> APP(f2, x)
APP(app(app(uncurry, f2), x), y) -> APP(app(f2, x), y)
APP(app(apply, f1), x) -> APP(f1, x)


Rules:


app(app(apply, f1), x) -> app(f1, x)
app(id, x) -> x
app(app(app(uncurry, f2), x), y) -> app(app(f2, x), y)
app(app(app(swap, f2), y), x) -> app(app(f2, x), y)
app(app(app(compose, g1), f1), x) -> app(g1, app(f1, x))
app(app(const, x), y) -> x
app(listify, x) -> app(app(cons, x), nil)
app(app(app(app(fold, f3), g2), x), nil) -> x
app(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> app(app(f3, app(g2, z)), app(app(app(app(fold, f3), g2), x), t))
app(sum, l) -> app(app(app(app(fold, add), id), 0), l)
app(app(uncurry, app(app(fold, cons), id)), nil) -> id
append -> app(app(compose, app(app(swap, fold), cons)), id)
reverse -> app(app(uncurry, app(app(fold, app(swap, append)), listify)), nil)
length -> app(app(uncurry, app(app(fold, add), app(cons, 1))), 0)


Strategy:

innermost




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

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



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


Dependency Pairs:

APP(sum, l) -> APP(app(app(fold, add), id), 0)
APP(sum, l) -> APP(app(app(app(fold, add), id), 0), l)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(app(app(app(fold, f3), g2), x), t)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(g2, z)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(f3, app(g2, z))
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(app(f3, app(g2, z)), app(app(app(app(fold, f3), g2), x), t))
APP(app(app(compose, g1), f1), x) -> APP(f1, x)
APP(app(app(compose, g1), f1), x) -> APP(g1, app(f1, x))
APP(app(app(swap, f2), y), x) -> APP(f2, x)
APP(app(app(swap, f2), y), x) -> APP(app(f2, x), y)
APP(app(app(uncurry, f2), x), y) -> APP(f2, x)
APP(app(app(uncurry, f2), x), y) -> APP(app(f2, x), y)
APP(app(apply, f1), x) -> APP(f1, x)
APP(sum, l) -> APP(app(fold, add), id)


Rules:


app(app(apply, f1), x) -> app(f1, x)
app(id, x) -> x
app(app(app(uncurry, f2), x), y) -> app(app(f2, x), y)
app(app(app(swap, f2), y), x) -> app(app(f2, x), y)
app(app(app(compose, g1), f1), x) -> app(g1, app(f1, x))
app(app(const, x), y) -> x
app(listify, x) -> app(app(cons, x), nil)
app(app(app(app(fold, f3), g2), x), nil) -> x
app(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> app(app(f3, app(g2, z)), app(app(app(app(fold, f3), g2), x), t))
app(sum, l) -> app(app(app(app(fold, add), id), 0), l)
app(app(uncurry, app(app(fold, cons), id)), nil) -> id
append -> app(app(compose, app(app(swap, fold), cons)), id)
reverse -> app(app(uncurry, app(app(fold, app(swap, append)), listify)), nil)
length -> app(app(uncurry, app(app(fold, add), app(cons, 1))), 0)


Strategy:

innermost




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

APP(sum, l) -> APP(app(app(fold, add), id), 0)
no new Dependency Pairs are created.
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(sum, l) -> APP(app(fold, add), id)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(app(app(app(fold, f3), g2), x), t)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(g2, z)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(f3, app(g2, z))
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(app(f3, app(g2, z)), app(app(app(app(fold, f3), g2), x), t))
APP(app(app(compose, g1), f1), x) -> APP(f1, x)
APP(app(app(compose, g1), f1), x) -> APP(g1, app(f1, x))
APP(app(app(swap, f2), y), x) -> APP(f2, x)
APP(app(app(swap, f2), y), x) -> APP(app(f2, x), y)
APP(app(app(uncurry, f2), x), y) -> APP(f2, x)
APP(app(app(uncurry, f2), x), y) -> APP(app(f2, x), y)
APP(app(apply, f1), x) -> APP(f1, x)
APP(sum, l) -> APP(app(app(app(fold, add), id), 0), l)


Rules:


app(app(apply, f1), x) -> app(f1, x)
app(id, x) -> x
app(app(app(uncurry, f2), x), y) -> app(app(f2, x), y)
app(app(app(swap, f2), y), x) -> app(app(f2, x), y)
app(app(app(compose, g1), f1), x) -> app(g1, app(f1, x))
app(app(const, x), y) -> x
app(listify, x) -> app(app(cons, x), nil)
app(app(app(app(fold, f3), g2), x), nil) -> x
app(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> app(app(f3, app(g2, z)), app(app(app(app(fold, f3), g2), x), t))
app(sum, l) -> app(app(app(app(fold, add), id), 0), l)
app(app(uncurry, app(app(fold, cons), id)), nil) -> id
append -> app(app(compose, app(app(swap, fold), cons)), id)
reverse -> app(app(uncurry, app(app(fold, app(swap, append)), listify)), nil)
length -> app(app(uncurry, app(app(fold, add), app(cons, 1))), 0)


Strategy:

innermost




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

APP(sum, l) -> APP(app(fold, add), id)
no new Dependency Pairs are created.
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(sum, l) -> APP(app(app(app(fold, add), id), 0), l)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(g2, z)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(f3, app(g2, z))
APP(app(app(compose, g1), f1), x) -> APP(f1, x)
APP(app(app(compose, g1), f1), x) -> APP(g1, app(f1, x))
APP(app(app(swap, f2), y), x) -> APP(f2, x)
APP(app(app(swap, f2), y), x) -> APP(app(f2, x), y)
APP(app(app(uncurry, f2), x), y) -> APP(f2, x)
APP(app(app(uncurry, f2), x), y) -> APP(app(f2, x), y)
APP(app(apply, f1), x) -> APP(f1, x)
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(app(f3, app(g2, z)), app(app(app(app(fold, f3), g2), x), t))
APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(app(app(app(fold, f3), g2), x), t)


Rules:


app(app(apply, f1), x) -> app(f1, x)
app(id, x) -> x
app(app(app(uncurry, f2), x), y) -> app(app(f2, x), y)
app(app(app(swap, f2), y), x) -> app(app(f2, x), y)
app(app(app(compose, g1), f1), x) -> app(g1, app(f1, x))
app(app(const, x), y) -> x
app(listify, x) -> app(app(cons, x), nil)
app(app(app(app(fold, f3), g2), x), nil) -> x
app(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> app(app(f3, app(g2, z)), app(app(app(app(fold, f3), g2), x), t))
app(sum, l) -> app(app(app(app(fold, add), id), 0), l)
app(app(uncurry, app(app(fold, cons), id)), nil) -> id
append -> app(app(compose, app(app(swap, fold), cons)), id)
reverse -> app(app(uncurry, app(app(fold, app(swap, append)), listify)), nil)
length -> app(app(uncurry, app(app(fold, add), app(cons, 1))), 0)


Strategy:

innermost



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