YES
0 RelTRS
↳1 RelTRStoRelADPProof (⇔, 0 ms)
↳2 RelADPP
↳3 RelADPDepGraphProof (⇔, 0 ms)
↳4 AND
↳5 RelADPP
↳6 RelADPCleverAfsProof (⇒, 93 ms)
↳7 QDP
↳8 MRRProof (⇔, 0 ms)
↳9 QDP
↳10 MRRProof (⇔, 0 ms)
↳11 QDP
↳12 PisEmptyProof (⇔, 0 ms)
↳13 YES
↳14 RelADPP
↳15 RelADPCleverAfsProof (⇒, 103 ms)
↳16 QDP
↳17 MRRProof (⇔, 0 ms)
↳18 QDP
↳19 PisEmptyProof (⇔, 0 ms)
↳20 YES
↳21 RelADPP
↳22 RelADPCleverAfsProof (⇒, 106 ms)
↳23 QDP
↳24 MRRProof (⇔, 0 ms)
↳25 QDP
↳26 PisEmptyProof (⇔, 0 ms)
↳27 YES
↳28 RelADPP
↳29 RelADPReductionPairProof (⇔, 100 ms)
↳30 RelADPP
↳31 DAbsisEmptyProof (⇔, 0 ms)
↳32 YES
↳33 RelADPP
↳34 RelADPReductionPairProof (⇔, 122 ms)
↳35 RelADPP
↳36 DAbsisEmptyProof (⇔, 0 ms)
↳37 YES
↳38 RelADPP
↳39 RelADPReductionPairProof (⇔, 97 ms)
↳40 RelADPP
↳41 DAbsisEmptyProof (⇔, 0 ms)
↳42 YES
↳43 RelADPP
↳44 RelADPReductionPairProof (⇔, 108 ms)
↳45 RelADPP
↳46 DAbsisEmptyProof (⇔, 0 ms)
↳47 YES
↳48 RelADPP
↳49 RelADPReductionPairProof (⇔, 106 ms)
↳50 RelADPP
↳51 DAbsisEmptyProof (⇔, 0 ms)
↳52 YES
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
pred(s(x)) → x
minus(x, 0) → x
minus(x, s(y)) → pred(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))
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, xs)) → gcdL(consSwap(x, xs))
consSwap(x, cons(y, xs)) → cons(y, consSwap(x, xs))
We upgrade the RelTRS problem to an equivalent Relative ADP Problem [IJCAR24].
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → LE(x, y)
pred(s(x)) → x
minus(x, 0) → x
minus(x, s(y)) → PRED(minus(x, y))
minus(x, s(y)) → pred(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))
consSwap(x, xs) → cons(x, xs)
gcdL(cons(x, xs)) → GCDL(CONSSWAP(x, xs))
consSwap(x, cons(y, xs)) → cons(y, CONSSWAP(x, xs))
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.
minus(x, s(y)) → pred(MINUS(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))
pred(s(x)) → x
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))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
Furthermore, We use an argument filter [LPAR04].
Filtering:MINUS_2 =
true =
gcd_2 =
pred_1 =
if_gcd_3 = 0
nil =
false =
s_1 =
gcdL_1 =
0 =
le_2 = 0, 1
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.
MINUS(x1, x2) = MINUS(x1, x2)
s(x1) = s(x1)
if_gcd(x1, x2, x3) = if_gcd(x2, x3)
false = false
gcd(x1, x2) = gcd(x1, x2)
minus(x1, x2) = minus(x1)
true = true
le(x1, x2) = le
0 = 0
pred(x1) = x1
Recursive path order with status [RPO].
Quasi-Precedence:
[true, le] > [false, 0] > [ifgcd2, gcd2] > [s1, minus1] > MINUS2
MINUS2: [1,2]
s1: multiset
ifgcd2: multiset
false: multiset
gcd2: multiset
minus1: multiset
true: multiset
le: multiset
0: multiset
MINUS0(x, s0(y)) → MINUS0(x, y)
consSwap0(x, xs) → cons0(x, xs)
gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
le → le
le → false0
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))
pred0(s0(x)) → x
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(00, y) → y
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
minus(x) → pred0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
le → true0
minus(x) → x
gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
le → true0
POL(00) = 0
POL(MINUS0(x1, x2)) = x1 + x2
POL(cons0(x1, x2)) = 2·x1 + x2
POL(consSwap0(x1, x2)) = 2·x1 + x2
POL(false0) = 2
POL(gcd0(x1, x2)) = x1 + x2
POL(gcdL0(x1)) = x1
POL(if_gcd(x1, x2)) = x1 + x2
POL(le) = 2
POL(minus(x1)) = x1
POL(nil0) = 1
POL(pred0(x1)) = x1
POL(s0(x1)) = x1
POL(true0) = 1
MINUS0(x, s0(y)) → MINUS0(x, y)
consSwap0(x, xs) → cons0(x, xs)
le → le
le → false0
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))
pred0(s0(x)) → x
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(00, y) → y
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
minus(x) → pred0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
minus(x) → x
MINUS0(x, s0(y)) → MINUS0(x, y)
le → false0
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))
pred0(s0(x)) → x
gcd0(00, y) → y
POL(00) = 2
POL(MINUS0(x1, x2)) = 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)) = 2·x1
POL(if_gcd(x1, x2)) = x1 + x2
POL(le) = 2
POL(minus(x1)) = x1
POL(pred0(x1)) = x1
POL(s0(x1)) = 2 + 2·x1
consSwap0(x, xs) → cons0(x, xs)
le → le
consSwap0(x, cons0(y, xs)) → cons0(y, consSwap0(x, xs))
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
minus(x) → pred0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
minus(x) → x
le(s(x), s(y)) → LE(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))
pred(s(x)) → x
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))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
Furthermore, We use an argument filter [LPAR04].
Filtering:true =
gcd_2 =
pred_1 =
if_gcd_3 = 0
nil =
false =
s_1 =
gcdL_1 =
LE_2 =
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(x1, x2)
s(x1) = s(x1)
if_gcd(x1, x2, x3) = if_gcd(x2, x3)
false = false
gcd(x1, x2) = gcd(x1, x2)
minus(x1, x2) = minus(x1)
le(x1, x2) = le
true = true
0 = 0
pred(x1) = x1
Recursive path order with status [RPO].
Quasi-Precedence:
[le, true] > [ifgcd2, gcd2] > [s1, false, minus1] > LE2
LE2: [2,1]
s1: [1]
ifgcd2: multiset
false: multiset
gcd2: multiset
minus1: [1]
le: []
true: multiset
0: multiset
LE0(s0(x), s0(y)) → LE0(x, y)
consSwap0(x, xs) → cons0(x, xs)
gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
le → le
le → false0
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))
pred0(s0(x)) → x
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(00, y) → y
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
minus(x) → pred0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
le → true0
minus(x) → x
LE0(s0(x), s0(y)) → LE0(x, y)
gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
gcd0(s0(x), 00) → s0(x)
pred0(s0(x)) → x
gcd0(00, y) → y
le → true0
minus(x) → x
POL(00) = 2
POL(LE0(x1, x2)) = x1 + x2
POL(cons0(x1, x2)) = 2 + 2·x1 + x2
POL(consSwap0(x1, x2)) = 2 + 2·x1 + x2
POL(false0) = 2
POL(gcd0(x1, x2)) = 1 + x1 + x2
POL(gcdL0(x1)) = 2 + x1
POL(if_gcd(x1, x2)) = 1 + x1 + x2
POL(le) = 2
POL(minus(x1)) = 1 + x1
POL(nil0) = 1
POL(pred0(x1)) = x1
POL(s0(x1)) = 1 + 2·x1
POL(true0) = 1
consSwap0(x, xs) → cons0(x, xs)
le → le
le → false0
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))
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
minus(x) → pred0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
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))
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))
pred(s(x)) → x
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))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
Furthermore, We use an argument filter [LPAR04].
Filtering:true =
IF_GCD_3 = 0
gcd_2 =
pred_1 =
if_gcd_3 = 0
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
pred(x1) = x1
0 = 0
if_gcd(x1, x2, x3) = if_gcd(x2, x3)
gcd(x1, x2) = gcd(x1, x2)
Recursive path order with status [RPO].
Quasi-Precedence:
[ifgcd2, gcd2] > s1 > [IFGCD2, false, GCD2, le] > true
IFGCD2: multiset
false: multiset
s1: [1]
GCD2: multiset
le: []
true: multiset
0: multiset
ifgcd2: multiset
gcd2: multiset
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))
consSwap0(x, xs) → cons0(x, xs)
gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
le → le
le → false0
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))
pred0(s0(x)) → x
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
gcd0(00, y) → y
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
minus(x) → pred0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
le → true0
minus(x) → x
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))
gcdL0(cons0(x, nil0)) → x
gcdL0(nil0) → 00
le → false0
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))
pred0(s0(x)) → x
gcd0(00, y) → y
gcd0(s0(x), s0(y)) → if_gcd(s0(x), s0(y))
le → true0
POL(00) = 0
POL(GCD0(x1, x2)) = 2 + 2·x1 + x2
POL(IF_GCD(x1, x2)) = 2·x1 + x2
POL(cons0(x1, x2)) = 2 + 2·x1 + x2
POL(consSwap0(x1, x2)) = 2 + 2·x1 + x2
POL(false0) = 1
POL(gcd0(x1, x2)) = 1 + x1 + x2
POL(gcdL0(x1)) = x1
POL(if_gcd(x1, x2)) = x1 + x2
POL(le) = 2
POL(minus(x1)) = x1
POL(nil0) = 1
POL(pred0(x1)) = x1
POL(s0(x1)) = 2 + 2·x1
POL(true0) = 0
consSwap0(x, xs) → cons0(x, xs)
le → le
consSwap0(x, cons0(y, xs)) → cons0(y, consSwap0(x, xs))
gcdL0(cons0(x, xs)) → gcdL0(consSwap0(x, xs))
minus(x) → pred0(minus(x))
gcdL0(cons0(x, cons0(y, xs))) → gcdL0(cons0(gcd0(x, y), xs))
minus(x) → x
gcdL(cons(x, cons(y, xs))) → GCDL(cons(gcd(x, y), xs))
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
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))
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
POL(0) = 2
POL(CONSSWAP(x1, x2)) = 0
POL(GCD(x1, x2)) = 2
POL(GCDL(x1)) = 1 + 3·x1
POL(IF_GCD(x1, x2, x3)) = 2
POL(LE(x1, x2)) = 2
POL(MINUS(x1, x2)) = 0
POL(PRED(x1)) = 2 + 2·x1 + x12
POL(cons(x1, x2)) = 1 + 2·x1 + x2
POL(consSwap(x1, x2)) = 1 + 2·x1 + x2
POL(false) = 0
POL(gcd(x1, x2)) = x1 + x2
POL(gcdL(x1)) = 1 + 2·x1
POL(if_gcd(x1, x2, x3)) = x2 + x3
POL(le(x1, x2)) = 2·x1
POL(minus(x1, x2)) = x1
POL(nil) = 2
POL(pred(x1)) = x1
POL(s(x1)) = x1
POL(true) = 3
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
gcdL(cons(x, cons(y, xs))) → GCDL(cons(gcd(x, y), xs))
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
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))
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
POL(0) = 2
POL(CONSSWAP(x1, x2)) = 0
POL(GCD(x1, x2)) = 2
POL(GCDL(x1)) = 1 + 3·x1
POL(IF_GCD(x1, x2, x3)) = 2
POL(LE(x1, x2)) = 2
POL(MINUS(x1, x2)) = 0
POL(PRED(x1)) = 2 + 2·x1 + x12
POL(cons(x1, x2)) = 1 + 2·x1 + x2
POL(consSwap(x1, x2)) = 1 + 2·x1 + x2
POL(false) = 0
POL(gcd(x1, x2)) = x1 + x2
POL(gcdL(x1)) = 1 + 2·x1
POL(if_gcd(x1, x2, x3)) = x2 + x3
POL(le(x1, x2)) = 2·x1
POL(minus(x1, x2)) = x1
POL(nil) = 2
POL(pred(x1)) = x1
POL(s(x1)) = x1
POL(true) = 3
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
gcdL(nil) → 0
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
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
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
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)) = 0
POL(LE(x1, x2)) = 2
POL(MINUS(x1, x2)) = 2·x2
POL(PRED(x1)) = 2 + x12
POL(cons(x1, x2)) = 1 + x1 + x2
POL(consSwap(x1, x2)) = 1 + x1 + x2
POL(false) = 0
POL(gcd(x1, x2)) = x1 + x2
POL(gcdL(x1)) = x1
POL(if_gcd(x1, x2, x3)) = x1 + x2 + x3
POL(le(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(nil) = 0
POL(pred(x1)) = x1
POL(s(x1)) = x1
POL(true) = 0
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
gcdL(cons(x, cons(y, xs))) → gcdL(cons(GCD(x, y), xs))
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
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))
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
POL(0) = 0
POL(CONSSWAP(x1, x2)) = 0
POL(GCD(x1, x2)) = 1 + 2·x2
POL(GCDL(x1)) = 2 + 3·x1
POL(IF_GCD(x1, x2, x3)) = 2
POL(LE(x1, x2)) = 2
POL(MINUS(x1, x2)) = 2
POL(PRED(x1)) = 2 + x1
POL(cons(x1, x2)) = 1 + x1 + x2
POL(consSwap(x1, x2)) = 1 + x1 + x2
POL(false) = 0
POL(gcd(x1, x2)) = x1 + x2
POL(gcdL(x1)) = x1
POL(if_gcd(x1, x2, x3)) = 3·x1 + x2 + x3
POL(le(x1, x2)) = 0
POL(minus(x1, x2)) = 2 + x1
POL(nil) = 0
POL(pred(x1)) = x1
POL(s(x1)) = 2 + x1
POL(true) = 0
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
gcdL(cons(x, nil)) → x
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
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
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x
POL(0) = 0
POL(CONSSWAP(x1, x2)) = 0
POL(GCD(x1, x2)) = 2
POL(GCDL(x1)) = 3·x1
POL(IF_GCD(x1, x2, x3)) = 2
POL(LE(x1, x2)) = 2
POL(MINUS(x1, x2)) = 2 + 2·x1 + 2·x1·x2 + 2·x2
POL(PRED(x1)) = 0
POL(cons(x1, x2)) = 1 + 2·x1 + x2
POL(consSwap(x1, x2)) = 1 + 2·x1 + x2
POL(false) = 0
POL(gcd(x1, x2)) = x1 + x2
POL(gcdL(x1)) = x1
POL(if_gcd(x1, x2, x3)) = x1 + x2 + x3
POL(le(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(nil) = 1
POL(pred(x1)) = x1
POL(s(x1)) = x1
POL(true) = 0
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))
pred(s(x)) → x
gcd(0, y) → y
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
minus(x, s(y)) → pred(minus(x, y))
gcdL(cons(x, cons(y, xs))) → gcdL(cons(gcd(x, y), xs))
le(0, y) → true
minus(x, 0) → x