YES Termination proof of quicktest.trs

(0) Obligation:

Relative term rewrite system:
The relative TRS consists of the following R rules:

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

The relative TRS consists of the following S rules:

rand(x) → rand(s(x))
rand(x) → x

(1) RelTRStoRelADPProof (EQUIVALENT transformation)

We upgrade the RelTRS problem to an equivalent Relative ADP Problem [IJCAR24].

(2) Obligation:

Relative ADP Problem with
absolute ADPs:

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

and relative ADPs:

rand(x) → RAND(s(x))
rand(x) → x

(3) RelADPDepGraphProof (EQUIVALENT transformation)

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.

(4) Obligation:

Relative ADP Problem with
absolute ADPs:

tests(s(x)) → and(test(rands(rand(0), nil)), x)
rands(0, y) → done(y)
rands(s(x), y) → RANDS(x, ::(rand(0), y))
rands(s(x), y) → rands(x, ::(rand(0), y))
test(done(y)) → eq(f(y), g(y))
tests(0) → true
eq(x, x) → true

and relative ADPs:

rand(x) → rand(s(x))
rand(x) → x

(5) RelADPCleverAfsProof (SOUND transformation)

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.

Furthermore, We use an argument filter [LPAR04].
Filtering:rands_2 = true = done_1 = and_2 = 0, 1 rand_1 = RANDS_2 = 1 g_1 = nil = s_1 = eq_2 = 0, 1 ::_2 = 1 tests_1 = 0 f_1 = 0 = test_1 = 0
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
RANDS(x1, x2)  =  RANDS(x1)
s(x1)  =  s(x1)
::(x1, x2)  =  x1
rand(x1)  =  x1
0  =  0
tests(x1)  =  tests
and(x1, x2)  =  and
test(x1)  =  test
rands(x1, x2)  =  rands(x1, x2)
nil  =  nil
done(x1)  =  x1
eq(x1, x2)  =  eq
f(x1)  =  f(x1)
g(x1)  =  g(x1)
true  =  true

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

[test, f1] > [tests, eq, true] > [s1, and] > RANDS1
[test, f1] > [tests, eq, true] > 0
[test, f1] > [tests, eq, true] > nil
[test, f1] > g1
rands2 > 0

Status:
RANDS1: multiset
s1: multiset
0: multiset
tests: []
and: multiset
test: []
rands2: [1,2]
nil: multiset
eq: []
f1: multiset
g1: multiset
true: multiset

(6) Obligation:

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

RANDS(s0(x)) → RANDS(x)

The TRS R consists of the following rules:

testsand
rands0(00, y) → done0(y)
rands0(s0(x), y) → rands0(x, ::(rand0(00)))
testeq
teststrue0
rand0(x) → rand0(s0(x))
eqtrue0
rand0(x) → x

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

(7) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.

Strictly oriented rules of the TRS R:

rands0(00, y) → done0(y)
testeq
teststrue0

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(::(x1)) = x1   
POL(RANDS(x1)) = x1   
POL(and) = 2   
POL(done0(x1)) = 1 + x1   
POL(eq) = 0   
POL(rand0(x1)) = x1   
POL(rands0(x1, x2)) = 2 + x1 + x2   
POL(s0(x1)) = x1   
POL(test) = 2   
POL(tests) = 2   
POL(true0) = 0   

(8) Obligation:

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

RANDS(s0(x)) → RANDS(x)

The TRS R consists of the following rules:

testsand
rands0(s0(x), y) → rands0(x, ::(rand0(00)))
rand0(x) → rand0(s0(x))
eqtrue0
rand0(x) → x

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

(9) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.

Strictly oriented rules of the TRS R:

testsand
eqtrue0

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(::(x1)) = x1   
POL(RANDS(x1)) = x1   
POL(and) = 0   
POL(eq) = 2   
POL(rand0(x1)) = x1   
POL(rands0(x1, x2)) = x1 + x2   
POL(s0(x1)) = x1   
POL(tests) = 2   
POL(true0) = 1   

(10) Obligation:

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

RANDS(s0(x)) → RANDS(x)

The TRS R consists of the following rules:

rands0(s0(x), y) → rands0(x, ::(rand0(00)))
rand0(x) → rand0(s0(x))
rand0(x) → x

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

(11) QDPBoundsTAProof (EQUIVALENT transformation)

The DP-Problem (P, R) could be shown to be Match-DP-Bounded [TAB_NONLEFTLINEAR] by 0 for the Rule:

RANDS(s0(x)) → RANDS(x)
by considering the usable rules:
none

The compatible tree automaton used to show the Match-DP-Boundedness is represented by:
final states : [0]
transitions:
#0() → 1
RANDS0(1) → 0

(12) Obligation:

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

rands0(s0(x), y) → rands0(x, ::(rand0(00)))
rand0(x) → rand0(s0(x))
rand0(x) → x

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

(13) PisEmptyProof (EQUIVALENT transformation)

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

(14) YES