WORST_CASE(?,O(n^1)) * Step 1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: fold(a,xs) -> Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) foldl(a,Nil()) -> a foldl(x,Cons(S(0()),xs)) -> foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) -> foldl(S(x),xs) foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold,foldl,foldr,notEmpty,op} and constructors {0,Cons ,False,Nil,S,True} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(Cons) = {1,2}, uargs(op) = {2} Following symbols are considered usable: {fold,foldl,foldr,notEmpty,op} TcT has computed the following interpretation: p(0) = [0] p(Cons) = [1] x1 + [1] x2 + [2] p(False) = [1] p(Nil) = [1] p(S) = [1] x1 + [6] p(True) = [0] p(fold) = [5] x1 + [9] x2 + [14] p(foldl) = [2] x1 + [2] x2 + [0] p(foldr) = [2] x1 + [7] x2 + [5] p(notEmpty) = [2] x1 + [6] p(op) = [2] x1 + [1] x2 + [5] Following rules are strictly oriented: fold(a,xs) = [5] a + [9] xs + [14] > [4] a + [9] xs + [10] = Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) foldl(a,Nil()) = [2] a + [2] > [1] a + [0] = a foldl(x,Cons(S(0()),xs)) = [2] x + [2] xs + [16] > [2] x + [2] xs + [12] = foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) = [2] x + [2] xs + [16] > [2] x + [2] xs + [12] = foldl(S(x),xs) foldr(a,Cons(x,xs)) = [2] a + [7] x + [7] xs + [19] > [2] a + [2] x + [7] xs + [10] = op(x,foldr(a,xs)) foldr(a,Nil()) = [2] a + [12] > [1] a + [0] = a notEmpty(Cons(x,xs)) = [2] x + [2] xs + [10] > [0] = True() notEmpty(Nil()) = [8] > [1] = False() op(x,S(0())) = [2] x + [11] > [1] x + [6] = S(x) op(S(0()),y) = [1] y + [17] > [1] y + [6] = S(y) Following rules are (at-least) weakly oriented: * Step 2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: fold(a,xs) -> Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) foldl(a,Nil()) -> a foldl(x,Cons(S(0()),xs)) -> foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) -> foldl(S(x),xs) foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold,foldl,foldr,notEmpty,op} and constructors {0,Cons ,False,Nil,S,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^1))