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


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




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

APP(app(apply, f1), x) -> APP(f1, x)
six new Dependency Pairs are created:

APP(app(apply, app(apply, f1'')), x'') -> APP(app(apply, f1''), x'')
APP(app(apply, app(app(uncurry, f2''), x'')), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(apply, app(app(swap, f2''), y'')), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(apply, app(app(compose, g1''), f1'')), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(apply, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(apply, sum), x') -> APP(sum, x')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 5
Forward Instantiation Transformation


Dependency Pairs:

APP(app(apply, sum), x') -> APP(sum, x')
APP(app(apply, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(apply, app(app(compose, g1''), f1'')), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(apply, app(app(swap, f2''), y'')), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(apply, app(app(uncurry, f2''), x'')), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(apply, app(apply, f1'')), x'') -> APP(app(apply, f1''), x'')
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(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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(uncurry, f2), x), y) -> APP(f2, x)
11 new Dependency Pairs are created:

APP(app(app(uncurry, app(app(uncurry, f2''), x'')), x0), y) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(app(uncurry, app(app(swap, f2''), y'')), x''), y) -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(app(compose, g1''), f1'')), x''), y) -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(uncurry, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')), y) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(uncurry, sum), x'), y) -> APP(sum, x')
APP(app(app(uncurry, app(apply, app(apply, f1''''))), x'), y) -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''), x''''))), x'), y) -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(uncurry, app(apply, app(app(swap, f2''''), y''''))), x'), y) -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(uncurry, app(apply, app(app(compose, g1''''), f1''''))), x'), y) -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''), g2''''), x''''))), app(app(cons, z''''), t'''')), y) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(uncurry, app(apply, sum)), x'), y) -> APP(app(apply, sum), x')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 6
Forward Instantiation Transformation


Dependency Pairs:

APP(app(app(uncurry, app(apply, sum)), x'), y) -> APP(app(apply, sum), x')
APP(app(apply, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''), g2''''), x''''))), app(app(cons, z''''), t'''')), y) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(apply, app(app(compose, g1''), f1'')), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(uncurry, app(apply, app(app(compose, g1''''), f1''''))), x'), y) -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(apply, app(app(swap, f2''), y'')), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(apply, app(app(swap, f2''''), y''''))), x'), y) -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''), x''''))), x'), y) -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(uncurry, app(apply, app(apply, f1''''))), x'), y) -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(uncurry, sum), x'), y) -> APP(sum, x')
APP(app(app(uncurry, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')), y) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(uncurry, app(app(compose, g1''), f1'')), x''), y) -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(uncurry, app(app(swap, f2''), y'')), x''), y) -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(app(uncurry, f2''), x'')), x0), y) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(apply, app(app(uncurry, f2''), x'')), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(apply, app(apply, f1'')), x'') -> APP(app(apply, f1''), x'')
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(app(f2, x), y)
APP(sum, l) -> APP(app(app(app(fold, add), id), 0), l)
APP(app(apply, sum), x') -> APP(sum, 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(swap, f2), y), x) -> APP(f2, x)
22 new Dependency Pairs are created:

APP(app(app(swap, app(app(swap, f2''), y'')), y), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(swap, app(app(uncurry, f2''), x'')), y), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(app(swap, app(app(compose, g1''), f1'')), y), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(swap, app(app(app(fold, f3''), g2''), x'')), y), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(swap, sum), y), x') -> APP(sum, x')
APP(app(app(swap, app(apply, app(apply, f1''''))), y), x') -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(swap, app(apply, app(app(uncurry, f2''''), x''''))), y), x') -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(swap, app(apply, app(app(swap, f2''''), y''''))), y), x') -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(swap, app(apply, app(app(compose, g1''''), f1''''))), y), x') -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(swap, app(apply, app(app(app(fold, f3''''), g2''''), x''''))), y), app(app(cons, z''''), t'''')) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(swap, app(apply, sum)), y), x') -> APP(app(apply, sum), x')
APP(app(app(swap, app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0'')), y), x') -> APP(app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0''), x')
APP(app(app(swap, app(app(uncurry, app(app(swap, f2''''), y'''')), x'''')), y), x') -> APP(app(app(uncurry, app(app(swap, f2''''), y'''')), x''''), x')
APP(app(app(swap, app(app(uncurry, app(app(compose, g1''''), f1'''')), x'''')), y), x') -> APP(app(app(uncurry, app(app(compose, g1''''), f1'''')), x''''), x')
APP(app(app(swap, app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))), y), x') -> APP(app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t'''')), x')
APP(app(app(swap, app(app(uncurry, sum), x''')), y), x') -> APP(app(app(uncurry, sum), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(apply, f1''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))), y), x') -> APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t'''''')), x')
APP(app(app(swap, app(app(uncurry, app(apply, sum)), x''')), y), x') -> APP(app(app(uncurry, app(apply, sum)), x'''), x')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 7
Forward Instantiation Transformation


Dependency Pairs:

APP(app(app(swap, app(app(uncurry, app(apply, sum)), x''')), y), x') -> APP(app(app(uncurry, app(apply, sum)), x'''), x')
APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''), g2''''), x''''))), app(app(cons, z''''), t'''')), y) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))), y), x') -> APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t'''''')), x')
APP(app(app(uncurry, app(apply, app(app(compose, g1''''), f1''''))), x'), y) -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(apply, f1''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, sum), x''')), y), x') -> APP(app(app(uncurry, sum), x'''), x')
APP(app(app(swap, app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))), y), x') -> APP(app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t'''')), x')
APP(app(app(swap, app(app(uncurry, app(app(compose, g1''''), f1'''')), x'''')), y), x') -> APP(app(app(uncurry, app(app(compose, g1''''), f1'''')), x''''), x')
APP(app(app(swap, app(app(uncurry, app(app(swap, f2''''), y'''')), x'''')), y), x') -> APP(app(app(uncurry, app(app(swap, f2''''), y'''')), x''''), x')
APP(app(app(swap, app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0'')), y), x') -> APP(app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0''), x')
APP(app(app(swap, app(apply, sum)), y), x') -> APP(app(apply, sum), x')
APP(app(apply, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(swap, app(apply, app(app(app(fold, f3''''), g2''''), x''''))), y), app(app(cons, z''''), t'''')) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(apply, app(app(compose, g1''), f1'')), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(swap, app(apply, app(app(compose, g1''''), f1''''))), y), x') -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(swap, app(apply, app(app(swap, f2''''), y''''))), y), x') -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(swap, app(apply, app(app(uncurry, f2''''), x''''))), y), x') -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(swap, app(apply, app(apply, f1''''))), y), x') -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(swap, sum), y), x') -> APP(sum, x')
APP(app(app(swap, app(app(app(fold, f3''), g2''), x'')), y), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(swap, app(app(compose, g1''), f1'')), y), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(apply, app(app(swap, f2''), y'')), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(apply, app(app(swap, f2''''), y''''))), x'), y) -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''), x''''))), x'), y) -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(uncurry, app(apply, app(apply, f1''''))), x'), y) -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(uncurry, sum), x'), y) -> APP(sum, x')
APP(app(app(uncurry, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')), y) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(uncurry, app(app(compose, g1''), f1'')), x''), y) -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(swap, app(app(uncurry, f2''), x'')), y), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(app(swap, app(app(swap, f2''), y'')), y), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(app(swap, f2''), y'')), x''), y) -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(app(uncurry, f2''), x'')), x0), y) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(apply, app(app(uncurry, f2''), x'')), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(apply, app(apply, f1'')), x'') -> APP(app(apply, f1''), x'')
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(app(f2, x), y)
APP(app(app(uncurry, f2), x), y) -> APP(app(f2, x), y)
APP(sum, l) -> APP(app(app(app(fold, add), id), 0), l)
APP(app(apply, sum), x') -> APP(sum, x')
APP(app(app(uncurry, app(apply, sum)), x'), y) -> APP(app(apply, sum), 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(compose, g1), f1), x) -> APP(f1, x)
44 new Dependency Pairs are created:

APP(app(app(compose, g1), app(app(compose, g1''), f1'')), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(compose, g1), app(app(uncurry, f2''), x'')), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(app(compose, g1), app(app(swap, f2''), y'')), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(compose, g1), app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(compose, g1), sum), x') -> APP(sum, x')
APP(app(app(compose, g1), app(apply, app(apply, f1''''))), x') -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(compose, g1), app(apply, app(app(uncurry, f2''''), x''''))), x') -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(compose, g1), app(apply, app(app(swap, f2''''), y''''))), x') -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(compose, g1), app(apply, app(app(compose, g1''''), f1''''))), x') -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(compose, g1), app(apply, app(app(app(fold, f3''''), g2''''), x''''))), app(app(cons, z''''), t'''')) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(compose, g1), app(apply, sum)), x') -> APP(app(apply, sum), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0'')), x') -> APP(app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0''), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(swap, f2''''), y'''')), x'''')), x') -> APP(app(app(uncurry, app(app(swap, f2''''), y'''')), x''''), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(compose, g1''''), f1'''')), x'''')), x') -> APP(app(app(uncurry, app(app(compose, g1''''), f1'''')), x''''), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))), x') -> APP(app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t'''')), x')
APP(app(app(compose, g1), app(app(uncurry, sum), x''')), x') -> APP(app(app(uncurry, sum), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(apply, f1''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(apply, f1''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))), x') -> APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t'''''')), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, sum)), x''')), x') -> APP(app(app(uncurry, app(apply, sum)), x'''), x')
APP(app(app(compose, g1), app(app(swap, app(app(swap, f2''''), y'''')), y'')), x') -> APP(app(app(swap, app(app(swap, f2''''), y'''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, f2''''), x'''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, f2''''), x'''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(compose, g1''''), f1'''')), y'')), x') -> APP(app(app(swap, app(app(compose, g1''''), f1'''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(app(fold, f3''''), g2''''), x'''')), y'')), app(app(cons, z''''), t'''')) -> APP(app(app(swap, app(app(app(fold, f3''''), g2''''), x'''')), y''), app(app(cons, z''''), t''''))
APP(app(app(compose, g1), app(app(swap, sum), y'')), x') -> APP(app(app(swap, sum), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(apply, f1''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(apply, f1''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(uncurry, f2''''''), x''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(app(uncurry, f2''''''), x''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(swap, f2''''''), y''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(app(swap, f2''''''), y''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(compose, g1''''''), f1''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(app(compose, g1''''''), f1''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), y'')), app(app(cons, z''''''), t'''''')) -> APP(app(app(swap, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), y''), app(app(cons, z''''''), t''''''))
APP(app(app(compose, g1), app(app(swap, app(apply, sum)), y'')), x') -> APP(app(app(swap, app(apply, sum)), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, sum), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, sum), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, sum)), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, sum)), x''''')), y''), x')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 8
Forward Instantiation Transformation


Dependency Pairs:

APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, sum)), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, sum)), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, sum), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, sum), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), y''), x')
APP(app(app(swap, app(apply, sum)), y), x') -> APP(app(apply, sum), x')
APP(app(app(compose, g1), app(app(swap, app(apply, sum)), y'')), x') -> APP(app(app(swap, app(apply, sum)), y''), x')
APP(app(app(swap, app(apply, app(app(app(fold, f3''''), g2''''), x''''))), y), app(app(cons, z''''), t'''')) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), y'')), app(app(cons, z''''''), t'''''')) -> APP(app(app(swap, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), y''), app(app(cons, z''''''), t''''''))
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(compose, g1''''''), f1''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(app(compose, g1''''''), f1''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(swap, f2''''''), y''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(app(swap, f2''''''), y''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(uncurry, f2''''''), x''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(app(uncurry, f2''''''), x''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(apply, f1''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(apply, f1''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, sum), y'')), x') -> APP(app(app(swap, sum), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(app(fold, f3''''), g2''''), x'''')), y'')), app(app(cons, z''''), t'''')) -> APP(app(app(swap, app(app(app(fold, f3''''), g2''''), x'''')), y''), app(app(cons, z''''), t''''))
APP(app(app(compose, g1), app(app(swap, app(app(compose, g1''''), f1'''')), y'')), x') -> APP(app(app(swap, app(app(compose, g1''''), f1'''')), y''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))), y), x') -> APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t'''''')), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(apply, f1''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, sum), x''')), y), x') -> APP(app(app(uncurry, sum), x'''), x')
APP(app(app(swap, app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))), y), x') -> APP(app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t'''')), x')
APP(app(app(swap, app(app(uncurry, app(app(compose, g1''''), f1'''')), x'''')), y), x') -> APP(app(app(uncurry, app(app(compose, g1''''), f1'''')), x''''), x')
APP(app(app(swap, app(app(uncurry, app(app(swap, f2''''), y'''')), x'''')), y), x') -> APP(app(app(uncurry, app(app(swap, f2''''), y'''')), x''''), x')
APP(app(app(swap, app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0'')), y), x') -> APP(app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, f2''''), x'''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, f2''''), x'''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(swap, f2''''), y'''')), y'')), x') -> APP(app(app(swap, app(app(swap, f2''''), y'''')), y''), x')
APP(app(app(uncurry, app(apply, sum)), x'), y) -> APP(app(apply, sum), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, sum)), x''')), x') -> APP(app(app(uncurry, app(apply, sum)), x'''), x')
APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''), g2''''), x''''))), app(app(cons, z''''), t'''')), y) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))), x') -> APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t'''''')), x')
APP(app(app(uncurry, app(apply, app(app(compose, g1''''), f1''''))), x'), y) -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(apply, f1''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(apply, f1''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, sum), x''')), x') -> APP(app(app(uncurry, sum), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))), x') -> APP(app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t'''')), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(compose, g1''''), f1'''')), x'''')), x') -> APP(app(app(uncurry, app(app(compose, g1''''), f1'''')), x''''), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(swap, f2''''), y'''')), x'''')), x') -> APP(app(app(uncurry, app(app(swap, f2''''), y'''')), x''''), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0'')), x') -> APP(app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0''), x')
APP(app(apply, sum), x') -> APP(sum, x')
APP(app(app(compose, g1), app(apply, sum)), x') -> APP(app(apply, sum), x')
APP(app(apply, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(compose, g1), app(apply, app(app(app(fold, f3''''), g2''''), x''''))), app(app(cons, z''''), t'''')) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(compose, g1), app(apply, app(app(compose, g1''''), f1''''))), x') -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(compose, g1), app(apply, app(app(swap, f2''''), y''''))), x') -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(compose, g1), app(apply, app(app(uncurry, f2''''), x''''))), x') -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(compose, g1), app(apply, app(apply, f1''''))), x') -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(compose, g1), sum), x') -> APP(sum, x')
APP(app(app(compose, g1), app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(apply, app(app(compose, g1''), f1'')), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(swap, app(apply, app(app(compose, g1''''), f1''''))), y), x') -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(swap, app(apply, app(app(swap, f2''''), y''''))), y), x') -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(swap, app(apply, app(app(uncurry, f2''''), x''''))), y), x') -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(swap, app(apply, app(apply, f1''''))), y), x') -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(swap, sum), y), x') -> APP(sum, x')
APP(app(app(swap, app(app(app(fold, f3''), g2''), x'')), y), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(compose, g1), app(app(swap, f2''), y'')), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(swap, app(app(compose, g1''), f1'')), y), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(apply, app(app(swap, f2''), y'')), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(apply, app(app(swap, f2''''), y''''))), x'), y) -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''), x''''))), x'), y) -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(uncurry, app(apply, app(apply, f1''''))), x'), y) -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(uncurry, sum), x'), y) -> APP(sum, x')
APP(app(app(uncurry, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')), y) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(compose, g1), app(app(uncurry, f2''), x'')), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(app(compose, g1), app(app(compose, g1''), f1'')), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(uncurry, app(app(compose, g1''), f1'')), x''), y) -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(swap, app(app(uncurry, f2''), x'')), y), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(app(swap, app(app(swap, f2''), y'')), y), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(app(swap, f2''), y'')), x''), y) -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(app(uncurry, f2''), x'')), x0), y) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(apply, app(app(uncurry, f2''), x'')), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(apply, app(apply, f1'')), x'') -> APP(app(apply, f1''), x'')
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(g1, app(f1, x))
APP(app(app(swap, f2), y), x) -> APP(app(f2, x), y)
APP(app(app(uncurry, f2), x), y) -> APP(app(f2, x), y)
APP(app(app(swap, app(app(uncurry, app(apply, sum)), x''')), y), x') -> APP(app(app(uncurry, app(apply, sum)), x'''), 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(fold, f3), g2), x), app(app(cons, z), t)) -> APP(g2, z)
88 new Dependency Pairs are created:

APP(app(app(app(fold, f3), app(app(app(fold, f3''), g2''), x'')), x), app(app(cons, app(app(cons, z''), t'')), t)) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(app(fold, f3), app(app(uncurry, f2''), x'')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, f2''), x''), z')
APP(app(app(app(fold, f3), app(app(swap, f2''), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, f2''), y''), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), f1'')), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), f1''), z')
APP(app(app(app(fold, f3), sum), x), app(app(cons, z'), t)) -> APP(sum, z')
APP(app(app(app(fold, f3), app(apply, app(apply, f1''''))), x), app(app(cons, z'), t)) -> APP(app(apply, app(apply, f1'''')), z')
APP(app(app(app(fold, f3), app(apply, app(app(uncurry, f2''''), x''''))), x), app(app(cons, z'), t)) -> APP(app(apply, app(app(uncurry, f2''''), x'''')), z')
APP(app(app(app(fold, f3), app(apply, app(app(swap, f2''''), y''''))), x), app(app(cons, z'), t)) -> APP(app(apply, app(app(swap, f2''''), y'''')), z')
APP(app(app(app(fold, f3), app(apply, app(app(compose, g1''''), f1''''))), x), app(app(cons, z'), t)) -> APP(app(apply, app(app(compose, g1''''), f1'''')), z')
APP(app(app(app(fold, f3), app(apply, app(app(app(fold, f3''''), g2''''), x''''))), x), app(app(cons, app(app(cons, z''''), t'''')), t)) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(app(fold, f3), app(apply, sum)), x), app(app(cons, z'), t)) -> APP(app(apply, sum), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0'')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(app(swap, f2''''), y'''')), x'''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(app(swap, f2''''), y'''')), x''''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(app(compose, g1''''), f1'''')), x'''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(app(compose, g1''''), f1'''')), x''''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t'''')), z')
APP(app(app(app(fold, f3), app(app(uncurry, sum), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, sum), x'''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, app(apply, f1''''''))), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, app(apply, f1''''''))), x'''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x'''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x'''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x'''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t'''''')), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, sum)), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, sum)), x'''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(swap, f2''''), y'''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(swap, f2''''), y'''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, f2''''), x'''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, f2''''), x'''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(compose, g1''''), f1'''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(compose, g1''''), f1'''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(app(fold, f3''''), g2''''), x'''')), y'')), x), app(app(cons, app(app(cons, z''''), t'''')), t)) -> APP(app(app(swap, app(app(app(fold, f3''''), g2''''), x'''')), y''), app(app(cons, z''''), t''''))
APP(app(app(app(fold, f3), app(app(swap, sum), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, sum), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(apply, app(apply, f1''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(apply, app(apply, f1''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(apply, app(app(uncurry, f2''''''), x''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(apply, app(app(uncurry, f2''''''), x''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(apply, app(app(swap, f2''''''), y''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(apply, app(app(swap, f2''''''), y''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(apply, app(app(compose, g1''''''), f1''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(apply, app(app(compose, g1''''''), f1''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), y'')), x), app(app(cons, app(app(cons, z''''''), t'''''')), t)) -> APP(app(app(swap, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), y''), app(app(cons, z''''''), t''''''))
APP(app(app(app(fold, f3), app(app(swap, app(apply, sum)), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(apply, sum)), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, sum), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, sum), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, sum)), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, sum)), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(compose, g1''''), f1''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(compose, g1''''), f1'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, f2''''), x''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, f2''''), x'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, f2''''), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, f2''''), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(app(fold, f3''''), g2''''), x''''))), x), app(app(cons, app(app(cons, z''''), t'''')), t)) -> APP(app(app(compose, g1''), app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(app(fold, f3), app(app(compose, g1''), sum)), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), sum), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, app(apply, f1'''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(apply, app(apply, f1''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, app(app(uncurry, f2''''''), x'''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(apply, app(app(uncurry, f2''''''), x''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, app(app(swap, f2''''''), y'''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(apply, app(app(swap, f2''''''), y''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, app(app(compose, g1''''''), f1'''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(apply, app(app(compose, g1''''''), f1''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, app(app(app(fold, f3''''''), g2''''''), x'''''')))), x), app(app(cons, app(app(cons, z''''''), t'''''')), t)) -> APP(app(app(compose, g1''), app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, sum))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(apply, sum)), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(app(swap, f2''''''), y'''''')), x''''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x''''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t'''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, sum), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, sum), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, app(apply, f1''''''''))), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t'''''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, sum)), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, sum)), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(swap, f2''''''), y'''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(swap, f2''''''), y'''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, f2''''''), x'''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, f2''''''), x'''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(compose, g1''''''), f1'''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(compose, g1''''''), f1'''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(app(fold, f3''''''), g2''''''), x'''''')), y''''))), x), app(app(cons, app(app(cons, z''''''), t'''''')), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(app(fold, f3''''''), g2''''''), x'''''')), y'''')), app(app(cons, z''''''), t''''''))
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, sum), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, sum), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, app(apply, f1''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, app(apply, f1''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, app(app(uncurry, f2''''''''), x''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, app(app(uncurry, f2''''''''), x''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, app(app(swap, f2''''''''), y''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, app(app(swap, f2''''''''), y''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, app(app(compose, g1''''''''), f1''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, app(app(compose, g1''''''''), f1''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), y''''))), x), app(app(cons, app(app(cons, z''''''''), t'''''''')), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), y'''')), app(app(cons, z''''''''), t''''''''))
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, sum)), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, sum)), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''''), x'''''''')), x0'''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''''), x'''''''')), x0'''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(swap, f2''''''''), y'''''''')), x'''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(swap, f2''''''''), y'''''''')), x'''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(compose, g1''''''''), f1'''''''')), x'''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(compose, g1''''''''), f1'''''''')), x'''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''''), g2''''''''), x'''''''')), app(app(cons, z''''''''), t''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''''), g2''''''''), x'''''''')), app(app(cons, z''''''''), t''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, sum), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, sum), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''''))), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''''))), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''''), x''''''''''))), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''''), x''''''''''))), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''''), y''''''''''))), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''''), y''''''''''))), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''''), f1''''''''''))), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''''), f1''''''''''))), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''''), g2''''''''''), x''''''''''))), app(app(cons, z''''''''''), t''''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''''), g2''''''''''), x''''''''''))), app(app(cons, z''''''''''), t''''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, sum)), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, sum)), x''''''')), y'''')), z')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 9
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, sum)), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, sum)), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''''), g2''''''''''), x''''''''''))), app(app(cons, z''''''''''), t''''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''''), g2''''''''''), x''''''''''))), app(app(cons, z''''''''''), t''''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''''), f1''''''''''))), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''''), f1''''''''''))), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''''), y''''''''''))), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''''), y''''''''''))), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''''), x''''''''''))), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''''), x''''''''''))), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''''))), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''''))), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, sum), x''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, sum), x''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''''), g2''''''''), x'''''''')), app(app(cons, z''''''''), t''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''''), g2''''''''), x'''''''')), app(app(cons, z''''''''), t''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(compose, g1''''''''), f1'''''''')), x'''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(compose, g1''''''''), f1'''''''')), x'''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(swap, f2''''''''), y'''''''')), x'''''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(swap, f2''''''''), y'''''''')), x'''''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''''), x'''''''')), x0'''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''''), x'''''''')), x0'''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, sum)), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, sum)), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), y''''))), x), app(app(cons, app(app(cons, z''''''''), t'''''''')), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), y'''')), app(app(cons, z''''''''), t''''''''))
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, app(app(compose, g1''''''''), f1''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, app(app(compose, g1''''''''), f1''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, app(app(swap, f2''''''''), y''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, app(app(swap, f2''''''''), y''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, app(app(uncurry, f2''''''''), x''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, app(app(uncurry, f2''''''''), x''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(apply, app(apply, f1''''''''))), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(apply, app(apply, f1''''''''))), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, sum), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, sum), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(app(fold, f3''''''), g2''''''), x'''''')), y''''))), x), app(app(cons, app(app(cons, z''''''), t'''''')), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(app(fold, f3''''''), g2''''''), x'''''')), y'''')), app(app(cons, z''''''), t''''''))
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(compose, g1''''''), f1'''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(compose, g1''''''), f1'''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(uncurry, f2''''''), x'''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(uncurry, f2''''''), x'''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, app(app(swap, f2''''''), y'''''')), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, app(app(swap, f2''''''), y'''''')), y'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, sum)), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, sum)), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t'''''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(apply, app(apply, f1''''''''))), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, sum), x'''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, sum), x''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t'''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x''''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(app(swap, f2''''''), y'''''')), x''''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), z')
APP(app(app(compose, g1), app(apply, sum)), x') -> APP(app(apply, sum), x')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, sum))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(apply, sum)), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, app(app(app(fold, f3''''''), g2''''''), x'''''')))), x), app(app(cons, app(app(cons, z''''''), t'''''')), t)) -> APP(app(app(compose, g1''), app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, app(app(compose, g1''''''), f1'''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(apply, app(app(compose, g1''''''), f1''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, app(app(swap, f2''''''), y'''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(apply, app(app(swap, f2''''''), y''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, app(app(uncurry, f2''''''), x'''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(apply, app(app(uncurry, f2''''''), x''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(apply, app(apply, f1'''''')))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(apply, app(apply, f1''''''))), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), sum)), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), sum), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(app(fold, f3''''), g2''''), x''''))), x), app(app(cons, app(app(cons, z''''), t'''')), t)) -> APP(app(app(compose, g1''), app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, sum), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, sum), x''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, sum)), y'')), x') -> APP(app(app(swap, app(apply, sum)), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), y'')), app(app(cons, z''''''), t'''''')) -> APP(app(app(swap, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), y''), app(app(cons, z''''''), t''''''))
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(compose, g1''''''), f1''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(app(compose, g1''''''), f1''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(swap, f2''''''), y''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(app(swap, f2''''''), y''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(app(uncurry, f2''''''), x''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(app(uncurry, f2''''''), x''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, app(apply, app(apply, f1''''''))), y'')), x') -> APP(app(app(swap, app(apply, app(apply, f1''''''))), y''), x')
APP(app(app(compose, g1), app(app(swap, sum), y'')), x') -> APP(app(app(swap, sum), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(app(fold, f3''''), g2''''), x'''')), y'')), app(app(cons, z''''), t'''')) -> APP(app(app(swap, app(app(app(fold, f3''''), g2''''), x'''')), y''), app(app(cons, z''''), t''''))
APP(app(app(compose, g1), app(app(swap, app(app(compose, g1''''), f1'''')), y'')), x') -> APP(app(app(swap, app(app(compose, g1''''), f1'''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(uncurry, f2''''), x'''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, f2''''), x'''')), y''), x')
APP(app(app(compose, g1), app(app(swap, app(app(swap, f2''''), y'''')), y'')), x') -> APP(app(app(swap, app(app(swap, f2''''), y'''')), y''), x')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(swap, f2''''), y''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(swap, f2''''), y'''')), z')
APP(app(app(compose, g1), app(app(uncurry, app(apply, sum)), x''')), x') -> APP(app(app(uncurry, app(apply, sum)), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))), x') -> APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t'''''')), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(apply, app(apply, f1''''''))), x''')), x') -> APP(app(app(uncurry, app(apply, app(apply, f1''''''))), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, sum), x''')), x') -> APP(app(app(uncurry, sum), x'''), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))), x') -> APP(app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t'''')), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(compose, g1''''), f1'''')), x'''')), x') -> APP(app(app(uncurry, app(app(compose, g1''''), f1'''')), x''''), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(swap, f2''''), y'''')), x'''')), x') -> APP(app(app(uncurry, app(app(swap, f2''''), y'''')), x''''), x')
APP(app(app(compose, g1), app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0'')), x') -> APP(app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0''), x')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(uncurry, f2''''), x''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(uncurry, f2''''), x'''')), z')
APP(app(app(app(fold, f3), app(app(compose, g1''), app(app(compose, g1''''), f1''''))), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), app(app(compose, g1''''), f1'''')), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, sum)), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, sum)), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''''), g2''''''''), x''''''''))), app(app(cons, z''''''''), t''''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''''), f1''''''''))), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''''), y''''''''))), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''''), x''''''''))), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''''))), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, sum), x''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, sum), x''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(app(app(fold, f3''''''), g2''''''), x'''''')), app(app(cons, z''''''), t''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(app(compose, g1''''''), f1'''''')), x'''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(app(swap, f2''''''), y'''''')), x'''''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, app(app(uncurry, f2''''''), x'''''')), x0'''')), y''), z')
APP(app(app(swap, app(apply, sum)), y), x') -> APP(app(apply, sum), x')
APP(app(app(app(fold, f3), app(app(swap, app(apply, sum)), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(apply, sum)), y''), z')
APP(app(app(swap, app(apply, app(app(app(fold, f3''''), g2''''), x''''))), y), app(app(cons, z''''), t'''')) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(app(fold, f3), app(app(swap, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), y'')), x), app(app(cons, app(app(cons, z''''''), t'''''')), t)) -> APP(app(app(swap, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), y''), app(app(cons, z''''''), t''''''))
APP(app(app(app(fold, f3), app(app(swap, app(apply, app(app(compose, g1''''''), f1''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(apply, app(app(compose, g1''''''), f1''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(apply, app(app(swap, f2''''''), y''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(apply, app(app(swap, f2''''''), y''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(apply, app(app(uncurry, f2''''''), x''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(apply, app(app(uncurry, f2''''''), x''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(apply, app(apply, f1''''''))), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(apply, app(apply, f1''''''))), y''), z')
APP(app(app(app(fold, f3), app(app(swap, sum), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, sum), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(app(fold, f3''''), g2''''), x'''')), y'')), x), app(app(cons, app(app(cons, z''''), t'''')), t)) -> APP(app(app(swap, app(app(app(fold, f3''''), g2''''), x'''')), y''), app(app(cons, z''''), t''''))
APP(app(app(app(fold, f3), app(app(swap, app(app(compose, g1''''), f1'''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(compose, g1''''), f1'''')), y''), z')
APP(app(app(swap, app(app(uncurry, app(apply, sum)), x''')), y), x') -> APP(app(app(uncurry, app(apply, sum)), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))), y), x') -> APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t'''''')), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, app(apply, app(apply, f1''''''))), x''')), y), x') -> APP(app(app(uncurry, app(apply, app(apply, f1''''''))), x'''), x')
APP(app(app(swap, app(app(uncurry, sum), x''')), y), x') -> APP(app(app(uncurry, sum), x'''), x')
APP(app(app(swap, app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))), y), x') -> APP(app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t'''')), x')
APP(app(app(swap, app(app(uncurry, app(app(compose, g1''''), f1'''')), x'''')), y), x') -> APP(app(app(uncurry, app(app(compose, g1''''), f1'''')), x''''), x')
APP(app(app(swap, app(app(uncurry, app(app(swap, f2''''), y'''')), x'''')), y), x') -> APP(app(app(uncurry, app(app(swap, f2''''), y'''')), x''''), x')
APP(app(app(swap, app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0'')), y), x') -> APP(app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0''), x')
APP(app(app(app(fold, f3), app(app(swap, app(app(uncurry, f2''''), x'''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(uncurry, f2''''), x'''')), y''), z')
APP(app(app(app(fold, f3), app(app(swap, app(app(swap, f2''''), y'''')), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, app(app(swap, f2''''), y'''')), y''), z')
APP(app(app(uncurry, app(apply, sum)), x'), y) -> APP(app(apply, sum), x')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, sum)), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, sum)), x'''), z')
APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''), g2''''), x''''))), app(app(cons, z''''), t'''')), y) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t''''''))), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, app(app(app(fold, f3''''''), g2''''''), x''''''))), app(app(cons, z''''''), t'''''')), z')
APP(app(app(uncurry, app(apply, app(app(compose, g1''''), f1''''))), x'), y) -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, app(app(compose, g1''''''), f1''''''))), x'''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, app(app(swap, f2''''''), y''''''))), x'''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''''), x''''''))), x'''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(apply, app(apply, f1''''''))), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(apply, app(apply, f1''''''))), x'''), z')
APP(app(app(app(fold, f3), app(app(uncurry, sum), x''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, sum), x'''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t'''')), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(app(compose, g1''''), f1'''')), x'''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(app(compose, g1''''), f1'''')), x''''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(app(swap, f2''''), y'''')), x'''')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(app(swap, f2''''), y'''')), x''''), z')
APP(app(app(app(fold, f3), app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0'')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, app(app(uncurry, f2''''), x'''')), x0''), z')
APP(app(apply, sum), x') -> APP(sum, x')
APP(app(app(app(fold, f3), app(apply, sum)), x), app(app(cons, z'), t)) -> APP(app(apply, sum), z')
APP(app(app(app(fold, f3), app(apply, app(app(app(fold, f3''''), g2''''), x''''))), x), app(app(cons, app(app(cons, z''''), t'''')), t)) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(app(fold, f3), app(apply, app(app(compose, g1''''), f1''''))), x), app(app(cons, z'), t)) -> APP(app(apply, app(app(compose, g1''''), f1'''')), z')
APP(app(app(app(fold, f3), app(apply, app(app(swap, f2''''), y''''))), x), app(app(cons, z'), t)) -> APP(app(apply, app(app(swap, f2''''), y'''')), z')
APP(app(app(app(fold, f3), app(apply, app(app(uncurry, f2''''), x''''))), x), app(app(cons, z'), t)) -> APP(app(apply, app(app(uncurry, f2''''), x'''')), z')
APP(app(app(app(fold, f3), app(apply, app(apply, f1''''))), x), app(app(cons, z'), t)) -> APP(app(apply, app(apply, f1'''')), z')
APP(app(apply, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(compose, g1), app(apply, app(app(app(fold, f3''''), g2''''), x''''))), app(app(cons, z''''), t'''')) -> APP(app(apply, app(app(app(fold, f3''''), g2''''), x'''')), app(app(cons, z''''), t''''))
APP(app(app(compose, g1), app(apply, app(app(compose, g1''''), f1''''))), x') -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(compose, g1), app(apply, app(app(swap, f2''''), y''''))), x') -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(compose, g1), app(apply, app(app(uncurry, f2''''), x''''))), x') -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(compose, g1), app(apply, app(apply, f1''''))), x') -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(compose, g1), sum), x') -> APP(sum, x')
APP(app(apply, app(app(compose, g1''), f1'')), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(swap, app(apply, app(app(compose, g1''''), f1''''))), y), x') -> APP(app(apply, app(app(compose, g1''''), f1'''')), x')
APP(app(app(swap, app(apply, app(app(swap, f2''''), y''''))), y), x') -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(swap, app(apply, app(app(uncurry, f2''''), x''''))), y), x') -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(swap, app(apply, app(apply, f1''''))), y), x') -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(swap, sum), y), x') -> APP(sum, x')
APP(app(apply, app(app(swap, f2''), y'')), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(apply, app(app(swap, f2''''), y''''))), x'), y) -> APP(app(apply, app(app(swap, f2''''), y'''')), x')
APP(app(app(uncurry, app(apply, app(app(uncurry, f2''''), x''''))), x'), y) -> APP(app(apply, app(app(uncurry, f2''''), x'''')), x')
APP(app(app(uncurry, app(apply, app(apply, f1''''))), x'), y) -> APP(app(apply, app(apply, f1'''')), x')
APP(app(app(uncurry, sum), x'), y) -> APP(sum, x')
APP(app(apply, app(app(uncurry, f2''), x'')), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(apply, app(apply, f1'')), x'') -> APP(app(apply, f1''), x'')
APP(sum, l) -> APP(app(app(app(fold, add), id), 0), l)
APP(app(app(app(fold, f3), sum), x), app(app(cons, z'), t)) -> APP(sum, z')
APP(app(app(compose, g1), app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(app(fold, f3), app(app(compose, g1''), f1'')), x), app(app(cons, z'), t)) -> APP(app(app(compose, g1''), f1''), z')
APP(app(app(swap, app(app(app(fold, f3''), g2''), x'')), y), app(app(cons, z''), t'')) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(compose, g1), app(app(swap, f2''), y'')), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(swap, app(app(compose, g1''), f1'')), y), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(app(fold, f3), app(app(swap, f2''), y'')), x), app(app(cons, z'), t)) -> APP(app(app(swap, f2''), y''), z')
APP(app(app(uncurry, app(app(app(fold, f3''), g2''), x'')), app(app(cons, z''), t'')), y) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
APP(app(app(compose, g1), app(app(uncurry, f2''), x'')), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(app(compose, g1), app(app(compose, g1''), f1'')), x'') -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(uncurry, app(app(compose, g1''), f1'')), x''), y) -> APP(app(app(compose, g1''), f1''), x'')
APP(app(app(swap, app(app(uncurry, f2''), x'')), y), x0) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(app(swap, app(app(swap, f2''), y'')), y), x'') -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(app(swap, f2''), y'')), x''), y) -> APP(app(app(swap, f2''), y''), x'')
APP(app(app(uncurry, app(app(uncurry, f2''), x'')), x0), y) -> APP(app(app(uncurry, f2''), x''), x0)
APP(app(app(app(fold, f3), app(app(uncurry, f2''), x'')), x), app(app(cons, z'), t)) -> APP(app(app(uncurry, f2''), x''), z')
APP(app(app(app(fold, f3), app(app(app(fold, f3''), g2''), x'')), x), app(app(cons, app(app(cons, z''), t'')), t)) -> APP(app(app(app(fold, f3''), g2''), x''), app(app(cons, z''), t''))
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(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(g1, app(f1, 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), app(app(swap, app(app(uncurry, app(apply, sum)), x''''')), y'')), x') -> APP(app(app(swap, app(app(uncurry, app(apply, sum)), x''''')), y''), 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



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