(0) Obligation:

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

minus(X, s(Y)) → pred(minus(X, Y))
minus(X, 0) → X
pred(s(X)) → X
le(s(X), s(Y)) → le(X, Y)
le(s(X), 0) → false
le(0, Y) → true
gcd(0, Y) → 0
gcd(s(X), 0) → s(X)
gcd(s(X), s(Y)) → if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) → gcd(minus(X, Y), s(Y))
if(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:

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

MINUS(z0, s(z1)) → c(PRED(minus(z0, z1)), MINUS(z0, z1))
LE(s(z0), s(z1)) → c3(LE(z0, z1))
GCD(s(z0), s(z1)) → c8(IF(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
S tuples:

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

minus, pred, le, gcd, if

Defined Pair Symbols:

MINUS, LE, GCD, IF

Compound Symbols:

c, c3, c8, c9, c10

(3) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

LE(s(z0), s(z1)) → c3(LE(z0, z1))
GCD(s(z0), s(z1)) → c8(IF(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
MINUS(z0, s(z1)) → c(MINUS(z0, z1))
S tuples:

LE(s(z0), s(z1)) → c3(LE(z0, z1))
GCD(s(z0), s(z1)) → c8(IF(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
MINUS(z0, s(z1)) → c(MINUS(z0, z1))
K tuples:none
Defined Rule Symbols:

minus, pred, le, gcd, if

Defined Pair Symbols:

LE, GCD, IF, MINUS

Compound Symbols:

c3, c8, c9, c10, c

(5) 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(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
We considered the (Usable) Rules:

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

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

POL(0) = [2]   
POL(GCD(x1, x2)) = [2] + [4]x1 + [4]x2   
POL(IF(x1, x2, x3)) = [1] + [4]x2 + [4]x3   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = [2]   
POL(c(x1)) = x1   
POL(c10(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
POL(c8(x1, x2)) = x1 + x2   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = [3] + x1   
POL(pred(x1)) = x1   
POL(s(x1)) = [4] + x1   
POL(true) = 0   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

LE(s(z0), s(z1)) → c3(LE(z0, z1))
GCD(s(z0), s(z1)) → c8(IF(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
MINUS(z0, s(z1)) → c(MINUS(z0, z1))
S tuples:

LE(s(z0), s(z1)) → c3(LE(z0, z1))
MINUS(z0, s(z1)) → c(MINUS(z0, z1))
K tuples:

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

minus, pred, le, gcd, if

Defined Pair Symbols:

LE, GCD, IF, MINUS

Compound Symbols:

c3, c8, c9, c10, c

(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.

MINUS(z0, s(z1)) → c(MINUS(z0, z1))
We considered the (Usable) Rules:

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

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

POL(0) = 0   
POL(GCD(x1, x2)) = x1·x2   
POL(IF(x1, x2, x3)) = x2·x3   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = [1] + x2   
POL(c(x1)) = x1   
POL(c10(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
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)) = [1] + x1   
POL(true) = 0   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

LE(s(z0), s(z1)) → c3(LE(z0, z1))
GCD(s(z0), s(z1)) → c8(IF(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
MINUS(z0, s(z1)) → c(MINUS(z0, z1))
S tuples:

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

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

minus, pred, le, gcd, if

Defined Pair Symbols:

LE, GCD, IF, MINUS

Compound Symbols:

c3, c8, c9, c10, c

(9) 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)) → c3(LE(z0, z1))
We considered the (Usable) Rules:

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

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

POL(0) = 0   
POL(GCD(x1, x2)) = [2]x1 + [2]x22 + [2]x12   
POL(IF(x1, x2, x3)) = [2]x32 + [2]x22   
POL(LE(x1, x2)) = [3] + [2]x2   
POL(MINUS(x1, x2)) = [2]x1   
POL(c(x1)) = x1   
POL(c10(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
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   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

LE(s(z0), s(z1)) → c3(LE(z0, z1))
GCD(s(z0), s(z1)) → c8(IF(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF(false, s(z0), s(z1)) → c10(GCD(minus(z1, z0), s(z0)), MINUS(z1, z0))
MINUS(z0, s(z1)) → c(MINUS(z0, z1))
S tuples:none
K tuples:

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

minus, pred, le, gcd, if

Defined Pair Symbols:

LE, GCD, IF, MINUS

Compound Symbols:

c3, c8, c9, c10, c

(11) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(12) BOUNDS(O(1), O(1))