YES Termination proof of AG_#3.5b_rand.trs

(0) Obligation:

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

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(0, y) → 0
minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
if_minus(true, s(x), y) → 0
if_minus(false, s(x), y) → s(minus(x, y))
mod(0, y) → 0
mod(s(x), 0) → 0
mod(s(x), s(y)) → if_mod(le(y, x), s(x), s(y))
if_mod(true, s(x), s(y)) → mod(minus(x, y), s(y))
if_mod(false, s(x), s(y)) → s(x)

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:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → LE(x, y)
minus(0, y) → 0
minus(s(x), y) → IF_MINUS(le(s(x), y), s(x), y)
minus(s(x), y) → if_minus(LE(s(x), y), s(x), y)
if_minus(true, s(x), y) → 0
if_minus(false, s(x), y) → s(MINUS(x, y))
mod(0, y) → 0
mod(s(x), 0) → 0
mod(s(x), s(y)) → IF_MOD(le(y, x), s(x), s(y))
mod(s(x), s(y)) → if_mod(LE(y, x), s(x), s(y))
if_mod(true, s(x), s(y)) → MOD(minus(x, y), s(y))
if_mod(true, s(x), s(y)) → mod(MINUS(x, y), s(y))
if_mod(false, s(x), s(y)) → s(x)

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:
3 SCCs with nodes from P_abs,
0 Lassos,
Result: This relative DT problem is equivalent to 3 subproblems.

(4) Complex Obligation (AND)

(5) Obligation:

Relative ADP Problem with
absolute ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
mod(s(x), s(y)) → if_mod(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
le(s(x), 0) → false
mod(0, y) → 0
if_mod(true, s(x), s(y)) → mod(minus(x, y), s(y))
if_mod(false, s(x), s(y)) → s(x)
le(0, y) → true
mod(s(x), 0) → 0
le(s(x), s(y)) → LE(x, y)
if_minus(true, s(x), y) → 0
minus(0, y) → 0

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:s_1 = mod_2 = if_mod_3 = true = LE_2 = 0 le_2 = 0, 1 0 = minus_2 = 1 if_minus_3 = 0, 2 rand_1 = false =
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
LE(x1, x2)  =  LE(x2)
s(x1)  =  s(x1)
minus(x1, x2)  =  x1
if_minus(x1, x2, x3)  =  x2
le(x1, x2)  =  le
0  =  0
false  =  false
if_mod(x1, x2, x3)  =  if_mod(x1, x2, x3)
true  =  true
mod(x1, x2)  =  mod(x1, x2)

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

[ifmod3, mod2] > [LE1, s1] > [le, 0, false] > true

Status:
LE1: [1]
s1: [1]
le: multiset
0: multiset
false: multiset
ifmod3: [2,1,3]
true: multiset
mod2: [1,2]

(7) Obligation:

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

LE(s0(y)) → LE(y)

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
lefalse0
if_mod0(false0, s0(x), s0(y)) → s0(x)
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod0(le, s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
mod0(00, y) → 00
if_mod0(true0, s0(x), s0(y)) → mod0(minus(x), s0(y))
letrue0
mod0(s0(x), 00) → 00
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:

rand0(x) → x

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(LE(x1)) = x1   
POL(false0) = 0   
POL(if_minus(x1)) = x1   
POL(if_mod0(x1, x2, x3)) = x1 + 2·x2 + 2·x3   
POL(le) = 0   
POL(minus(x1)) = x1   
POL(mod0(x1, x2)) = 2·x1 + 2·x2   
POL(rand0(x1)) = 2 + x1   
POL(s0(x1)) = x1   
POL(true0) = 0   

(9) Obligation:

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

LE(s0(y)) → LE(y)

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
lefalse0
if_mod0(false0, s0(x), s0(y)) → s0(x)
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod0(le, s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
mod0(00, y) → 00
if_mod0(true0, s0(x), s0(y)) → mod0(minus(x), s0(y))
letrue0
mod0(s0(x), 00) → 00

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:

lefalse0
if_mod0(false0, s0(x), s0(y)) → s0(x)
mod0(00, y) → 00
mod0(s0(x), 00) → 00

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(LE(x1)) = x1   
POL(false0) = 1   
POL(if_minus(x1)) = x1   
POL(if_mod0(x1, x2, x3)) = x1 + 2·x2 + 2·x3   
POL(le) = 2   
POL(minus(x1)) = x1   
POL(mod0(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(rand0(x1)) = x1   
POL(s0(x1)) = x1   
POL(true0) = 2   

(11) Obligation:

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

LE(s0(y)) → LE(y)

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod0(le, s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
if_mod0(true0, s0(x), s0(y)) → mod0(minus(x), s0(y))
letrue0

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

(12) QDPOrderProof (EQUIVALENT transformation)

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


The following pairs can be oriented strictly and are deleted.


LE(s0(y)) → LE(y)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:
POL( minus(x1) ) = x1

POL( s0(x1) ) = 2x1 + 2

POL( if_minus(x1) ) = x1

POL( le ) = 2

POL( rand0(x1) ) = 0

POL( 00 ) = 0

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

POL( if_mod0(x1, ..., x3) ) = 2x1 + x2 + x3

POL( true0 ) = 2

POL( LE(x1) ) = 2x1


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

minus(s0(x)) → if_minus(s0(x))
lele
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod0(le, s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
if_mod0(true0, s0(x), s0(y)) → mod0(minus(x), s0(y))
letrue0

(13) Obligation:

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

minus(s0(x)) → if_minus(s0(x))
lele
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod0(le, s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
if_mod0(true0, s0(x), s0(y)) → mod0(minus(x), s0(y))
letrue0

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

(14) PisEmptyProof (EQUIVALENT transformation)

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

(15) YES

(16) Obligation:

Relative ADP Problem with
absolute ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
if_mod(false, s(x), s(y)) → s(x)
if_minus(false, s(x), y) → s(MINUS(x, y))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
mod(s(x), s(y)) → if_mod(le(y, x), s(x), s(y))
mod(0, y) → 0
if_mod(true, s(x), s(y)) → mod(minus(x, y), s(y))
le(0, y) → true
mod(s(x), 0) → 0
minus(s(x), y) → IF_MINUS(le(s(x), y), s(x), y)

and relative ADPs:

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

(17) 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:MINUS_2 = 1 if_mod_3 = 2 true = IF_MINUS_3 = 0, 2 if_minus_3 = 0, 2 rand_1 = false = s_1 = mod_2 = 1 le_2 = 0, 1 0 = minus_2 = 1
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
IF_MINUS(x1, x2, x3)  =  x2
false  =  false
s(x1)  =  s(x1)
MINUS(x1, x2)  =  MINUS(x1)
le(x1, x2)  =  le
minus(x1, x2)  =  x1
if_minus(x1, x2, x3)  =  x2
0  =  0
if_mod(x1, x2, x3)  =  if_mod(x1, x2)
true  =  true
mod(x1, x2)  =  mod(x1)

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

[s1, MINUS1, 0, mod1] > ifmod2 > [false, le, true]

Status:
false: multiset
s1: multiset
MINUS1: multiset
le: multiset
0: multiset
ifmod2: [2,1]
true: multiset
mod1: multiset

(18) Obligation:

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

IF_MINUS(s0(x)) → MINUS(x)
MINUS(s0(x)) → IF_MINUS(s0(x))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
lefalse0
if_mod(false0, s0(x)) → s0(x)
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod(s0(x)) → if_mod(le, s0(x))
if_minus(s0(x)) → s0(minus(x))
mod(00) → 00
if_mod(true0, s0(x)) → mod(minus(x))
letrue0
mod(s0(x)) → 00
rand0(x) → x

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

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

rand0(x) → x

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(IF_MINUS(x1)) = x1   
POL(MINUS(x1)) = x1   
POL(false0) = 0   
POL(if_minus(x1)) = x1   
POL(if_mod(x1, x2)) = x1 + 2·x2   
POL(le) = 0   
POL(minus(x1)) = x1   
POL(mod(x1)) = 2·x1   
POL(rand0(x1)) = 2 + x1   
POL(s0(x1)) = x1   
POL(true0) = 0   

(20) Obligation:

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

IF_MINUS(s0(x)) → MINUS(x)
MINUS(s0(x)) → IF_MINUS(s0(x))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
lefalse0
if_mod(false0, s0(x)) → s0(x)
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod(s0(x)) → if_mod(le, s0(x))
if_minus(s0(x)) → s0(minus(x))
mod(00) → 00
if_mod(true0, s0(x)) → mod(minus(x))
letrue0
mod(s0(x)) → 00

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

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

lefalse0
mod(00) → 00
mod(s0(x)) → 00

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(IF_MINUS(x1)) = x1   
POL(MINUS(x1)) = x1   
POL(false0) = 0   
POL(if_minus(x1)) = x1   
POL(if_mod(x1, x2)) = 2·x1 + x2   
POL(le) = 1   
POL(minus(x1)) = x1   
POL(mod(x1)) = 2 + x1   
POL(rand0(x1)) = x1   
POL(s0(x1)) = x1   
POL(true0) = 1   

(22) Obligation:

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

IF_MINUS(s0(x)) → MINUS(x)
MINUS(s0(x)) → IF_MINUS(s0(x))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
if_mod(false0, s0(x)) → s0(x)
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod(s0(x)) → if_mod(le, s0(x))
if_minus(s0(x)) → s0(minus(x))
if_mod(true0, s0(x)) → mod(minus(x))
letrue0

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:

if_mod(false0, s0(x)) → s0(x)

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(IF_MINUS(x1)) = x1   
POL(MINUS(x1)) = x1   
POL(false0) = 2   
POL(if_minus(x1)) = x1   
POL(if_mod(x1, x2)) = x1 + 2·x2   
POL(le) = 0   
POL(minus(x1)) = x1   
POL(mod(x1)) = 2·x1   
POL(rand0(x1)) = x1   
POL(s0(x1)) = x1   
POL(true0) = 0   

(24) Obligation:

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

IF_MINUS(s0(x)) → MINUS(x)
MINUS(s0(x)) → IF_MINUS(s0(x))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod(s0(x)) → if_mod(le, s0(x))
if_minus(s0(x)) → s0(minus(x))
if_mod(true0, s0(x)) → mod(minus(x))
letrue0

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

(25) QDPOrderProof (EQUIVALENT transformation)

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


The following pairs can be oriented strictly and are deleted.


MINUS(s0(x)) → IF_MINUS(s0(x))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
IF_MINUS(x1)  =  x1
s0(x1)  =  s0(x1)
MINUS(x1)  =  MINUS(x1)
minus(x1)  =  minus(x1)
if_minus(x1)  =  if_minus(x1)
le  =  le
rand0(x1)  =  rand0
00  =  00
mod(x1)  =  mod
if_mod(x1, x2)  =  if_mod
true0  =  true0

Recursive path order with status [RPO].
Quasi-Precedence:
[mod, ifmod] > [s01, MINUS1, minus1, ifminus1, le] > 00 > rand0
[mod, ifmod] > [s01, MINUS1, minus1, ifminus1, le] > true0 > rand0

Status:
s01: [1]
MINUS1: [1]
minus1: [1]
ifminus1: [1]
le: multiset
rand0: multiset
00: multiset
mod: []
ifmod: []
true0: multiset


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

minus(s0(x)) → if_minus(s0(x))
lele
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod(s0(x)) → if_mod(le, s0(x))
if_minus(s0(x)) → s0(minus(x))
if_mod(true0, s0(x)) → mod(minus(x))
letrue0

(26) Obligation:

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

IF_MINUS(s0(x)) → MINUS(x)

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod(s0(x)) → if_mod(le, s0(x))
if_minus(s0(x)) → s0(minus(x))
if_mod(true0, s0(x)) → mod(minus(x))
letrue0

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

(27) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(28) TRUE

(29) Obligation:

Relative ADP Problem with
absolute ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
if_mod(false, s(x), s(y)) → s(x)
mod(s(x), s(y)) → IF_MOD(le(y, x), s(x), s(y))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
mod(s(x), s(y)) → if_mod(le(y, x), s(x), s(y))
if_mod(true, s(x), s(y)) → MOD(minus(x, y), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
mod(0, y) → 0
if_mod(true, s(x), s(y)) → mod(minus(x, y), s(y))
le(0, y) → true
mod(s(x), 0) → 0

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:if_mod_3 = 0 true = IF_MOD_3 = 0, 2 if_minus_3 = 0, 2 rand_1 = false = s_1 = mod_2 = le_2 = 0, 1 0 = minus_2 = 1 MOD_2 = 1
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
MOD(x1, x2)  =  MOD(x1)
s(x1)  =  s(x1)
IF_MOD(x1, x2, x3)  =  IF_MOD(x2)
le(x1, x2)  =  le
true  =  true
minus(x1, x2)  =  x1
if_minus(x1, x2, x3)  =  x2
0  =  0
false  =  false
if_mod(x1, x2, x3)  =  if_mod(x2, x3)
mod(x1, x2)  =  mod(x1, x2)

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

[MOD1, s1, IFMOD1] > le > [true, 0, false]
[MOD1, s1, IFMOD1] > [ifmod2, mod2] > [true, 0, false]

Status:
MOD1: multiset
s1: multiset
IFMOD1: multiset
le: []
true: multiset
0: multiset
false: multiset
ifmod2: [1,2]
mod2: [1,2]

(31) Obligation:

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

MOD(s0(x)) → IF_MOD(s0(x))
IF_MOD(s0(x)) → MOD(minus(x))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
lefalse0
if_mod(s0(x), s0(y)) → s0(x)
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
mod0(00, y) → 00
if_mod(s0(x), s0(y)) → mod0(minus(x), s0(y))
letrue0
mod0(s0(x), 00) → 00
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 rules of the TRS R:

lefalse0
rand0(x) → x

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(IF_MOD(x1)) = 2·x1   
POL(MOD(x1)) = 2·x1   
POL(false0) = 0   
POL(if_minus(x1)) = x1   
POL(if_mod(x1, x2)) = x1 + x2   
POL(le) = 2   
POL(minus(x1)) = x1   
POL(mod0(x1, x2)) = x1 + x2   
POL(rand0(x1)) = 2 + x1   
POL(s0(x1)) = x1   
POL(true0) = 2   

(33) Obligation:

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

MOD(s0(x)) → IF_MOD(s0(x))
IF_MOD(s0(x)) → MOD(minus(x))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
if_mod(s0(x), s0(y)) → s0(x)
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
mod0(00, y) → 00
if_mod(s0(x), s0(y)) → mod0(minus(x), s0(y))
letrue0
mod0(s0(x), 00) → 00

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

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

letrue0

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(IF_MOD(x1)) = 2 + 2·x1   
POL(MOD(x1)) = 2 + 2·x1   
POL(if_minus(x1)) = x1   
POL(if_mod(x1, x2)) = 2·x1 + 2·x2   
POL(le) = 2   
POL(minus(x1)) = x1   
POL(mod0(x1, x2)) = 2·x1 + 2·x2   
POL(rand0(x1)) = x1   
POL(s0(x1)) = x1   
POL(true0) = 1   

(35) Obligation:

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

MOD(s0(x)) → IF_MOD(s0(x))
IF_MOD(s0(x)) → MOD(minus(x))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
if_mod(s0(x), s0(y)) → s0(x)
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
mod0(00, y) → 00
if_mod(s0(x), s0(y)) → mod0(minus(x), s0(y))
mod0(s0(x), 00) → 00

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

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

if_mod(s0(x), s0(y)) → s0(x)
mod0(00, y) → 00
mod0(s0(x), 00) → 00

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(IF_MOD(x1)) = 2 + 2·x1   
POL(MOD(x1)) = 2 + 2·x1   
POL(if_minus(x1)) = x1   
POL(if_mod(x1, x2)) = 1 + 2·x1 + x2   
POL(le) = 0   
POL(minus(x1)) = x1   
POL(mod0(x1, x2)) = 1 + 2·x1 + x2   
POL(rand0(x1)) = x1   
POL(s0(x1)) = x1   

(37) Obligation:

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

MOD(s0(x)) → IF_MOD(s0(x))
IF_MOD(s0(x)) → MOD(minus(x))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
if_mod(s0(x), s0(y)) → mod0(minus(x), s0(y))

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

(38) QDPOrderProof (EQUIVALENT transformation)

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


The following pairs can be oriented strictly and are deleted.


IF_MOD(s0(x)) → MOD(minus(x))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:
POL( minus(x1) ) = x1

POL( s0(x1) ) = 2x1 + 1

POL( if_minus(x1) ) = x1

POL( le ) = 0

POL( rand0(x1) ) = 2

POL( 00 ) = 1

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

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

POL( MOD(x1) ) = 2x1 + 1

POL( IF_MOD(x1) ) = 2x1 + 1


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

minus(s0(x)) → if_minus(s0(x))
lele
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
if_mod(s0(x), s0(y)) → mod0(minus(x), s0(y))

(39) Obligation:

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

MOD(s0(x)) → IF_MOD(s0(x))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
lele
rand0(x) → rand0(s0(x))
if_minus(s0(x)) → 00
minus(00) → 00
mod0(s0(x), s0(y)) → if_mod(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
if_mod(s0(x), s0(y)) → mod0(minus(x), s0(y))

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

(40) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(41) TRUE