YES(O(1),O(n^1)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict Trs: { is_empty(nil()) -> true() , is_empty(cons(x, l)) -> false() , hd(cons(x, l)) -> x , tl(cons(x, l)) -> l , append(l1, l2) -> ifappend(l1, l2, l1) , ifappend(l1, l2, nil()) -> l2 , ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We add following weak dependency pairs: Strict DPs: { is_empty^#(nil()) -> c_1() , is_empty^#(cons(x, l)) -> c_2() , hd^#(cons(x, l)) -> c_3() , tl^#(cons(x, l)) -> c_4() , append^#(l1, l2) -> c_5(ifappend^#(l1, l2, l1)) , ifappend^#(l1, l2, nil()) -> c_6() , ifappend^#(l1, l2, cons(x, l)) -> c_7(append^#(l, l2)) } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { is_empty^#(nil()) -> c_1() , is_empty^#(cons(x, l)) -> c_2() , hd^#(cons(x, l)) -> c_3() , tl^#(cons(x, l)) -> c_4() , append^#(l1, l2) -> c_5(ifappend^#(l1, l2, l1)) , ifappend^#(l1, l2, nil()) -> c_6() , ifappend^#(l1, l2, cons(x, l)) -> c_7(append^#(l, l2)) } Strict Trs: { is_empty(nil()) -> true() , is_empty(cons(x, l)) -> false() , hd(cons(x, l)) -> x , tl(cons(x, l)) -> l , append(l1, l2) -> ifappend(l1, l2, l1) , ifappend(l1, l2, nil()) -> l2 , ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { is_empty^#(nil()) -> c_1() , is_empty^#(cons(x, l)) -> c_2() , hd^#(cons(x, l)) -> c_3() , tl^#(cons(x, l)) -> c_4() , append^#(l1, l2) -> c_5(ifappend^#(l1, l2, l1)) , ifappend^#(l1, l2, nil()) -> c_6() , ifappend^#(l1, l2, cons(x, l)) -> c_7(append^#(l, l2)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The weightgap principle applies (using the following constant growth matrix-interpretation) The following argument positions are usable: Uargs(c_5) = {1}, Uargs(c_7) = {1} TcT has computed following constructor-restricted matrix interpretation. [nil] = [2] [cons](x1, x2) = [1] x2 + [1] [is_empty^#](x1) = [2] x1 + [2] [c_1] = [1] [c_2] = [1] [hd^#](x1) = [2] x1 + [1] [c_3] = [2] [tl^#](x1) = [2] x1 + [1] [c_4] = [2] [append^#](x1, x2) = [2] x1 + [2] x2 + [2] [c_5](x1) = [1] x1 + [1] [ifappend^#](x1, x2, x3) = [2] x2 + [2] x3 + [2] [c_6] = [1] [c_7](x1) = [1] x1 + [1] This order satisfies following ordering constraints: Further, it can be verified that all rules not oriented are covered by the weightgap condition. We are left with following problem, upon which TcT provides the certificate YES(?,O(n^1)). Strict DPs: { append^#(l1, l2) -> c_5(ifappend^#(l1, l2, l1)) } Weak DPs: { is_empty^#(nil()) -> c_1() , is_empty^#(cons(x, l)) -> c_2() , hd^#(cons(x, l)) -> c_3() , tl^#(cons(x, l)) -> c_4() , ifappend^#(l1, l2, nil()) -> c_6() , ifappend^#(l1, l2, cons(x, l)) -> c_7(append^#(l, l2)) } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { is_empty^#(nil()) -> c_1() , is_empty^#(cons(x, l)) -> c_2() , hd^#(cons(x, l)) -> c_3() , tl^#(cons(x, l)) -> c_4() , ifappend^#(l1, l2, nil()) -> c_6() } We are left with following problem, upon which TcT provides the certificate YES(?,O(n^1)). Strict DPs: { append^#(l1, l2) -> c_5(ifappend^#(l1, l2, l1)) } Weak DPs: { ifappend^#(l1, l2, cons(x, l)) -> c_7(append^#(l, l2)) } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) The following argument positions are usable: Uargs(c_5) = {1}, Uargs(c_7) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [cons](x1, x2) = [1] x1 + [1] x2 + [2] [append^#](x1, x2) = [2] x1 + [3] x2 + [2] [c_5](x1) = [1] x1 + [1] [ifappend^#](x1, x2, x3) = [3] x2 + [2] x3 + [0] [c_7](x1) = [1] x1 + [0] This order satisfies following ordering constraints: [append^#(l1, l2)] = [2] l1 + [3] l2 + [2] > [2] l1 + [3] l2 + [1] = [c_5(ifappend^#(l1, l2, l1))] [ifappend^#(l1, l2, cons(x, l))] = [2] x + [2] l + [3] l2 + [4] > [2] l + [3] l2 + [2] = [c_7(append^#(l, l2))] Hurray, we answered YES(O(1),O(n^1))