(0) Obligation:

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

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

Q is empty.

(1) AAECC Innermost (EQUIVALENT transformation)

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

if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError

The TRS R 2 is

ac
ad

The signature Sigma is {a, c, d}

(2) Obligation:

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

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
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:

DIV(x, y) → DIV2(x, y, 0)
DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
DIV2(x, y, i) → LE(y, 0)
DIV2(x, y, i) → LE(y, x)
DIV2(x, y, i) → PLUS(i, 0)
DIV2(x, y, i) → INC(i)
IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
IF2(true, x, y, i, j) → MINUS(x, y)
INC(s(i)) → INC(i)
LE(s(x), s(y)) → LE(x, y)
MINUS(s(x), s(y)) → MINUS(x, y)
PLUS(x, y) → PLUSITER(x, y, 0)
PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z)
PLUSITER(x, y, z) → LE(x, z)
IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
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 5 SCCs with 8 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

MINUS(s(x), s(y)) → MINUS(x, y)

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(8) Obligation:

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

LE(s(x), s(y)) → LE(x, y)

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(9) Obligation:

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

PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z)
IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(10) Obligation:

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

INC(s(i)) → INC(i)

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(11) Obligation:

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

IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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