(0) Obligation:

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

isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0) → true
isZero(s(x)) → false
head(cons(x, xs)) → x
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0)) → 0
p(0) → 0
inc(s(x)) → s(inc(x))
inc(0) → s(0)
sumList(xs, y) → if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y))
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0)

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(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0) → true
isZero(s(x)) → false
head(cons(x, xs)) → x
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0)) → 0
p(0) → 0
inc(s(x)) → s(inc(x))
inc(0) → s(0)
sumList(xs, y) → if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y))
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0)

The set Q consists of the following terms:

isEmpty(cons(x0, x1))
isEmpty(nil)
isZero(0)
isZero(s(x0))
head(cons(x0, x1))
tail(cons(x0, x1))
tail(nil)
p(s(s(x0)))
p(s(0))
p(0)
inc(s(x0))
inc(0)
sumList(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, true, x0, x1, x2, x3)
if(false, false, x0, x1, x2, x3)
sum(x0)

(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:

P(s(s(x))) → P(s(x))
INC(s(x)) → INC(x)
SUMLIST(xs, y) → IF(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y))
SUMLIST(xs, y) → ISEMPTY(xs)
SUMLIST(xs, y) → ISZERO(head(xs))
SUMLIST(xs, y) → HEAD(xs)
SUMLIST(xs, y) → TAIL(xs)
SUMLIST(xs, y) → P(head(xs))
SUMLIST(xs, y) → INC(y)
IF(false, true, y, xs, ys, x) → SUMLIST(xs, y)
IF(false, false, y, xs, ys, x) → SUMLIST(ys, x)
SUM(xs) → SUMLIST(xs, 0)

The TRS R consists of the following rules:

isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0) → true
isZero(s(x)) → false
head(cons(x, xs)) → x
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0)) → 0
p(0) → 0
inc(s(x)) → s(inc(x))
inc(0) → s(0)
sumList(xs, y) → if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y))
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0)

The set Q consists of the following terms:

isEmpty(cons(x0, x1))
isEmpty(nil)
isZero(0)
isZero(s(x0))
head(cons(x0, x1))
tail(cons(x0, x1))
tail(nil)
p(s(s(x0)))
p(s(0))
p(0)
inc(s(x0))
inc(0)
sumList(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, true, x0, x1, x2, x3)
if(false, false, x0, x1, x2, x3)
sum(x0)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

INC(s(x)) → INC(x)

The TRS R consists of the following rules:

isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0) → true
isZero(s(x)) → false
head(cons(x, xs)) → x
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0)) → 0
p(0) → 0
inc(s(x)) → s(inc(x))
inc(0) → s(0)
sumList(xs, y) → if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y))
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0)

The set Q consists of the following terms:

isEmpty(cons(x0, x1))
isEmpty(nil)
isZero(0)
isZero(s(x0))
head(cons(x0, x1))
tail(cons(x0, x1))
tail(nil)
p(s(s(x0)))
p(s(0))
p(0)
inc(s(x0))
inc(0)
sumList(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, true, x0, x1, x2, x3)
if(false, false, x0, x1, x2, x3)
sum(x0)

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

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


INC(s(x)) → INC(x)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
INC(x1)  =  x1
s(x1)  =  s(x1)

Recursive path order with status [RPO].
Precedence:
trivial

Status:
trivial

The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0) → true
isZero(s(x)) → false
head(cons(x, xs)) → x
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0)) → 0
p(0) → 0
inc(s(x)) → s(inc(x))
inc(0) → s(0)
sumList(xs, y) → if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y))
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0)

The set Q consists of the following terms:

isEmpty(cons(x0, x1))
isEmpty(nil)
isZero(0)
isZero(s(x0))
head(cons(x0, x1))
tail(cons(x0, x1))
tail(nil)
p(s(s(x0)))
p(s(0))
p(0)
inc(s(x0))
inc(0)
sumList(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, true, x0, x1, x2, x3)
if(false, false, x0, x1, x2, x3)
sum(x0)

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

(10) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(11) TRUE

(12) Obligation:

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

P(s(s(x))) → P(s(x))

The TRS R consists of the following rules:

isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0) → true
isZero(s(x)) → false
head(cons(x, xs)) → x
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0)) → 0
p(0) → 0
inc(s(x)) → s(inc(x))
inc(0) → s(0)
sumList(xs, y) → if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y))
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0)

The set Q consists of the following terms:

isEmpty(cons(x0, x1))
isEmpty(nil)
isZero(0)
isZero(s(x0))
head(cons(x0, x1))
tail(cons(x0, x1))
tail(nil)
p(s(s(x0)))
p(s(0))
p(0)
inc(s(x0))
inc(0)
sumList(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, true, x0, x1, x2, x3)
if(false, false, x0, x1, x2, x3)
sum(x0)

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

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


P(s(s(x))) → P(s(x))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
P(x1)  =  x1
s(x1)  =  s(x1)

Recursive path order with status [RPO].
Precedence:
trivial

Status:
trivial

The following usable rules [FROCOS05] were oriented: none

(14) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0) → true
isZero(s(x)) → false
head(cons(x, xs)) → x
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0)) → 0
p(0) → 0
inc(s(x)) → s(inc(x))
inc(0) → s(0)
sumList(xs, y) → if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y))
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0)

The set Q consists of the following terms:

isEmpty(cons(x0, x1))
isEmpty(nil)
isZero(0)
isZero(s(x0))
head(cons(x0, x1))
tail(cons(x0, x1))
tail(nil)
p(s(s(x0)))
p(s(0))
p(0)
inc(s(x0))
inc(0)
sumList(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, true, x0, x1, x2, x3)
if(false, false, x0, x1, x2, x3)
sum(x0)

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

(15) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(16) TRUE

(17) Obligation:

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

SUMLIST(xs, y) → IF(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y))
IF(false, true, y, xs, ys, x) → SUMLIST(xs, y)
IF(false, false, y, xs, ys, x) → SUMLIST(ys, x)

The TRS R consists of the following rules:

isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0) → true
isZero(s(x)) → false
head(cons(x, xs)) → x
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0)) → 0
p(0) → 0
inc(s(x)) → s(inc(x))
inc(0) → s(0)
sumList(xs, y) → if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y))
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0)

The set Q consists of the following terms:

isEmpty(cons(x0, x1))
isEmpty(nil)
isZero(0)
isZero(s(x0))
head(cons(x0, x1))
tail(cons(x0, x1))
tail(nil)
p(s(s(x0)))
p(s(0))
p(0)
inc(s(x0))
inc(0)
sumList(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, true, x0, x1, x2, x3)
if(false, false, x0, x1, x2, x3)
sum(x0)

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