We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^1)).
Strict Trs:
{ double(0()) -> 0()
, double(s(x)) -> s(s(double(x)))
, half(double(x)) -> x
, half(0()) -> 0()
, half(s(0())) -> 0()
, half(s(s(x))) -> s(half(x))
, -(x, 0()) -> x
, -(s(x), s(y)) -> -(x, y)
, if(0(), y, z) -> y
, if(s(x), y, z) -> z }
Obligation:
innermost runtime complexity
Answer:
YES(?,O(n^1))
The problem is match-bounded by 1. The enriched problem is
compatible with the following automaton.
{ double_0(2) -> 1
, double_1(2) -> 4
, 0_0() -> 1
, 0_0() -> 2
, 0_1() -> 1
, 0_1() -> 3
, 0_1() -> 4
, s_0(2) -> 1
, s_0(2) -> 2
, s_1(3) -> 1
, s_1(3) -> 3
, s_1(3) -> 4
, s_1(4) -> 3
, half_0(2) -> 1
, half_1(2) -> 3
, -_0(2, 2) -> 1
, -_1(2, 2) -> 1
, if_0(2, 2, 2) -> 1 }
Hurray, we answered YES(?,O(n^1))