YES
0 RelTRS
↳1 RelTRStoRelADPProof (⇔, 0 ms)
↳2 RelADPP
↳3 RelADPDepGraphProof (⇔, 0 ms)
↳4 RelADPP
↳5 RelADPDerelatifyingProof (⇔, 0 ms)
↳6 QDP
↳7 MRRProof (⇔, 0 ms)
↳8 QDP
↳9 MRRProof (⇔, 11 ms)
↳10 QDP
↳11 MRRProof (⇔, 0 ms)
↳12 QDP
↳13 TransformationProof (⇔, 0 ms)
↳14 QDP
↳15 TransformationProof (⇔, 0 ms)
↳16 QDP
↳17 QDPBoundsTAProof (⇔, 0 ms)
↳18 QDP
↳19 PisEmptyProof (⇔, 0 ms)
↳20 YES
tests(0) → true
tests(s(x)) → and(test(rands(rand(0), nil)), x)
test(done(y)) → eq(f(y), g(y))
eq(x, x) → true
rands(0, y) → done(y)
rands(s(x), y) → rands(x, ::(rand(0), y))
rand(x) → rand(s(x))
rand(x) → x
We upgrade the RelTRS problem to an equivalent Relative ADP Problem [IJCAR24].
tests(0) → true
tests(s(x)) → and(TEST(rands(rand(0), nil)), x)
tests(s(x)) → and(test(RANDS(rand(0), nil)), x)
tests(s(x)) → and(test(rands(RAND(0), nil)), x)
test(done(y)) → EQ(f(y), g(y))
eq(x, x) → true
rands(0, y) → done(y)
rands(s(x), y) → RANDS(x, ::(rand(0), y))
rands(s(x), y) → rands(x, ::(RAND(0), y))
rand(x) → RAND(s(x))
rand(x) → x
We use the relative dependency graph processor [IJCAR24].
The approximation of the Relative Dependency Graph contains:
1 SCC with nodes from P_abs,
0 Lassos,
Result: This relative DT problem is equivalent to 1 subproblem.
rands(s(x), y) → RANDS(x, ::(rand(0), y))
tests(s(x)) → and(test(rands(rand(0), nil)), x)
rands(0, y) → done(y)
rands(s(x), y) → rands(x, ::(rand(0), y))
test(done(y)) → eq(f(y), g(y))
tests(0) → true
rand(x) → rand(s(x))
eq(x, x) → true
rand(x) → x
We use the first derelatifying processor [IJCAR24].
There are no annotations in relative ADPs, so the relative ADP problem can be transformed into a non-relative DP problem.
RANDS(s(x), y) → RANDS(x, ::(rand(0), y))
tests(s(x)) → and(test(rands(rand(0), nil)), x)
rands(0, y) → done(y)
rands(s(x), y) → rands(x, ::(rand(0), y))
test(done(y)) → eq(f(y), g(y))
tests(0) → true
rand(x) → rand(s(x))
eq(x, x) → true
rand(x) → x
tests(s(x)) → and(test(rands(rand(0), nil)), x)
tests(0) → true
POL(0) = 0
POL(::(x1, x2)) = x1 + x2
POL(RANDS(x1, x2)) = x1 + x2
POL(and(x1, x2)) = x1 + x2
POL(done(x1)) = 2·x1
POL(eq(x1, x2)) = x1 + x2
POL(f(x1)) = x1
POL(g(x1)) = x1
POL(nil) = 0
POL(rand(x1)) = x1
POL(rands(x1, x2)) = x1 + 2·x2
POL(s(x1)) = x1
POL(test(x1)) = 2·x1
POL(tests(x1)) = 1 + 2·x1
POL(true) = 0
RANDS(s(x), y) → RANDS(x, ::(rand(0), y))
rands(0, y) → done(y)
rands(s(x), y) → rands(x, ::(rand(0), y))
test(done(y)) → eq(f(y), g(y))
rand(x) → rand(s(x))
eq(x, x) → true
rand(x) → x
rands(0, y) → done(y)
test(done(y)) → eq(f(y), g(y))
POL(0) = 0
POL(::(x1, x2)) = x1 + x2
POL(RANDS(x1, x2)) = x1 + x2
POL(done(x1)) = 1 + 2·x1
POL(eq(x1, x2)) = x1 + x2
POL(f(x1)) = x1
POL(g(x1)) = x1
POL(rand(x1)) = x1
POL(rands(x1, x2)) = 2 + x1 + 2·x2
POL(s(x1)) = x1
POL(test(x1)) = 2 + x1
POL(true) = 0
RANDS(s(x), y) → RANDS(x, ::(rand(0), y))
rands(s(x), y) → rands(x, ::(rand(0), y))
rand(x) → rand(s(x))
eq(x, x) → true
rand(x) → x
eq(x, x) → true
POL(0) = 0
POL(::(x1, x2)) = x1 + x2
POL(RANDS(x1, x2)) = x1 + x2
POL(eq(x1, x2)) = 2 + x1 + x2
POL(rand(x1)) = x1
POL(rands(x1, x2)) = x1 + x2
POL(s(x1)) = x1
POL(true) = 0
RANDS(s(x), y) → RANDS(x, ::(rand(0), y))
rands(s(x), y) → rands(x, ::(rand(0), y))
rand(x) → rand(s(x))
rand(x) → x
RANDS(s(x0), ::(y_1, y_2)) → RANDS(x0, ::(rand(0), ::(y_1, y_2))) → RANDS(s(x0), ::(y_1, y_2)) → RANDS(x0, ::(rand(0), ::(y_1, y_2)))
RANDS(s(x0), ::(y_1, y_2)) → RANDS(x0, ::(rand(0), ::(y_1, y_2)))
rands(s(x), y) → rands(x, ::(rand(0), y))
rand(x) → rand(s(x))
rand(x) → x
RANDS(s(x0), ::(y_1, ::(y_2, y_3))) → RANDS(x0, ::(rand(0), ::(y_1, ::(y_2, y_3)))) → RANDS(s(x0), ::(y_1, ::(y_2, y_3))) → RANDS(x0, ::(rand(0), ::(y_1, ::(y_2, y_3))))
RANDS(s(x0), ::(y_1, ::(y_2, y_3))) → RANDS(x0, ::(rand(0), ::(y_1, ::(y_2, y_3))))
rands(s(x), y) → rands(x, ::(rand(0), y))
rand(x) → rand(s(x))
rand(x) → x
by considering the usable rules:
RANDS(s(x0), ::(y_1, ::(y_2, y_3))) → RANDS(x0, ::(rand(0), ::(y_1, ::(y_2, y_3))))
rand(x) → rand(s(x))
rand(x) → x
rands(s(x), y) → rands(x, ::(rand(0), y))
rand(x) → rand(s(x))
rand(x) → x