We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^1)).

Strict Trs:
  { g(c(x, s(y))) -> g(c(s(x), y))
  , f(x) -> x
  , f(c(s(x), y)) -> f(c(x, s(y)))
  , f(f(x)) -> f(d(f(x))) }
Obligation:
  runtime complexity
Answer:
  YES(?,O(n^1))

The problem is match-bounded by 1. The enriched problem is
compatible with the following automaton.
{ g_0(2) -> 1
, g_1(3) -> 1
, c_0(2, 2) -> 1
, c_0(2, 2) -> 2
, c_1(2, 4) -> 1
, c_1(2, 4) -> 5
, c_1(4, 2) -> 3
, s_0(2) -> 1
, s_0(2) -> 2
, s_1(2) -> 4
, s_1(4) -> 4
, f_0(2) -> 1
, f_1(5) -> 1
, d_0(2) -> 1
, d_0(2) -> 2 }

Hurray, we answered YES(?,O(n^1))