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:
  { from(X) -> cons(X, n__from(n__s(X)))
  , from(X) -> n__from(X)
  , head(cons(X, XS)) -> X
  , 2nd(cons(X, XS)) -> head(activate(XS))
  , activate(X) -> X
  , activate(n__from(X)) -> from(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__take(X1, X2)) -> take(activate(X1), activate(X2))
  , take(X1, X2) -> n__take(X1, X2)
  , take(0(), XS) -> nil()
  , take(s(N), cons(X, XS)) -> cons(X, n__take(N, activate(XS)))
  , s(X) -> n__s(X)
  , sel(0(), cons(X, XS)) -> X
  , sel(s(N), cons(X, XS)) -> sel(N, activate(XS)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

Arguments of following rules are not normal-forms:

{ take(s(N), cons(X, XS)) -> cons(X, n__take(N, activate(XS)))
, sel(s(N), cons(X, XS)) -> sel(N, activate(XS)) }

All above mentioned rules can be savely removed.

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict Trs:
  { from(X) -> cons(X, n__from(n__s(X)))
  , from(X) -> n__from(X)
  , head(cons(X, XS)) -> X
  , 2nd(cons(X, XS)) -> head(activate(XS))
  , activate(X) -> X
  , activate(n__from(X)) -> from(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__take(X1, X2)) -> take(activate(X1), activate(X2))
  , take(X1, X2) -> n__take(X1, X2)
  , take(0(), XS) -> nil()
  , s(X) -> n__s(X)
  , sel(0(), cons(X, XS)) -> X }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We add the following innermost weak dependency pairs:

Strict DPs:
  { from^#(X) -> c_1()
  , from^#(X) -> c_2()
  , head^#(cons(X, XS)) -> c_3()
  , 2nd^#(cons(X, XS)) -> c_4(head^#(activate(XS)))
  , activate^#(X) -> c_5()
  , activate^#(n__from(X)) -> c_6(from^#(activate(X)))
  , activate^#(n__s(X)) -> c_7(s^#(activate(X)))
  , activate^#(n__take(X1, X2)) ->
    c_8(take^#(activate(X1), activate(X2)))
  , s^#(X) -> c_11()
  , take^#(X1, X2) -> c_9()
  , take^#(0(), XS) -> c_10()
  , sel^#(0(), cons(X, XS)) -> c_12() }

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:
  { from^#(X) -> c_1()
  , from^#(X) -> c_2()
  , head^#(cons(X, XS)) -> c_3()
  , 2nd^#(cons(X, XS)) -> c_4(head^#(activate(XS)))
  , activate^#(X) -> c_5()
  , activate^#(n__from(X)) -> c_6(from^#(activate(X)))
  , activate^#(n__s(X)) -> c_7(s^#(activate(X)))
  , activate^#(n__take(X1, X2)) ->
    c_8(take^#(activate(X1), activate(X2)))
  , s^#(X) -> c_11()
  , take^#(X1, X2) -> c_9()
  , take^#(0(), XS) -> c_10()
  , sel^#(0(), cons(X, XS)) -> c_12() }
Strict Trs:
  { from(X) -> cons(X, n__from(n__s(X)))
  , from(X) -> n__from(X)
  , head(cons(X, XS)) -> X
  , 2nd(cons(X, XS)) -> head(activate(XS))
  , activate(X) -> X
  , activate(n__from(X)) -> from(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__take(X1, X2)) -> take(activate(X1), activate(X2))
  , take(X1, X2) -> n__take(X1, X2)
  , take(0(), XS) -> nil()
  , s(X) -> n__s(X)
  , sel(0(), cons(X, XS)) -> X }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We replace rewrite rules by usable rules:

  Strict Usable Rules:
    { from(X) -> cons(X, n__from(n__s(X)))
    , from(X) -> n__from(X)
    , activate(X) -> X
    , activate(n__from(X)) -> from(activate(X))
    , activate(n__s(X)) -> s(activate(X))
    , activate(n__take(X1, X2)) -> take(activate(X1), activate(X2))
    , take(X1, X2) -> n__take(X1, X2)
    , take(0(), XS) -> nil()
    , s(X) -> n__s(X) }

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).

Strict DPs:
  { from^#(X) -> c_1()
  , from^#(X) -> c_2()
  , head^#(cons(X, XS)) -> c_3()
  , 2nd^#(cons(X, XS)) -> c_4(head^#(activate(XS)))
  , activate^#(X) -> c_5()
  , activate^#(n__from(X)) -> c_6(from^#(activate(X)))
  , activate^#(n__s(X)) -> c_7(s^#(activate(X)))
  , activate^#(n__take(X1, X2)) ->
    c_8(take^#(activate(X1), activate(X2)))
  , s^#(X) -> c_11()
  , take^#(X1, X2) -> c_9()
  , take^#(0(), XS) -> c_10()
  , sel^#(0(), cons(X, XS)) -> c_12() }
Strict Trs:
  { from(X) -> cons(X, n__from(n__s(X)))
  , from(X) -> n__from(X)
  , activate(X) -> X
  , activate(n__from(X)) -> from(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__take(X1, X2)) -> take(activate(X1), activate(X2))
  , take(X1, X2) -> n__take(X1, X2)
  , take(0(), XS) -> nil()
  , s(X) -> n__s(X) }
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(from) = {1}, Uargs(take) = {1, 2}, Uargs(s) = {1},
  Uargs(from^#) = {1}, Uargs(head^#) = {1}, Uargs(c_4) = {1},
  Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(s^#) = {1},
  Uargs(c_8) = {1}, Uargs(take^#) = {1, 2}

TcT has computed the following constructor-restricted matrix
interpretation.

         [from](x1) = [1 0] x1 + [1]           
                      [0 1]      [2]           
                                               
     [cons](x1, x2) = [1 0] x2 + [0]           
                      [0 1]      [0]           
                                               
      [n__from](x1) = [1 0] x1 + [0]           
                      [0 1]      [1]           
                                               
         [n__s](x1) = [1 0] x1 + [0]           
                      [0 1]      [1]           
                                               
     [activate](x1) = [1 2] x1 + [1]           
                      [0 2]      [0]           
                                               
     [take](x1, x2) = [1 0] x1 + [1 0] x2 + [1]
                      [0 1]      [0 1]      [2]
                                               
                [0] = [0]                      
                      [0]                      
                                               
              [nil] = [0]                      
                      [1]                      
                                               
            [s](x1) = [1 0] x1 + [1]           
                      [0 1]      [1]           
                                               
  [n__take](x1, x2) = [1 0] x1 + [1 0] x2 + [0]
                      [0 1]      [0 1]      [2]
                                               
       [from^#](x1) = [1 0] x1 + [1]           
                      [0 0]      [2]           
                                               
              [c_1] = [1]                      
                      [1]                      
                                               
              [c_2] = [0]                      
                      [1]                      
                                               
       [head^#](x1) = [1 0] x1 + [1]           
                      [0 0]      [2]           
                                               
              [c_3] = [0]                      
                      [1]                      
                                               
        [2nd^#](x1) = [2 2] x1 + [2]           
                      [1 1]      [2]           
                                               
          [c_4](x1) = [1 0] x1 + [2]           
                      [0 1]      [2]           
                                               
   [activate^#](x1) = [1 2] x1 + [0]           
                      [0 0]      [0]           
                                               
              [c_5] = [1]                      
                      [1]                      
                                               
          [c_6](x1) = [1 0] x1 + [2]           
                      [0 1]      [2]           
                                               
          [c_7](x1) = [1 0] x1 + [2]           
                      [0 1]      [2]           
                                               
          [s^#](x1) = [1 0] x1 + [1]           
                      [0 0]      [2]           
                                               
          [c_8](x1) = [1 0] x1 + [2]           
                      [0 1]      [2]           
                                               
   [take^#](x1, x2) = [1 0] x1 + [1 0] x2 + [2]
                      [0 0]      [0 0]      [2]
                                               
              [c_9] = [1]                      
                      [1]                      
                                               
             [c_10] = [2]                      
                      [1]                      
                                               
             [c_11] = [0]                      
                      [1]                      
                                               
    [sel^#](x1, x2) = [1 1] x1 + [2 2] x2 + [2]
                      [2 2]      [1 2]      [2]
                                               
             [c_12] = [1]                      
                      [1]                      

The following symbols are considered usable

  {from, activate, take, s, from^#, head^#, 2nd^#, activate^#, s^#,
   take^#, sel^#}

The order satisfies the following ordering constraints:

                      [from(X)] =  [1 0] X + [1]                            
                                   [0 1]     [2]                            
                                >  [1 0] X + [0]                            
                                   [0 1]     [2]                            
                                =  [cons(X, n__from(n__s(X)))]              
                                                                            
                      [from(X)] =  [1 0] X + [1]                            
                                   [0 1]     [2]                            
                                >  [1 0] X + [0]                            
                                   [0 1]     [1]                            
                                =  [n__from(X)]                             
                                                                            
                  [activate(X)] =  [1 2] X + [1]                            
                                   [0 2]     [0]                            
                                >  [1 0] X + [0]                            
                                   [0 1]     [0]                            
                                =  [X]                                      
                                                                            
         [activate(n__from(X))] =  [1 2] X + [3]                            
                                   [0 2]     [2]                            
                                >  [1 2] X + [2]                            
                                   [0 2]     [2]                            
                                =  [from(activate(X))]                      
                                                                            
            [activate(n__s(X))] =  [1 2] X + [3]                            
                                   [0 2]     [2]                            
                                >  [1 2] X + [2]                            
                                   [0 2]     [1]                            
                                =  [s(activate(X))]                         
                                                                            
    [activate(n__take(X1, X2))] =  [1 2] X1 + [1 2] X2 + [5]                
                                   [0 2]      [0 2]      [4]                
                                >  [1 2] X1 + [1 2] X2 + [3]                
                                   [0 2]      [0 2]      [2]                
                                =  [take(activate(X1), activate(X2))]       
                                                                            
                 [take(X1, X2)] =  [1 0] X1 + [1 0] X2 + [1]                
                                   [0 1]      [0 1]      [2]                
                                >  [1 0] X1 + [1 0] X2 + [0]                
                                   [0 1]      [0 1]      [2]                
                                =  [n__take(X1, X2)]                        
                                                                            
                [take(0(), XS)] =  [1 0] XS + [1]                           
                                   [0 1]      [2]                           
                                >  [0]                                      
                                   [1]                                      
                                =  [nil()]                                  
                                                                            
                         [s(X)] =  [1 0] X + [1]                            
                                   [0 1]     [1]                            
                                >  [1 0] X + [0]                            
                                   [0 1]     [1]                            
                                =  [n__s(X)]                                
                                                                            
                    [from^#(X)] =  [1 0] X + [1]                            
                                   [0 0]     [2]                            
                                >= [1]                                      
                                   [1]                                      
                                =  [c_1()]                                  
                                                                            
                    [from^#(X)] =  [1 0] X + [1]                            
                                   [0 0]     [2]                            
                                >  [0]                                      
                                   [1]                                      
                                =  [c_2()]                                  
                                                                            
          [head^#(cons(X, XS))] =  [1 0] XS + [1]                           
                                   [0 0]      [2]                           
                                >  [0]                                      
                                   [1]                                      
                                =  [c_3()]                                  
                                                                            
           [2nd^#(cons(X, XS))] =  [2 2] XS + [2]                           
                                   [1 1]      [2]                           
                                ?  [1 2] XS + [4]                           
                                   [0 0]      [4]                           
                                =  [c_4(head^#(activate(XS)))]              
                                                                            
                [activate^#(X)] =  [1 2] X + [0]                            
                                   [0 0]     [0]                            
                                ?  [1]                                      
                                   [1]                                      
                                =  [c_5()]                                  
                                                                            
       [activate^#(n__from(X))] =  [1 2] X + [2]                            
                                   [0 0]     [0]                            
                                ?  [1 2] X + [4]                            
                                   [0 0]     [4]                            
                                =  [c_6(from^#(activate(X)))]               
                                                                            
          [activate^#(n__s(X))] =  [1 2] X + [2]                            
                                   [0 0]     [0]                            
                                ?  [1 2] X + [4]                            
                                   [0 0]     [4]                            
                                =  [c_7(s^#(activate(X)))]                  
                                                                            
  [activate^#(n__take(X1, X2))] =  [1 2] X1 + [1 2] X2 + [4]                
                                   [0 0]      [0 0]      [0]                
                                ?  [1 2] X1 + [1 2] X2 + [6]                
                                   [0 0]      [0 0]      [4]                
                                =  [c_8(take^#(activate(X1), activate(X2)))]
                                                                            
                       [s^#(X)] =  [1 0] X + [1]                            
                                   [0 0]     [2]                            
                                >  [0]                                      
                                   [1]                                      
                                =  [c_11()]                                 
                                                                            
               [take^#(X1, X2)] =  [1 0] X1 + [1 0] X2 + [2]                
                                   [0 0]      [0 0]      [2]                
                                >  [1]                                      
                                   [1]                                      
                                =  [c_9()]                                  
                                                                            
              [take^#(0(), XS)] =  [1 0] XS + [2]                           
                                   [0 0]      [2]                           
                                >= [2]                                      
                                   [1]                                      
                                =  [c_10()]                                 
                                                                            
      [sel^#(0(), cons(X, XS))] =  [2 2] XS + [2]                           
                                   [1 2]      [2]                           
                                >  [1]                                      
                                   [1]                                      
                                =  [c_12()]                                 
                                                                            

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(1)).

Strict DPs:
  { from^#(X) -> c_1()
  , 2nd^#(cons(X, XS)) -> c_4(head^#(activate(XS)))
  , activate^#(X) -> c_5()
  , activate^#(n__from(X)) -> c_6(from^#(activate(X)))
  , activate^#(n__s(X)) -> c_7(s^#(activate(X)))
  , activate^#(n__take(X1, X2)) ->
    c_8(take^#(activate(X1), activate(X2)))
  , take^#(0(), XS) -> c_10() }
Weak DPs:
  { from^#(X) -> c_2()
  , head^#(cons(X, XS)) -> c_3()
  , s^#(X) -> c_11()
  , take^#(X1, X2) -> c_9()
  , sel^#(0(), cons(X, XS)) -> c_12() }
Weak Trs:
  { from(X) -> cons(X, n__from(n__s(X)))
  , from(X) -> n__from(X)
  , activate(X) -> X
  , activate(n__from(X)) -> from(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__take(X1, X2)) -> take(activate(X1), activate(X2))
  , take(X1, X2) -> n__take(X1, X2)
  , take(0(), XS) -> nil()
  , s(X) -> n__s(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

We estimate the number of application of {1,2,3,5,7} by
applications of Pre({1,2,3,5,7}) = {4,6}. Here rules are labeled as
follows:

  DPs:
    { 1: from^#(X) -> c_1()
    , 2: 2nd^#(cons(X, XS)) -> c_4(head^#(activate(XS)))
    , 3: activate^#(X) -> c_5()
    , 4: activate^#(n__from(X)) -> c_6(from^#(activate(X)))
    , 5: activate^#(n__s(X)) -> c_7(s^#(activate(X)))
    , 6: activate^#(n__take(X1, X2)) ->
         c_8(take^#(activate(X1), activate(X2)))
    , 7: take^#(0(), XS) -> c_10()
    , 8: from^#(X) -> c_2()
    , 9: head^#(cons(X, XS)) -> c_3()
    , 10: s^#(X) -> c_11()
    , 11: take^#(X1, X2) -> c_9()
    , 12: sel^#(0(), cons(X, XS)) -> c_12() }

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).

Strict DPs:
  { activate^#(n__from(X)) -> c_6(from^#(activate(X)))
  , activate^#(n__take(X1, X2)) ->
    c_8(take^#(activate(X1), activate(X2))) }
Weak DPs:
  { from^#(X) -> c_1()
  , from^#(X) -> c_2()
  , head^#(cons(X, XS)) -> c_3()
  , 2nd^#(cons(X, XS)) -> c_4(head^#(activate(XS)))
  , activate^#(X) -> c_5()
  , activate^#(n__s(X)) -> c_7(s^#(activate(X)))
  , s^#(X) -> c_11()
  , take^#(X1, X2) -> c_9()
  , take^#(0(), XS) -> c_10()
  , sel^#(0(), cons(X, XS)) -> c_12() }
Weak Trs:
  { from(X) -> cons(X, n__from(n__s(X)))
  , from(X) -> n__from(X)
  , activate(X) -> X
  , activate(n__from(X)) -> from(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__take(X1, X2)) -> take(activate(X1), activate(X2))
  , take(X1, X2) -> n__take(X1, X2)
  , take(0(), XS) -> nil()
  , s(X) -> n__s(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

We estimate the number of application of {1,2} by applications of
Pre({1,2}) = {}. Here rules are labeled as follows:

  DPs:
    { 1: activate^#(n__from(X)) -> c_6(from^#(activate(X)))
    , 2: activate^#(n__take(X1, X2)) ->
         c_8(take^#(activate(X1), activate(X2)))
    , 3: from^#(X) -> c_1()
    , 4: from^#(X) -> c_2()
    , 5: head^#(cons(X, XS)) -> c_3()
    , 6: 2nd^#(cons(X, XS)) -> c_4(head^#(activate(XS)))
    , 7: activate^#(X) -> c_5()
    , 8: activate^#(n__s(X)) -> c_7(s^#(activate(X)))
    , 9: s^#(X) -> c_11()
    , 10: take^#(X1, X2) -> c_9()
    , 11: take^#(0(), XS) -> c_10()
    , 12: sel^#(0(), cons(X, XS)) -> c_12() }

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).

Weak DPs:
  { from^#(X) -> c_1()
  , from^#(X) -> c_2()
  , head^#(cons(X, XS)) -> c_3()
  , 2nd^#(cons(X, XS)) -> c_4(head^#(activate(XS)))
  , activate^#(X) -> c_5()
  , activate^#(n__from(X)) -> c_6(from^#(activate(X)))
  , activate^#(n__s(X)) -> c_7(s^#(activate(X)))
  , activate^#(n__take(X1, X2)) ->
    c_8(take^#(activate(X1), activate(X2)))
  , s^#(X) -> c_11()
  , take^#(X1, X2) -> c_9()
  , take^#(0(), XS) -> c_10()
  , sel^#(0(), cons(X, XS)) -> c_12() }
Weak Trs:
  { from(X) -> cons(X, n__from(n__s(X)))
  , from(X) -> n__from(X)
  , activate(X) -> X
  , activate(n__from(X)) -> from(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__take(X1, X2)) -> take(activate(X1), activate(X2))
  , take(X1, X2) -> n__take(X1, X2)
  , take(0(), XS) -> nil()
  , s(X) -> n__s(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

The following weak DPs constitute a sub-graph of the DG that is
closed under successors. The DPs are removed.

{ from^#(X) -> c_1()
, from^#(X) -> c_2()
, head^#(cons(X, XS)) -> c_3()
, 2nd^#(cons(X, XS)) -> c_4(head^#(activate(XS)))
, activate^#(X) -> c_5()
, activate^#(n__from(X)) -> c_6(from^#(activate(X)))
, activate^#(n__s(X)) -> c_7(s^#(activate(X)))
, activate^#(n__take(X1, X2)) ->
  c_8(take^#(activate(X1), activate(X2)))
, s^#(X) -> c_11()
, take^#(X1, X2) -> c_9()
, take^#(0(), XS) -> c_10()
, sel^#(0(), cons(X, XS)) -> c_12() }

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).

Weak Trs:
  { from(X) -> cons(X, n__from(n__s(X)))
  , from(X) -> n__from(X)
  , activate(X) -> X
  , activate(n__from(X)) -> from(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__take(X1, X2)) -> take(activate(X1), activate(X2))
  , take(X1, X2) -> n__take(X1, X2)
  , take(0(), XS) -> nil()
  , s(X) -> n__s(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(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(1)).

Rules: Empty
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

Empty rules are trivially bounded

Hurray, we answered YES(O(1),O(n^1))