YES Termination proof of AG_#3.49_rand.trs

(0) Obligation:

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

f(c(s(x), y)) → f(c(x, s(y)))
f(c(s(x), s(y))) → g(c(x, y))
g(c(x, s(y))) → g(c(s(x), y))
g(c(s(x), s(y))) → f(c(x, y))

The relative TRS consists of the following S rules:

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

(1) RelTRStoQDPProof (SOUND transformation)

The relative termination problem is root-restricted. We can therefore treat it as a dependency pair problem.

(2) Obligation:

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

f(c(s(x), y)) → f(c(x, s(y)))
f(c(s(x), s(y))) → g(c(x, y))
g(c(x, s(y))) → g(c(s(x), y))
g(c(s(x), s(y))) → f(c(x, y))

The TRS R consists of the following rules:

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

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

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

rand(x) → x

Used ordering: Polynomial interpretation [POLO]:

POL(c(x1, x2)) = 2·x1 + x2   
POL(f(x1)) = 2·x1   
POL(g(x1)) = 2·x1   
POL(rand(x1)) = 2 + x1   
POL(s(x1)) = x1   

(4) Obligation:

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

f(c(s(x), y)) → f(c(x, s(y)))
f(c(s(x), s(y))) → g(c(x, y))
g(c(x, s(y))) → g(c(s(x), y))
g(c(s(x), s(y))) → f(c(x, y))

The TRS R consists of the following rules:

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

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

(5) QDPOrderProof (EQUIVALENT transformation)

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


The following pairs can be oriented strictly and are deleted.


f(c(s(x), s(y))) → g(c(x, y))
g(c(s(x), s(y))) → f(c(x, y))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:
POL( rand(x1) ) = 0

POL( s(x1) ) = x1 + 2

POL( f(x1) ) = 2x1 + 2

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

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


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

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

(6) Obligation:

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

f(c(s(x), y)) → f(c(x, s(y)))
g(c(x, s(y))) → g(c(s(x), y))

The TRS R consists of the following rules:

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

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.

(8) Complex Obligation (AND)

(9) Obligation:

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

g(c(x, s(y))) → g(c(s(x), y))

The TRS R consists of the following rules:

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

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

(10) QDPOrderProof (EQUIVALENT transformation)

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


The following pairs can be oriented strictly and are deleted.


g(c(x, s(y))) → g(c(s(x), y))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
g(x1)  =  x1
c(x1, x2)  =  x2
s(x1)  =  s(x1)
rand(x1)  =  rand

Knuth-Bendix order [KBO] with precedence:
trivial

and weight map:

s_1=1
rand=1

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

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

(11) Obligation:

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

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

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

(12) PisEmptyProof (EQUIVALENT transformation)

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

(13) YES

(14) Obligation:

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

f(c(s(x), y)) → f(c(x, s(y)))

The TRS R consists of the following rules:

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

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

(15) QDPOrderProof (EQUIVALENT transformation)

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


The following pairs can be oriented strictly and are deleted.


f(c(s(x), y)) → f(c(x, s(y)))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
f(x1)  =  x1
c(x1, x2)  =  x1
s(x1)  =  s(x1)
rand(x1)  =  rand

Knuth-Bendix order [KBO] with precedence:
trivial

and weight map:

s_1=1
rand=1

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

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

(16) Obligation:

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

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

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

(17) PisEmptyProof (EQUIVALENT transformation)

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

(18) YES