YES Termination proof of AG_#3.36_rand.trs

(0) Obligation:

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

minus(x, 0) → x
minus(s(x), s(y)) → minus(x, y)
f(0) → s(0)
f(s(x)) → minus(s(x), g(f(x)))
g(0) → 0
g(s(x)) → minus(s(x), f(g(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:

minus(x, 0) → x
minus(s(x), s(y)) → MINUS(x, y)
f(0) → s(0)
f(s(x)) → MINUS(s(x), g(f(x)))
f(s(x)) → minus(s(x), G(f(x)))
f(s(x)) → minus(s(x), g(F(x)))
g(0) → 0
g(s(x)) → MINUS(s(x), f(g(x)))
g(s(x)) → minus(s(x), F(g(x)))
g(s(x)) → minus(s(x), f(G(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:
2 SCCs with nodes from P_abs,
0 Lassos,
Result: This relative DT problem is equivalent to 2 subproblems.

(4) Complex Obligation (AND)

(5) Obligation:

Relative ADP Problem with
absolute ADPs:

f(0) → s(0)
g(s(x)) → minus(s(x), f(g(x)))
g(0) → 0
f(s(x)) → minus(s(x), g(f(x)))
minus(x, 0) → x
minus(s(x), s(y)) → MINUS(x, y)

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 = MINUS_2 = 0 f_1 = 0 = minus_2 = 1 rand_1 = g_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.
MINUS(x1, x2)  =  MINUS(x2)
s(x1)  =  s(x1)
f(x1)  =  f(x1)
0  =  0
g(x1)  =  x1
minus(x1, x2)  =  x1

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

MINUS1 > [s1, f1]
0 > [s1, f1]

Status:
MINUS1: multiset
s1: multiset
f1: multiset
0: multiset

(7) Obligation:

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

MINUS(s0(y)) → MINUS(y)

The TRS R consists of the following rules:

f0(00) → s0(00)
g0(s0(x)) → minus(s0(x))
g0(00) → 00
minus(s0(x)) → minus(x)
f0(s0(x)) → minus(s0(x))
minus(x) → x
rand0(x) → rand0(s0(x))
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:

f0(00) → s0(00)
f0(s0(x)) → minus(s0(x))
rand0(x) → x

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(MINUS(x1)) = x1   
POL(f0(x1)) = 1 + x1   
POL(g0(x1)) = x1   
POL(minus(x1)) = x1   
POL(rand0(x1)) = 2 + x1   
POL(s0(x1)) = x1   

(9) Obligation:

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

MINUS(s0(y)) → MINUS(y)

The TRS R consists of the following rules:

g0(s0(x)) → minus(s0(x))
g0(00) → 00
minus(s0(x)) → minus(x)
minus(x) → x
rand0(x) → rand0(s0(x))

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:

g0(00) → 00

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 2   
POL(MINUS(x1)) = x1   
POL(g0(x1)) = 2·x1   
POL(minus(x1)) = x1   
POL(rand0(x1)) = x1   
POL(s0(x1)) = x1   

(11) Obligation:

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

MINUS(s0(y)) → MINUS(y)

The TRS R consists of the following rules:

g0(s0(x)) → minus(s0(x))
minus(s0(x)) → minus(x)
minus(x) → x
rand0(x) → rand0(s0(x))

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:

g0(s0(x)) → minus(s0(x))

Used ordering: Polynomial interpretation [POLO]:

POL(MINUS(x1)) = x1   
POL(g0(x1)) = 2 + 2·x1   
POL(minus(x1)) = x1   
POL(rand0(x1)) = x1   
POL(s0(x1)) = x1   

(13) Obligation:

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

MINUS(s0(y)) → MINUS(y)

The TRS R consists of the following rules:

minus(s0(x)) → minus(x)
minus(x) → x
rand0(x) → rand0(s0(x))

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:

minus(x) → x

Used ordering: Polynomial interpretation [POLO]:

POL(MINUS(x1)) = x1   
POL(minus(x1)) = 1 + x1   
POL(rand0(x1)) = x1   
POL(s0(x1)) = x1   

(15) Obligation:

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

MINUS(s0(y)) → MINUS(y)

The TRS R consists of the following rules:

minus(s0(x)) → minus(x)
rand0(x) → rand0(s0(x))

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.


MINUS(s0(y)) → MINUS(y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MINUS(x1)  =  MINUS(x1)
s0(x1)  =  s0(x1)
minus(x1)  =  minus(x1)
rand0(x1)  =  rand0

Recursive path order with status [RPO].
Quasi-Precedence:
MINUS1 > s01
minus1 > s01
rand0 > s01

Status:
MINUS1: multiset
s01: multiset
minus1: multiset
rand0: multiset


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

minus(s0(x)) → minus(x)
rand0(x) → rand0(s0(x))

(17) Obligation:

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

minus(s0(x)) → minus(x)
rand0(x) → rand0(s0(x))

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:

f(0) → s(0)
f(s(x)) → minus(s(x), g(F(x)))
g(s(x)) → minus(s(x), F(g(x)))
g(s(x)) → minus(s(x), f(g(x)))
g(0) → 0
minus(s(x), s(y)) → minus(x, y)
f(s(x)) → minus(s(x), g(f(x)))
minus(x, 0) → x
g(s(x)) → minus(s(x), f(G(x)))
f(s(x)) → minus(s(x), G(f(x)))

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:s_1 = G_1 = f_1 = 0 = minus_2 = 1 F_1 = rand_1 = g_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.
F(x1)  =  x1
s(x1)  =  s(x1)
G(x1)  =  x1
f(x1)  =  f(x1)
g(x1)  =  g(x1)
0  =  0
minus(x1, x2)  =  minus(x1)

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

[s1, f1, g1, 0, minus1]

Status:
s1: [1]
f1: [1]
g1: [1]
0: multiset
minus1: [1]

(22) Obligation:

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

F0(s0(x)) → F0(x)
G0(s0(x)) → G0(x)
F0(s0(x)) → G0(f0(x))
G0(s0(x)) → F0(g0(x))

The TRS R consists of the following rules:

f0(00) → s0(00)
g0(s0(x)) → minus(s0(x))
g0(00) → 00
minus(s0(x)) → minus(x)
f0(s0(x)) → minus(s0(x))
minus(x) → x
rand0(x) → rand0(s0(x))
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:

rand0(x) → x

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(F0(x1)) = x1   
POL(G0(x1)) = x1   
POL(f0(x1)) = x1   
POL(g0(x1)) = x1   
POL(minus(x1)) = x1   
POL(rand0(x1)) = 2 + x1   
POL(s0(x1)) = x1   

(24) Obligation:

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

F0(s0(x)) → F0(x)
G0(s0(x)) → G0(x)
F0(s0(x)) → G0(f0(x))
G0(s0(x)) → F0(g0(x))

The TRS R consists of the following rules:

f0(00) → s0(00)
g0(s0(x)) → minus(s0(x))
g0(00) → 00
minus(s0(x)) → minus(x)
f0(s0(x)) → minus(s0(x))
minus(x) → x
rand0(x) → rand0(s0(x))

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.


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

POL( 00 ) = 0

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

POL( g0(x1) ) = x1

POL( minus(x1) ) = x1

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

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

POL( G0(x1) ) = x1 + 2


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

f0(00) → s0(00)
g0(s0(x)) → minus(s0(x))
g0(00) → 00
minus(s0(x)) → minus(x)
f0(s0(x)) → minus(s0(x))
minus(x) → x
rand0(x) → rand0(s0(x))

(26) Obligation:

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

F0(s0(x)) → G0(f0(x))

The TRS R consists of the following rules:

f0(00) → s0(00)
g0(s0(x)) → minus(s0(x))
g0(00) → 00
minus(s0(x)) → minus(x)
f0(s0(x)) → minus(s0(x))
minus(x) → x
rand0(x) → rand0(s0(x))

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