(0) Obligation:

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

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

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:

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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

MIN(s(x), s(y)) → MIN(x, y)
LEN(cons(x, xs)) → LEN(xs)
SUM(x, s(y)) → SUM(x, y)
LE(s(x), s(y)) → LE(x, y)
TAKE(s(x), cons(y, ys)) → TAKE(x, ys)
ADDLIST(x, y) → IF(le(0, min(len(x), len(y))), 0, x, y, nil)
ADDLIST(x, y) → LE(0, min(len(x), len(y)))
ADDLIST(x, y) → MIN(len(x), len(y))
ADDLIST(x, y) → LEN(x)
ADDLIST(x, y) → LEN(y)
IF(true, c, xs, ys, z) → IF(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))
IF(true, c, xs, ys, z) → LE(s(c), min(len(xs), len(ys)))
IF(true, c, xs, ys, z) → MIN(len(xs), len(ys))
IF(true, c, xs, ys, z) → LEN(xs)
IF(true, c, xs, ys, z) → LEN(ys)
IF(true, c, xs, ys, z) → SUM(take(c, xs), take(c, ys))
IF(true, c, xs, ys, z) → TAKE(c, xs)
IF(true, c, xs, ys, z) → TAKE(c, ys)

The TRS R consists of the following rules:

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

TAKE(s(x), cons(y, ys)) → TAKE(x, ys)

The TRS R consists of the following rules:

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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.


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

Recursive Path Order [RPO].
Precedence:
s > TAKE1
cons2 > TAKE1

The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

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

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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:

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

The TRS R consists of the following rules:

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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.


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(x2)
s(x1)  =  s(x1)

Recursive Path Order [RPO].
Precedence:
s1 > LE1

The following usable rules [FROCOS05] were oriented: none

(14) Obligation:

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

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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:

SUM(x, s(y)) → SUM(x, y)

The TRS R consists of the following rules:

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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

(18) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
trivial

The following usable rules [FROCOS05] were oriented: none

(19) Obligation:

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

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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

(20) PisEmptyProof (EQUIVALENT transformation)

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

(21) TRUE

(22) Obligation:

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

LEN(cons(x, xs)) → LEN(xs)

The TRS R consists of the following rules:

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
trivial

The following usable rules [FROCOS05] were oriented: none

(24) Obligation:

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

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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

(25) PisEmptyProof (EQUIVALENT transformation)

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

(26) TRUE

(27) Obligation:

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

MIN(s(x), s(y)) → MIN(x, y)

The TRS R consists of the following rules:

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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

(28) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
s1 > MIN1

The following usable rules [FROCOS05] were oriented: none

(29) Obligation:

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

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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

(30) PisEmptyProof (EQUIVALENT transformation)

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

(31) TRUE

(32) Obligation:

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

IF(true, c, xs, ys, z) → IF(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The TRS R consists of the following rules:

min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
len(nil) → 0
len(cons(x, xs)) → s(len(xs))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
take(0, cons(y, ys)) → y
take(s(x), cons(y, ys)) → take(x, ys)
addList(x, y) → if(le(0, min(len(x), len(y))), 0, x, y, nil)
if(false, c, x, y, z) → z
if(true, c, xs, ys, z) → if(le(s(c), min(len(xs), len(ys))), s(c), xs, ys, cons(sum(take(c, xs), take(c, ys)), z))

The set Q consists of the following terms:

min(0, x0)
min(s(x0), 0)
min(s(x0), s(x1))
len(nil)
len(cons(x0, x1))
sum(x0, 0)
sum(x0, s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
take(0, cons(x0, x1))
take(s(x0), cons(x1, x2))
addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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