(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)  =  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

(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

Lexicographic path order with status [LPO].
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: Lexicographic path order with status [LPO].
Quasi-Precedence:
s1 > TIMES2

Status:
TIMES2: [2,1]
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.


QUOT(s(x), s(y), z) → QUOT(x, y, 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))))
DIVIDES(y, x) → DIV(x, 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)  =  s(x1)
0  =  0
div(x1, x2)  =  div(x1)
times(x1, x2)  =  times
zero(x1)  =  zero(x1)
ZERO(x1)  =  ZERO
IF(x1, x2, x3)  =  IF(x2)
eq(x1, x2)  =  eq(x1)
plus(x1, x2)  =  plus(x1)
false  =  false
PR(x1, x2)  =  PR(x1)
divides(x1, x2)  =  divides(x1, x2)
DIVIDES(x1, x2)  =  DIVIDES(x2)
if(x1, x2, x3)  =  if(x1, x3)
quot(x1, x2, x3)  =  quot(x3)
true  =  true
pr(x1, x2)  =  pr
p(x1)  =  p(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
div1 > ZERO > 0 > [eq1, false, if2] > [IF1, PR1, divides2, DIVIDES1] > [times, true]
div1 > ZERO > zero1 > [eq1, false, if2] > [IF1, PR1, divides2, DIVIDES1] > [times, true]
div1 > ZERO > plus1 > p1 > [times, true]
div1 > quot1 > [times, true]
pr > s1 > 0 > [eq1, false, if2] > [IF1, PR1, divides2, DIVIDES1] > [times, true]
pr > s1 > zero1 > [eq1, false, if2] > [IF1, PR1, divides2, DIVIDES1] > [times, true]
pr > s1 > plus1 > p1 > [times, true]
pr > s1 > quot1 > [times, true]

Status:
zero1: [1]
if2: [1,2]
ZERO: []
quot1: [1]
div1: [1]
true: []
IF1: [1]
p1: [1]
pr: []
0: []
eq1: [1]
DIVIDES1: [1]
PR1: [1]
plus1: [1]
times: []
false: []
s1: [1]
divides2: [2,1]


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(x, 0, s(z)) → DIV(x, s(z))
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)

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 1 less node.

(22) Complex Obligation (AND)

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

(24) 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(x1, x2)
s(x1)  =  s(x1)
IF(x1, x2, x3)  =  IF(x2, x3)
divides(x1, x2)  =  x1
false  =  false
zero(x1)  =  zero
times(x1, x2)  =  x2
div(x1, x2)  =  div(x1, x2)
if(x1, x2, x3)  =  x2
eq(x1, x2)  =  eq(x1, x2)
0  =  0
plus(x1, x2)  =  plus
quot(x1, x2, x3)  =  quot(x1, x3)
true  =  true
pr(x1, x2)  =  pr(x1, x2)
p(x1)  =  p

Lexicographic path order with status [LPO].
Quasi-Precedence:
s1 > [PR2, IF2, false] > pr2 > [eq2, 0, true] > [div2, quot2] > [zero, plus]
p > [zero, plus]

Status:
eq2: [2,1]
PR2: [1,2]
true: []
plus: []
pr2: [1,2]
0: []
zero: []
p: []
div2: [2,1]
quot2: [2,1]
false: []
s1: [1]
IF2: [1,2]


The following usable rules [FROCOS05] were oriented: none

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

(26) DependencyGraphProof (EQUIVALENT transformation)

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

(27) TRUE

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

(29) 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))
DIV(x, y) → QUOT(x, y, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
QUOT(x1, x2, x3)  =  QUOT(x2, x3)
0  =  0
s(x1)  =  s
DIV(x1, x2)  =  DIV(x2)

Lexicographic path order with status [LPO].
Quasi-Precedence:
0 > s > QUOT2
0 > DIV1 > QUOT2

Status:
QUOT2: [2,1]
DIV1: [1]
s: []
0: []


The following usable rules [FROCOS05] were oriented: none

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

(31) PisEmptyProof (EQUIVALENT transformation)

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

(32) TRUE