(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
nonZero(0) → false
nonZero(s(x)) → true
p(0) → 0
p(s(x)) → 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:
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(0) → 0
p(s(x)) → 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 1 SCC with 4 less nodes.
(4) 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(0) → 0
p(s(x)) → 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.