YES Termination proof of AG_#3.2_rand.trs

(0) Obligation:

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

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

pred(s(x)) → x
minus(x, 0) → x
minus(x, s(y)) → PRED(minus(x, y))
minus(x, s(y)) → pred(MINUS(x, y))
quot(0, s(y)) → 0
quot(s(x), s(y)) → s(QUOT(minus(x, y), s(y)))
quot(s(x), s(y)) → s(quot(MINUS(x, y), s(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:
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:

minus(x, s(y)) → pred(MINUS(x, y))
quot(s(x), s(y)) → s(quot(minus(x, y), s(y)))
minus(x, s(y)) → pred(minus(x, y))
minus(x, 0) → x
pred(s(x)) → x
quot(0, s(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 = MINUS_2 = 0 pred_1 = 0 = minus_2 = 1 rand_1 = quot_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.
MINUS(x1, x2)  =  MINUS(x2)
s(x1)  =  s(x1)
quot(x1, x2)  =  quot(x1)
minus(x1, x2)  =  minus(x1)
pred(x1)  =  x1
0  =  0

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

quot1 > s1 > MINUS1 > minus1
quot1 > s1 > 0 > minus1

Status:
MINUS1: multiset
s1: multiset
quot1: [1]
minus1: [1]
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:

quot(s0(x)) → s0(quot(minus(x)))
minus(x) → pred0(minus(x))
minus(x) → x
rand0(x) → rand0(s0(x))
rand0(x) → x
pred0(s0(x)) → x
quot(00) → 00

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
quot(00) → 00

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(MINUS(x1)) = 2·x1   
POL(minus(x1)) = x1   
POL(pred0(x1)) = x1   
POL(quot(x1)) = 1 + 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:

quot(s0(x)) → s0(quot(minus(x)))
minus(x) → pred0(minus(x))
minus(x) → x
rand0(x) → rand0(s0(x))
pred0(s0(x)) → 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.


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)
quot(x1)  =  quot(x1)
minus(x1)  =  x1
pred0(x1)  =  x1
rand0(x1)  =  rand0

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

Status:
MINUS1: multiset
s01: multiset
quot1: multiset
rand0: []


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

quot(s0(x)) → s0(quot(minus(x)))
minus(x) → pred0(minus(x))
minus(x) → x
rand0(x) → rand0(s0(x))
pred0(s0(x)) → x

(11) Obligation:

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

quot(s0(x)) → s0(quot(minus(x)))
minus(x) → pred0(minus(x))
minus(x) → x
rand0(x) → rand0(s0(x))
pred0(s0(x)) → 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:

Relative ADP Problem with
absolute ADPs:

quot(s(x), s(y)) → s(QUOT(minus(x, y), s(y)))
quot(s(x), s(y)) → s(quot(minus(x, y), s(y)))
minus(x, s(y)) → pred(minus(x, y))
minus(x, 0) → x
pred(s(x)) → x
quot(0, s(y)) → 0

and relative ADPs:

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

(15) 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 = QUOT_2 = pred_1 = 0 = minus_2 = 1 rand_1 = quot_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.
QUOT(x1, x2)  =  QUOT(x1, x2)
s(x1)  =  s(x1)
minus(x1, x2)  =  x1
quot(x1, x2)  =  x1
pred(x1)  =  x1
0  =  0

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

[s1, 0] > QUOT2

Status:
QUOT2: [2,1]
s1: [1]
0: multiset

(16) Obligation:

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

QUOT0(s0(x), s0(y)) → QUOT0(minus(x), s0(y))

The TRS R consists of the following rules:

quot(s0(x)) → s0(quot(minus(x)))
minus(x) → pred0(minus(x))
minus(x) → x
rand0(x) → rand0(s0(x))
rand0(x) → x
pred0(s0(x)) → x
quot(00) → 00

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

(17) 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(QUOT0(x1, x2)) = x1 + x2   
POL(minus(x1)) = x1   
POL(pred0(x1)) = x1   
POL(quot(x1)) = x1   
POL(rand0(x1)) = 2 + x1   
POL(s0(x1)) = x1   

(18) Obligation:

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

QUOT0(s0(x), s0(y)) → QUOT0(minus(x), s0(y))

The TRS R consists of the following rules:

quot(s0(x)) → s0(quot(minus(x)))
minus(x) → pred0(minus(x))
minus(x) → x
rand0(x) → rand0(s0(x))
pred0(s0(x)) → x
quot(00) → 00

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:

quot(00) → 00

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 2   
POL(QUOT0(x1, x2)) = x1 + x2   
POL(minus(x1)) = x1   
POL(pred0(x1)) = x1   
POL(quot(x1)) = 2·x1   
POL(rand0(x1)) = x1   
POL(s0(x1)) = x1   

(20) Obligation:

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

QUOT0(s0(x), s0(y)) → QUOT0(minus(x), s0(y))

The TRS R consists of the following rules:

quot(s0(x)) → s0(quot(minus(x)))
minus(x) → pred0(minus(x))
minus(x) → x
rand0(x) → rand0(s0(x))
pred0(s0(x)) → x

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

(21) QDPOrderProof (EQUIVALENT transformation)

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


The following pairs can be oriented strictly and are deleted.


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

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

Status:
s01: multiset
rand0: []


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

quot(s0(x)) → s0(quot(minus(x)))
minus(x) → pred0(minus(x))
minus(x) → x
rand0(x) → rand0(s0(x))
pred0(s0(x)) → x

(22) Obligation:

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

quot(s0(x)) → s0(quot(minus(x)))
minus(x) → pred0(minus(x))
minus(x) → x
rand0(x) → rand0(s0(x))
pred0(s0(x)) → x

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

(23) PisEmptyProof (EQUIVALENT transformation)

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

(24) YES