WORST_CASE(?,O(n^1)) * Step 1: WeightGap 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: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following nonconstant growth matrix-interpretation: 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: all TcT has computed the following interpretation: p(0) = [1] p(Cons) = [1] x1 + [1] x2 + [3] p(False) = [0] p(Nil) = [0] p(S) = [1] x1 + [0] p(True) = [0] p(fold) = [5] x1 + [4] x2 + [8] p(foldl) = [3] x1 + [3] x2 + [0] p(foldr) = [2] x1 + [1] x2 + [0] p(notEmpty) = [0] p(op) = [1] x1 + [1] x2 + [0] Following rules are strictly oriented: fold(a,xs) = [5] a + [4] xs + [8] > [5] a + [4] xs + [6] = Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) foldl(x,Cons(S(0()),xs)) = [3] x + [3] xs + [12] > [3] x + [3] xs + [0] = foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) = [3] x + [3] xs + [12] > [3] x + [3] xs + [0] = foldl(S(x),xs) foldr(a,Cons(x,xs)) = [2] a + [1] x + [1] xs + [3] > [2] a + [1] x + [1] xs + [0] = op(x,foldr(a,xs)) op(x,S(0())) = [1] x + [1] > [1] x + [0] = S(x) op(S(0()),y) = [1] y + [1] > [1] y + [0] = S(y) Following rules are (at-least) weakly oriented: foldl(a,Nil()) = [3] a + [0] >= [1] a + [0] = a foldr(a,Nil()) = [2] a + [0] >= [1] a + [0] = a notEmpty(Cons(x,xs)) = [0] >= [0] = True() notEmpty(Nil()) = [0] >= [0] = False() Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 2: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: foldl(a,Nil()) -> a foldr(a,Nil()) -> a notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() - Weak TRS: fold(a,xs) -> Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) 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)) 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: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following nonconstant growth matrix-interpretation: 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: all TcT has computed the following interpretation: p(0) = [0] p(Cons) = [1] x1 + [1] x2 + [0] p(False) = [0] p(Nil) = [0] p(S) = [1] x1 + [0] p(True) = [0] p(fold) = [7] x1 + [4] x2 + [0] p(foldl) = [3] x1 + [3] x2 + [0] p(foldr) = [4] x1 + [1] x2 + [0] p(notEmpty) = [3] p(op) = [1] x1 + [1] x2 + [0] Following rules are strictly oriented: notEmpty(Cons(x,xs)) = [3] > [0] = True() notEmpty(Nil()) = [3] > [0] = False() Following rules are (at-least) weakly oriented: fold(a,xs) = [7] a + [4] xs + [0] >= [7] a + [4] xs + [0] = Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) foldl(a,Nil()) = [3] a + [0] >= [1] a + [0] = a foldl(x,Cons(S(0()),xs)) = [3] x + [3] xs + [0] >= [3] x + [3] xs + [0] = foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) = [3] x + [3] xs + [0] >= [3] x + [3] xs + [0] = foldl(S(x),xs) foldr(a,Cons(x,xs)) = [4] a + [1] x + [1] xs + [0] >= [4] a + [1] x + [1] xs + [0] = op(x,foldr(a,xs)) foldr(a,Nil()) = [4] a + [0] >= [1] a + [0] = a op(x,S(0())) = [1] x + [0] >= [1] x + [0] = S(x) op(S(0()),y) = [1] y + [0] >= [1] y + [0] = S(y) Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: foldl(a,Nil()) -> a foldr(a,Nil()) -> a - Weak TRS: fold(a,xs) -> Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) 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)) 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: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following nonconstant growth matrix-interpretation: 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: all TcT has computed the following interpretation: p(0) = [2] p(Cons) = [1] x1 + [1] x2 + [2] p(False) = [0] p(Nil) = [0] p(S) = [1] x1 + [0] p(True) = [1] p(fold) = [4] x1 + [3] x2 + [7] p(foldl) = [1] x1 + [1] x2 + [2] p(foldr) = [1] x1 + [2] x2 + [0] p(notEmpty) = [1] x1 + [0] p(op) = [2] x1 + [1] x2 + [0] Following rules are strictly oriented: foldl(a,Nil()) = [1] a + [2] > [1] a + [0] = a Following rules are (at-least) weakly oriented: fold(a,xs) = [4] a + [3] xs + [7] >= [2] a + [3] xs + [6] = Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) foldl(x,Cons(S(0()),xs)) = [1] x + [1] xs + [6] >= [1] x + [1] xs + [2] = foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) = [1] x + [1] xs + [6] >= [1] x + [1] xs + [2] = foldl(S(x),xs) foldr(a,Cons(x,xs)) = [1] a + [2] x + [2] xs + [4] >= [1] a + [2] x + [2] xs + [0] = op(x,foldr(a,xs)) foldr(a,Nil()) = [1] a + [0] >= [1] a + [0] = a notEmpty(Cons(x,xs)) = [1] x + [1] xs + [2] >= [1] = True() notEmpty(Nil()) = [0] >= [0] = False() op(x,S(0())) = [2] x + [2] >= [1] x + [0] = S(x) op(S(0()),y) = [1] y + [4] >= [1] y + [0] = S(y) Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 4: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: foldr(a,Nil()) -> a - 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)) 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) = [0] p(Nil) = [1] p(S) = [0] p(True) = [0] p(fold) = [3] x1 + [8] x2 + [7] p(foldl) = [2] x1 + [2] p(foldr) = [1] x1 + [2] x2 + [0] p(notEmpty) = [0] p(op) = [2] x1 + [1] x2 + [4] Following rules are strictly oriented: foldr(a,Nil()) = [1] a + [2] > [1] a + [0] = a Following rules are (at-least) weakly oriented: fold(a,xs) = [3] a + [8] xs + [7] >= [3] a + [2] xs + [7] = 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] >= [2] = foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) = [2] >= [2] = foldl(S(x),xs) foldr(a,Cons(x,xs)) = [1] a + [2] x + [2] xs + [4] >= [1] a + [2] x + [2] xs + [4] = op(x,foldr(a,xs)) notEmpty(Cons(x,xs)) = [0] >= [0] = True() notEmpty(Nil()) = [0] >= [0] = False() op(x,S(0())) = [2] x + [4] >= [0] = S(x) op(S(0()),y) = [1] y + [4] >= [0] = S(y) * Step 5: 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))