(0) Obligation:

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

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(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:

PLUS(s(x), y) → PLUS(x, y)
PLUS(s(x), y) → PLUS(p(s(x)), y)
PLUS(s(x), y) → P(s(x))
PLUS(x, s(y)) → PLUS(x, p(s(y)))
PLUS(x, s(y)) → P(s(y))
TIMES(s(x), y) → PLUS(y, times(x, y))
TIMES(s(x), y) → TIMES(x, y)
DIV(x, y) → QUOT(x, y, y)
QUOT(s(x), s(y), z) → QUOT(x, y, z)
QUOT(x, 0, s(z)) → DIV(x, s(z))
DIV(div(x, y), z) → DIV(x, times(zero(y), z))
DIV(div(x, y), z) → TIMES(zero(y), z)
DIV(div(x, y), z) → ZERO(y)
EQ(s(x), s(y)) → EQ(x, y)
DIVIDES(y, x) → EQ(x, times(div(x, y), y))
DIVIDES(y, x) → TIMES(div(x, y), y)
DIVIDES(y, x) → DIV(x, y)
PRIME(s(s(x))) → PR(s(s(x)), s(x))
PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
PR(x, s(s(y))) → DIVIDES(s(s(y)), x)
IF(false, x, y) → PR(x, y)
ZERO(s(x)) → IF(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
ZERO(s(x)) → EQ(x, s(0))
ZERO(s(x)) → PLUS(zero(0), 0)
ZERO(s(x)) → ZERO(0)
ZERO(s(x)) → PLUS(0, zero(0))

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(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 11 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

EQ(s(x), s(y)) → EQ(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(6) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[EQ1, s1]

Status:
EQ1: multiset
s1: [1]


The following usable rules [FROCOS05] were oriented: none

(7) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(8) PisEmptyProof (EQUIVALENT transformation)

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

(9) TRUE

(10) Obligation:

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

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

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(11) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[PLUS2, s1]

Status:
PLUS2: [2,1]
s1: [1]


The following usable rules [FROCOS05] were oriented:

p(s(x)) → x

(12) Obligation:

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

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

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(13) Obligation:

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

TIMES(s(x), y) → TIMES(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(14) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[TIMES1, s1]

Status:
TIMES1: multiset
s1: [1]


The following usable rules [FROCOS05] were oriented: none

(15) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(16) PisEmptyProof (EQUIVALENT transformation)

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

(17) TRUE

(18) Obligation:

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

DIV(x, y) → QUOT(x, y, y)
QUOT(s(x), s(y), z) → QUOT(x, y, z)
QUOT(x, 0, s(z)) → DIV(x, s(z))
DIV(div(x, y), z) → DIV(x, times(zero(y), z))
DIV(div(x, y), z) → ZERO(y)
ZERO(s(x)) → IF(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
IF(false, x, y) → PR(x, y)
PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
PR(x, s(s(y))) → DIVIDES(s(s(y)), x)
DIVIDES(y, x) → DIV(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
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.


DIV(div(x, y), z) → DIV(x, times(zero(y), z))
DIV(div(x, y), z) → ZERO(y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
DIV(x1, x2)  =  x1
QUOT(x1, x2, x3)  =  x1
s(x1)  =  x1
0  =  0
div(x1, x2)  =  div(x1)
times(x1, x2)  =  times
zero(x1)  =  x1
ZERO(x1)  =  ZERO
IF(x1, x2, x3)  =  x2
eq(x1, x2)  =  eq(x2)
plus(x1, x2)  =  x1
false  =  false
PR(x1, x2)  =  x1
divides(x1, x2)  =  divides
DIVIDES(x1, x2)  =  x2
quot(x1, x2, x3)  =  x1
if(x1, x2, x3)  =  if(x2, x3)
pr(x1, x2)  =  pr(x1, x2)
true  =  true
p(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
divides > [0, div1, times, ZERO]
divides > eq1 > false
divides > eq1 > true
if2 > false
if2 > pr2 > true

Status:
eq1: multiset
if2: multiset
ZERO: multiset
div1: multiset
true: multiset
times: multiset
false: multiset
pr2: multiset
0: multiset
divides: multiset


The following usable rules [FROCOS05] were oriented:

plus(x, 0) → x

(20) Obligation:

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

DIV(x, y) → QUOT(x, y, y)
QUOT(s(x), s(y), z) → QUOT(x, y, z)
QUOT(x, 0, s(z)) → DIV(x, s(z))
ZERO(s(x)) → IF(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
IF(false, x, y) → PR(x, y)
PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
PR(x, s(s(y))) → DIVIDES(s(s(y)), x)
DIVIDES(y, x) → DIV(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(21) DependencyGraphProof (EQUIVALENT transformation)

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

(22) Complex Obligation (AND)

(23) Obligation:

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

QUOT(s(x), s(y), z) → QUOT(x, y, z)
QUOT(x, 0, s(z)) → DIV(x, s(z))
DIV(x, y) → QUOT(x, y, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(24) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[QUOT2, s1, 0, DIV2]

Status:
QUOT2: [1,2]
DIV2: [1,2]
s1: [1]
0: multiset


The following usable rules [FROCOS05] were oriented: none

(25) Obligation:

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

QUOT(x, 0, s(z)) → DIV(x, s(z))
DIV(x, y) → QUOT(x, y, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(26) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
0 > s

Status:
s: multiset
0: multiset


The following usable rules [FROCOS05] were oriented: none

(27) Obligation:

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

DIV(x, y) → QUOT(x, y, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(28) DependencyGraphProof (EQUIVALENT transformation)

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

(29) TRUE

(30) Obligation:

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

PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
IF(false, x, y) → PR(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(31) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PR(x1, x2)  =  PR(x2)
s(x1)  =  s(x1)
IF(x1, x2, x3)  =  IF(x3)
divides(x1, x2)  =  divides(x2)
false  =  false
zero(x1)  =  x1
quot(x1, x2, x3)  =  quot(x1, x3)
if(x1, x2, x3)  =  if(x1, x2)
eq(x1, x2)  =  x2
0  =  0
plus(x1, x2)  =  plus(x1, x2)
times(x1, x2)  =  x1
div(x1, x2)  =  x1
pr(x1, x2)  =  pr(x2)
true  =  true
p(x1)  =  p

Recursive path order with status [RPO].
Quasi-Precedence:
[PR1, IF1] > [s1, plus2, pr1] > [false, 0]
[PR1, IF1] > divides1 > [false, 0]
quot2 > [s1, plus2, pr1] > [false, 0]
if2 > [s1, plus2, pr1] > [false, 0]
true > [false, 0]
p > [false, 0]

Status:
plus2: multiset
if2: [1,2]
true: multiset
IF1: [1]
divides1: multiset
0: multiset
p: multiset
PR1: [1]
quot2: multiset
false: multiset
s1: [1]
pr1: multiset


The following usable rules [FROCOS05] were oriented: none

(32) Obligation:

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

IF(false, x, y) → PR(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

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

(33) DependencyGraphProof (EQUIVALENT transformation)

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

(34) TRUE