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:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

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

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

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:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(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(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF2(true, x) → HEAD(x)
IF2(false, x) → SUM(x, cons(0, tail(tail(x))))
IF(false, b, x) → IF2(b, x)
WEIGHT(x) → EMPTY(tail(x))
WEIGHT(x) → EMPTY(x)
WEIGHT(x) → IF(empty(x), empty(tail(x)), x)
SUM(cons(0, x), y) → SUM(x, y)
WEIGHT(x) → TAIL(x)
IF2(false, x) → TAIL(x)
IF2(false, x) → TAIL(tail(x))
SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(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(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF2(true, x) → HEAD(x)
IF2(false, x) → SUM(x, cons(0, tail(tail(x))))
IF(false, b, x) → IF2(b, x)
WEIGHT(x) → EMPTY(tail(x))
WEIGHT(x) → EMPTY(x)
WEIGHT(x) → IF(empty(x), empty(tail(x)), x)
SUM(cons(0, x), y) → SUM(x, y)
WEIGHT(x) → TAIL(x)
IF2(false, x) → TAIL(x)
IF2(false, x) → TAIL(tail(x))
SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(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 2 SCCs with 7 less nodes.

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

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

SUM(cons(0, x), y) → SUM(x, y)
SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(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

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

SUM(cons(0, x), y) → SUM(x, y)
SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

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

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(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.

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(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
                        ↳ UsableRulesReductionPairsProof
              ↳ QDP

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

SUM(cons(0, x), y) → SUM(x, y)
SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

SUM(cons(0, x), y) → SUM(x, y)
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(SUM(x1, x2)) = x1 + 2·x2   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(s(x1)) = x1   



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

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

SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))


Used ordering: POLO with Polynomial interpretation [25]:

POL(SUM(x1, x2)) = 2·x1 + x2   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(s(x1)) = 2 + x1   



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

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

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

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

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF(false, b, x) → IF2(b, x)
WEIGHT(x) → IF(empty(x), empty(tail(x)), x)

The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(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

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

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF(false, b, x) → IF2(b, x)
WEIGHT(x) → IF(empty(x), empty(tail(x)), x)

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(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.

head(cons(x0, x1))
weight(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

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

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF(false, b, x) → IF2(b, x)
WEIGHT(x) → IF(empty(x), empty(tail(x)), x)

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule WEIGHT(x) → IF(empty(x), empty(tail(x)), x) at position [0] we obtained the following new rules:

WEIGHT(cons(x0, x1)) → IF(false, empty(tail(cons(x0, x1))), cons(x0, x1))
WEIGHT(nil) → IF(true, empty(tail(nil)), nil)



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

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

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
WEIGHT(cons(x0, x1)) → IF(false, empty(tail(cons(x0, x1))), cons(x0, x1))
WEIGHT(nil) → IF(true, empty(tail(nil)), nil)
IF(false, b, x) → IF2(b, x)

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

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
                                ↳ Rewriting

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

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
WEIGHT(cons(x0, x1)) → IF(false, empty(tail(cons(x0, x1))), cons(x0, x1))
IF(false, b, x) → IF2(b, x)

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule WEIGHT(cons(x0, x1)) → IF(false, empty(tail(cons(x0, x1))), cons(x0, x1)) at position [1,0] we obtained the following new rules:

WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))



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

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

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF(false, b, x) → IF2(b, x)
WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x))))) at position [0] we obtained the following new rules:

IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
IF2(false, nil) → WEIGHT(sum(nil, cons(0, tail(nil))))



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

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

IF(false, b, x) → IF2(b, x)
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))
IF2(false, nil) → WEIGHT(sum(nil, cons(0, tail(nil))))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(false, nil) → WEIGHT(sum(nil, cons(0, tail(nil)))) at position [0] we obtained the following new rules:

IF2(false, nil) → WEIGHT(cons(0, tail(nil)))



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

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

IF2(false, nil) → WEIGHT(cons(0, tail(nil)))
IF(false, b, x) → IF2(b, x)
WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(false, nil) → WEIGHT(cons(0, tail(nil))) at position [0,1] we obtained the following new rules:

IF2(false, nil) → WEIGHT(cons(0, nil))



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

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

IF(false, b, x) → IF2(b, x)
IF2(false, nil) → WEIGHT(cons(0, nil))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule IF(false, b, x) → IF2(b, x) 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
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
QDP
                                                    ↳ DependencyGraphProof

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

WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
IF2(false, nil) → WEIGHT(cons(0, nil))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

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
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
QDP
                                                        ↳ QDPOrderProof

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

WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

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.


WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))
The remaining pairs can at least be oriented weakly.

IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))
Used ordering: Polynomial interpretation [25,35]:

POL(empty(x1)) = (4)x_1   
POL(IF2(x1, x2)) = 3/2 + (1/2)x_1 + (5/4)x_2   
POL(cons(x1, x2)) = 1/2 + x_1 + (4)x_2   
POL(tail(x1)) = (1/4)x_1   
POL(WEIGHT(x1)) = 1/4 + (4)x_1   
POL(true) = 0   
POL(false) = 1/4   
POL(sum(x1, x2)) = x_2   
POL(s(x1)) = 0   
POL(IF(x1, x2, x3)) = 5/4 + (1/2)x_1 + (2)x_2 + (3/2)x_3   
POL(0) = 0   
POL(nil) = 0   
The value of delta used in the strict ordering is 1/8.
The following usable rules [17] were oriented:

tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
empty(nil) → true
empty(cons(n, x)) → false
sum(nil, y) → y



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

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

IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

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.