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

f(x, c(x), c(y)) → f(y, y, f(y, x, y))
f(s(x), y, z) → f(x, s(c(y)), c(z))
f(c(x), x, y) → c(y)
g(x, y) → x
g(x, y) → y

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

f'(x, c'(x), c'(y)) → f'(y, y, f'(y, x, y))
f'(s'(x), y, z) → f'(x, s'(c'(y)), c'(z))
f'(c'(x), x, y) → c'(y)
g'(x, y) → x
g'(x, y) → y

Rewrite Strategy: INNERMOST

Infered types.

Rules:
f'(x, c'(x), c'(y)) → f'(y, y, f'(y, x, y))
f'(s'(x), y, z) → f'(x, s'(c'(y)), c'(z))
f'(c'(x), x, y) → c'(y)
g'(x, y) → x
g'(x, y) → y

Types:
f' :: c':s' → c':s' → c':s' → c':s'
c' :: c':s' → c':s'
s' :: c':s' → c':s'
g' :: g' → g' → g'
_hole_c':s'1 :: c':s'
_hole_g'2 :: g'
_gen_c':s'3 :: Nat → c':s'

Heuristically decided to analyse the following defined symbols:
f'

Rules:
f'(x, c'(x), c'(y)) → f'(y, y, f'(y, x, y))
f'(s'(x), y, z) → f'(x, s'(c'(y)), c'(z))
f'(c'(x), x, y) → c'(y)
g'(x, y) → x
g'(x, y) → y

Types:
f' :: c':s' → c':s' → c':s' → c':s'
c' :: c':s' → c':s'
s' :: c':s' → c':s'
g' :: g' → g' → g'
_hole_c':s'1 :: c':s'
_hole_g'2 :: g'
_gen_c':s'3 :: Nat → c':s'

Generator Equations:
_gen_c':s'3(0) ⇔ _hole_c':s'1
_gen_c':s'3(+(x, 1)) ⇔ c'(_gen_c':s'3(x))

The following defined symbols remain to be analysed:
f'

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

Rules:
f'(x, c'(x), c'(y)) → f'(y, y, f'(y, x, y))
f'(s'(x), y, z) → f'(x, s'(c'(y)), c'(z))
f'(c'(x), x, y) → c'(y)
g'(x, y) → x
g'(x, y) → y

Types:
f' :: c':s' → c':s' → c':s' → c':s'
c' :: c':s' → c':s'
s' :: c':s' → c':s'
g' :: g' → g' → g'
_hole_c':s'1 :: c':s'
_hole_g'2 :: g'
_gen_c':s'3 :: Nat → c':s'

Generator Equations:
_gen_c':s'3(0) ⇔ _hole_c':s'1
_gen_c':s'3(+(x, 1)) ⇔ c'(_gen_c':s'3(x))

No more defined symbols left to analyse.