YES Termination proof of AProVE_24_gcdSet_c2.ari

(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))
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
gcdL(nil) → 0
gcdL(cons(x, nil)) → x
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))

The relative TRS consists of the following S rules:

consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, xs)) → gcdL(consSwap(x, xs))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))

(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))
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y))
gcd(s(x), s(y)) → if_gcd(LE(y, x), s(x), s(y))
if_gcd(true, s(x), s(y)) → GCD(minus(x, y), s(y))
if_gcd(true, s(x), s(y)) → gcd(MINUS(x, y), s(y))
if_gcd(false, s(x), s(y)) → GCD(minus(y, x), s(x))
if_gcd(false, s(x), s(y)) → gcd(MINUS(y, x), s(x))
gcdL(nil) → 0
gcdL(cons(x, nil)) → x
gcdL(cons(x, cons(y, xs))) → GCDL(cons(gcd(x, y), xs))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(GCD(x, y), xs))

and relative ADPs:

consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
consSwap(x, cons(y, xs)) → cons(y, CONSSWAP(x, xs))

(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,
4 Lassos,
Result: This relative DT problem is equivalent to 8 subproblems.

(4) Complex Obligation (AND)

(5) Obligation:

Relative ADP Problem with
absolute ADPs:

le(s(x), s(y)) → LE(x, y)

and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcdL(cons(x, xs)) → gcdL(consSwap(x, xs))
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(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:true = gcd_2 = if_gcd_3 = 0 if_minus_3 = 0, 2 nil = false = s_1 = gcdL_1 = LE_2 = 0 le_2 = 0, 1 0 = minus_2 = 1 cons_2 = consSwap_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.
LE(x1, x2)  =  LE(x2)
s(x1)  =  s(x1)
minus(x1, x2)  =  minus(x1)
if_minus(x1, x2, x3)  =  if_minus(x2)
le(x1, x2)  =  le
if_gcd(x1, x2, x3)  =  if_gcd(x2, x3)
true  =  true
gcd(x1, x2)  =  gcd(x1, x2)
false  =  false
0  =  0

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

[le, ifgcd2, gcd2] > [LE1, s1, minus1, ifminus1] > [false, 0]
[le, ifgcd2, gcd2] > true > [false, 0]

Status:
LE1: multiset
s1: [1]
minus1: [1]
ifminus1: [1]
le: multiset
ifgcd2: multiset
true: multiset
gcd2: multiset
false: multiset
0: multiset

(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))
consSwap0(x, xs) → cons0(x, xs)
gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
lele
lefalse0
gcd0(s0(x), 00) → s0(x)
if_gcd(s0(x), s0(y)) → gcd0(minus(x), s0(y))
if_gcd(s0(x), s0(y)) → gcd0(minus(y), s0(x))
consSwap0(x, cons0(y, xs)) → cons0(y, consSwap0(x, xs))
if_minus(s0(x)) → 00
minus(00) → 00
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(00, y) → y
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
letrue0

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 dependency pairs:

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

Strictly oriented rules of the TRS R:

gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
lefalse0
if_gcd(s0(x), s0(y)) → gcd0(minus(x), s0(y))
if_gcd(s0(x), s0(y)) → gcd0(minus(y), s0(x))
if_minus(s0(x)) → 00
letrue0

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(LE(x1)) = 2·x1   
POL(cons0(x1, x2)) = 2·x1 + x2   
POL(consSwap0(x1, x2)) = 2·x1 + x2   
POL(false0) = 1   
POL(gcd0(x1, x2)) = x1 + x2   
POL(gcdL0(x1)) = 1 + 2·x1   
POL(if_gcd(x1, x2)) = x1 + x2   
POL(if_minus(x1)) = x1   
POL(le) = 2   
POL(minus(x1)) = x1   
POL(nil0) = 1   
POL(s0(x1)) = 2 + x1   
POL(true0) = 0   

(9) Obligation:

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

minus(s0(x)) → if_minus(s0(x))
consSwap0(x, xs) → cons0(x, xs)
lele
gcd0(s0(x), 00) → s0(x)
consSwap0(x, cons0(y, xs)) → cons0(y, consSwap0(x, xs))
minus(00) → 00
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(00, y) → y
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))

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

(10) PisEmptyProof (EQUIVALENT transformation)

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

(11) YES

(12) Obligation:

Relative ADP Problem with
absolute ADPs:

if_minus(false, s(x), y) → s(MINUS(x, y))
minus(s(x), y) → IF_MINUS(le(s(x), y), s(x), y)

and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcdL(cons(x, xs)) → gcdL(consSwap(x, xs))
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(13) 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 true = gcd_2 = IF_MINUS_3 = 0, 2 if_gcd_3 = 0 if_minus_3 = 0, 2 false = nil = s_1 = gcdL_1 = le_2 = 0, 1 0 = minus_2 = 1 cons_2 = consSwap_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.
IF_MINUS(x1, x2, x3)  =  IF_MINUS(x2)
false  =  false
s(x1)  =  s(x1)
MINUS(x1, x2)  =  MINUS(x1)
le(x1, x2)  =  le
0  =  0
true  =  true
gcd(x1, x2)  =  gcd(x1, x2)
if_gcd(x1, x2, x3)  =  if_gcd(x2, x3)
minus(x1, x2)  =  minus(x1)
if_minus(x1, x2, x3)  =  if_minus(x2)

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

[gcd2, ifgcd2] > [s1, MINUS1, minus1, ifminus1] > IFMINUS1 > [false, le, 0, true]

Status:
IFMINUS1: multiset
false: multiset
s1: multiset
MINUS1: multiset
le: []
0: multiset
true: multiset
gcd2: multiset
ifgcd2: multiset
minus1: multiset
ifminus1: multiset

(14) 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))
consSwap0(x, xs) → cons0(x, xs)
gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
lele
lefalse0
gcd0(s0(x), 00) → s0(x)
if_gcd(s0(x), s0(y)) → gcd0(minus(x), s0(y))
if_gcd(s0(x), s0(y)) → gcd0(minus(y), s0(x))
consSwap0(x, cons0(y, xs)) → cons0(y, consSwap0(x, xs))
if_minus(s0(x)) → 00
minus(00) → 00
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(00, y) → y
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
letrue0

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

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

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

Strictly oriented rules of the TRS R:

gcdL0(cons0(x, nil0)) → x
lefalse0
gcd0(s0(x), 00) → s0(x)
if_gcd(s0(x), s0(y)) → gcd0(minus(x), s0(y))
if_gcd(s0(x), s0(y)) → gcd0(minus(y), s0(x))
gcd0(00, y) → y
letrue0

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 1   
POL(IF_MINUS(x1)) = 1 + x1   
POL(MINUS(x1)) = 1 + x1   
POL(cons0(x1, x2)) = 2 + x1 + x2   
POL(consSwap0(x1, x2)) = 2 + x1 + x2   
POL(false0) = 1   
POL(gcd0(x1, x2)) = 2 + x1 + x2   
POL(gcdL0(x1)) = x1   
POL(if_gcd(x1, x2)) = 2 + x1 + x2   
POL(if_minus(x1)) = x1   
POL(le) = 2   
POL(minus(x1)) = x1   
POL(nil0) = 1   
POL(s0(x1)) = 1 + 2·x1   
POL(true0) = 0   

(16) Obligation:

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

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

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
consSwap0(x, xs) → cons0(x, xs)
gcdL0(nil0) → 00
lele
consSwap0(x, cons0(y, xs)) → cons0(y, consSwap0(x, xs))
if_minus(s0(x)) → 00
minus(00) → 00
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))

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

(17) DependencyGraphProof (EQUIVALENT transformation)

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

(18) TRUE

(19) Obligation:

Relative ADP Problem with
absolute ADPs:

if_gcd(true, s(x), s(y)) → GCD(minus(x, y), s(y))
gcd(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y))
if_gcd(false, s(x), s(y)) → GCD(minus(y, x), s(x))

and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcdL(cons(x, xs)) → gcdL(consSwap(x, xs))
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(20) 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:true = IF_GCD_3 = 0 gcd_2 = if_gcd_3 = 0 if_minus_3 = 0, 2 GCD_2 = false = nil = s_1 = gcdL_1 = le_2 = 0, 1 0 = minus_2 = 1 cons_2 = consSwap_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.
IF_GCD(x1, x2, x3)  =  IF_GCD(x2, x3)
false  =  false
s(x1)  =  s(x1)
GCD(x1, x2)  =  GCD(x1, x2)
minus(x1, x2)  =  x1
le(x1, x2)  =  le
true  =  true
if_minus(x1, x2, x3)  =  x2
0  =  0
gcd(x1, x2)  =  gcd(x1, x2)
if_gcd(x1, x2, x3)  =  if_gcd(x2, x3)

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

[false, le] > [IFGCD2, s1, GCD2, true, gcd2, ifgcd2] > 0

Status:
IFGCD2: multiset
false: multiset
s1: [1]
GCD2: multiset
le: multiset
true: multiset
0: multiset
gcd2: multiset
ifgcd2: multiset

(21) Obligation:

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

IF_GCD(s0(x), s0(y)) → GCD0(minus(y), s0(x))
GCD0(s0(x), s0(y)) → IF_GCD(s0(x), s0(y))
IF_GCD(s0(x), s0(y)) → GCD0(minus(x), s0(y))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
consSwap0(x, xs) → cons0(x, xs)
gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
lele
lefalse0
gcd0(s0(x), 00) → s0(x)
if_gcd(s0(x), s0(y)) → gcd0(minus(x), s0(y))
if_gcd(s0(x), s0(y)) → gcd0(minus(y), s0(x))
consSwap0(x, cons0(y, xs)) → cons0(y, consSwap0(x, xs))
if_minus(s0(x)) → 00
minus(00) → 00
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(00, y) → y
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
if_minus(s0(x)) → s0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
letrue0

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

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

GCD0(s0(x), s0(y)) → IF_GCD(s0(x), s0(y))

Strictly oriented rules of the TRS R:

gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
lefalse0
if_gcd(s0(x), s0(y)) → gcd0(minus(x), s0(y))
if_gcd(s0(x), s0(y)) → gcd0(minus(y), s0(x))
if_minus(s0(x)) → 00
if_minus(s0(x)) → s0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
letrue0

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(GCD0(x1, x2)) = 2 + x1 + x2   
POL(IF_GCD(x1, x2)) = 1 + x1 + x2   
POL(cons0(x1, x2)) = 2 + x1 + x2   
POL(consSwap0(x1, x2)) = 2 + x1 + x2   
POL(false0) = 1   
POL(gcd0(x1, x2)) = x1 + x2   
POL(gcdL0(x1)) = 1 + 2·x1   
POL(if_gcd(x1, x2)) = x1 + x2   
POL(if_minus(x1)) = 2·x1   
POL(le) = 2   
POL(minus(x1)) = 2·x1   
POL(nil0) = 1   
POL(s0(x1)) = 1 + 2·x1   
POL(true0) = 0   

(23) Obligation:

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

IF_GCD(s0(x), s0(y)) → GCD0(minus(y), s0(x))
IF_GCD(s0(x), s0(y)) → GCD0(minus(x), s0(y))

The TRS R consists of the following rules:

minus(s0(x)) → if_minus(s0(x))
consSwap0(x, xs) → cons0(x, xs)
lele
gcd0(s0(x), 00) → s0(x)
consSwap0(x, cons0(y, xs)) → cons0(y, consSwap0(x, xs))
minus(00) → 00
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(00, y) → y
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))

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

(24) DependencyGraphProof (EQUIVALENT transformation)

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

(25) TRUE

(26) Obligation:

Relative ADP Problem with
absolute ADPs:

gcdL(cons(x, cons(y, xs))) → GCDL(cons(gcd(x, y), xs))

and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(27) RelADPReductionPairProof (EQUIVALENT transformation)

We use the reduction pair processor [IJCAR24].
The following rules can be oriented strictly (l^# > ann(r))
and therefore we can remove all of its annotations in the right-hand side:
Absolute ADPs:


gcdL(cons(x, cons(y, xs))) → GCDL(cons(gcd(x, y), xs))

Relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true


The remaining rules can at least be oriented weakly:

Ordered with Polynomial interpretation [POLO]:

POL(0) = 0   
POL(CONSSWAP(x1, x2)) = 0   
POL(GCD(x1, x2)) = 2   
POL(GCDL(x1)) = 2 + 3·x1   
POL(IF_GCD(x1, x2, x3)) = 2 + x2 + 2·x2·x3 + x3   
POL(IF_MINUS(x1, x2, x3)) = 2 + x1·x2 + x2 + 2·x3   
POL(LE(x1, x2)) = 2   
POL(MINUS(x1, x2)) = 2 + 2·x2   
POL(cons(x1, x2)) = 2 + 2·x1 + x2   
POL(consSwap(x1, x2)) = 2 + 2·x1 + x2   
POL(false) = 0   
POL(gcd(x1, x2)) = x2   
POL(gcdL(x1)) = x1   
POL(if_gcd(x1, x2, x3)) = 0   
POL(if_minus(x1, x2, x3)) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = 0   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

(28) Obligation:

Relative ADP Problem with
No absolute ADPs, and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(29) DAbsisEmptyProof (EQUIVALENT transformation)

The relative ADP Problem has an empty P_abs. Hence, no infinite chain exists.

(30) YES

(31) Obligation:

Relative ADP Problem with
absolute ADPs:

gcdL(cons(x, nil)) → x

and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(32) RelADPReductionPairProof (EQUIVALENT transformation)

We use the reduction pair processor [IJCAR24].
The following rules can be oriented strictly (l^# > ann(r))
and therefore we can remove all of its annotations in the right-hand side:
Absolute ADPs:


gcdL(cons(x, nil)) → x

Relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true


The remaining rules can at least be oriented weakly:

Ordered with Polynomial interpretation [POLO]:

POL(0) = 3   
POL(CONSSWAP(x1, x2)) = 0   
POL(GCD(x1, x2)) = 2   
POL(GCDL(x1)) = 3·x1   
POL(IF_GCD(x1, x2, x3)) = 2 + 2·x2·x3   
POL(IF_MINUS(x1, x2, x3)) = 2 + 2·x3   
POL(LE(x1, x2)) = 2   
POL(MINUS(x1, x2)) = 2 + 2·x2   
POL(cons(x1, x2)) = 2 + 2·x1 + x2   
POL(consSwap(x1, x2)) = 2 + 2·x1 + x2   
POL(false) = 0   
POL(gcd(x1, x2)) = x2   
POL(gcdL(x1)) = 3 + x1   
POL(if_gcd(x1, x2, x3)) = 2   
POL(if_minus(x1, x2, x3)) = 2 + x2   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = 3·x1   
POL(nil) = 0   
POL(s(x1)) = 2   
POL(true) = 0   

(33) Obligation:

Relative ADP Problem with
No absolute ADPs, and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(34) DAbsisEmptyProof (EQUIVALENT transformation)

The relative ADP Problem has an empty P_abs. Hence, no infinite chain exists.

(35) YES

(36) Obligation:

Relative ADP Problem with
absolute ADPs:

gcdL(cons(x, cons(y, xs))) → gcdL(cons(GCD(x, y), xs))

and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(37) RelADPReductionPairProof (EQUIVALENT transformation)

We use the reduction pair processor [IJCAR24].
The following rules can be oriented strictly (l^# > ann(r))
and therefore we can remove all of its annotations in the right-hand side:
Absolute ADPs:


gcdL(cons(x, cons(y, xs))) → gcdL(cons(GCD(x, y), xs))

Relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true


The remaining rules can at least be oriented weakly:

Ordered with Polynomial interpretation [POLO]:

POL(0) = 0   
POL(CONSSWAP(x1, x2)) = 0   
POL(GCD(x1, x2)) = 1   
POL(GCDL(x1)) = 2 + 3·x1   
POL(IF_GCD(x1, x2, x3)) = 2   
POL(IF_MINUS(x1, x2, x3)) = 2 + 2·x3   
POL(LE(x1, x2)) = 2   
POL(MINUS(x1, x2)) = 2·x2   
POL(cons(x1, x2)) = 2 + 2·x1 + x2   
POL(consSwap(x1, x2)) = 2 + 2·x1 + x2   
POL(false) = 0   
POL(gcd(x1, x2)) = 1 + x1 + x2   
POL(gcdL(x1)) = x1   
POL(if_gcd(x1, x2, x3)) = 3·x1 + x2 + x3   
POL(if_minus(x1, x2, x3)) = 2·x2   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = 2·x1   
POL(nil) = 0   
POL(s(x1)) = 1 + 3·x1   
POL(true) = 0   

(38) Obligation:

Relative ADP Problem with
No absolute ADPs, and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(39) DAbsisEmptyProof (EQUIVALENT transformation)

The relative ADP Problem has an empty P_abs. Hence, no infinite chain exists.

(40) YES

(41) Obligation:

Relative ADP Problem with
absolute ADPs:

gcdL(cons(x, cons(y, xs))) → GCDL(cons(gcd(x, y), xs))

and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(42) RelADPReductionPairProof (EQUIVALENT transformation)

We use the reduction pair processor [IJCAR24].
The following rules can be oriented strictly (l^# > ann(r))
and therefore we can remove all of its annotations in the right-hand side:
Absolute ADPs:


gcdL(cons(x, cons(y, xs))) → GCDL(cons(gcd(x, y), xs))

Relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true


The remaining rules can at least be oriented weakly:

Ordered with Polynomial interpretation [POLO]:

POL(0) = 0   
POL(CONSSWAP(x1, x2)) = 0   
POL(GCD(x1, x2)) = 2   
POL(GCDL(x1)) = 2 + 3·x1   
POL(IF_GCD(x1, x2, x3)) = 2 + x2 + 2·x2·x3 + x3   
POL(IF_MINUS(x1, x2, x3)) = 2 + x1·x2 + x2 + 2·x3   
POL(LE(x1, x2)) = 2   
POL(MINUS(x1, x2)) = 2 + 2·x2   
POL(cons(x1, x2)) = 2 + 2·x1 + x2   
POL(consSwap(x1, x2)) = 2 + 2·x1 + x2   
POL(false) = 0   
POL(gcd(x1, x2)) = x2   
POL(gcdL(x1)) = x1   
POL(if_gcd(x1, x2, x3)) = 0   
POL(if_minus(x1, x2, x3)) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = 0   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

(43) Obligation:

Relative ADP Problem with
No absolute ADPs, and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(44) DAbsisEmptyProof (EQUIVALENT transformation)

The relative ADP Problem has an empty P_abs. Hence, no infinite chain exists.

(45) YES

(46) Obligation:

Relative ADP Problem with
absolute ADPs:

gcdL(nil) → 0

and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(47) RelADPReductionPairProof (EQUIVALENT transformation)

We use the reduction pair processor [IJCAR24].
The following rules can be oriented strictly (l^# > ann(r))
and therefore we can remove all of its annotations in the right-hand side:
Absolute ADPs:


gcdL(nil) → 0

Relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true


The remaining rules can at least be oriented weakly:

Ordered with Polynomial interpretation [POLO]:

POL(0) = 0   
POL(CONSSWAP(x1, x2)) = 0   
POL(GCD(x1, x2)) = 2   
POL(GCDL(x1)) = 1 + 3·x1   
POL(IF_GCD(x1, x2, x3)) = 2   
POL(IF_MINUS(x1, x2, x3)) = 2 + x1 + 2·x3   
POL(LE(x1, x2)) = 2   
POL(MINUS(x1, x2)) = 2·x1   
POL(cons(x1, x2)) = 1 + 2·x1 + x2   
POL(consSwap(x1, x2)) = 1 + 2·x1 + x2   
POL(false) = 1   
POL(gcd(x1, x2)) = x1 + x2   
POL(gcdL(x1)) = x1   
POL(if_gcd(x1, x2, x3)) = x2 + x3   
POL(if_minus(x1, x2, x3)) = 1 + 3·x2   
POL(le(x1, x2)) = 2   
POL(minus(x1, x2)) = 1 + 3·x1   
POL(nil) = 0   
POL(s(x1)) = 1 + 3·x1   
POL(true) = 0   

(48) Obligation:

Relative ADP Problem with
No absolute ADPs, and relative ADPs:

minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, nil)) → x
gcdL(nil) → 0
le(s(x), s(y)) → le(x, y)
le(s(x), 0) → false
gcd(s(x), 0) → s(x)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
if_minus(true, s(x), y) → 0
minus(0, y) → 0
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_minus(false, s(x), y) → s(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true

(49) DAbsisEmptyProof (EQUIVALENT transformation)

The relative ADP Problem has an empty P_abs. Hence, no infinite chain exists.

(50) YES