(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 {c, a, 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) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MINUS(s(x), s(y)) → MINUS(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MINUS(x1, x2)  =  MINUS(x2)
s(x1)  =  s(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
s1: [1]
MINUS1: [1]


The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

Q DP problem:
P is empty.
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) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(11) TRUE

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

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LE(s(x), s(y)) → LE(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
LE(x1, x2)  =  LE(x2)
s(x1)  =  s(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
s1: [1]
LE1: [1]


The following usable rules [FROCOS05] were oriented: none

(14) Obligation:

Q DP problem:
P is empty.
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.

(15) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(16) TRUE

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

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

(19) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


INC(s(i)) → INC(i)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
INC(x1)  =  x1
s(x1)  =  s(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
s1: [1]


The following usable rules [FROCOS05] were oriented: none

(20) Obligation:

Q DP problem:
P is empty.
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.

(21) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(22) TRUE

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