YES Termination proof of quicktest_sum.trs

(0) Obligation:

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

+(0, y) → y
+(s(x), y) → s(+(x, y))
sum1(nil) → 0
sum1(cons(x, y)) → +(x, sum1(y))
sum2(nil, z) → z
sum2(cons(x, y), z) → sum2(y, +(x, z))
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:

+(0, y) → y
+(s(x), y) → s(+1(x, y))
sum1(nil) → 0
sum1(cons(x, y)) → +1(x, sum1(y))
sum1(cons(x, y)) → +(x, SUM1(y))
sum2(nil, z) → z
sum2(cons(x, y), z) → SUM2(y, +(x, z))
sum2(cons(x, y), z) → sum2(y, +1(x, z))
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:
4 SCCs with nodes from P_abs,
0 Lassos,
Result: This relative DT problem is equivalent to 4 subproblems.

(4) Complex Obligation (AND)

(5) Obligation:

Relative ADP Problem with
absolute ADPs:

sum1(cons(x, y)) → +(x, sum1(y))
sum2(nil, z) → z
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))
sum1(nil) → 0
tests(0) → true
sum2(cons(x, y), z) → sum2(y, +(x, z))
+(s(x), y) → s(+1(x, y))
+(0, y) → y
eq(x, x) → true

and relative ADPs:

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

(6) 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 = 1 true = done_1 = 0 sum1_1 = and_2 = 1 rand_1 = g_1 = nil = s_1 = eq_2 = 1 +_2 = ::_2 = 0, 1 tests_1 = 0 f_1 = 0 0 = +^1_2 = 1 cons_2 = test_1 = 0 sum2_2 =
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
+1(x1, x2)  =  +1(x1)
s(x1)  =  s(x1)
rands(x1, x2)  =  x1
0  =  0
done(x1)  =  done
::(x1, x2)  =  ::
rand(x1)  =  rand(x1)
sum1(x1)  =  x1
nil  =  nil
tests(x1)  =  tests
true  =  true
sum2(x1, x2)  =  sum2(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
+(x1, x2)  =  +(x1, x2)
eq(x1, x2)  =  x1
and(x1, x2)  =  x1
test(x1)  =  test
f(x1)  =  f
g(x1)  =  g(x1)

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

+^11 > true
[0, nil] > done > true
:: > true
[tests, test, f] > rand1 > true
sum22 > [cons2, +2] > s1 > true
g1 > true

Status:
+^11: multiset
s1: multiset
0: multiset
done: []
::: multiset
rand1: multiset
nil: multiset
tests: multiset
true: multiset
sum22: [1,2]
cons2: [2,1]
+2: [2,1]
test: multiset
f: multiset
g1: multiset

(7) Obligation:

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

+1(s0(x)) → +1(x)

The TRS R consists of the following rules:

rands(00) → done
rands(s0(x)) → rands(x)
sum10(nil0) → 00
teststrue0
sum20(cons0(x, y), z) → sum20(y, +0(x, z))
rand0(x) → rand0(s0(x))
eq(x) → true0
sum10(cons0(x, y)) → +0(x, sum10(y))
sum20(nil0, z) → z
testsand(test)
+0(s0(x), y) → s0(+0(x, y))
testeq(f)
+0(00, y) → y
rand0(x) → x

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

(8) 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:

teststrue0
sum20(cons0(x, y), z) → sum20(y, +0(x, z))
sum10(cons0(x, y)) → +0(x, sum10(y))
sum20(nil0, z) → z
testsand(test)
rand0(x) → x

Used ordering: Polynomial interpretation [POLO]:

POL(+0(x1, x2)) = x1 + x2   
POL(+1(x1)) = x1   
POL(00) = 0   
POL(and(x1)) = x1   
POL(cons0(x1, x2)) = 1 + x1 + x2   
POL(done) = 0   
POL(eq(x1)) = 2·x1   
POL(f) = 0   
POL(nil0) = 0   
POL(rand0(x1)) = 2 + x1   
POL(rands(x1)) = x1   
POL(s0(x1)) = x1   
POL(sum10(x1)) = x1   
POL(sum20(x1, x2)) = 2 + 2·x1 + x2   
POL(test) = 0   
POL(tests) = 2   
POL(true0) = 0   

(9) Obligation:

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

+1(s0(x)) → +1(x)

The TRS R consists of the following rules:

rands(00) → done
rands(s0(x)) → rands(x)
sum10(nil0) → 00
rand0(x) → rand0(s0(x))
eq(x) → true0
+0(s0(x), y) → s0(+0(x, y))
testeq(f)
+0(00, y) → y

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

(10) 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:

rands(00) → done
testeq(f)
+0(00, y) → y

Used ordering: Polynomial interpretation [POLO]:

POL(+0(x1, x2)) = 2·x1 + x2   
POL(+1(x1)) = x1   
POL(00) = 2   
POL(done) = 0   
POL(eq(x1)) = x1   
POL(f) = 0   
POL(nil0) = 1   
POL(rand0(x1)) = x1   
POL(rands(x1)) = 2·x1   
POL(s0(x1)) = x1   
POL(sum10(x1)) = 2·x1   
POL(test) = 2   
POL(true0) = 0   

(11) Obligation:

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

+1(s0(x)) → +1(x)

The TRS R consists of the following rules:

rands(s0(x)) → rands(x)
sum10(nil0) → 00
rand0(x) → rand0(s0(x))
eq(x) → true0
+0(s0(x), y) → s0(+0(x, y))

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

(12) 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:

eq(x) → true0

Used ordering: Polynomial interpretation [POLO]:

POL(+0(x1, x2)) = x1 + x2   
POL(+1(x1)) = x1   
POL(00) = 0   
POL(eq(x1)) = 2 + x1   
POL(nil0) = 0   
POL(rand0(x1)) = x1   
POL(rands(x1)) = x1   
POL(s0(x1)) = x1   
POL(sum10(x1)) = 2·x1   
POL(true0) = 1   

(13) Obligation:

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

+1(s0(x)) → +1(x)

The TRS R consists of the following rules:

rands(s0(x)) → rands(x)
sum10(nil0) → 00
rand0(x) → rand0(s0(x))
+0(s0(x), y) → s0(+0(x, y))

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

(14) 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:

sum10(nil0) → 00

Used ordering: Polynomial interpretation [POLO]:

POL(+0(x1, x2)) = x1 + x2   
POL(+1(x1)) = 2·x1   
POL(00) = 0   
POL(nil0) = 0   
POL(rand0(x1)) = x1   
POL(rands(x1)) = x1   
POL(s0(x1)) = x1   
POL(sum10(x1)) = 1 + x1   

(15) Obligation:

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

+1(s0(x)) → +1(x)

The TRS R consists of the following rules:

rands(s0(x)) → rands(x)
rand0(x) → rand0(s0(x))
+0(s0(x), y) → s0(+0(x, y))

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

(16) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


+1(s0(x)) → +1(x)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
+1(x1)  =  x1
s0(x1)  =  s0(x1)
rands(x1)  =  rands(x1)
rand0(x1)  =  rand0
+0(x1, x2)  =  +0(x1, x2)

Recursive path order with status [RPO].
Quasi-Precedence:
rands1 > [s01, rand0]
+02 > [s01, rand0]

Status:
s01: multiset
rands1: multiset
rand0: multiset
+02: [2,1]


The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

rands(s0(x)) → rands(x)
rand0(x) → rand0(s0(x))
+0(s0(x), y) → s0(+0(x, y))

(17) Obligation:

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

rands(s0(x)) → rands(x)
rand0(x) → rand0(s0(x))
+0(s0(x), y) → s0(+0(x, y))

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

(18) PisEmptyProof (EQUIVALENT transformation)

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

(19) YES

(20) Obligation:

Relative ADP Problem with
absolute ADPs:

rands(0, y) → done(y)
rands(s(x), y) → rands(x, ::(rand(0), y))
sum1(nil) → 0
tests(0) → true
sum2(cons(x, y), z) → sum2(y, +(x, z))
eq(x, x) → true
sum2(cons(x, y), z) → SUM2(y, +(x, z))
sum1(cons(x, y)) → +(x, sum1(y))
sum2(nil, z) → z
tests(s(x)) → and(test(rands(rand(0), nil)), x)
+(s(x), y) → s(+(x, y))
test(done(y)) → eq(f(y), g(y))
+(0, y) → y

and relative ADPs:

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

(21) 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 = 0 sum1_1 = 0 and_2 = 1 rand_1 = g_1 = 0 nil = s_1 = eq_2 = 1 +_2 = 0 ::_2 = 0, 1 tests_1 = 0 f_1 = 0 0 = cons_2 = 0 SUM2_2 = test_1 = 0 sum2_2 = 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.
SUM2(x1, x2)  =  SUM2(x1, x2)
cons(x1, x2)  =  cons(x2)
+(x1, x2)  =  x2
rands(x1, x2)  =  rands(x1, x2)
0  =  0
done(x1)  =  done
s(x1)  =  x1
::(x1, x2)  =  ::
rand(x1)  =  rand(x1)
sum1(x1)  =  sum1
nil  =  nil
tests(x1)  =  tests
true  =  true
sum2(x1, x2)  =  x2
eq(x1, x2)  =  x1
and(x1, x2)  =  x1
test(x1)  =  test
f(x1)  =  f
g(x1)  =  g

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

cons1 > SUM22 > [::, true]
rands2 > [done, tests, test, f] > [::, true]
[0, sum1] > [done, tests, test, f] > [::, true]
rand1 > [::, true]
nil > [::, true]
g > [::, true]

Status:
SUM22: [1,2]
cons1: multiset
rands2: multiset
0: multiset
done: multiset
::: multiset
rand1: multiset
sum1: []
nil: multiset
tests: multiset
true: multiset
test: multiset
f: multiset
g: multiset

(22) Obligation:

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

SUM20(cons(y), z) → SUM20(y, +(z))

The TRS R consists of the following rules:

rands0(00, y) → done
rands0(s0(x), y) → rands0(x, ::)
sum100
teststrue0
sum2(z) → sum2(+(z))
rand0(x) → rand0(s0(x))
eq(x) → true0
sum1+(sum1)
sum2(z) → z
testsand(test)
+(y) → s0(+(y))
testeq(f)
+(y) → y
rand0(x) → x

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

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

teststrue0
sum2(z) → z
testsand(test)
rand0(x) → x

Used ordering: Polynomial interpretation [POLO]:

POL(+(x1)) = x1   
POL(00) = 0   
POL(::) = 0   
POL(SUM20(x1, x2)) = x1 + x2   
POL(and(x1)) = x1   
POL(cons(x1)) = x1   
POL(done) = 0   
POL(eq(x1)) = 2·x1   
POL(f) = 0   
POL(rand0(x1)) = 2 + x1   
POL(rands0(x1, x2)) = 2·x1 + x2   
POL(s0(x1)) = x1   
POL(sum1) = 0   
POL(sum2(x1)) = 2 + x1   
POL(test) = 0   
POL(tests) = 2   
POL(true0) = 0   

(24) Obligation:

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

SUM20(cons(y), z) → SUM20(y, +(z))

The TRS R consists of the following rules:

rands0(00, y) → done
rands0(s0(x), y) → rands0(x, ::)
sum100
sum2(z) → sum2(+(z))
rand0(x) → rand0(s0(x))
eq(x) → true0
sum1+(sum1)
+(y) → s0(+(y))
testeq(f)
+(y) → y

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

(25) 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 dependency pairs:

SUM20(cons(y), z) → SUM20(y, +(z))

Strictly oriented rules of the TRS R:

rands0(00, y) → done
sum100

Used ordering: Polynomial interpretation [POLO]:

POL(+(x1)) = x1   
POL(00) = 0   
POL(::) = 0   
POL(SUM20(x1, x2)) = x1 + x2   
POL(cons(x1)) = 1 + x1   
POL(done) = 0   
POL(eq(x1)) = 2 + x1   
POL(f) = 0   
POL(rand0(x1)) = x1   
POL(rands0(x1, x2)) = 1 + x1 + x2   
POL(s0(x1)) = x1   
POL(sum1) = 2   
POL(sum2(x1)) = x1   
POL(test) = 2   
POL(true0) = 2   

(26) Obligation:

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

rands0(s0(x), y) → rands0(x, ::)
sum2(z) → sum2(+(z))
rand0(x) → rand0(s0(x))
eq(x) → true0
sum1+(sum1)
+(y) → s0(+(y))
testeq(f)
+(y) → y

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

(27) PisEmptyProof (EQUIVALENT transformation)

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

(28) YES

(29) Obligation:

Relative ADP Problem with
absolute ADPs:

rands(0, y) → done(y)
rands(s(x), y) → rands(x, ::(rand(0), y))
sum1(nil) → 0
tests(0) → true
sum2(cons(x, y), z) → sum2(y, +(x, z))
eq(x, x) → true
sum1(cons(x, y)) → +(x, sum1(y))
sum1(cons(x, y)) → +(x, SUM1(y))
sum2(nil, z) → z
tests(s(x)) → and(test(rands(rand(0), nil)), x)
+(s(x), y) → s(+(x, y))
test(done(y)) → eq(f(y), g(y))
+(0, y) → y

and relative ADPs:

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

(30) 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 = sum1_1 = SUM1_1 = and_2 = 1 rand_1 = g_1 = nil = s_1 = eq_2 = 0 +_2 = ::_2 = 0 tests_1 = 0 f_1 = 0 = cons_2 = test_1 = sum2_2 =
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
SUM1(x1)  =  SUM1(x1)
cons(x1, x2)  =  cons(x1, x2)
rands(x1, x2)  =  rands(x1, x2)
0  =  0
done(x1)  =  x1
s(x1)  =  x1
::(x1, x2)  =  x2
rand(x1)  =  x1
sum1(x1)  =  x1
nil  =  nil
tests(x1)  =  tests
true  =  true
sum2(x1, x2)  =  sum2(x1, x2)
+(x1, x2)  =  +(x1, x2)
eq(x1, x2)  =  x2
and(x1, x2)  =  and(x1)
test(x1)  =  x1
f(x1)  =  f(x1)
g(x1)  =  x1

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

SUM11 > true
tests > rands2 > 0 > true
tests > nil > 0 > true
tests > and1 > true
sum22 > [cons2, +2] > true
f1 > true

Status:
SUM11: [1]
cons2: multiset
rands2: [2,1]
0: multiset
nil: multiset
tests: []
true: multiset
sum22: [1,2]
+2: multiset
and1: [1]
f1: multiset

(31) Obligation:

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

SUM10(cons0(x, y)) → SUM10(y)

The TRS R consists of the following rules:

rands0(00, y) → done0(y)
rands0(s0(x), y) → rands0(x, ::(y))
sum10(nil0) → 00
teststrue0
sum20(cons0(x, y), z) → sum20(y, +0(x, z))
rand0(x) → rand0(s0(x))
eq(x) → true0
sum10(cons0(x, y)) → +0(x, sum10(y))
sum20(nil0, z) → z
testsand(test0(rands0(rand0(00), nil0)))
+0(s0(x), y) → s0(+0(x, y))
test0(done0(y)) → eq(g0(y))
+0(00, y) → y
rand0(x) → x

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

(32) 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 dependency pairs:

SUM10(cons0(x, y)) → SUM10(y)

Strictly oriented rules of the TRS R:

sum20(cons0(x, y), z) → sum20(y, +0(x, z))
sum10(cons0(x, y)) → +0(x, sum10(y))
sum20(nil0, z) → z

Used ordering: Polynomial interpretation [POLO]:

POL(+0(x1, x2)) = x1 + x2   
POL(00) = 0   
POL(::(x1)) = x1   
POL(SUM10(x1)) = x1   
POL(and(x1)) = x1   
POL(cons0(x1, x2)) = 1 + x1 + 2·x2   
POL(done0(x1)) = 2·x1   
POL(eq(x1)) = 2·x1   
POL(g0(x1)) = x1   
POL(nil0) = 0   
POL(rand0(x1)) = x1   
POL(rands0(x1, x2)) = x1 + 2·x2   
POL(s0(x1)) = x1   
POL(sum10(x1)) = x1   
POL(sum20(x1, x2)) = 2 + 2·x1 + x2   
POL(test0(x1)) = x1   
POL(tests) = 0   
POL(true0) = 0   

(33) Obligation:

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

rands0(00, y) → done0(y)
rands0(s0(x), y) → rands0(x, ::(y))
sum10(nil0) → 00
teststrue0
rand0(x) → rand0(s0(x))
eq(x) → true0
testsand(test0(rands0(rand0(00), nil0)))
+0(s0(x), y) → s0(+0(x, y))
test0(done0(y)) → eq(g0(y))
+0(00, y) → y
rand0(x) → x

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

(34) PisEmptyProof (EQUIVALENT transformation)

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

(35) YES

(36) Obligation:

Relative ADP Problem with
absolute ADPs:

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

and relative ADPs:

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

(37) 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 = sum1_1 = and_2 = 1 RANDS_2 = 1 rand_1 = g_1 = 0 nil = s_1 = eq_2 = 0 +_2 = ::_2 = 0 tests_1 = f_1 = 0 = cons_2 = test_1 = 0 sum2_2 =
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)  =  x2
rand(x1)  =  rand(x1)
0  =  0
rands(x1, x2)  =  rands(x1, x2)
done(x1)  =  x1
sum1(x1)  =  x1
nil  =  nil
tests(x1)  =  tests(x1)
true  =  true
sum2(x1, x2)  =  sum2(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
+(x1, x2)  =  +(x1, x2)
eq(x1, x2)  =  x2
and(x1, x2)  =  x1
test(x1)  =  test
f(x1)  =  f(x1)
g(x1)  =  g

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

rand1 > true
nil > 0 > true
tests1 > rands2 > true
tests1 > [test, g] > true
[sum22, cons2] > +2 > s1 > RANDS1 > true
f1 > true

Status:
RANDS1: multiset
s1: multiset
rand1: multiset
0: multiset
rands2: [1,2]
nil: multiset
tests1: multiset
true: multiset
sum22: [1,2]
cons2: multiset
+2: multiset
test: multiset
f1: multiset
g: multiset

(38) 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(00, y) → done0(y)
rands0(s0(x), y) → rands0(x, ::(y))
sum10(nil0) → 00
tests0(00) → true0
sum20(cons0(x, y), z) → sum20(y, +0(x, z))
rand0(x) → rand0(s0(x))
eq(x) → true0
sum10(cons0(x, y)) → +0(x, sum10(y))
sum20(nil0, z) → z
tests0(s0(x)) → and(test)
+0(s0(x), y) → s0(+0(x, y))
testeq(g)
+0(00, y) → y
rand0(x) → x

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

(39) 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:

tests0(00) → true0
sum20(cons0(x, y), z) → sum20(y, +0(x, z))
sum10(cons0(x, y)) → +0(x, sum10(y))
sum20(nil0, z) → z
tests0(s0(x)) → and(test)
rand0(x) → x

Used ordering: Polynomial interpretation [POLO]:

POL(+0(x1, x2)) = x1 + x2   
POL(00) = 0   
POL(::(x1)) = x1   
POL(RANDS(x1)) = x1   
POL(and(x1)) = x1   
POL(cons0(x1, x2)) = 1 + x1 + x2   
POL(done0(x1)) = x1   
POL(eq(x1)) = 2·x1   
POL(g) = 0   
POL(nil0) = 0   
POL(rand0(x1)) = 2 + x1   
POL(rands0(x1, x2)) = x1 + 2·x2   
POL(s0(x1)) = x1   
POL(sum10(x1)) = x1   
POL(sum20(x1, x2)) = 1 + 2·x1 + x2   
POL(test) = 0   
POL(tests0(x1)) = 2 + x1   
POL(true0) = 0   

(40) 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(00, y) → done0(y)
rands0(s0(x), y) → rands0(x, ::(y))
sum10(nil0) → 00
rand0(x) → rand0(s0(x))
eq(x) → true0
+0(s0(x), y) → s0(+0(x, y))
testeq(g)
+0(00, y) → y

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

(41) 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(g)
+0(00, y) → y

Used ordering: Polynomial interpretation [POLO]:

POL(+0(x1, x2)) = 1 + x1 + x2   
POL(00) = 2   
POL(::(x1)) = x1   
POL(RANDS(x1)) = x1   
POL(done0(x1)) = x1   
POL(eq(x1)) = x1   
POL(g) = 0   
POL(nil0) = 1   
POL(rand0(x1)) = x1   
POL(rands0(x1, x2)) = 2·x1 + 2·x2   
POL(s0(x1)) = x1   
POL(sum10(x1)) = 2·x1   
POL(test) = 2   
POL(true0) = 0   

(42) 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, ::(y))
sum10(nil0) → 00
rand0(x) → rand0(s0(x))
eq(x) → true0
+0(s0(x), y) → s0(+0(x, y))

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

(43) 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:

eq(x) → true0

Used ordering: Polynomial interpretation [POLO]:

POL(+0(x1, x2)) = x1 + x2   
POL(00) = 0   
POL(::(x1)) = x1   
POL(RANDS(x1)) = x1   
POL(eq(x1)) = 2 + x1   
POL(nil0) = 0   
POL(rand0(x1)) = x1   
POL(rands0(x1, x2)) = x1 + 2·x2   
POL(s0(x1)) = x1   
POL(sum10(x1)) = x1   
POL(true0) = 1   

(44) 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, ::(y))
sum10(nil0) → 00
rand0(x) → rand0(s0(x))
+0(s0(x), y) → s0(+0(x, y))

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

(45) 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:

sum10(nil0) → 00

Used ordering: Polynomial interpretation [POLO]:

POL(+0(x1, x2)) = x1 + x2   
POL(00) = 0   
POL(::(x1)) = x1   
POL(RANDS(x1)) = x1   
POL(nil0) = 1   
POL(rand0(x1)) = x1   
POL(rands0(x1, x2)) = 2·x1 + 2·x2   
POL(s0(x1)) = x1   
POL(sum10(x1)) = x1   

(46) 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, ::(y))
rand0(x) → rand0(s0(x))
+0(s0(x), y) → s0(+0(x, y))

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

(47) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


RANDS(s0(x)) → RANDS(x)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:
POL( rands0(x1, x2) ) = 2x1 + 2

POL( s0(x1) ) = x1 + 1

POL( ::(x1) ) = 0

POL( rand0(x1) ) = max{0, -2}

POL( +0(x1, x2) ) = x1 + 2

POL( RANDS(x1) ) = 2x1


The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

rands0(s0(x), y) → rands0(x, ::(y))
rand0(x) → rand0(s0(x))
+0(s0(x), y) → s0(+0(x, y))

(48) Obligation:

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

rands0(s0(x), y) → rands0(x, ::(y))
rand0(x) → rand0(s0(x))
+0(s0(x), y) → s0(+0(x, y))

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

(49) PisEmptyProof (EQUIVALENT transformation)

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

(50) YES