(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(apply, f_1), x) → app(f_1, x)
app(id, x) → x
app(app(app(uncurry, f_2), x), y) → app(app(f_2, x), y)
app(app(app(swap, f_2), y), x) → app(app(f_2, x), y)
app(app(app(compose, g_1), f_1), x) → app(g_1, app(f_1, x))
app(app(const, x), y) → x
app(listify, x) → app(app(cons, x), nil)
app(app(app(app(fold, f_3), g_2), x), nil) → x
app(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → app(app(f_3, app(g_2, z)), app(app(app(app(fold, f_3), g_2), x), t))
app(sum, l) → app(app(app(app(fold, add), id), 0), l)
app(app(uncurry, app(app(fold, cons), id)), nil) → id
appendapp(app(compose, app(app(swap, fold), cons)), id)
reverseapp(app(uncurry, app(app(fold, app(swap, append)), listify)), nil)
lengthapp(app(uncurry, app(app(fold, add), app(cons, 1))), 0)

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APP(app(apply, f_1), x) → APP(f_1, x)
APP(app(app(uncurry, f_2), x), y) → APP(app(f_2, x), y)
APP(app(app(uncurry, f_2), x), y) → APP(f_2, x)
APP(app(app(swap, f_2), y), x) → APP(app(f_2, x), y)
APP(app(app(swap, f_2), y), x) → APP(f_2, x)
APP(app(app(compose, g_1), f_1), x) → APP(g_1, app(f_1, x))
APP(app(app(compose, g_1), f_1), x) → APP(f_1, x)
APP(listify, x) → APP(app(cons, x), nil)
APP(listify, x) → APP(cons, x)
APP(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → APP(app(f_3, app(g_2, z)), app(app(app(app(fold, f_3), g_2), x), t))
APP(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → APP(f_3, app(g_2, z))
APP(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → APP(g_2, z)
APP(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → APP(app(app(app(fold, f_3), g_2), 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)
APPENDAPP(app(compose, app(app(swap, fold), cons)), id)
APPENDAPP(compose, app(app(swap, fold), cons))
APPENDAPP(app(swap, fold), cons)
APPENDAPP(swap, fold)
REVERSEAPP(app(uncurry, app(app(fold, app(swap, append)), listify)), nil)
REVERSEAPP(uncurry, app(app(fold, app(swap, append)), listify))
REVERSEAPP(app(fold, app(swap, append)), listify)
REVERSEAPP(fold, app(swap, append))
REVERSEAPP(swap, append)
REVERSEAPPEND
LENGTHAPP(app(uncurry, app(app(fold, add), app(cons, 1))), 0)
LENGTHAPP(uncurry, app(app(fold, add), app(cons, 1)))
LENGTHAPP(app(fold, add), app(cons, 1))
LENGTHAPP(fold, add)
LENGTHAPP(cons, 1)

The TRS R consists of the following rules:

app(app(apply, f_1), x) → app(f_1, x)
app(id, x) → x
app(app(app(uncurry, f_2), x), y) → app(app(f_2, x), y)
app(app(app(swap, f_2), y), x) → app(app(f_2, x), y)
app(app(app(compose, g_1), f_1), x) → app(g_1, app(f_1, x))
app(app(const, x), y) → x
app(listify, x) → app(app(cons, x), nil)
app(app(app(app(fold, f_3), g_2), x), nil) → x
app(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → app(app(f_3, app(g_2, z)), app(app(app(app(fold, f_3), g_2), x), t))
app(sum, l) → app(app(app(app(fold, add), id), 0), l)
app(app(uncurry, app(app(fold, cons), id)), nil) → id
appendapp(app(compose, app(app(swap, fold), cons)), id)
reverseapp(app(uncurry, app(app(fold, app(swap, append)), listify)), nil)
lengthapp(app(uncurry, app(app(fold, add), app(cons, 1))), 0)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 20 less nodes.

(4) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APP(app(app(uncurry, f_2), x), y) → APP(app(f_2, x), y)
APP(app(apply, f_1), x) → APP(f_1, x)
APP(app(app(uncurry, f_2), x), y) → APP(f_2, x)
APP(app(app(swap, f_2), y), x) → APP(app(f_2, x), y)
APP(app(app(swap, f_2), y), x) → APP(f_2, x)
APP(app(app(compose, g_1), f_1), x) → APP(g_1, app(f_1, x))
APP(app(app(compose, g_1), f_1), x) → APP(f_1, x)
APP(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → APP(app(f_3, app(g_2, z)), app(app(app(app(fold, f_3), g_2), x), t))
APP(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → APP(f_3, app(g_2, z))
APP(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → APP(g_2, z)
APP(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → APP(app(app(app(fold, f_3), g_2), x), t)
APP(sum, l) → APP(app(app(app(fold, add), id), 0), l)

The TRS R consists of the following rules:

app(app(apply, f_1), x) → app(f_1, x)
app(id, x) → x
app(app(app(uncurry, f_2), x), y) → app(app(f_2, x), y)
app(app(app(swap, f_2), y), x) → app(app(f_2, x), y)
app(app(app(compose, g_1), f_1), x) → app(g_1, app(f_1, x))
app(app(const, x), y) → x
app(listify, x) → app(app(cons, x), nil)
app(app(app(app(fold, f_3), g_2), x), nil) → x
app(app(app(app(fold, f_3), g_2), x), app(app(cons, z), t)) → app(app(f_3, app(g_2, z)), app(app(app(app(fold, f_3), g_2), x), t))
app(sum, l) → app(app(app(app(fold, add), id), 0), l)
app(app(uncurry, app(app(fold, cons), id)), nil) → id
appendapp(app(compose, app(app(swap, fold), cons)), id)
reverseapp(app(uncurry, app(app(fold, app(swap, append)), listify)), nil)
lengthapp(app(uncurry, app(app(fold, add), app(cons, 1))), 0)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.