(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) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(9) Obligation:

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

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

R is empty.
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) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

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)

(11) Obligation:

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

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

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

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • TAKE(s(x), cons(y, ys)) → TAKE(x, ys)
    The graph contains the following edges 1 > 1, 2 > 2

(13) TRUE

(14) 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.

(15) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(16) Obligation:

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

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

R is empty.
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.

(17) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

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)

(18) Obligation:

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

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

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

(19) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LE(s(x), s(y)) → LE(x, y)
    The graph contains the following edges 1 > 1, 2 > 2

(20) TRUE

(21) 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.

(22) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(23) Obligation:

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

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

R is empty.
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.

(24) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

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)

(25) Obligation:

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

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

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

(26) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • SUM(x, s(y)) → SUM(x, y)
    The graph contains the following edges 1 >= 1, 2 > 2

(27) TRUE

(28) 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.

(29) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(30) Obligation:

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

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

R is empty.
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.

(31) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

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)

(32) Obligation:

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

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

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

(33) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LEN(cons(x, xs)) → LEN(xs)
    The graph contains the following edges 1 > 1

(34) TRUE

(35) 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.

(36) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(37) Obligation:

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

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

R is empty.
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.

(38) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

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)

(39) Obligation:

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

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

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

(40) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • MIN(s(x), s(y)) → MIN(x, y)
    The graph contains the following edges 1 > 1, 2 > 2

(41) TRUE

(42) 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.

(43) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

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

len(nil) → 0
len(cons(x, xs)) → s(len(xs))
min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
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)
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true

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.

(45) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

addList(x0, x1)
if(false, x0, x1, x2, x3)
if(true, x0, x1, x2, x3)

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

len(nil) → 0
len(cons(x, xs)) → s(len(xs))
min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
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)
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true

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))

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

(47) Induction-Processor (SOUND transformation)


This DP could be deleted by the Induction-Processor:
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))


This order was computed:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(IF(x1, x2, x3, x4, x5)) = x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = 1   
POL(len(x1)) = 0   
POL(min(x1, x2)) = 0   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(sum(x1, x2)) = 1 + x1   
POL(take(x1, x2)) = x2   
POL(true) = 1   

At least one of these decreasing rules is always used after the deleted DP:
le(s(x463), 0) → false


The following formula is valid:
c:sort[a23],xs:sort[a24],ys:sort[a24].le'(s(), min(len(xs ), len(ys )))=true


The transformed set:
le'(s(x46), 0) → true
le'(s(x56), s(y36)) → le'(x56, y36)
le'(0, x105) → false
len(nil) → 0
len(cons(x7, xs')) → s(len(xs'))
min(0, y10) → 0
min(s(x26), 0) → 0
min(s(x36), s(y23)) → min(x36, y23)
le(s(x46), 0) → false
le(s(x56), s(y36)) → le(x56, y36)
take(0, cons(y43, ys12)) → y43
take(s(x75), cons(y50, ys15)) → take(x75, ys15)
sum(x85, 0) → x85
sum(x95, s(y63)) → s(sum(x95, y63))
le(0, x105) → true
take(0, nil) → 0
take(s(x2), nil) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a23](0, 0) → true
equal_sort[a23](0, s(x0)) → false
equal_sort[a23](s(x0), 0) → false
equal_sort[a23](s(x0), s(x1)) → equal_sort[a23](x0, x1)
equal_sort[a24](nil, nil) → true
equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](cons(x0, x1), nil) → false
equal_sort[a24](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a24](x0, x2), equal_sort[a24](x1, x3))
equal_sort[a50](witness_sort[a50], witness_sort[a50]) → true

(48) Complex Obligation (AND)

(49) Obligation:

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

len(nil) → 0
len(cons(x, xs)) → s(len(xs))
min(0, y) → 0
min(s(x), 0) → 0
min(s(x), s(y)) → min(x, y)
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)
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
le(0, x) → true

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))

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

(50) PisEmptyProof (EQUIVALENT transformation)

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

(51) TRUE

(52) Obligation:

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

le'(s(x46), 0) → true
le'(s(x56), s(y36)) → le'(x56, y36)
le'(0, x105) → false
len(nil) → 0
len(cons(x7, xs')) → s(len(xs'))
min(0, y10) → 0
min(s(x26), 0) → 0
min(s(x36), s(y23)) → min(x36, y23)
le(s(x46), 0) → false
le(s(x56), s(y36)) → le(x56, y36)
take(0, cons(y43, ys12)) → y43
take(s(x75), cons(y50, ys15)) → take(x75, ys15)
sum(x85, 0) → x85
sum(x95, s(y63)) → s(sum(x95, y63))
le(0, x105) → true
take(0, nil) → 0
take(s(x2), nil) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a23](0, 0) → true
equal_sort[a23](0, s(x0)) → false
equal_sort[a23](s(x0), 0) → false
equal_sort[a23](s(x0), s(x1)) → equal_sort[a23](x0, x1)
equal_sort[a24](nil, nil) → true
equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](cons(x0, x1), nil) → false
equal_sort[a24](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a24](x0, x2), equal_sort[a24](x1, x3))
equal_sort[a50](witness_sort[a50], witness_sort[a50]) → true

Q is empty.

(53) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 1   
POL(and(x1, x2)) = 1 + x1 + x2   
POL(cons(x1, x2)) = 2 + x1 + x2   
POL(equal_bool(x1, x2)) = x1 + x2   
POL(equal_sort[a23](x1, x2)) = 2 + x1 + x2   
POL(equal_sort[a24](x1, x2)) = 1 + x1 + x2   
POL(equal_sort[a50](x1, x2)) = 1 + x1 + x2   
POL(false) = 3   
POL(isa_false(x1)) = 4 + x1   
POL(isa_true(x1)) = x1   
POL(le(x1, x2)) = 3 + x1 + x2   
POL(le'(x1, x2)) = 3 + x1 + x2   
POL(len(x1)) = 2 + x1   
POL(min(x1, x2)) = 1 + x1 + x2   
POL(nil) = 0   
POL(not(x1)) = 4 + x1   
POL(or(x1, x2)) = 1 + x1 + x2   
POL(s(x1)) = x1   
POL(sum(x1, x2)) = x1 + x2   
POL(take(x1, x2)) = 2 + x1 + x2   
POL(true) = 0   
POL(witness_sort[a50]) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

le'(s(x46), 0) → true
le'(0, x105) → false
len(nil) → 0
len(cons(x7, xs')) → s(len(xs'))
min(0, y10) → 0
min(s(x26), 0) → 0
le(s(x46), 0) → false
take(0, cons(y43, ys12)) → y43
take(s(x75), cons(y50, ys15)) → take(x75, ys15)
sum(x85, 0) → x85
le(0, x105) → true
take(0, nil) → 0
take(s(x2), nil) → 0
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a23](0, 0) → true
equal_sort[a24](nil, nil) → true
equal_sort[a24](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a24](x0, x2), equal_sort[a24](x1, x3))
equal_sort[a50](witness_sort[a50], witness_sort[a50]) → true


(54) Obligation:

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

le'(s(x56), s(y36)) → le'(x56, y36)
min(s(x36), s(y23)) → min(x36, y23)
le(s(x56), s(y36)) → le(x56, y36)
sum(x95, s(y63)) → s(sum(x95, y63))
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
isa_true(true) → true
isa_true(false) → false
equal_sort[a23](0, s(x0)) → false
equal_sort[a23](s(x0), 0) → false
equal_sort[a23](s(x0), s(x1)) → equal_sort[a23](x0, x1)
equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](cons(x0, x1), nil) → false

Q is empty.

(55) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(cons(x1, x2)) = x1 + x2   
POL(equal_bool(x1, x2)) = 1 + x1 + x2   
POL(equal_sort[a23](x1, x2)) = x1 + x2   
POL(equal_sort[a24](x1, x2)) = x1 + x2   
POL(false) = 0   
POL(isa_true(x1)) = x1   
POL(le(x1, x2)) = x1 + x2   
POL(le'(x1, x2)) = x1 + x2   
POL(min(x1, x2)) = x1 + x2   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(sum(x1, x2)) = x1 + x2   
POL(true) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true


(56) Obligation:

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

le'(s(x56), s(y36)) → le'(x56, y36)
min(s(x36), s(y23)) → min(x36, y23)
le(s(x56), s(y36)) → le(x56, y36)
sum(x95, s(y63)) → s(sum(x95, y63))
isa_true(true) → true
isa_true(false) → false
equal_sort[a23](0, s(x0)) → false
equal_sort[a23](s(x0), 0) → false
equal_sort[a23](s(x0), s(x1)) → equal_sort[a23](x0, x1)
equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](cons(x0, x1), nil) → false

Q is empty.

(57) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(cons(x1, x2)) = x1 + x2   
POL(equal_sort[a23](x1, x2)) = x1 + x2   
POL(equal_sort[a24](x1, x2)) = x1 + x2   
POL(false) = 0   
POL(isa_true(x1)) = 1 + x1   
POL(le(x1, x2)) = x1 + x2   
POL(le'(x1, x2)) = x1 + x2   
POL(min(x1, x2)) = x1 + x2   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(sum(x1, x2)) = x1 + x2   
POL(true) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

isa_true(true) → true
isa_true(false) → false


(58) Obligation:

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

le'(s(x56), s(y36)) → le'(x56, y36)
min(s(x36), s(y23)) → min(x36, y23)
le(s(x56), s(y36)) → le(x56, y36)
sum(x95, s(y63)) → s(sum(x95, y63))
equal_sort[a23](0, s(x0)) → false
equal_sort[a23](s(x0), 0) → false
equal_sort[a23](s(x0), s(x1)) → equal_sort[a23](x0, x1)
equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](cons(x0, x1), nil) → false

Q is empty.

(59) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 2   
POL(cons(x1, x2)) = x1 + x2   
POL(equal_sort[a23](x1, x2)) = x1 + 2·x2   
POL(equal_sort[a24](x1, x2)) = 2·x1 + 2·x2   
POL(false) = 0   
POL(le(x1, x2)) = 2·x1 + x2   
POL(le'(x1, x2)) = 2·x1 + x2   
POL(min(x1, x2)) = x1 + x2   
POL(nil) = 0   
POL(s(x1)) = 2 + x1   
POL(sum(x1, x2)) = 2·x1 + 2·x2   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

le'(s(x56), s(y36)) → le'(x56, y36)
min(s(x36), s(y23)) → min(x36, y23)
le(s(x56), s(y36)) → le(x56, y36)
sum(x95, s(y63)) → s(sum(x95, y63))
equal_sort[a23](0, s(x0)) → false
equal_sort[a23](s(x0), 0) → false
equal_sort[a23](s(x0), s(x1)) → equal_sort[a23](x0, x1)


(60) Obligation:

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

equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](cons(x0, x1), nil) → false

Q is empty.

(61) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(cons(x1, x2)) = x1 + x2   
POL(equal_sort[a24](x1, x2)) = 1 + x1 + x2   
POL(false) = 0   
POL(nil) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](cons(x0, x1), nil) → false


(62) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(63) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(64) TRUE

(65) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(66) TRUE

(67) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(68) TRUE