(0) Obligation:

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

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(p(s(x)), p(s(y)))
minus(x, plus(y, z)) → minus(minus(x, y), z)
p(s(s(x))) → s(p(s(x)))
p(0) → s(s(0))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
div(plus(x, y), z) → plus(div(x, z), div(y, z))
plus(0, y) → y
plus(s(x), y) → s(plus(y, minus(s(x), s(0))))

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

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

(2) Obligation:

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

MINUS(s(x), s(y)) → MINUS(p(s(x)), p(s(y)))
MINUS(s(x), s(y)) → P(s(x))
MINUS(s(x), s(y)) → P(s(y))
MINUS(x, plus(y, z)) → MINUS(minus(x, y), z)
MINUS(x, plus(y, z)) → MINUS(x, y)
P(s(s(x))) → P(s(x))
DIV(s(x), s(y)) → DIV(minus(x, y), s(y))
DIV(s(x), s(y)) → MINUS(x, y)
DIV(plus(x, y), z) → PLUS(div(x, z), div(y, z))
DIV(plus(x, y), z) → DIV(x, z)
DIV(plus(x, y), z) → DIV(y, z)
PLUS(s(x), y) → PLUS(y, minus(s(x), s(0)))
PLUS(s(x), y) → MINUS(s(x), s(0))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(p(s(x)), p(s(y)))
minus(x, plus(y, z)) → minus(minus(x, y), z)
p(s(s(x))) → s(p(s(x)))
p(0) → s(s(0))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
div(plus(x, y), z) → plus(div(x, z), div(y, z))
plus(0, y) → y
plus(s(x), y) → s(plus(y, minus(s(x), s(0))))

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

(3) DependencyGraphProof (EQUIVALENT transformation)

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

(4) Complex Obligation (AND)

(5) Obligation:

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

P(s(s(x))) → P(s(x))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(p(s(x)), p(s(y)))
minus(x, plus(y, z)) → minus(minus(x, y), z)
p(s(s(x))) → s(p(s(x)))
p(0) → s(s(0))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
div(plus(x, y), z) → plus(div(x, z), div(y, z))
plus(0, y) → y
plus(s(x), y) → s(plus(y, minus(s(x), s(0))))

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

(6) Obligation:

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

MINUS(x, plus(y, z)) → MINUS(minus(x, y), z)
MINUS(s(x), s(y)) → MINUS(p(s(x)), p(s(y)))
MINUS(x, plus(y, z)) → MINUS(x, y)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(p(s(x)), p(s(y)))
minus(x, plus(y, z)) → minus(minus(x, y), z)
p(s(s(x))) → s(p(s(x)))
p(0) → s(s(0))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
div(plus(x, y), z) → plus(div(x, z), div(y, z))
plus(0, y) → y
plus(s(x), y) → s(plus(y, minus(s(x), s(0))))

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

(7) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MINUS(x, plus(y, z)) → MINUS(minus(x, y), z)
MINUS(x, plus(y, z)) → 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(x1, x2)
plus(x1, x2)  =  plus(x1, x2)
minus(x1, x2)  =  x1
s(x1)  =  s
p(x1)  =  p
0  =  0
div(x1, x2)  =  x1

Lexicographic Path Order [LPO].
Precedence:
[plus2, s, p, 0] > MINUS2


The following usable rules [FROCOS05] were oriented:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(p(s(x)), p(s(y)))
minus(x, plus(y, z)) → minus(minus(x, y), z)
p(s(s(x))) → s(p(s(x)))
p(0) → s(s(0))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
div(plus(x, y), z) → plus(div(x, z), div(y, z))
plus(0, y) → y
plus(s(x), y) → s(plus(y, minus(s(x), s(0))))

(8) Obligation:

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

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

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(p(s(x)), p(s(y)))
minus(x, plus(y, z)) → minus(minus(x, y), z)
p(s(s(x))) → s(p(s(x)))
p(0) → s(s(0))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
div(plus(x, y), z) → plus(div(x, z), div(y, z))
plus(0, y) → y
plus(s(x), y) → s(plus(y, minus(s(x), s(0))))

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

(9) Obligation:

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

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

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(p(s(x)), p(s(y)))
minus(x, plus(y, z)) → minus(minus(x, y), z)
p(s(s(x))) → s(p(s(x)))
p(0) → s(s(0))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
div(plus(x, y), z) → plus(div(x, z), div(y, z))
plus(0, y) → y
plus(s(x), y) → s(plus(y, minus(s(x), s(0))))

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

(10) Obligation:

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

DIV(plus(x, y), z) → DIV(x, z)
DIV(s(x), s(y)) → DIV(minus(x, y), s(y))
DIV(plus(x, y), z) → DIV(y, z)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(p(s(x)), p(s(y)))
minus(x, plus(y, z)) → minus(minus(x, y), z)
p(s(s(x))) → s(p(s(x)))
p(0) → s(s(0))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
div(plus(x, y), z) → plus(div(x, z), div(y, z))
plus(0, y) → y
plus(s(x), y) → s(plus(y, minus(s(x), s(0))))

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