(0) Obligation:

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

car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0) → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0), shorter(l, s(0)), l)
if(true, b, l) → s(0)
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

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:

car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0) → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0), shorter(l, s(0)), l)
if(true, b, l) → s(0)
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, 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:

PLUS(x, y) → IFPLUS(isZero(x), x, y)
PLUS(x, y) → ISZERO(x)
IFPLUS(false, x, y) → PLUS(p(x), y)
IFPLUS(false, x, y) → P(x)
TIMES(x, y) → IFTIMES(isZero(x), x, y)
TIMES(x, y) → ISZERO(x)
IFTIMES(false, x, y) → PLUS(y, times(p(x), y))
IFTIMES(false, x, y) → TIMES(p(x), y)
IFTIMES(false, x, y) → P(x)
SHORTER(cons(x, l), s(y)) → SHORTER(l, y)
PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l)
PROD(l) → SHORTER(l, 0)
PROD(l) → SHORTER(l, s(0))
IF(false, b, l) → IF2(b, l)
IF2(true, l) → CAR(l)
IF2(false, l) → PROD(cons(times(car(l), cadr(l)), cddr(l)))
IF2(false, l) → TIMES(car(l), cadr(l))
IF2(false, l) → CAR(l)
IF2(false, l) → CADR(l)
IF2(false, l) → CDDR(l)

The TRS R consists of the following rules:

car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0) → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0), shorter(l, s(0)), l)
if(true, b, l) → s(0)
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, 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 4 SCCs with 12 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

SHORTER(cons(x, l), s(y)) → SHORTER(l, y)

The TRS R consists of the following rules:

car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0) → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0), shorter(l, s(0)), l)
if(true, b, l) → s(0)
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

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:

SHORTER(cons(x, l), s(y)) → SHORTER(l, y)

R is empty.
The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

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].

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

(11) Obligation:

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

SHORTER(cons(x, l), s(y)) → SHORTER(l, y)

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:

  • SHORTER(cons(x, l), s(y)) → SHORTER(l, y)
    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:

IFPLUS(false, x, y) → PLUS(p(x), y)
PLUS(x, y) → IFPLUS(isZero(x), x, y)

The TRS R consists of the following rules:

car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0) → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0), shorter(l, s(0)), l)
if(true, b, l) → s(0)
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

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:

IFPLUS(false, x, y) → PLUS(p(x), y)
PLUS(x, y) → IFPLUS(isZero(x), x, y)

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

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].

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

(18) Obligation:

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

IFPLUS(false, x, y) → PLUS(p(x), y)
PLUS(x, y) → IFPLUS(isZero(x), x, y)

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

isZero(0)
isZero(s(x0))
p(s(x0))
p(0)

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

(19) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PLUS(x, y) → IFPLUS(isZero(x), x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO,RATPOLO]:

POL(IFPLUS(x1, x2, x3)) = x1 + (1/2)x2   
POL(false) = 1/2   
POL(PLUS(x1, x2)) = 1/2 + (3/4)x1   
POL(p(x1)) = (1/4)x1   
POL(isZero(x1)) = (1/4)x1   
POL(s(x1)) = 15/4 + (4)x1   
POL(0) = 0   
POL(true) = 0   
The value of delta used in the strict ordering is 1/2.
The following usable rules [FROCOS05] were oriented:

p(s(x)) → x
p(0) → 0
isZero(0) → true
isZero(s(x)) → false

(20) Obligation:

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

IFPLUS(false, x, y) → PLUS(p(x), y)

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

isZero(0)
isZero(s(x0))
p(s(x0))
p(0)

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

(21) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(22) TRUE

(23) Obligation:

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

IFTIMES(false, x, y) → TIMES(p(x), y)
TIMES(x, y) → IFTIMES(isZero(x), x, y)

The TRS R consists of the following rules:

car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0) → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0), shorter(l, s(0)), l)
if(true, b, l) → s(0)
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

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

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

(25) Obligation:

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

IFTIMES(false, x, y) → TIMES(p(x), y)
TIMES(x, y) → IFTIMES(isZero(x), x, y)

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

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

(26) 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].

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

(27) Obligation:

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

IFTIMES(false, x, y) → TIMES(p(x), y)
TIMES(x, y) → IFTIMES(isZero(x), x, y)

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

isZero(0)
isZero(s(x0))
p(s(x0))
p(0)

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.


IFTIMES(false, x, y) → TIMES(p(x), y)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO,RATPOLO]:

POL(IFTIMES(x1, x2, x3)) = (1/4)x1 + (1/2)x2   
POL(false) = 1/4   
POL(TIMES(x1, x2)) = (3/4)x1   
POL(p(x1)) = (1/4)x1   
POL(isZero(x1)) = x1   
POL(0) = 0   
POL(true) = 0   
POL(s(x1)) = 1/4 + (4)x1   
The value of delta used in the strict ordering is 1/16.
The following usable rules [FROCOS05] were oriented:

isZero(0) → true
isZero(s(x)) → false
p(s(x)) → x
p(0) → 0

(29) Obligation:

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

TIMES(x, y) → IFTIMES(isZero(x), x, y)

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

isZero(0)
isZero(s(x0))
p(s(x0))
p(0)

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

(30) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(31) TRUE

(32) Obligation:

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

IF2(false, l) → PROD(cons(times(car(l), cadr(l)), cddr(l)))
PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l)
IF(false, b, l) → IF2(b, l)

The TRS R consists of the following rules:

car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0) → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0), shorter(l, s(0)), l)
if(true, b, l) → s(0)
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

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

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

(34) Obligation:

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

IF2(false, l) → PROD(cons(times(car(l), cadr(l)), cddr(l)))
PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l)
IF(false, b, l) → IF2(b, l)

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
car(cons(x, l)) → x
cadr(cons(x, cons(y, l))) → y
times(x, y) → iftimes(isZero(x), x, y)
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))
prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

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

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

prod(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

(36) Obligation:

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

IF2(false, l) → PROD(cons(times(car(l), cadr(l)), cddr(l)))
PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l)
IF(false, b, l) → IF2(b, l)

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
car(cons(x, l)) → x
cadr(cons(x, cons(y, l))) → y
times(x, y) → iftimes(isZero(x), x, y)
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(37) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l) we obtained the following new rules [LPAR04]:

PROD(cons(y_2, y_3)) → IF(shorter(cons(y_2, y_3), 0), shorter(cons(y_2, y_3), s(0)), cons(y_2, y_3))

(38) Obligation:

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

IF2(false, l) → PROD(cons(times(car(l), cadr(l)), cddr(l)))
IF(false, b, l) → IF2(b, l)
PROD(cons(y_2, y_3)) → IF(shorter(cons(y_2, y_3), 0), shorter(cons(y_2, y_3), s(0)), cons(y_2, y_3))

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
car(cons(x, l)) → x
cadr(cons(x, cons(y, l))) → y
times(x, y) → iftimes(isZero(x), x, y)
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(39) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule IF2(false, l) → PROD(cons(times(car(l), cadr(l)), cddr(l))) at position [0,0] we obtained the following new rules [LPAR04]:

IF2(false, l) → PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l)))

(40) Obligation:

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

PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l)
IF(false, b, l) → IF2(b, l)
IF2(false, l) → PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l)))

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
car(cons(x, l)) → x
cadr(cons(x, cons(y, l))) → y
times(x, y) → iftimes(isZero(x), x, y)
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(41) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l) we obtained the following new rules [LPAR04]:

PROD(cons(y_4, y_5)) → IF(shorter(cons(y_4, y_5), 0), shorter(cons(y_4, y_5), s(0)), cons(y_4, y_5))

(42) Obligation:

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

IF(false, b, l) → IF2(b, l)
IF2(false, l) → PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l)))
PROD(cons(y_4, y_5)) → IF(shorter(cons(y_4, y_5), 0), shorter(cons(y_4, y_5), s(0)), cons(y_4, y_5))

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
car(cons(x, l)) → x
cadr(cons(x, cons(y, l))) → y
times(x, y) → iftimes(isZero(x), x, y)
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(43) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l) at position [0] we obtained the following new rules [LPAR04]:

PROD(nil) → IF(true, shorter(nil, s(0)), nil)
PROD(cons(x0, x1)) → IF(false, shorter(cons(x0, x1), s(0)), cons(x0, x1))

(44) Obligation:

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

IF(false, b, l) → IF2(b, l)
IF2(false, l) → PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l)))
PROD(nil) → IF(true, shorter(nil, s(0)), nil)
PROD(cons(x0, x1)) → IF(false, shorter(cons(x0, x1), s(0)), cons(x0, x1))

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
car(cons(x, l)) → x
cadr(cons(x, cons(y, l))) → y
times(x, y) → iftimes(isZero(x), x, y)
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(45) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(46) Obligation:

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

IF2(false, l) → PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l)))
PROD(cons(x0, x1)) → IF(false, shorter(cons(x0, x1), s(0)), cons(x0, x1))
IF(false, b, l) → IF2(b, l)

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
car(cons(x, l)) → x
cadr(cons(x, cons(y, l))) → y
times(x, y) → iftimes(isZero(x), x, y)
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(47) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule PROD(cons(x0, x1)) → IF(false, shorter(cons(x0, x1), s(0)), cons(x0, x1)) at position [1] we obtained the following new rules [LPAR04]:

PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))

(48) Obligation:

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

IF2(false, l) → PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l)))
IF(false, b, l) → IF2(b, l)
PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
car(cons(x, l)) → x
cadr(cons(x, cons(y, l))) → y
times(x, y) → iftimes(isZero(x), x, y)
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

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

(50) Obligation:

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

IF2(false, l) → PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l)))
IF(false, b, l) → IF2(b, l)
PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
car(cons(x, l)) → x
isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(51) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF(false, b, l) → IF2(b, l) we obtained the following new rules [LPAR04]:

IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))

(52) Obligation:

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

IF2(false, l) → PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l)))
PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
car(cons(x, l)) → x
isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(53) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF2(false, l) → PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l))) we obtained the following new rules [LPAR04]:

IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(car(cons(z1, z2))), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2))))

(54) Obligation:

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

PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))
IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(car(cons(z1, z2))), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2))))

The TRS R consists of the following rules:

shorter(nil, y) → true
shorter(cons(x, l), 0) → false
car(cons(x, l)) → x
isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

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

(56) Obligation:

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

PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))
IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(car(cons(z1, z2))), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2))))

The TRS R consists of the following rules:

car(cons(x, l)) → x
isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
shorter(nil, y) → true
shorter(cons(x, l), 0) → false

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(57) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(car(cons(z1, z2))), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2)))) at position [0,0,0,0] we obtained the following new rules [LPAR04]:

IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2))))

(58) Obligation:

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

PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))
IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2))))

The TRS R consists of the following rules:

car(cons(x, l)) → x
isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
shorter(nil, y) → true
shorter(cons(x, l), 0) → false

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(59) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2)))) at position [0,0,1] we obtained the following new rules [LPAR04]:

IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2))))

(60) Obligation:

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

PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))
IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2))))

The TRS R consists of the following rules:

car(cons(x, l)) → x
isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
shorter(nil, y) → true
shorter(cons(x, l), 0) → false

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

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

(62) Obligation:

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

PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))
IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2))))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
shorter(nil, y) → true
shorter(cons(x, l), 0) → false

The set Q consists of the following terms:

car(cons(x0, x1))
cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(63) 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].

car(cons(x0, x1))

(64) Obligation:

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

PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))
IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2))))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
shorter(nil, y) → true
shorter(cons(x, l), 0) → false

The set Q consists of the following terms:

cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(65) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1)) we obtained the following new rules [LPAR04]:

IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))

(66) Obligation:

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

PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1))
IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2))))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
shorter(nil, y) → true
shorter(cons(x, l), 0) → false

The set Q consists of the following terms:

cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(67) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1)) at position [1] we obtained the following new rules [LPAR04]:

PROD(cons(y0, nil)) → IF(false, true, cons(y0, nil))
PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))

(68) Obligation:

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

IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2))))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
PROD(cons(y0, nil)) → IF(false, true, cons(y0, nil))
PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
shorter(nil, y) → true
shorter(cons(x, l), 0) → false

The set Q consists of the following terms:

cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(69) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(70) Obligation:

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

PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2))))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
shorter(nil, y) → true
shorter(cons(x, l), 0) → false

The set Q consists of the following terms:

cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

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

(72) Obligation:

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

PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2))))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)
shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

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

(73) 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].

shorter(nil, x0)
shorter(cons(x0, x1), 0)
shorter(cons(x0, x1), s(x2))

(74) Obligation:

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

PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2))))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)

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

(75) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))) at position [0,1] we obtained the following new rules [LPAR04]:

IF2(false, cons(x0, nil)) → PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, nil))), nil))
IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2))

(76) Obligation:

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

PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
IF2(false, cons(x0, nil)) → PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, nil))), nil))
IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)

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

(77) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(78) Obligation:

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

IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2))
PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)

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

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

(80) Obligation:

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

IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2))
PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))
cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)

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

(81) 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].

cddr(nil)
cddr(cons(x0, nil))
cddr(cons(x0, cons(x1, x2)))

(82) Obligation:

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

IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2))
PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)

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

(83) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2)) at position [0,0,2] we obtained the following new rules [LPAR04]:

IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, x1), x2))

(84) Obligation:

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

IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, x1), x2))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
cadr(cons(x, cons(y, l))) → y
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)

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

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

(86) Obligation:

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

IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, x1), x2))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

cadr(cons(x0, cons(x1, x2)))
isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)

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

(87) 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].

cadr(cons(x0, cons(x1, x2)))

(88) Obligation:

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

IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))
PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, x1), x2))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)

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

(89) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2)) we obtained the following new rules [LPAR04]:

IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))

(90) Obligation:

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

PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, x1), x2))
IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)

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

(91) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF2(false, cons(x0, cons(x1, x2))) → PROD(cons(iftimes(isZero(x0), x0, x1), x2))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 1   
POL(IF(x1, x2, x3)) = 1 + x3   
POL(IF2(x1, x2)) = 1 + x2   
POL(PROD(x1)) = 1 + x1   
POL(cons(x1, x2)) = 1 + x2   
POL(false) = 0   
POL(ifplus(x1, x2, x3)) = 0   
POL(iftimes(x1, x2, x3)) = 0   
POL(isZero(x1)) = x1   
POL(p(x1)) = 0   
POL(plus(x1, x2)) = 0   
POL(s(x1)) = 0   
POL(times(x1, x2)) = 0   
POL(true) = 0   

The following usable rules [FROCOS05] were oriented: none

(92) Obligation:

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

PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))

The TRS R consists of the following rules:

isZero(0) → true
isZero(s(x)) → false
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
times(x, y) → iftimes(isZero(x), x, y)
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))

The set Q consists of the following terms:

isZero(0)
isZero(s(x0))
plus(x0, x1)
ifplus(true, x0, x1)
ifplus(false, x0, x1)
times(x0, x1)
iftimes(true, x0, x1)
iftimes(false, x0, x1)
p(s(x0))
p(0)

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

(93) DependencyGraphProof (EQUIVALENT transformation)

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

(94) TRUE