(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

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))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
pred(s(z0)) → z0
minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
gcd(0, z0) → z0
gcd(s(z0), 0) → s(z0)
gcd(s(z0), s(z1)) → if_gcd(le(z1, z0), s(z0), s(z1))
if_gcd(true, s(z0), s(z1)) → gcd(minus(z0, z1), s(z1))
if_gcd(false, s(z0), s(z1)) → gcd(minus(z1, z0), s(z0))
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
K tuples:none
Defined Rule Symbols:

le, pred, minus, gcd, if_gcd

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c9, c10

(3) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
We considered the (Usable) Rules:

minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
pred(s(z0)) → z0
le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [3]   
POL(GCD(x1, x2)) = [2] + [3]x1 + [3]x2   
POL(IF_GCD(x1, x2, x3)) = [3]x2 + [3]x3   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = [5]   
POL(PRED(x1)) = 0   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c5(x1, x2)) = x1 + x2   
POL(c8(x1, x2)) = x1 + x2   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(pred(x1)) = x1   
POL(s(x1)) = [3] + x1   
POL(true) = 0   

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
pred(s(z0)) → z0
minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
gcd(0, z0) → z0
gcd(s(z0), 0) → s(z0)
gcd(s(z0), s(z1)) → if_gcd(le(z1, z0), s(z0), s(z1))
if_gcd(true, s(z0), s(z1)) → gcd(minus(z0, z1), s(z1))
if_gcd(false, s(z0), s(z1)) → gcd(minus(z1, z0), s(z0))
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
K tuples:

GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
Defined Rule Symbols:

le, pred, minus, gcd, if_gcd

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c9, c10

(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
We considered the (Usable) Rules:

minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
pred(s(z0)) → z0
le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(GCD(x1, x2)) = [2]x1·x2   
POL(IF_GCD(x1, x2, x3)) = [2]x2·x3   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = [3] + x2   
POL(PRED(x1)) = 0   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c5(x1, x2)) = x1 + x2   
POL(c8(x1, x2)) = x1 + x2   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(pred(x1)) = x1   
POL(s(x1)) = [2] + x1   
POL(true) = 0   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
pred(s(z0)) → z0
minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
gcd(0, z0) → z0
gcd(s(z0), 0) → s(z0)
gcd(s(z0), s(z1)) → if_gcd(le(z1, z0), s(z0), s(z1))
if_gcd(true, s(z0), s(z1)) → gcd(minus(z0, z1), s(z1))
if_gcd(false, s(z0), s(z1)) → gcd(minus(z1, z0), s(z0))
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
K tuples:

GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
Defined Rule Symbols:

le, pred, minus, gcd, if_gcd

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c9, c10

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

LE(s(z0), s(z1)) → c2(LE(z0, z1))
We considered the (Usable) Rules:

minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
pred(s(z0)) → z0
le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(GCD(x1, x2)) = x2 + [2]x1·x2   
POL(IF_GCD(x1, x2, x3)) = [2]x2·x3   
POL(LE(x1, x2)) = [2] + x1   
POL(MINUS(x1, x2)) = x2   
POL(PRED(x1)) = [1]   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c5(x1, x2)) = x1 + x2   
POL(c8(x1, x2)) = x1 + x2   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(pred(x1)) = x1   
POL(s(x1)) = [2] + x1   
POL(true) = 0   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
pred(s(z0)) → z0
minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
gcd(0, z0) → z0
gcd(s(z0), 0) → s(z0)
gcd(s(z0), s(z1)) → if_gcd(le(z1, z0), s(z0), s(z1))
if_gcd(true, s(z0), s(z1)) → gcd(minus(z0, z1), s(z1))
if_gcd(false, s(z0), s(z1)) → gcd(minus(z1, z0), s(z0))
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
S tuples:none
K tuples:

GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_GCD(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
MINUS(z0, s(z1)) → c5(PRED(minus(z0, z1)), MINUS(z0, z1))
LE(s(z0), s(z1)) → c2(LE(z0, z1))
Defined Rule Symbols:

le, pred, minus, gcd, if_gcd

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c9, c10

(9) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(10) BOUNDS(O(1), O(1))