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

min(0, y) → 0
min(x, 0) → 0
min(s(x), s(y)) → s(min(x, y))
max(0, y) → y
max(x, 0) → x
max(s(x), s(y)) → s(max(x, y))
p(s(x)) → x
f(s(x), s(y), s(z)) → f(max(s(x), max(s(y), s(z))), p(min(s(x), max(s(y), s(z)))), min(s(x), min(s(y), s(z))))
f(0, y, z) → max(y, z)
f(x, 0, z) → max(x, z)
f(x, y, 0) → max(x, y)

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

min'(0', y) → 0'
min'(x, 0') → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(0', y) → y
max'(x, 0') → x
max'(s'(x), s'(y)) → s'(max'(x, y))
p'(s'(x)) → x
f'(s'(x), s'(y), s'(z)) → f'(max'(s'(x), max'(s'(y), s'(z))), p'(min'(s'(x), max'(s'(y), s'(z)))), min'(s'(x), min'(s'(y), s'(z))))
f'(0', y, z) → max'(y, z)
f'(x, 0', z) → max'(x, z)
f'(x, y, 0') → max'(x, y)

Rewrite Strategy: INNERMOST

Infered types.

Rules:
min'(0', y) → 0'
min'(x, 0') → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(0', y) → y
max'(x, 0') → x
max'(s'(x), s'(y)) → s'(max'(x, y))
p'(s'(x)) → x
f'(s'(x), s'(y), s'(z)) → f'(max'(s'(x), max'(s'(y), s'(z))), p'(min'(s'(x), max'(s'(y), s'(z)))), min'(s'(x), min'(s'(y), s'(z))))
f'(0', y, z) → max'(y, z)
f'(x, 0', z) → max'(x, z)
f'(x, y, 0') → max'(x, y)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
p' :: 0':s' → 0':s'
f' :: 0':s' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'

Heuristically decided to analyse the following defined symbols:
min', max', f'

They will be analysed ascendingly in the following order:
min' < f'
max' < f'

Rules:
min'(0', y) → 0'
min'(x, 0') → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(0', y) → y
max'(x, 0') → x
max'(s'(x), s'(y)) → s'(max'(x, y))
p'(s'(x)) → x
f'(s'(x), s'(y), s'(z)) → f'(max'(s'(x), max'(s'(y), s'(z))), p'(min'(s'(x), max'(s'(y), s'(z)))), min'(s'(x), min'(s'(y), s'(z))))
f'(0', y, z) → max'(y, z)
f'(x, 0', z) → max'(x, z)
f'(x, y, 0') → max'(x, y)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
p' :: 0':s' → 0':s'
f' :: 0':s' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'

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

The following defined symbols remain to be analysed:
min', max', f'

They will be analysed ascendingly in the following order:
min' < f'
max' < f'

Proved the following rewrite lemma:
min'(_gen_0':s'2(_n4), _gen_0':s'2(_n4)) → _gen_0':s'2(_n4), rt ∈ Ω(1 + n4)

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

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

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

Rules:
min'(0', y) → 0'
min'(x, 0') → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(0', y) → y
max'(x, 0') → x
max'(s'(x), s'(y)) → s'(max'(x, y))
p'(s'(x)) → x
f'(s'(x), s'(y), s'(z)) → f'(max'(s'(x), max'(s'(y), s'(z))), p'(min'(s'(x), max'(s'(y), s'(z)))), min'(s'(x), min'(s'(y), s'(z))))
f'(0', y, z) → max'(y, z)
f'(x, 0', z) → max'(x, z)
f'(x, y, 0') → max'(x, y)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
p' :: 0':s' → 0':s'
f' :: 0':s' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'

Lemmas:
min'(_gen_0':s'2(_n4), _gen_0':s'2(_n4)) → _gen_0':s'2(_n4), rt ∈ Ω(1 + n4)

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

The following defined symbols remain to be analysed:
max', f'

They will be analysed ascendingly in the following order:
max' < f'

Proved the following rewrite lemma:
max'(_gen_0':s'2(_n714), _gen_0':s'2(_n714)) → _gen_0':s'2(_n714), rt ∈ Ω(1 + n714)

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

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

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

Rules:
min'(0', y) → 0'
min'(x, 0') → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(0', y) → y
max'(x, 0') → x
max'(s'(x), s'(y)) → s'(max'(x, y))
p'(s'(x)) → x
f'(s'(x), s'(y), s'(z)) → f'(max'(s'(x), max'(s'(y), s'(z))), p'(min'(s'(x), max'(s'(y), s'(z)))), min'(s'(x), min'(s'(y), s'(z))))
f'(0', y, z) → max'(y, z)
f'(x, 0', z) → max'(x, z)
f'(x, y, 0') → max'(x, y)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
p' :: 0':s' → 0':s'
f' :: 0':s' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'

Lemmas:
min'(_gen_0':s'2(_n4), _gen_0':s'2(_n4)) → _gen_0':s'2(_n4), rt ∈ Ω(1 + n4)
max'(_gen_0':s'2(_n714), _gen_0':s'2(_n714)) → _gen_0':s'2(_n714), rt ∈ Ω(1 + n714)

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

The following defined symbols remain to be analysed:
f'

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

Rules:
min'(0', y) → 0'
min'(x, 0') → 0'
min'(s'(x), s'(y)) → s'(min'(x, y))
max'(0', y) → y
max'(x, 0') → x
max'(s'(x), s'(y)) → s'(max'(x, y))
p'(s'(x)) → x
f'(s'(x), s'(y), s'(z)) → f'(max'(s'(x), max'(s'(y), s'(z))), p'(min'(s'(x), max'(s'(y), s'(z)))), min'(s'(x), min'(s'(y), s'(z))))
f'(0', y, z) → max'(y, z)
f'(x, 0', z) → max'(x, z)
f'(x, y, 0') → max'(x, y)

Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
max' :: 0':s' → 0':s' → 0':s'
p' :: 0':s' → 0':s'
f' :: 0':s' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'

Lemmas:
min'(_gen_0':s'2(_n4), _gen_0':s'2(_n4)) → _gen_0':s'2(_n4), rt ∈ Ω(1 + n4)
max'(_gen_0':s'2(_n714), _gen_0':s'2(_n714)) → _gen_0':s'2(_n714), rt ∈ Ω(1 + n714)

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

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
min'(_gen_0':s'2(_n4), _gen_0':s'2(_n4)) → _gen_0':s'2(_n4), rt ∈ Ω(1 + n4)