Termination w.r.t. Q of the following Term Rewriting System could be proven:

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.


QTRS
  ↳ Overlay + Local Confluence

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.

The TRS is overlay and locally confluent. By [19] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

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)


Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

IF2(true, l) → CAR(l)
IF2(false, l) → PROD(cons(times(car(l), cadr(l)), cddr(l)))
PLUS(x, y) → IFPLUS(isZero(x), x, y)
IF(false, b, l) → IF2(b, l)
IF2(false, l) → CAR(l)
TIMES(x, y) → ISZERO(x)
IFTIMES(false, x, y) → PLUS(y, times(p(x), y))
PLUS(x, y) → ISZERO(x)
TIMES(x, y) → IFTIMES(isZero(x), x, y)
PROD(l) → SHORTER(l, s(0))
IF2(false, l) → TIMES(car(l), cadr(l))
PROD(l) → SHORTER(l, 0)
IFPLUS(false, x, y) → PLUS(p(x), y)
SHORTER(cons(x, l), s(y)) → SHORTER(l, y)
PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l)
IF2(false, l) → CADR(l)
IFPLUS(false, x, y) → P(x)
IFTIMES(false, x, y) → P(x)
IFTIMES(false, x, y) → TIMES(p(x), y)
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.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

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

IF2(true, l) → CAR(l)
IF2(false, l) → PROD(cons(times(car(l), cadr(l)), cddr(l)))
PLUS(x, y) → IFPLUS(isZero(x), x, y)
IF(false, b, l) → IF2(b, l)
IF2(false, l) → CAR(l)
TIMES(x, y) → ISZERO(x)
IFTIMES(false, x, y) → PLUS(y, times(p(x), y))
PLUS(x, y) → ISZERO(x)
TIMES(x, y) → IFTIMES(isZero(x), x, y)
PROD(l) → SHORTER(l, s(0))
IF2(false, l) → TIMES(car(l), cadr(l))
PROD(l) → SHORTER(l, 0)
IFPLUS(false, x, y) → PLUS(p(x), y)
SHORTER(cons(x, l), s(y)) → SHORTER(l, y)
PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l)
IF2(false, l) → CADR(l)
IFPLUS(false, x, y) → P(x)
IFTIMES(false, x, y) → P(x)
IFTIMES(false, x, y) → TIMES(p(x), y)
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.
The approximation of the Dependency Graph [15,17,22] contains 4 SCCs with 12 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

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.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

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)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

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.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP

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

PLUS(x, y) → IFPLUS(isZero(x), x, y)
IFPLUS(false, x, y) → PLUS(p(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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP

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

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

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
isZero(0) → true
isZero(s(x)) → 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))
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.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

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)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ Narrowing
              ↳ QDP
              ↳ QDP

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

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

The TRS R consists of the following rules:

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

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.
By narrowing [15] the rule PLUS(x, y) → IFPLUS(isZero(x), x, y) at position [0] we obtained the following new rules:

PLUS(s(x0), y1) → IFPLUS(false, s(x0), y1)
PLUS(0, y1) → IFPLUS(true, 0, y1)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ DependencyGraphProof
              ↳ QDP
              ↳ QDP

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

PLUS(s(x0), y1) → IFPLUS(false, s(x0), y1)
IFPLUS(false, x, y) → PLUS(p(x), y)
PLUS(0, y1) → IFPLUS(true, 0, y1)

The TRS R consists of the following rules:

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

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.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
QDP
                                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP

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

PLUS(s(x0), y1) → IFPLUS(false, s(x0), y1)
IFPLUS(false, x, y) → PLUS(p(x), y)

The TRS R consists of the following rules:

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

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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP

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

PLUS(s(x0), y1) → IFPLUS(false, s(x0), y1)
IFPLUS(false, x, y) → PLUS(p(x), y)

The TRS R consists of the following rules:

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.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

isZero(0)
isZero(s(x0))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ Narrowing
              ↳ QDP
              ↳ QDP

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

PLUS(s(x0), y1) → IFPLUS(false, s(x0), y1)
IFPLUS(false, x, y) → PLUS(p(x), y)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule IFPLUS(false, x, y) → PLUS(p(x), y) at position [0] we obtained the following new rules:

IFPLUS(false, s(x0), y1) → PLUS(x0, y1)
IFPLUS(false, 0, y1) → PLUS(0, y1)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ DependencyGraphProof
              ↳ QDP
              ↳ QDP

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

PLUS(s(x0), y1) → IFPLUS(false, s(x0), y1)
IFPLUS(false, 0, y1) → PLUS(0, y1)
IFPLUS(false, s(x0), y1) → PLUS(x0, y1)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
QDP
                                                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP

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

PLUS(s(x0), y1) → IFPLUS(false, s(x0), y1)
IFPLUS(false, s(x0), y1) → PLUS(x0, y1)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ UsableRulesProof
QDP
                                                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP

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

PLUS(s(x0), y1) → IFPLUS(false, s(x0), y1)
IFPLUS(false, s(x0), y1) → PLUS(x0, y1)

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

p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

p(s(x0))
p(0)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ UsableRulesProof
                                                  ↳ QDP
                                                    ↳ QReductionProof
QDP
                                                        ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP

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

PLUS(s(x0), y1) → IFPLUS(false, s(x0), y1)
IFPLUS(false, s(x0), y1) → PLUS(x0, y1)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP

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

TIMES(x, y) → IFTIMES(isZero(x), x, y)
IFTIMES(false, x, y) → TIMES(p(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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP

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

TIMES(x, y) → IFTIMES(isZero(x), x, y)
IFTIMES(false, x, y) → TIMES(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:

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.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

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)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ Narrowing
              ↳ QDP

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

TIMES(x, y) → IFTIMES(isZero(x), x, y)
IFTIMES(false, x, y) → TIMES(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.
By narrowing [15] the rule TIMES(x, y) → IFTIMES(isZero(x), x, y) at position [0] we obtained the following new rules:

TIMES(0, y1) → IFTIMES(true, 0, y1)
TIMES(s(x0), y1) → IFTIMES(false, s(x0), y1)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ DependencyGraphProof
              ↳ QDP

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

TIMES(0, y1) → IFTIMES(true, 0, y1)
TIMES(s(x0), y1) → IFTIMES(false, s(x0), y1)
IFTIMES(false, x, y) → TIMES(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.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
QDP
                                ↳ UsableRulesProof
              ↳ QDP

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

IFTIMES(false, x, y) → TIMES(p(x), y)
TIMES(s(x0), y1) → IFTIMES(false, s(x0), y1)

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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof
              ↳ QDP

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

IFTIMES(false, x, y) → TIMES(p(x), y)
TIMES(s(x0), y1) → IFTIMES(false, s(x0), y1)

The TRS R consists of the following rules:

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.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

isZero(0)
isZero(s(x0))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ Narrowing
              ↳ QDP

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

TIMES(s(x0), y1) → IFTIMES(false, s(x0), y1)
IFTIMES(false, x, y) → TIMES(p(x), y)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule IFTIMES(false, x, y) → TIMES(p(x), y) at position [0] we obtained the following new rules:

IFTIMES(false, 0, y1) → TIMES(0, y1)
IFTIMES(false, s(x0), y1) → TIMES(x0, y1)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ DependencyGraphProof
              ↳ QDP

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

IFTIMES(false, 0, y1) → TIMES(0, y1)
IFTIMES(false, s(x0), y1) → TIMES(x0, y1)
TIMES(s(x0), y1) → IFTIMES(false, s(x0), y1)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
QDP
                                                ↳ UsableRulesProof
              ↳ QDP

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

IFTIMES(false, s(x0), y1) → TIMES(x0, y1)
TIMES(s(x0), y1) → IFTIMES(false, s(x0), y1)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0

The set Q consists of the following terms:

p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ UsableRulesProof
QDP
                                                    ↳ QReductionProof
              ↳ QDP

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

IFTIMES(false, s(x0), y1) → TIMES(x0, y1)
TIMES(s(x0), y1) → IFTIMES(false, s(x0), y1)

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

p(s(x0))
p(0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

p(s(x0))
p(0)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ UsableRulesProof
                                                  ↳ QDP
                                                    ↳ QReductionProof
QDP
                                                        ↳ QDPSizeChangeProof
              ↳ QDP

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

IFTIMES(false, s(x0), y1) → TIMES(x0, y1)
TIMES(s(x0), y1) → IFTIMES(false, s(x0), y1)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof

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(l) → IF(shorter(l, 0), shorter(l, s(0)), 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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof

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(l) → IF(shorter(l, 0), shorter(l, s(0)), 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.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ Rewriting

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.
By rewriting [15] the rule IF2(false, l) → PROD(cons(times(car(l), cadr(l)), cddr(l))) at position [0,0] we obtained the following new rules:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
QDP
                            ↳ Narrowing

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(l) → IF(shorter(l, 0), shorter(l, s(0)), 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.
By narrowing [15] the rule PROD(l) → IF(shorter(l, 0), shorter(l, s(0)), l) at position [0] we obtained the following new rules:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ DependencyGraphProof

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(nil) → IF(true, shorter(nil, s(0)), nil)
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.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
QDP
                                    ↳ Rewriting

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.
By rewriting [15] 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:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
QDP
                                        ↳ UsableRulesProof

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, 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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
QDP
                                            ↳ Instantiation

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, b, l) → IF2(b, l)

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.
By instantiating [15] the rule IF(false, b, l) → IF2(b, l) we obtained the following new rules:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
QDP
                                                ↳ Instantiation

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.
By instantiating [15] the rule IF2(false, l) → PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l))) we obtained the following new rules:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
QDP
                                                    ↳ UsableRulesProof

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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
QDP
                                                        ↳ Rewriting

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(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.
By rewriting [15] 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:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
QDP
                                                            ↳ Rewriting

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

IF2(false, cons(z1, z2)) → PROD(cons(iftimes(isZero(z1), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2))))
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(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.
By rewriting [15] 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:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
QDP
                                                                ↳ UsableRulesProof

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, 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(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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
QDP
                                                                    ↳ QReductionProof

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, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))

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.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

car(cons(x0, x1))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
QDP
                                                                        ↳ ForwardInstantiation

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, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))

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.
By forward instantiating [14] the rule IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1)) we obtained the following new rules:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
QDP
                                                                            ↳ Narrowing

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.
By narrowing [15] the rule PROD(cons(x0, x1)) → IF(false, shorter(x1, 0), cons(x0, x1)) at position [1] we obtained the following new rules:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
QDP
                                                                                ↳ DependencyGraphProof

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

PROD(cons(y0, nil)) → IF(false, true, cons(y0, nil))
PROD(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, 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.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
QDP
                                                                                    ↳ UsableRulesProof

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(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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
QDP
                                                                                        ↳ QReductionProof

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

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.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ QReductionProof
QDP
                                                                                            ↳ Narrowing

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

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.
By narrowing [15] 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:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ QReductionProof
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
QDP
                                                                                                ↳ DependencyGraphProof

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

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.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ QReductionProof
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
QDP
                                                                                                    ↳ UsableRulesProof

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, cadr(cons(x0, cons(x1, x2)))), x2))
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))

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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ QReductionProof
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
QDP
                                                                                                        ↳ QReductionProof

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, cadr(cons(x0, cons(x1, x2)))), x2))
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))
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.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ QReductionProof
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
                                                                                                      ↳ QDP
                                                                                                        ↳ QReductionProof
QDP
                                                                                                            ↳ Rewriting

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, cadr(cons(x0, cons(x1, x2)))), x2))
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))
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.
By rewriting [15] 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:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ QReductionProof
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
                                                                                                      ↳ QDP
                                                                                                        ↳ QReductionProof
                                                                                                          ↳ QDP
                                                                                                            ↳ Rewriting
QDP
                                                                                                                ↳ UsableRulesProof

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(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))
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.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ QReductionProof
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
                                                                                                      ↳ QDP
                                                                                                        ↳ QReductionProof
                                                                                                          ↳ QDP
                                                                                                            ↳ Rewriting
                                                                                                              ↳ QDP
                                                                                                                ↳ UsableRulesProof
QDP
                                                                                                                    ↳ QReductionProof

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(x1, x2)) → IF2(false, cons(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.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ QReductionProof
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
                                                                                                      ↳ QDP
                                                                                                        ↳ QReductionProof
                                                                                                          ↳ QDP
                                                                                                            ↳ Rewriting
                                                                                                              ↳ QDP
                                                                                                                ↳ UsableRulesProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ QReductionProof
QDP
                                                                                                                        ↳ Instantiation

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(x1, x2)) → IF2(false, cons(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.
By instantiating [15] the rule IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2)) we obtained the following new rules:

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



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ QReductionProof
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
                                                                                                      ↳ QDP
                                                                                                        ↳ QReductionProof
                                                                                                          ↳ QDP
                                                                                                            ↳ Rewriting
                                                                                                              ↳ QDP
                                                                                                                ↳ UsableRulesProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ QReductionProof
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Instantiation
QDP
                                                                                                                            ↳ QDPOrderProof

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)))
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.
We use the reduction pair processor [15].


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.

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)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 1   
POL(IF(x1, x2, x3)) = x3   
POL(IF2(x1, x2)) = x2   
POL(PROD(x1)) = 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)) = 1 + x1   
POL(plus(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   
POL(times(x1, x2)) = 0   
POL(true) = 0   

The following usable rules [17] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ UsableRulesProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ UsableRulesProof
                                                                  ↳ QDP
                                                                    ↳ QReductionProof
                                                                      ↳ QDP
                                                                        ↳ ForwardInstantiation
                                                                          ↳ QDP
                                                                            ↳ Narrowing
                                                                              ↳ QDP
                                                                                ↳ DependencyGraphProof
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ QReductionProof
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
                                                                                                      ↳ QDP
                                                                                                        ↳ QReductionProof
                                                                                                          ↳ QDP
                                                                                                            ↳ Rewriting
                                                                                                              ↳ QDP
                                                                                                                ↳ UsableRulesProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ QReductionProof
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Instantiation
                                                                                                                          ↳ QDP
                                                                                                                            ↳ QDPOrderProof
QDP
                                                                                                                                ↳ DependencyGraphProof

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.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 2 less nodes.