YES
0 QTRS
↳1 AAECC Innermost (⇔, 4 ms)
↳2 QTRS
↳3 DependencyPairsProof (⇔, 0 ms)
↳4 QDP
↳5 DependencyGraphProof (⇔, 0 ms)
↳6 AND
↳7 QDP
↳8 UsableRulesProof (⇔, 0 ms)
↳9 QDP
↳10 QReductionProof (⇔, 0 ms)
↳11 QDP
↳12 QDPSizeChangeProof (⇔, 0 ms)
↳13 YES
↳14 QDP
↳15 UsableRulesProof (⇔, 0 ms)
↳16 QDP
↳17 QReductionProof (⇔, 0 ms)
↳18 QDP
↳19 QDPSizeChangeProof (⇔, 0 ms)
↳20 YES
↳21 QDP
↳22 UsableRulesProof (⇔, 0 ms)
↳23 QDP
↳24 QReductionProof (⇔, 0 ms)
↳25 QDP
↳26 QDPSizeChangeProof (⇔, 0 ms)
↳27 YES
↳28 QDP
↳29 UsableRulesProof (⇔, 0 ms)
↳30 QDP
↳31 QReductionProof (⇔, 0 ms)
↳32 QDP
↳33 QDPQMonotonicMRRProof (⇔, 6 ms)
↳34 QDP
↳35 TransformationProof (⇔, 0 ms)
↳36 QDP
↳37 DependencyGraphProof (⇔, 0 ms)
↳38 QDP
↳39 TransformationProof (⇔, 0 ms)
↳40 QDP
↳41 DependencyGraphProof (⇔, 0 ms)
↳42 QDP
↳43 TransformationProof (⇔, 0 ms)
↳44 QDP
↳45 TransformationProof (⇔, 0 ms)
↳46 QDP
↳47 TransformationProof (⇔, 0 ms)
↳48 QDP
↳49 TransformationProof (⇔, 0 ms)
↳50 QDP
↳51 UsableRulesProof (⇔, 0 ms)
↳52 QDP
↳53 TransformationProof (⇔, 0 ms)
↳54 QDP
↳55 TransformationProof (⇔, 0 ms)
↳56 QDP
↳57 TransformationProof (⇔, 0 ms)
↳58 QDP
↳59 DependencyGraphProof (⇔, 0 ms)
↳60 TRUE
gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
a → b
a → c
gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
GCD(x, y) → GCD2(x, y, 0)
GCD2(x, y, i) → IF1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
GCD2(x, y, i) → LE(x, 0)
GCD2(x, y, i) → LE(y, 0)
GCD2(x, y, i) → LE(x, y)
GCD2(x, y, i) → LE(y, x)
GCD2(x, y, i) → INC(i)
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
IF3(false, b3, x, y, i) → MINUS(x, y)
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
IF4(false, x, y, i) → MINUS(y, x)
INC(s(i)) → INC(i)
LE(s(x), s(y)) → LE(x, y)
MINUS(s(x), s(y)) → MINUS(x, y)
gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
MINUS(s(x), s(y)) → MINUS(x, y)
gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
MINUS(s(x), s(y)) → MINUS(x, y)
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
MINUS(s(x), s(y)) → MINUS(x, y)
From the DPs we obtained the following set of size-change graphs:
LE(s(x), s(y)) → LE(x, y)
gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
LE(s(x), s(y)) → LE(x, y)
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
LE(s(x), s(y)) → LE(x, y)
From the DPs we obtained the following set of size-change graphs:
INC(s(i)) → INC(i)
gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
INC(s(i)) → INC(i)
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
INC(s(i)) → INC(i)
From the DPs we obtained the following set of size-change graphs:
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
GCD2(x, y, i) → IF1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
GCD2(x, y, i) → IF1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a
gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
a
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
GCD2(x, y, i) → IF1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
minus(s(x), s(y)) → minus(x, y)
POL(0) = 0
POL(GCD2(x1, x2, x3)) = 2 + x1 + 2·x2
POL(IF1(x1, x2, x3, x4, x5, x6, x7)) = 2 + x5 + 2·x6
POL(IF2(x1, x2, x3, x4, x5, x6)) = 2 + x4 + 2·x5
POL(IF3(x1, x2, x3, x4, x5)) = 2 + x3 + 2·x4
POL(IF4(x1, x2, x3, x4)) = 2 + x2 + 2·x3
POL(false) = 0
POL(inc(x1)) = 2 + 2·x1
POL(le(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(s(x1)) = 2 + 2·x1
POL(true) = 0
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
GCD2(x, y, i) → IF1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
minus(x, 0) → x
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2)) → GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
GCD2(0, y1, y2) → IF1(true, le(y1, 0), le(0, y1), le(y1, 0), 0, y1, inc(y2)) → GCD2(0, y1, y2) → IF1(true, le(y1, 0), le(0, y1), le(y1, 0), 0, y1, inc(y2))
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
GCD2(0, y1, y2) → IF1(true, le(y1, 0), le(0, y1), le(y1, 0), 0, y1, inc(y2))
minus(x, 0) → x
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
minus(x, 0) → x
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3) → IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF3(false, y0, 0, x0, y3) → GCD2(0, x0, y3) → IF3(false, y0, 0, x0, y3) → GCD2(0, x0, y3)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF3(false, y0, 0, x0, y3) → GCD2(0, x0, y3)
minus(x, 0) → x
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
minus(x, 0) → x
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3) → IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
minus(x, 0) → x
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5) → IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
minus(x, 0) → x
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4) → IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
minus(x, 0) → x
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3) → IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
minus(x, 0) → x
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
IF3(false, z1, s(z2), 0, z4) → GCD2(s(z2), 0, z4) → IF3(false, z1, s(z2), 0, z4) → GCD2(s(z2), 0, z4)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
IF3(false, z1, s(z2), 0, z4) → GCD2(s(z2), 0, z4)
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5) → IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
IF3(false, z1, s(z2), 0, z4) → GCD2(s(z2), 0, z4)
IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(s(y0), s(x0)), le(s(x0), s(y0)), s(y0), s(x0), inc(y2)) → GCD2(s(y0), s(x0), y2) → IF1(false, false, le(s(y0), s(x0)), le(s(x0), s(y0)), s(y0), s(x0), inc(y2))
GCD2(s(y0), 0, y2) → IF1(false, true, le(s(y0), 0), le(0, s(y0)), s(y0), 0, inc(y2)) → GCD2(s(y0), 0, y2) → IF1(false, true, le(s(y0), 0), le(0, s(y0)), s(y0), 0, inc(y2))
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
IF3(false, z1, s(z2), 0, z4) → GCD2(s(z2), 0, z4)
IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(s(y0), s(x0)), le(s(x0), s(y0)), s(y0), s(x0), inc(y2))
GCD2(s(y0), 0, y2) → IF1(false, true, le(s(y0), 0), le(0, s(y0)), s(y0), 0, inc(y2))
minus(0, y) → 0
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))