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)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(cons) = {2} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [is_empty](x1) = [1] x1 + [7] [nil] = [7] [true] = [5] [cons](x1, x2) = [1] x1 + [1] x2 + [7] [false] = [5] [hd](x1) = [1] x1 + [7] [tl](x1) = [1] x1 + [7] [append](x1, x2) = [1] x1 + [1] x2 + [7] [ifappend](x1, x2, x3) = [1] x2 + [1] x3 + [7] The following symbols are considered usable {is_empty, hd, tl, append, ifappend} The order satisfies the following ordering constraints: [is_empty(nil())] = [14] > [5] = [true()] [is_empty(cons(x, l))] = [1] x + [1] l + [14] > [5] = [false()] [hd(cons(x, l))] = [1] x + [1] l + [14] > [1] x + [0] = [x] [tl(cons(x, l))] = [1] x + [1] l + [14] > [1] l + [0] = [l] [append(l1, l2)] = [1] l1 + [1] l2 + [7] >= [1] l1 + [1] l2 + [7] = [ifappend(l1, l2, l1)] [ifappend(l1, l2, nil())] = [1] l2 + [14] > [1] l2 + [0] = [l2] [ifappend(l1, l2, cons(x, l))] = [1] x + [1] l + [1] l2 + [14] >= [1] x + [1] l + [1] l2 + [14] = [cons(x, append(l, l2))] 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(1),O(n^1)). Strict Trs: { append(l1, l2) -> ifappend(l1, l2, l1) , ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) } Weak Trs: { is_empty(nil()) -> true() , is_empty(cons(x, l)) -> false() , hd(cons(x, l)) -> x , tl(cons(x, l)) -> l , ifappend(l1, l2, nil()) -> l2 } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(cons) = {2} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [is_empty](x1) = [1] x1 + [7] [nil] = [7] [true] = [5] [cons](x1, x2) = [1] x1 + [1] x2 + [0] [false] = [7] [hd](x1) = [1] x1 + [7] [tl](x1) = [1] x1 + [7] [append](x1, x2) = [1] x1 + [1] x2 + [1] [ifappend](x1, x2, x3) = [1] x2 + [1] x3 + [0] The following symbols are considered usable {is_empty, hd, tl, append, ifappend} The order satisfies the following ordering constraints: [is_empty(nil())] = [14] > [5] = [true()] [is_empty(cons(x, l))] = [1] x + [1] l + [7] >= [7] = [false()] [hd(cons(x, l))] = [1] x + [1] l + [7] > [1] x + [0] = [x] [tl(cons(x, l))] = [1] x + [1] l + [7] > [1] l + [0] = [l] [append(l1, l2)] = [1] l1 + [1] l2 + [1] > [1] l1 + [1] l2 + [0] = [ifappend(l1, l2, l1)] [ifappend(l1, l2, nil())] = [1] l2 + [7] > [1] l2 + [0] = [l2] [ifappend(l1, l2, cons(x, l))] = [1] x + [1] l + [1] l2 + [0] ? [1] x + [1] l + [1] l2 + [1] = [cons(x, append(l, l2))] 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(1),O(n^1)). Strict Trs: { ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) } Weak 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 } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(cons) = {2} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [is_empty](x1) = [5] [nil] = [0] [true] = [3] [cons](x1, x2) = [1] x1 + [1] x2 + [4] [false] = [5] [hd](x1) = [3] x1 + [3] [tl](x1) = [3] x1 + [3] [append](x1, x2) = [2] x1 + [7] x2 + [3] [ifappend](x1, x2, x3) = [7] x2 + [2] x3 + [0] The following symbols are considered usable {is_empty, hd, tl, append, ifappend} The order satisfies the following ordering constraints: [is_empty(nil())] = [5] > [3] = [true()] [is_empty(cons(x, l))] = [5] >= [5] = [false()] [hd(cons(x, l))] = [3] x + [3] l + [15] > [1] x + [0] = [x] [tl(cons(x, l))] = [3] x + [3] l + [15] > [1] l + [0] = [l] [append(l1, l2)] = [2] l1 + [7] l2 + [3] > [2] l1 + [7] l2 + [0] = [ifappend(l1, l2, l1)] [ifappend(l1, l2, nil())] = [7] l2 + [0] >= [1] l2 + [0] = [l2] [ifappend(l1, l2, cons(x, l))] = [2] x + [2] l + [7] l2 + [8] > [1] x + [2] l + [7] l2 + [7] = [cons(x, append(l, l2))] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak 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(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^1))