(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)
a → b
a → c
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
a → b
a → c
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)
a → b
a → c
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)
a → b
a → c
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)
a → b
a → c
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) 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)
a → b
a → c
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.
(9) 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)
a → b
a → c
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) 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)
a → b
a → c
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.