### (0) Obligation:

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

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

Rewrite Strategy: FULL

### (1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
inc(s(i)) →+ s(inc(i))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [i / s(i)].
The result substitution is [ ].

### (3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

### (4) Obligation:

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

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

S is empty.
Rewrite Strategy: FULL

### (5) SlicingProof (LOWER BOUND(ID) transformation)

Sliced the following arguments:
pair/0
pair/1
result/0
neededIterations/0

### (6) Obligation:

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

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
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
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
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)
ab
ac

S is empty.
Rewrite Strategy: FULL

Infered types.

### (8) Obligation:

TRS:
Rules:
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
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
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
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)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s

### (9) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
gcd2, le, inc, minus

They will be analysed ascendingly in the following order:
le < gcd2
inc < gcd2
minus < gcd2

### (10) Obligation:

TRS:
Rules:
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
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
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
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)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
le, gcd2, inc, minus

They will be analysed ascendingly in the following order:
le < gcd2
inc < gcd2
minus < gcd2

### (11) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)

Induction Base:
le(gen_0':s5_0(+(1, 0)), gen_0':s5_0(0)) →RΩ(1)
false

Induction Step:
le(gen_0':s5_0(+(1, +(n7_0, 1))), gen_0':s5_0(+(n7_0, 1))) →RΩ(1)
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) →IH
false

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

### (13) Obligation:

TRS:
Rules:
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
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
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
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)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s

Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
inc, gcd2, minus

They will be analysed ascendingly in the following order:
inc < gcd2
minus < gcd2

### (14) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
inc(gen_0':s5_0(n338_0)) → gen_0':s5_0(n338_0), rt ∈ Ω(1 + n3380)

Induction Base:
inc(gen_0':s5_0(0)) →RΩ(1)
0'

Induction Step:
inc(gen_0':s5_0(+(n338_0, 1))) →RΩ(1)
s(inc(gen_0':s5_0(n338_0))) →IH
s(gen_0':s5_0(c339_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

### (16) Obligation:

TRS:
Rules:
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
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
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
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)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s

Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n338_0)) → gen_0':s5_0(n338_0), rt ∈ Ω(1 + n3380)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
minus, gcd2

They will be analysed ascendingly in the following order:
minus < gcd2

### (17) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
minus(gen_0':s5_0(n568_0), gen_0':s5_0(n568_0)) → gen_0':s5_0(0), rt ∈ Ω(1 + n5680)

Induction Base:
minus(gen_0':s5_0(0), gen_0':s5_0(0)) →RΩ(1)
gen_0':s5_0(0)

Induction Step:
minus(gen_0':s5_0(+(n568_0, 1)), gen_0':s5_0(+(n568_0, 1))) →RΩ(1)
minus(gen_0':s5_0(n568_0), gen_0':s5_0(n568_0)) →IH
gen_0':s5_0(0)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

### (19) Obligation:

TRS:
Rules:
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
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
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
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)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s

Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n338_0)) → gen_0':s5_0(n338_0), rt ∈ Ω(1 + n3380)
minus(gen_0':s5_0(n568_0), gen_0':s5_0(n568_0)) → gen_0':s5_0(0), rt ∈ Ω(1 + n5680)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
gcd2

### (20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol gcd2.

### (21) Obligation:

TRS:
Rules:
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
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
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
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)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s

Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n338_0)) → gen_0':s5_0(n338_0), rt ∈ Ω(1 + n3380)
minus(gen_0':s5_0(n568_0), gen_0':s5_0(n568_0)) → gen_0':s5_0(0), rt ∈ Ω(1 + n5680)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

### (22) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)

### (24) Obligation:

TRS:
Rules:
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
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
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
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)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s

Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n338_0)) → gen_0':s5_0(n338_0), rt ∈ Ω(1 + n3380)
minus(gen_0':s5_0(n568_0), gen_0':s5_0(n568_0)) → gen_0':s5_0(0), rt ∈ Ω(1 + n5680)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

### (25) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)

### (27) Obligation:

TRS:
Rules:
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
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
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
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)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s

Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n338_0)) → gen_0':s5_0(n338_0), rt ∈ Ω(1 + n3380)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

### (28) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)

### (30) Obligation:

TRS:
Rules:
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
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
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
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)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s

Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

### (31) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)