(0) Obligation:

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

nonZero(0) → false
nonZero(s(x)) → true
p(s(0)) → 0
p(s(s(x))) → s(p(s(x)))
id_inc(x) → x
id_inc(x) → s(x)
random(x) → rand(x, 0)
rand(x, y) → if(nonZero(x), x, y)
if(false, x, y) → y
if(true, x, y) → rand(p(x), id_inc(y))

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:

P(s(s(x))) → P(s(x))
RANDOM(x) → RAND(x, 0)
RAND(x, y) → IF(nonZero(x), x, y)
RAND(x, y) → NONZERO(x)
IF(true, x, y) → RAND(p(x), id_inc(y))
IF(true, x, y) → P(x)
IF(true, x, y) → ID_INC(y)

The TRS R consists of the following rules:

nonZero(0) → false
nonZero(s(x)) → true
p(s(0)) → 0
p(s(s(x))) → s(p(s(x)))
id_inc(x) → x
id_inc(x) → s(x)
random(x) → rand(x, 0)
rand(x, y) → if(nonZero(x), x, y)
if(false, x, y) → y
if(true, x, y) → rand(p(x), id_inc(y))

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 2 SCCs with 4 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:

nonZero(0) → false
nonZero(s(x)) → true
p(s(0)) → 0
p(s(s(x))) → s(p(s(x)))
id_inc(x) → x
id_inc(x) → s(x)
random(x) → rand(x, 0)
rand(x, y) → if(nonZero(x), x, y)
if(false, x, y) → y
if(true, x, y) → rand(p(x), id_inc(y))

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.


P(s(s(x))) → P(s(x))
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Precedence:
s1 > P1

Status:
P1: multiset
s1: multiset

The following usable rules [FROCOS05] were oriented: none

(7) Obligation:

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

nonZero(0) → false
nonZero(s(x)) → true
p(s(0)) → 0
p(s(s(x))) → s(p(s(x)))
id_inc(x) → x
id_inc(x) → s(x)
random(x) → rand(x, 0)
rand(x, y) → if(nonZero(x), x, y)
if(false, x, y) → y
if(true, x, y) → rand(p(x), id_inc(y))

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:

IF(true, x, y) → RAND(p(x), id_inc(y))
RAND(x, y) → IF(nonZero(x), x, y)

The TRS R consists of the following rules:

nonZero(0) → false
nonZero(s(x)) → true
p(s(0)) → 0
p(s(s(x))) → s(p(s(x)))
id_inc(x) → x
id_inc(x) → s(x)
random(x) → rand(x, 0)
rand(x, y) → if(nonZero(x), x, y)
if(false, x, y) → y
if(true, x, y) → rand(p(x), id_inc(y))

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