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

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

min'(x, 0') → 0'
min'(0', y) → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(x, 0') → x
max'(0', y) → y
max'(s'(x), s'(y)) → s'(max'(x, y))
minus'(x, 0') → x
minus'(s'(x), s'(y)) → s'(minus'(x, y))
gcd'(s'(x), s'(y)) → gcd'(minus'(max'(x, y), min'(x, transform'(y))), s'(min'(x, y)))
transform'(x) → s'(s'(x))
transform'(cons'(x, y)) → cons'(cons'(x, x), x)
transform'(cons'(x, y)) → y
transform'(s'(x)) → s'(s'(transform'(x)))
cons'(x, y) → y
cons'(x, cons'(y, s'(z))) → cons'(y, x)
cons'(cons'(x, z), s'(y)) → transform'(x)

Rewrite Strategy: INNERMOST

Infered types.

Rules:
min'(x, 0') → 0'
min'(0', y) → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(x, 0') → x
max'(0', y) → y
max'(s'(x), s'(y)) → s'(max'(x, y))
minus'(x, 0') → x
minus'(s'(x), s'(y)) → s'(minus'(x, y))
gcd'(s'(x), s'(y)) → gcd'(minus'(max'(x, y), min'(x, transform'(y))), s'(min'(x, y)))
transform'(x) → s'(s'(x))
transform'(cons'(x, y)) → cons'(cons'(x, x), x)
transform'(cons'(x, y)) → y
transform'(s'(x)) → s'(s'(transform'(x)))
cons'(x, y) → y
cons'(x, cons'(y, s'(z))) → cons'(y, x)
cons'(cons'(x, z), s'(y)) → transform'(x)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
gcd' :: 0':s' → 0':s' → gcd'
transform' :: 0':s' → 0':s'
cons' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_gcd'2 :: gcd'
_gen_0':s'3 :: Nat → 0':s'

Heuristically decided to analyse the following defined symbols:
min', max', minus', gcd', transform', cons'

They will be analysed ascendingly in the following order:
min' < gcd'
max' < gcd'
minus' < gcd'
transform' < gcd'
transform' = cons'

Rules:
min'(x, 0') → 0'
min'(0', y) → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(x, 0') → x
max'(0', y) → y
max'(s'(x), s'(y)) → s'(max'(x, y))
minus'(x, 0') → x
minus'(s'(x), s'(y)) → s'(minus'(x, y))
gcd'(s'(x), s'(y)) → gcd'(minus'(max'(x, y), min'(x, transform'(y))), s'(min'(x, y)))
transform'(x) → s'(s'(x))
transform'(cons'(x, y)) → cons'(cons'(x, x), x)
transform'(cons'(x, y)) → y
transform'(s'(x)) → s'(s'(transform'(x)))
cons'(x, y) → y
cons'(x, cons'(y, s'(z))) → cons'(y, x)
cons'(cons'(x, z), s'(y)) → transform'(x)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
gcd' :: 0':s' → 0':s' → gcd'
transform' :: 0':s' → 0':s'
cons' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_gcd'2 :: gcd'
_gen_0':s'3 :: Nat → 0':s'

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
min', max', minus', gcd', transform', cons'

They will be analysed ascendingly in the following order:
min' < gcd'
max' < gcd'
minus' < gcd'
transform' < gcd'
transform' = cons'

Proved the following rewrite lemma:
min'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)

Induction Base:
min'(_gen_0':s'3(0), _gen_0':s'3(0)) →RΩ(1)
0'

Induction Step:
min'(_gen_0':s'3(+(_\$n6, 1)), _gen_0':s'3(+(_\$n6, 1))) →RΩ(1)
s'(min'(_gen_0':s'3(_\$n6), _gen_0':s'3(_\$n6))) →IH
s'(_gen_0':s'3(_\$n6))

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

Rules:
min'(x, 0') → 0'
min'(0', y) → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(x, 0') → x
max'(0', y) → y
max'(s'(x), s'(y)) → s'(max'(x, y))
minus'(x, 0') → x
minus'(s'(x), s'(y)) → s'(minus'(x, y))
gcd'(s'(x), s'(y)) → gcd'(minus'(max'(x, y), min'(x, transform'(y))), s'(min'(x, y)))
transform'(x) → s'(s'(x))
transform'(cons'(x, y)) → cons'(cons'(x, x), x)
transform'(cons'(x, y)) → y
transform'(s'(x)) → s'(s'(transform'(x)))
cons'(x, y) → y
cons'(x, cons'(y, s'(z))) → cons'(y, x)
cons'(cons'(x, z), s'(y)) → transform'(x)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
gcd' :: 0':s' → 0':s' → gcd'
transform' :: 0':s' → 0':s'
cons' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_gcd'2 :: gcd'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
min'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
max', minus', gcd', transform', cons'

They will be analysed ascendingly in the following order:
max' < gcd'
minus' < gcd'
transform' < gcd'
transform' = cons'

Proved the following rewrite lemma:
max'(_gen_0':s'3(_n994), _gen_0':s'3(_n994)) → _gen_0':s'3(_n994), rt ∈ Ω(1 + n994)

Induction Base:
max'(_gen_0':s'3(0), _gen_0':s'3(0)) →RΩ(1)
_gen_0':s'3(0)

Induction Step:
max'(_gen_0':s'3(+(_\$n995, 1)), _gen_0':s'3(+(_\$n995, 1))) →RΩ(1)
s'(max'(_gen_0':s'3(_\$n995), _gen_0':s'3(_\$n995))) →IH
s'(_gen_0':s'3(_\$n995))

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

Rules:
min'(x, 0') → 0'
min'(0', y) → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(x, 0') → x
max'(0', y) → y
max'(s'(x), s'(y)) → s'(max'(x, y))
minus'(x, 0') → x
minus'(s'(x), s'(y)) → s'(minus'(x, y))
gcd'(s'(x), s'(y)) → gcd'(minus'(max'(x, y), min'(x, transform'(y))), s'(min'(x, y)))
transform'(x) → s'(s'(x))
transform'(cons'(x, y)) → cons'(cons'(x, x), x)
transform'(cons'(x, y)) → y
transform'(s'(x)) → s'(s'(transform'(x)))
cons'(x, y) → y
cons'(x, cons'(y, s'(z))) → cons'(y, x)
cons'(cons'(x, z), s'(y)) → transform'(x)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
gcd' :: 0':s' → 0':s' → gcd'
transform' :: 0':s' → 0':s'
cons' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_gcd'2 :: gcd'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
min'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)
max'(_gen_0':s'3(_n994), _gen_0':s'3(_n994)) → _gen_0':s'3(_n994), rt ∈ Ω(1 + n994)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
minus', gcd', transform', cons'

They will be analysed ascendingly in the following order:
minus' < gcd'
transform' < gcd'
transform' = cons'

Proved the following rewrite lemma:
minus'(_gen_0':s'3(_n2173), _gen_0':s'3(_n2173)) → _gen_0':s'3(_n2173), rt ∈ Ω(1 + n2173)

Induction Base:
minus'(_gen_0':s'3(0), _gen_0':s'3(0)) →RΩ(1)
_gen_0':s'3(0)

Induction Step:
minus'(_gen_0':s'3(+(_\$n2174, 1)), _gen_0':s'3(+(_\$n2174, 1))) →RΩ(1)
s'(minus'(_gen_0':s'3(_\$n2174), _gen_0':s'3(_\$n2174))) →IH
s'(_gen_0':s'3(_\$n2174))

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

Rules:
min'(x, 0') → 0'
min'(0', y) → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(x, 0') → x
max'(0', y) → y
max'(s'(x), s'(y)) → s'(max'(x, y))
minus'(x, 0') → x
minus'(s'(x), s'(y)) → s'(minus'(x, y))
gcd'(s'(x), s'(y)) → gcd'(minus'(max'(x, y), min'(x, transform'(y))), s'(min'(x, y)))
transform'(x) → s'(s'(x))
transform'(cons'(x, y)) → cons'(cons'(x, x), x)
transform'(cons'(x, y)) → y
transform'(s'(x)) → s'(s'(transform'(x)))
cons'(x, y) → y
cons'(x, cons'(y, s'(z))) → cons'(y, x)
cons'(cons'(x, z), s'(y)) → transform'(x)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
gcd' :: 0':s' → 0':s' → gcd'
transform' :: 0':s' → 0':s'
cons' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_gcd'2 :: gcd'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
min'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)
max'(_gen_0':s'3(_n994), _gen_0':s'3(_n994)) → _gen_0':s'3(_n994), rt ∈ Ω(1 + n994)
minus'(_gen_0':s'3(_n2173), _gen_0':s'3(_n2173)) → _gen_0':s'3(_n2173), rt ∈ Ω(1 + n2173)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
cons', gcd', transform'

They will be analysed ascendingly in the following order:
transform' < gcd'
transform' = cons'

Could not prove a rewrite lemma for the defined symbol cons'.

Rules:
min'(x, 0') → 0'
min'(0', y) → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(x, 0') → x
max'(0', y) → y
max'(s'(x), s'(y)) → s'(max'(x, y))
minus'(x, 0') → x
minus'(s'(x), s'(y)) → s'(minus'(x, y))
gcd'(s'(x), s'(y)) → gcd'(minus'(max'(x, y), min'(x, transform'(y))), s'(min'(x, y)))
transform'(x) → s'(s'(x))
transform'(cons'(x, y)) → cons'(cons'(x, x), x)
transform'(cons'(x, y)) → y
transform'(s'(x)) → s'(s'(transform'(x)))
cons'(x, y) → y
cons'(x, cons'(y, s'(z))) → cons'(y, x)
cons'(cons'(x, z), s'(y)) → transform'(x)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
gcd' :: 0':s' → 0':s' → gcd'
transform' :: 0':s' → 0':s'
cons' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_gcd'2 :: gcd'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
min'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)
max'(_gen_0':s'3(_n994), _gen_0':s'3(_n994)) → _gen_0':s'3(_n994), rt ∈ Ω(1 + n994)
minus'(_gen_0':s'3(_n2173), _gen_0':s'3(_n2173)) → _gen_0':s'3(_n2173), rt ∈ Ω(1 + n2173)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
transform', gcd'

They will be analysed ascendingly in the following order:
transform' < gcd'
transform' = cons'

Proved the following rewrite lemma:
transform'(_gen_0':s'3(+(1, _n3325))) → _*4, rt ∈ Ω(n3325)

Induction Base:
transform'(_gen_0':s'3(+(1, 0)))

Induction Step:
transform'(_gen_0':s'3(+(1, +(_\$n3326, 1)))) →RΩ(1)
s'(s'(transform'(_gen_0':s'3(+(1, _\$n3326))))) →IH
s'(s'(_*4))

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

Rules:
min'(x, 0') → 0'
min'(0', y) → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(x, 0') → x
max'(0', y) → y
max'(s'(x), s'(y)) → s'(max'(x, y))
minus'(x, 0') → x
minus'(s'(x), s'(y)) → s'(minus'(x, y))
gcd'(s'(x), s'(y)) → gcd'(minus'(max'(x, y), min'(x, transform'(y))), s'(min'(x, y)))
transform'(x) → s'(s'(x))
transform'(cons'(x, y)) → cons'(cons'(x, x), x)
transform'(cons'(x, y)) → y
transform'(s'(x)) → s'(s'(transform'(x)))
cons'(x, y) → y
cons'(x, cons'(y, s'(z))) → cons'(y, x)
cons'(cons'(x, z), s'(y)) → transform'(x)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
gcd' :: 0':s' → 0':s' → gcd'
transform' :: 0':s' → 0':s'
cons' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_gcd'2 :: gcd'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
min'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)
max'(_gen_0':s'3(_n994), _gen_0':s'3(_n994)) → _gen_0':s'3(_n994), rt ∈ Ω(1 + n994)
minus'(_gen_0':s'3(_n2173), _gen_0':s'3(_n2173)) → _gen_0':s'3(_n2173), rt ∈ Ω(1 + n2173)
transform'(_gen_0':s'3(+(1, _n3325))) → _*4, rt ∈ Ω(n3325)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
cons', gcd'

They will be analysed ascendingly in the following order:
transform' < gcd'
transform' = cons'

Could not prove a rewrite lemma for the defined symbol cons'.

Rules:
min'(x, 0') → 0'
min'(0', y) → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(x, 0') → x
max'(0', y) → y
max'(s'(x), s'(y)) → s'(max'(x, y))
minus'(x, 0') → x
minus'(s'(x), s'(y)) → s'(minus'(x, y))
gcd'(s'(x), s'(y)) → gcd'(minus'(max'(x, y), min'(x, transform'(y))), s'(min'(x, y)))
transform'(x) → s'(s'(x))
transform'(cons'(x, y)) → cons'(cons'(x, x), x)
transform'(cons'(x, y)) → y
transform'(s'(x)) → s'(s'(transform'(x)))
cons'(x, y) → y
cons'(x, cons'(y, s'(z))) → cons'(y, x)
cons'(cons'(x, z), s'(y)) → transform'(x)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
gcd' :: 0':s' → 0':s' → gcd'
transform' :: 0':s' → 0':s'
cons' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_gcd'2 :: gcd'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
min'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)
max'(_gen_0':s'3(_n994), _gen_0':s'3(_n994)) → _gen_0':s'3(_n994), rt ∈ Ω(1 + n994)
minus'(_gen_0':s'3(_n2173), _gen_0':s'3(_n2173)) → _gen_0':s'3(_n2173), rt ∈ Ω(1 + n2173)
transform'(_gen_0':s'3(+(1, _n3325))) → _*4, rt ∈ Ω(n3325)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
gcd'

Could not prove a rewrite lemma for the defined symbol gcd'.

Rules:
min'(x, 0') → 0'
min'(0', y) → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(x, 0') → x
max'(0', y) → y
max'(s'(x), s'(y)) → s'(max'(x, y))
minus'(x, 0') → x
minus'(s'(x), s'(y)) → s'(minus'(x, y))
gcd'(s'(x), s'(y)) → gcd'(minus'(max'(x, y), min'(x, transform'(y))), s'(min'(x, y)))
transform'(x) → s'(s'(x))
transform'(cons'(x, y)) → cons'(cons'(x, x), x)
transform'(cons'(x, y)) → y
transform'(s'(x)) → s'(s'(transform'(x)))
cons'(x, y) → y
cons'(x, cons'(y, s'(z))) → cons'(y, x)
cons'(cons'(x, z), s'(y)) → transform'(x)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
gcd' :: 0':s' → 0':s' → gcd'
transform' :: 0':s' → 0':s'
cons' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_gcd'2 :: gcd'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
min'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)
max'(_gen_0':s'3(_n994), _gen_0':s'3(_n994)) → _gen_0':s'3(_n994), rt ∈ Ω(1 + n994)
minus'(_gen_0':s'3(_n2173), _gen_0':s'3(_n2173)) → _gen_0':s'3(_n2173), rt ∈ Ω(1 + n2173)
transform'(_gen_0':s'3(+(1, _n3325))) → _*4, rt ∈ Ω(n3325)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
min'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)