(0) Obligation:

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

plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
sum(xs) → sumIter(xs, 0)
sumIter(xs, x) → ifSum(isempty(xs), xs, x, plus(x, head(xs)))
ifSum(true, xs, x, y) → x
ifSum(false, xs, x, y) → sumIter(tail(xs), y)
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ab
ac

Q is empty.

(1) AAECC Innermost (EQUIVALENT transformation)

We have applied [NOC,AAECCNOC] to switch to innermost. The TRS R 1 is

ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifSum(true, xs, x, y) → x
ifSum(false, xs, x, y) → sumIter(tail(xs), y)
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
sum(xs) → sumIter(xs, 0)
sumIter(xs, x) → ifSum(isempty(xs), xs, x, plus(x, head(xs)))

The TRS R 2 is

ab
ac

The signature Sigma is {c, a, b}

(2) Obligation:

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

plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
sum(xs) → sumIter(xs, 0)
sumIter(xs, x) → ifSum(isempty(xs), xs, x, plus(x, head(xs)))
ifSum(true, xs, x, y) → x
ifSum(false, xs, x, y) → sumIter(tail(xs), y)
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ab
ac

The set Q consists of the following terms:

plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
sum(x0)
sumIter(x0, x1)
ifSum(true, x0, x1, x2)
ifSum(false, x0, x1, x2)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
a

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

PLUS(x, y) → PLUSITER(x, y, 0)
PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z)
PLUSITER(x, y, z) → LE(x, z)
IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))
LE(s(x), s(y)) → LE(x, y)
SUM(xs) → SUMITER(xs, 0)
SUMITER(xs, x) → IFSUM(isempty(xs), xs, x, plus(x, head(xs)))
SUMITER(xs, x) → ISEMPTY(xs)
SUMITER(xs, x) → PLUS(x, head(xs))
SUMITER(xs, x) → HEAD(xs)
IFSUM(false, xs, x, y) → SUMITER(tail(xs), y)
IFSUM(false, xs, x, y) → TAIL(xs)

The TRS R consists of the following rules:

plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
sum(xs) → sumIter(xs, 0)
sumIter(xs, x) → ifSum(isempty(xs), xs, x, plus(x, head(xs)))
ifSum(true, xs, x, y) → x
ifSum(false, xs, x, y) → sumIter(tail(xs), y)
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ab
ac

The set Q consists of the following terms:

plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
sum(x0)
sumIter(x0, x1)
ifSum(true, x0, x1, x2)
ifSum(false, x0, x1, x2)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
a

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:

LE(s(x), s(y)) → LE(x, y)

The TRS R consists of the following rules:

plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
sum(xs) → sumIter(xs, 0)
sumIter(xs, x) → ifSum(isempty(xs), xs, x, plus(x, head(xs)))
ifSum(true, xs, x, y) → x
ifSum(false, xs, x, y) → sumIter(tail(xs), y)
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ab
ac

The set Q consists of the following terms:

plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
sum(x0)
sumIter(x0, x1)
ifSum(true, x0, x1, x2)
ifSum(false, x0, x1, x2)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
a

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.


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

Lexicographic path order with status [LPO].
Precedence:
s1 > LE1

Status:
s1: [1]
LE1: [1]

The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

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

plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
sum(xs) → sumIter(xs, 0)
sumIter(xs, x) → ifSum(isempty(xs), xs, x, plus(x, head(xs)))
ifSum(true, xs, x, y) → x
ifSum(false, xs, x, y) → sumIter(tail(xs), y)
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ab
ac

The set Q consists of the following terms:

plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
sum(x0)
sumIter(x0, x1)
ifSum(true, x0, x1, x2)
ifSum(false, x0, x1, x2)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
a

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:

IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))
PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z)

The TRS R consists of the following rules:

plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
sum(xs) → sumIter(xs, 0)
sumIter(xs, x) → ifSum(isempty(xs), xs, x, plus(x, head(xs)))
ifSum(true, xs, x, y) → x
ifSum(false, xs, x, y) → sumIter(tail(xs), y)
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ab
ac

The set Q consists of the following terms:

plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
sum(x0)
sumIter(x0, x1)
ifSum(true, x0, x1, x2)
ifSum(false, x0, x1, x2)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
a

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

(13) Obligation:

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

SUMITER(xs, x) → IFSUM(isempty(xs), xs, x, plus(x, head(xs)))
IFSUM(false, xs, x, y) → SUMITER(tail(xs), y)

The TRS R consists of the following rules:

plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
sum(xs) → sumIter(xs, 0)
sumIter(xs, x) → ifSum(isempty(xs), xs, x, plus(x, head(xs)))
ifSum(true, xs, x, y) → x
ifSum(false, xs, x, y) → sumIter(tail(xs), y)
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ab
ac

The set Q consists of the following terms:

plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
sum(x0)
sumIter(x0, x1)
ifSum(true, x0, x1, x2)
ifSum(false, x0, x1, x2)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
a

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