(0) Obligation:

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

prod(xs) → prodIter(xs, s(0))
prodIter(xs, x) → ifProd(isempty(xs), xs, x)
ifProd(true, xs, x) → x
ifProd(false, xs, x) → prodIter(tail(xs), times(x, head(xs)))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0, 0)
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
ifTimes(true, x, y, z, u) → z
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

Q is empty.

(1) AAECC Innermost (EQUIVALENT transformation)

We have applied [NOC,AAECCNOC] to switch to innermost. The TRS R 1 is

ifProd(true, xs, x) → x
ifProd(false, xs, x) → prodIter(tail(xs), times(x, head(xs)))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0, 0)
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
ifTimes(true, x, y, z, u) → z
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
prod(xs) → prodIter(xs, s(0))
prodIter(xs, x) → ifProd(isempty(xs), xs, x)

The TRS R 2 is

ab
ac

The signature Sigma is {c, a, b}

(2) Obligation:

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

prod(xs) → prodIter(xs, s(0))
prodIter(xs, x) → ifProd(isempty(xs), xs, x)
ifProd(true, xs, x) → x
ifProd(false, xs, x) → prodIter(tail(xs), times(x, head(xs)))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0, 0)
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
ifTimes(true, x, y, z, u) → z
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

The set Q consists of the following terms:

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

(3) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(4) Obligation:

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

PROD(xs) → PRODITER(xs, s(0))
PRODITER(xs, x) → IFPROD(isempty(xs), xs, x)
PRODITER(xs, x) → ISEMPTY(xs)
IFPROD(false, xs, x) → PRODITER(tail(xs), times(x, head(xs)))
IFPROD(false, xs, x) → TAIL(xs)
IFPROD(false, xs, x) → TIMES(x, head(xs))
IFPROD(false, xs, x) → HEAD(xs)
PLUS(s(x), y) → PLUS(x, y)
TIMES(x, y) → TIMESITER(x, y, 0, 0)
TIMESITER(x, y, z, u) → IFTIMES(ge(u, x), x, y, z, u)
TIMESITER(x, y, z, u) → GE(u, x)
IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u))
IFTIMES(false, x, y, z, u) → PLUS(y, z)
GE(s(x), s(y)) → GE(x, y)

The TRS R consists of the following rules:

prod(xs) → prodIter(xs, s(0))
prodIter(xs, x) → ifProd(isempty(xs), xs, x)
ifProd(true, xs, x) → x
ifProd(false, xs, x) → prodIter(tail(xs), times(x, head(xs)))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0, 0)
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
ifTimes(true, x, y, z, u) → z
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

The set Q consists of the following terms:

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

GE(s(x), s(y)) → GE(x, y)

The TRS R consists of the following rules:

prod(xs) → prodIter(xs, s(0))
prodIter(xs, x) → ifProd(isempty(xs), xs, x)
ifProd(true, xs, x) → x
ifProd(false, xs, x) → prodIter(tail(xs), times(x, head(xs)))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0, 0)
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
ifTimes(true, x, y, z, u) → z
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

The set Q consists of the following terms:

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

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

(8) UsableRulesProof (EQUIVALENT transformation)

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

(9) Obligation:

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

GE(s(x), s(y)) → GE(x, y)

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

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

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

(10) QReductionProof (EQUIVALENT transformation)

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

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

(11) Obligation:

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

GE(s(x), s(y)) → GE(x, y)

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

(12) QDPSizeChangeProof (EQUIVALENT transformation)

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

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

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

(13) TRUE

(14) Obligation:

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

PLUS(s(x), y) → PLUS(x, y)

The TRS R consists of the following rules:

prod(xs) → prodIter(xs, s(0))
prodIter(xs, x) → ifProd(isempty(xs), xs, x)
ifProd(true, xs, x) → x
ifProd(false, xs, x) → prodIter(tail(xs), times(x, head(xs)))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0, 0)
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
ifTimes(true, x, y, z, u) → z
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

The set Q consists of the following terms:

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

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

(15) UsableRulesProof (EQUIVALENT transformation)

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

(16) Obligation:

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

PLUS(s(x), y) → PLUS(x, y)

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

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

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

(17) QReductionProof (EQUIVALENT transformation)

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

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

(18) Obligation:

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

PLUS(s(x), y) → PLUS(x, y)

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

(19) QDPSizeChangeProof (EQUIVALENT transformation)

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

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

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

(20) TRUE

(21) Obligation:

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

IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u))
TIMESITER(x, y, z, u) → IFTIMES(ge(u, x), x, y, z, u)

The TRS R consists of the following rules:

prod(xs) → prodIter(xs, s(0))
prodIter(xs, x) → ifProd(isempty(xs), xs, x)
ifProd(true, xs, x) → x
ifProd(false, xs, x) → prodIter(tail(xs), times(x, head(xs)))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0, 0)
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
ifTimes(true, x, y, z, u) → z
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

The set Q consists of the following terms:

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

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

(22) UsableRulesProof (EQUIVALENT transformation)

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

(23) Obligation:

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

IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u))
TIMESITER(x, y, z, u) → IFTIMES(ge(u, x), x, y, z, u)

The TRS R consists of the following rules:

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

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

(24) QReductionProof (EQUIVALENT transformation)

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

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
a

(25) Obligation:

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

IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u))
TIMESITER(x, y, z, u) → IFTIMES(ge(u, x), x, y, z, u)

The TRS R consists of the following rules:

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(26) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule TIMESITER(x, y, z, u) → IFTIMES(ge(u, x), x, y, z, u) we obtained the following new rules [LPAR04]:

TIMESITER(z0, z1, y_0, s(z3)) → IFTIMES(ge(s(z3), z0), z0, z1, y_0, s(z3))

(27) Obligation:

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

IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u))
TIMESITER(z0, z1, y_0, s(z3)) → IFTIMES(ge(s(z3), z0), z0, z1, y_0, s(z3))

The TRS R consists of the following rules:

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(28) NonInfProof (EQUIVALENT transformation)

The DP Problem is simplified using the Induction Calculus [NONINF] with the following steps:
Note that final constraints are written in bold face.


For Pair IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u)) the following chains were created:
  • We consider the chain TIMESITER(x, y, z, u) → IFTIMES(ge(u, x), x, y, z, u), IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u)) which results in the following constraint:

    (1)    (IFTIMES(ge(x7, x4), x4, x5, x6, x7)=IFTIMES(false, x8, x9, x10, x11) ⇒ IFTIMES(false, x8, x9, x10, x11)≥TIMESITER(x8, x9, plus(x9, x10), s(x11)))



    We simplified constraint (1) using rules (I), (II), (III) which results in the following new constraint:

    (2)    (ge(x7, x4)=falseIFTIMES(false, x4, x5, x6, x7)≥TIMESITER(x4, x5, plus(x5, x6), s(x7)))



    We simplified constraint (2) using rule (V) (with possible (I) afterwards) using induction on ge(x7, x4)=false which results in the following new constraints:

    (3)    (false=falseIFTIMES(false, s(x25), x5, x6, 0)≥TIMESITER(s(x25), x5, plus(x5, x6), s(0)))


    (4)    (ge(x27, x26)=false∧(∀x28,x29:ge(x27, x26)=falseIFTIMES(false, x26, x28, x29, x27)≥TIMESITER(x26, x28, plus(x28, x29), s(x27))) ⇒ IFTIMES(false, s(x26), x5, x6, s(x27))≥TIMESITER(s(x26), x5, plus(x5, x6), s(s(x27))))



    We simplified constraint (3) using rules (I), (II) which results in the following new constraint:

    (5)    (IFTIMES(false, s(x25), x5, x6, 0)≥TIMESITER(s(x25), x5, plus(x5, x6), s(0)))



    We simplified constraint (4) using rule (VI) where we applied the induction hypothesis (∀x28,x29:ge(x27, x26)=falseIFTIMES(false, x26, x28, x29, x27)≥TIMESITER(x26, x28, plus(x28, x29), s(x27))) with σ = [x28 / x5, x29 / x6] which results in the following new constraint:

    (6)    (IFTIMES(false, x26, x5, x6, x27)≥TIMESITER(x26, x5, plus(x5, x6), s(x27)) ⇒ IFTIMES(false, s(x26), x5, x6, s(x27))≥TIMESITER(s(x26), x5, plus(x5, x6), s(s(x27))))







For Pair TIMESITER(x, y, z, u) → IFTIMES(ge(u, x), x, y, z, u) the following chains were created:
  • We consider the chain IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u)), TIMESITER(x, y, z, u) → IFTIMES(ge(u, x), x, y, z, u) which results in the following constraint:

    (7)    (TIMESITER(x12, x13, plus(x13, x14), s(x15))=TIMESITER(x16, x17, x18, x19) ⇒ TIMESITER(x16, x17, x18, x19)≥IFTIMES(ge(x19, x16), x16, x17, x18, x19))



    We simplified constraint (7) using rules (I), (II), (III), (IV) which results in the following new constraint:

    (8)    (TIMESITER(x12, x13, x18, s(x15))≥IFTIMES(ge(s(x15), x12), x12, x13, x18, s(x15)))







To summarize, we get the following constraints P for the following pairs.
  • IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u))
    • (IFTIMES(false, s(x25), x5, x6, 0)≥TIMESITER(s(x25), x5, plus(x5, x6), s(0)))
    • (IFTIMES(false, x26, x5, x6, x27)≥TIMESITER(x26, x5, plus(x5, x6), s(x27)) ⇒ IFTIMES(false, s(x26), x5, x6, s(x27))≥TIMESITER(s(x26), x5, plus(x5, x6), s(s(x27))))

  • TIMESITER(x, y, z, u) → IFTIMES(ge(u, x), x, y, z, u)
    • (TIMESITER(x12, x13, x18, s(x15))≥IFTIMES(ge(s(x15), x12), x12, x13, x18, s(x15)))




The constraints for P> respective Pbound are constructed from P where we just replace every occurence of "t ≥ s" in P by "t > s" respective "t ≥ c". Here c stands for the fresh constant used for Pbound.
Using the following integer polynomial ordering the resulting constraints can be solved
Polynomial interpretation [NONINF]:

POL(0) = 0   
POL(IFTIMES(x1, x2, x3, x4, x5)) = -1 - x1 + x2 - x5   
POL(TIMESITER(x1, x2, x3, x4)) = -1 + x1 - x4   
POL(c) = -2   
POL(false) = 0   
POL(ge(x1, x2)) = 0   
POL(plus(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   
POL(true) = 1   

The following pairs are in P>:

IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u))
The following pairs are in Pbound:

IFTIMES(false, x, y, z, u) → TIMESITER(x, y, plus(y, z), s(u))
The following rules are usable:

falsege(0, s(y))
truege(x, 0)
ge(x, y) → ge(s(x), s(y))

(29) Obligation:

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

TIMESITER(x, y, z, u) → IFTIMES(ge(u, x), x, y, z, u)

The TRS R consists of the following rules:

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(30) DependencyGraphProof (EQUIVALENT transformation)

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

(31) TRUE

(32) Obligation:

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

IFPROD(false, xs, x) → PRODITER(tail(xs), times(x, head(xs)))
PRODITER(xs, x) → IFPROD(isempty(xs), xs, x)

The TRS R consists of the following rules:

prod(xs) → prodIter(xs, s(0))
prodIter(xs, x) → ifProd(isempty(xs), xs, x)
ifProd(true, xs, x) → x
ifProd(false, xs, x) → prodIter(tail(xs), times(x, head(xs)))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0, 0)
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
ifTimes(true, x, y, z, u) → z
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
isempty(nil) → true
isempty(cons(x, xs)) → false
head(nil) → error
head(cons(x, xs)) → x
tail(nil) → nil
tail(cons(x, xs)) → xs
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ab
ac

The set Q consists of the following terms:

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

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

(33) UsableRulesProof (EQUIVALENT transformation)

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

(34) Obligation:

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

IFPROD(false, xs, x) → PRODITER(tail(xs), times(x, head(xs)))
PRODITER(xs, x) → IFPROD(isempty(xs), xs, x)

The TRS R consists of the following rules:

isempty(nil) → true
isempty(cons(x, xs)) → false
tail(nil) → nil
tail(cons(x, xs)) → xs
head(nil) → error
head(cons(x, xs)) → x
times(x, y) → timesIter(x, y, 0, 0)
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ifTimes(true, x, y, z, u) → z

The set Q consists of the following terms:

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a

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

(35) QReductionProof (EQUIVALENT transformation)

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

prod(x0)
prodIter(x0, x1)
ifProd(true, x0, x1)
ifProd(false, x0, x1)
a

(36) Obligation:

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

IFPROD(false, xs, x) → PRODITER(tail(xs), times(x, head(xs)))
PRODITER(xs, x) → IFPROD(isempty(xs), xs, x)

The TRS R consists of the following rules:

isempty(nil) → true
isempty(cons(x, xs)) → false
tail(nil) → nil
tail(cons(x, xs)) → xs
head(nil) → error
head(cons(x, xs)) → x
times(x, y) → timesIter(x, y, 0, 0)
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ifTimes(true, x, y, z, u) → z

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(37) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IFPROD(false, xs, x) → PRODITER(tail(xs), times(x, head(xs)))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO,RATPOLO]:

POL(IFPROD(x1, x2, x3)) = 1/2 + (1/4)x1 + (1/4)x2   
POL(false) = 2   
POL(PRODITER(x1, x2)) = 3/4 + (1/2)x1   
POL(tail(x1)) = 1/4 + (1/2)x1   
POL(times(x1, x2)) = 1/4 + (1/2)x1   
POL(head(x1)) = 5/2 + (1/2)x1   
POL(isempty(x1)) = 1 + (1/4)x1   
POL(ifTimes(x1, x2, x3, x4, x5)) = 13/4 + (5/4)x1 + (5/2)x2 + (4)x3 + (5/4)x4 + (7/4)x5   
POL(true) = 3/4   
POL(ge(x1, x2)) = 4 + (2)x1 + (7/4)x2   
POL(s(x1)) = 13/4 + (1/2)x1   
POL(0) = 15/4   
POL(timesIter(x1, x2, x3, x4)) = 15/4 + (15/4)x1 + (13/4)x2 + (4)x4   
POL(plus(x1, x2)) = 0   
POL(nil) = 1/2   
POL(error) = 3/4   
POL(cons(x1, x2)) = 4 + (1/4)x1 + (2)x2   
The value of delta used in the strict ordering is 1/8.
The following usable rules [FROCOS05] were oriented:

isempty(nil) → true
isempty(cons(x, xs)) → false
tail(nil) → nil
tail(cons(x, xs)) → xs

(38) Obligation:

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

PRODITER(xs, x) → IFPROD(isempty(xs), xs, x)

The TRS R consists of the following rules:

isempty(nil) → true
isempty(cons(x, xs)) → false
tail(nil) → nil
tail(cons(x, xs)) → xs
head(nil) → error
head(cons(x, xs)) → x
times(x, y) → timesIter(x, y, 0, 0)
ifTimes(false, x, y, z, u) → timesIter(x, y, plus(y, z), s(u))
timesIter(x, y, z, u) → ifTimes(ge(u, x), x, y, z, u)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
ifTimes(true, x, y, z, u) → z

The set Q consists of the following terms:

plus(0, x0)
plus(s(x0), x1)
times(x0, x1)
timesIter(x0, x1, x2, x3)
ifTimes(true, x0, x1, x2, x3)
ifTimes(false, x0, x1, x2, x3)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(39) DependencyGraphProof (EQUIVALENT transformation)

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

(40) TRUE