(0) Obligation:

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

isEmpty(nil) → true
isEmpty(cons(x, xs)) → false
last(cons(x, nil)) → x
last(cons(x, cons(y, ys))) → last(cons(y, ys))
dropLast(nil) → nil
dropLast(cons(x, nil)) → nil
dropLast(cons(x, cons(y, ys))) → cons(x, dropLast(cons(y, ys)))
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
reverse(xs) → rev(xs, nil)
rev(xs, ys) → if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys)
if(true, xs, ys, zs) → zs
if(false, xs, ys, zs) → rev(xs, ys)

Q is empty.

(1) Overlay + Local Confluence (EQUIVALENT transformation)

The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.

(2) Obligation:

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

isEmpty(nil) → true
isEmpty(cons(x, xs)) → false
last(cons(x, nil)) → x
last(cons(x, cons(y, ys))) → last(cons(y, ys))
dropLast(nil) → nil
dropLast(cons(x, nil)) → nil
dropLast(cons(x, cons(y, ys))) → cons(x, dropLast(cons(y, ys)))
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
reverse(xs) → rev(xs, nil)
rev(xs, ys) → if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys)
if(true, xs, ys, zs) → zs
if(false, xs, ys, zs) → rev(xs, ys)

The set Q consists of the following terms:

isEmpty(nil)
isEmpty(cons(x0, x1))
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
dropLast(nil)
dropLast(cons(x0, nil))
dropLast(cons(x0, cons(x1, x2)))
append(nil, x0)
append(cons(x0, x1), x2)
reverse(x0)
rev(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)

(3) DependencyPairsProof (EQUIVALENT transformation)

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

(4) Obligation:

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

LAST(cons(x, cons(y, ys))) → LAST(cons(y, ys))
DROPLAST(cons(x, cons(y, ys))) → DROPLAST(cons(y, ys))
APPEND(cons(x, xs), ys) → APPEND(xs, ys)
REVERSE(xs) → REV(xs, nil)
REV(xs, ys) → IF(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys)
REV(xs, ys) → ISEMPTY(xs)
REV(xs, ys) → DROPLAST(xs)
REV(xs, ys) → APPEND(ys, last(xs))
REV(xs, ys) → LAST(xs)
IF(false, xs, ys, zs) → REV(xs, ys)

The TRS R consists of the following rules:

isEmpty(nil) → true
isEmpty(cons(x, xs)) → false
last(cons(x, nil)) → x
last(cons(x, cons(y, ys))) → last(cons(y, ys))
dropLast(nil) → nil
dropLast(cons(x, nil)) → nil
dropLast(cons(x, cons(y, ys))) → cons(x, dropLast(cons(y, ys)))
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
reverse(xs) → rev(xs, nil)
rev(xs, ys) → if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys)
if(true, xs, ys, zs) → zs
if(false, xs, ys, zs) → rev(xs, ys)

The set Q consists of the following terms:

isEmpty(nil)
isEmpty(cons(x0, x1))
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
dropLast(nil)
dropLast(cons(x0, nil))
dropLast(cons(x0, cons(x1, x2)))
append(nil, x0)
append(cons(x0, x1), x2)
reverse(x0)
rev(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 4 SCCs with 5 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

APPEND(cons(x, xs), ys) → APPEND(xs, ys)

The TRS R consists of the following rules:

isEmpty(nil) → true
isEmpty(cons(x, xs)) → false
last(cons(x, nil)) → x
last(cons(x, cons(y, ys))) → last(cons(y, ys))
dropLast(nil) → nil
dropLast(cons(x, nil)) → nil
dropLast(cons(x, cons(y, ys))) → cons(x, dropLast(cons(y, ys)))
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
reverse(xs) → rev(xs, nil)
rev(xs, ys) → if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys)
if(true, xs, ys, zs) → zs
if(false, xs, ys, zs) → rev(xs, ys)

The set Q consists of the following terms:

isEmpty(nil)
isEmpty(cons(x0, x1))
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
dropLast(nil)
dropLast(cons(x0, nil))
dropLast(cons(x0, cons(x1, x2)))
append(nil, x0)
append(cons(x0, x1), x2)
reverse(x0)
rev(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)

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

(8) Obligation:

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

DROPLAST(cons(x, cons(y, ys))) → DROPLAST(cons(y, ys))

The TRS R consists of the following rules:

isEmpty(nil) → true
isEmpty(cons(x, xs)) → false
last(cons(x, nil)) → x
last(cons(x, cons(y, ys))) → last(cons(y, ys))
dropLast(nil) → nil
dropLast(cons(x, nil)) → nil
dropLast(cons(x, cons(y, ys))) → cons(x, dropLast(cons(y, ys)))
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
reverse(xs) → rev(xs, nil)
rev(xs, ys) → if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys)
if(true, xs, ys, zs) → zs
if(false, xs, ys, zs) → rev(xs, ys)

The set Q consists of the following terms:

isEmpty(nil)
isEmpty(cons(x0, x1))
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
dropLast(nil)
dropLast(cons(x0, nil))
dropLast(cons(x0, cons(x1, x2)))
append(nil, x0)
append(cons(x0, x1), x2)
reverse(x0)
rev(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)

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

(9) Obligation:

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

LAST(cons(x, cons(y, ys))) → LAST(cons(y, ys))

The TRS R consists of the following rules:

isEmpty(nil) → true
isEmpty(cons(x, xs)) → false
last(cons(x, nil)) → x
last(cons(x, cons(y, ys))) → last(cons(y, ys))
dropLast(nil) → nil
dropLast(cons(x, nil)) → nil
dropLast(cons(x, cons(y, ys))) → cons(x, dropLast(cons(y, ys)))
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
reverse(xs) → rev(xs, nil)
rev(xs, ys) → if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys)
if(true, xs, ys, zs) → zs
if(false, xs, ys, zs) → rev(xs, ys)

The set Q consists of the following terms:

isEmpty(nil)
isEmpty(cons(x0, x1))
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
dropLast(nil)
dropLast(cons(x0, nil))
dropLast(cons(x0, cons(x1, x2)))
append(nil, x0)
append(cons(x0, x1), x2)
reverse(x0)
rev(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)

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

(10) Obligation:

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

REV(xs, ys) → IF(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys)
IF(false, xs, ys, zs) → REV(xs, ys)

The TRS R consists of the following rules:

isEmpty(nil) → true
isEmpty(cons(x, xs)) → false
last(cons(x, nil)) → x
last(cons(x, cons(y, ys))) → last(cons(y, ys))
dropLast(nil) → nil
dropLast(cons(x, nil)) → nil
dropLast(cons(x, cons(y, ys))) → cons(x, dropLast(cons(y, ys)))
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
reverse(xs) → rev(xs, nil)
rev(xs, ys) → if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys)
if(true, xs, ys, zs) → zs
if(false, xs, ys, zs) → rev(xs, ys)

The set Q consists of the following terms:

isEmpty(nil)
isEmpty(cons(x0, x1))
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
dropLast(nil)
dropLast(cons(x0, nil))
dropLast(cons(x0, cons(x1, x2)))
append(nil, x0)
append(cons(x0, x1), x2)
reverse(x0)
rev(x0, x1)
if(true, x0, x1, x2)
if(false, x0, x1, x2)

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