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

Strict Trs:
  { terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N)))
  , terms(X) -> n__terms(X)
  , sqr(0()) -> 0()
  , sqr(s(X)) -> s(add(sqr(X), dbl(X)))
  , s(X) -> n__s(X)
  , add(0(), X) -> X
  , add(s(X), Y) -> s(add(X, Y))
  , dbl(0()) -> 0()
  , dbl(s(X)) -> s(s(dbl(X)))
  , first(X1, X2) -> n__first(X1, X2)
  , first(0(), X) -> nil()
  , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z)))
  , activate(X) -> X
  , activate(n__terms(X)) -> terms(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

Arguments of following rules are not normal-forms:

{ sqr(s(X)) -> s(add(sqr(X), dbl(X)))
, add(s(X), Y) -> s(add(X, Y))
, dbl(s(X)) -> s(s(dbl(X)))
, first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) }

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:
  { terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N)))
  , terms(X) -> n__terms(X)
  , sqr(0()) -> 0()
  , s(X) -> n__s(X)
  , add(0(), X) -> X
  , dbl(0()) -> 0()
  , first(X1, X2) -> n__first(X1, X2)
  , first(0(), X) -> nil()
  , activate(X) -> X
  , activate(n__terms(X)) -> terms(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }
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(terms) = {1}, Uargs(cons) = {1}, Uargs(recip) = {1},
  Uargs(s) = {1}, Uargs(first) = {1, 2}

TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).

         [terms](x1) = [1] x1 + [0]         
                                            
      [cons](x1, x2) = [1] x1 + [1] x2 + [1]
                                            
         [recip](x1) = [1] x1 + [0]         
                                            
           [sqr](x1) = [0]                  
                                            
      [n__terms](x1) = [1] x1 + [1]         
                                            
          [n__s](x1) = [1] x1 + [0]         
                                            
                 [0] = [3]                  
                                            
             [s](x1) = [1] x1 + [0]         
                                            
       [add](x1, x2) = [1] x2 + [5]         
                                            
           [dbl](x1) = [1] x1 + [0]         
                                            
     [first](x1, x2) = [1] x1 + [1] x2 + [1]
                                            
               [nil] = [0]                  
                                            
  [n__first](x1, x2) = [1] x1 + [1] x2 + [0]
                                            
      [activate](x1) = [1] x1 + [0]         

The order satisfies the following ordering constraints:

                    [terms(N)] =  [1] N + [0]                             
                               ?  [1] N + [2]                             
                               =  [cons(recip(sqr(N)), n__terms(n__s(N)))]
                                                                          
                    [terms(X)] =  [1] X + [0]                             
                               ?  [1] X + [1]                             
                               =  [n__terms(X)]                           
                                                                          
                    [sqr(0())] =  [0]                                     
                               ?  [3]                                     
                               =  [0()]                                   
                                                                          
                        [s(X)] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [n__s(X)]                               
                                                                          
                 [add(0(), X)] =  [1] X + [5]                             
                               >  [1] X + [0]                             
                               =  [X]                                     
                                                                          
                    [dbl(0())] =  [3]                                     
                               >= [3]                                     
                               =  [0()]                                   
                                                                          
               [first(X1, X2)] =  [1] X1 + [1] X2 + [1]                   
                               >  [1] X1 + [1] X2 + [0]                   
                               =  [n__first(X1, X2)]                      
                                                                          
               [first(0(), X)] =  [1] X + [4]                             
                               >  [0]                                     
                               =  [nil()]                                 
                                                                          
                 [activate(X)] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [X]                                     
                                                                          
       [activate(n__terms(X))] =  [1] X + [1]                             
                               >  [1] X + [0]                             
                               =  [terms(activate(X))]                    
                                                                          
           [activate(n__s(X))] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [s(activate(X))]                        
                                                                          
  [activate(n__first(X1, X2))] =  [1] X1 + [1] X2 + [0]                   
                               ?  [1] X1 + [1] X2 + [1]                   
                               =  [first(activate(X1), activate(X2))]     
                                                                          

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:
  { terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N)))
  , terms(X) -> n__terms(X)
  , sqr(0()) -> 0()
  , s(X) -> n__s(X)
  , dbl(0()) -> 0()
  , activate(X) -> X
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }
Weak Trs:
  { add(0(), X) -> X
  , first(X1, X2) -> n__first(X1, X2)
  , first(0(), X) -> nil()
  , activate(n__terms(X)) -> terms(activate(X)) }
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: { dbl(0()) -> 0() }

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(terms) = {1}, Uargs(cons) = {1}, Uargs(recip) = {1},
    Uargs(s) = {1}, Uargs(first) = {1, 2}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
           [terms](x1) = [1] x1 + [0]         
                                              
        [cons](x1, x2) = [1] x1 + [0]         
                                              
           [recip](x1) = [1] x1 + [0]         
                                              
             [sqr](x1) = [0]                  
                                              
        [n__terms](x1) = [1] x1 + [0]         
                                              
            [n__s](x1) = [1] x1 + [0]         
                                              
                   [0] = [0]                  
                                              
               [s](x1) = [1] x1 + [0]         
                                              
         [add](x1, x2) = [1] x1 + [1] x2 + [0]
                                              
             [dbl](x1) = [6]                  
                                              
       [first](x1, x2) = [1] x1 + [1] x2 + [0]
                                              
                 [nil] = [0]                  
                                              
    [n__first](x1, x2) = [1] x1 + [1] x2 + [0]
                                              
        [activate](x1) = [1] x1 + [0]         
  
  The order satisfies the following ordering constraints:
  
                      [terms(N)] =  [1] N + [0]                             
                                 >= [0]                                     
                                 =  [cons(recip(sqr(N)), n__terms(n__s(N)))]
                                                                            
                      [terms(X)] =  [1] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [n__terms(X)]                           
                                                                            
                      [sqr(0())] =  [0]                                     
                                 >= [0]                                     
                                 =  [0()]                                   
                                                                            
                          [s(X)] =  [1] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [n__s(X)]                               
                                                                            
                   [add(0(), X)] =  [1] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [X]                                     
                                                                            
                      [dbl(0())] =  [6]                                     
                                 >  [0]                                     
                                 =  [0()]                                   
                                                                            
                 [first(X1, X2)] =  [1] X1 + [1] X2 + [0]                   
                                 >= [1] X1 + [1] X2 + [0]                   
                                 =  [n__first(X1, X2)]                      
                                                                            
                 [first(0(), X)] =  [1] X + [0]                             
                                 >= [0]                                     
                                 =  [nil()]                                 
                                                                            
                   [activate(X)] =  [1] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [X]                                     
                                                                            
         [activate(n__terms(X))] =  [1] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [terms(activate(X))]                    
                                                                            
             [activate(n__s(X))] =  [1] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [s(activate(X))]                        
                                                                            
    [activate(n__first(X1, X2))] =  [1] X1 + [1] X2 + [0]                   
                                 >= [1] X1 + [1] X2 + [0]                   
                                 =  [first(activate(X1), activate(X2))]     
                                                                            

We return to the main proof.

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

Strict Trs:
  { terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N)))
  , terms(X) -> n__terms(X)
  , sqr(0()) -> 0()
  , s(X) -> n__s(X)
  , activate(X) -> X
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }
Weak Trs:
  { add(0(), X) -> X
  , dbl(0()) -> 0()
  , first(X1, X2) -> n__first(X1, X2)
  , first(0(), X) -> nil()
  , activate(n__terms(X)) -> terms(activate(X)) }
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(terms) = {1}, Uargs(cons) = {1}, Uargs(recip) = {1},
  Uargs(s) = {1}, Uargs(first) = {1, 2}

TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).

         [terms](x1) = [1] x1 + [2]         
                                            
      [cons](x1, x2) = [1] x1 + [1]         
                                            
         [recip](x1) = [1] x1 + [1]         
                                            
           [sqr](x1) = [1] x1 + [0]         
                                            
      [n__terms](x1) = [1] x1 + [7]         
                                            
          [n__s](x1) = [1] x1 + [3]         
                                            
                 [0] = [0]                  
                                            
             [s](x1) = [1] x1 + [0]         
                                            
       [add](x1, x2) = [1] x1 + [1] x2 + [0]
                                            
           [dbl](x1) = [1] x1 + [4]         
                                            
     [first](x1, x2) = [1] x1 + [1] x2 + [4]
                                            
               [nil] = [0]                  
                                            
  [n__first](x1, x2) = [1] x1 + [1] x2 + [3]
                                            
      [activate](x1) = [1] x1 + [1]         

The order satisfies the following ordering constraints:

                    [terms(N)] =  [1] N + [2]                             
                               >= [1] N + [2]                             
                               =  [cons(recip(sqr(N)), n__terms(n__s(N)))]
                                                                          
                    [terms(X)] =  [1] X + [2]                             
                               ?  [1] X + [7]                             
                               =  [n__terms(X)]                           
                                                                          
                    [sqr(0())] =  [0]                                     
                               >= [0]                                     
                               =  [0()]                                   
                                                                          
                        [s(X)] =  [1] X + [0]                             
                               ?  [1] X + [3]                             
                               =  [n__s(X)]                               
                                                                          
                 [add(0(), X)] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [X]                                     
                                                                          
                    [dbl(0())] =  [4]                                     
                               >  [0]                                     
                               =  [0()]                                   
                                                                          
               [first(X1, X2)] =  [1] X1 + [1] X2 + [4]                   
                               >  [1] X1 + [1] X2 + [3]                   
                               =  [n__first(X1, X2)]                      
                                                                          
               [first(0(), X)] =  [1] X + [4]                             
                               >  [0]                                     
                               =  [nil()]                                 
                                                                          
                 [activate(X)] =  [1] X + [1]                             
                               >  [1] X + [0]                             
                               =  [X]                                     
                                                                          
       [activate(n__terms(X))] =  [1] X + [8]                             
                               >  [1] X + [3]                             
                               =  [terms(activate(X))]                    
                                                                          
           [activate(n__s(X))] =  [1] X + [4]                             
                               >  [1] X + [1]                             
                               =  [s(activate(X))]                        
                                                                          
  [activate(n__first(X1, X2))] =  [1] X1 + [1] X2 + [4]                   
                               ?  [1] X1 + [1] X2 + [6]                   
                               =  [first(activate(X1), activate(X2))]     
                                                                          

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:
  { terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N)))
  , terms(X) -> n__terms(X)
  , sqr(0()) -> 0()
  , s(X) -> n__s(X)
  , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }
Weak Trs:
  { add(0(), X) -> X
  , dbl(0()) -> 0()
  , first(X1, X2) -> n__first(X1, X2)
  , first(0(), X) -> nil()
  , activate(X) -> X
  , activate(n__terms(X)) -> terms(activate(X))
  , activate(n__s(X)) -> s(activate(X)) }
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(terms) = {1}, Uargs(cons) = {1}, Uargs(recip) = {1},
  Uargs(s) = {1}, Uargs(first) = {1, 2}

TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).

         [terms](x1) = [1] x1 + [0]         
                                            
      [cons](x1, x2) = [1] x1 + [0]         
                                            
         [recip](x1) = [1] x1 + [1]         
                                            
           [sqr](x1) = [1] x1 + [2]         
                                            
      [n__terms](x1) = [1] x1 + [0]         
                                            
          [n__s](x1) = [1] x1 + [4]         
                                            
                 [0] = [0]                  
                                            
             [s](x1) = [1] x1 + [0]         
                                            
       [add](x1, x2) = [1] x1 + [1] x2 + [0]
                                            
           [dbl](x1) = [1] x1 + [4]         
                                            
     [first](x1, x2) = [1] x1 + [1] x2 + [0]
                                            
               [nil] = [0]                  
                                            
  [n__first](x1, x2) = [1] x1 + [1] x2 + [0]
                                            
      [activate](x1) = [1] x1 + [0]         

The order satisfies the following ordering constraints:

                    [terms(N)] =  [1] N + [0]                             
                               ?  [1] N + [3]                             
                               =  [cons(recip(sqr(N)), n__terms(n__s(N)))]
                                                                          
                    [terms(X)] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [n__terms(X)]                           
                                                                          
                    [sqr(0())] =  [2]                                     
                               >  [0]                                     
                               =  [0()]                                   
                                                                          
                        [s(X)] =  [1] X + [0]                             
                               ?  [1] X + [4]                             
                               =  [n__s(X)]                               
                                                                          
                 [add(0(), X)] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [X]                                     
                                                                          
                    [dbl(0())] =  [4]                                     
                               >  [0]                                     
                               =  [0()]                                   
                                                                          
               [first(X1, X2)] =  [1] X1 + [1] X2 + [0]                   
                               >= [1] X1 + [1] X2 + [0]                   
                               =  [n__first(X1, X2)]                      
                                                                          
               [first(0(), X)] =  [1] X + [0]                             
                               >= [0]                                     
                               =  [nil()]                                 
                                                                          
                 [activate(X)] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [X]                                     
                                                                          
       [activate(n__terms(X))] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [terms(activate(X))]                    
                                                                          
           [activate(n__s(X))] =  [1] X + [4]                             
                               >  [1] X + [0]                             
                               =  [s(activate(X))]                        
                                                                          
  [activate(n__first(X1, X2))] =  [1] X1 + [1] X2 + [0]                   
                               >= [1] X1 + [1] X2 + [0]                   
                               =  [first(activate(X1), activate(X2))]     
                                                                          

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:
  { terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N)))
  , terms(X) -> n__terms(X)
  , s(X) -> n__s(X)
  , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }
Weak Trs:
  { sqr(0()) -> 0()
  , add(0(), X) -> X
  , dbl(0()) -> 0()
  , first(X1, X2) -> n__first(X1, X2)
  , first(0(), X) -> nil()
  , activate(X) -> X
  , activate(n__terms(X)) -> terms(activate(X))
  , activate(n__s(X)) -> s(activate(X)) }
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(terms) = {1}, Uargs(cons) = {1}, Uargs(recip) = {1},
  Uargs(s) = {1}, Uargs(first) = {1, 2}

TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).

         [terms](x1) = [1] x1 + [1]         
                                            
      [cons](x1, x2) = [1] x1 + [0]         
                                            
         [recip](x1) = [1] x1 + [0]         
                                            
           [sqr](x1) = [1] x1 + [0]         
                                            
      [n__terms](x1) = [1] x1 + [4]         
                                            
          [n__s](x1) = [1] x1 + [0]         
                                            
                 [0] = [0]                  
                                            
             [s](x1) = [1] x1 + [0]         
                                            
       [add](x1, x2) = [1] x1 + [1] x2 + [0]
                                            
           [dbl](x1) = [1] x1 + [4]         
                                            
     [first](x1, x2) = [1] x1 + [1] x2 + [0]
                                            
               [nil] = [0]                  
                                            
  [n__first](x1, x2) = [1] x1 + [1] x2 + [0]
                                            
      [activate](x1) = [1] x1 + [0]         

The order satisfies the following ordering constraints:

                    [terms(N)] =  [1] N + [1]                             
                               >  [1] N + [0]                             
                               =  [cons(recip(sqr(N)), n__terms(n__s(N)))]
                                                                          
                    [terms(X)] =  [1] X + [1]                             
                               ?  [1] X + [4]                             
                               =  [n__terms(X)]                           
                                                                          
                    [sqr(0())] =  [0]                                     
                               >= [0]                                     
                               =  [0()]                                   
                                                                          
                        [s(X)] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [n__s(X)]                               
                                                                          
                 [add(0(), X)] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [X]                                     
                                                                          
                    [dbl(0())] =  [4]                                     
                               >  [0]                                     
                               =  [0()]                                   
                                                                          
               [first(X1, X2)] =  [1] X1 + [1] X2 + [0]                   
                               >= [1] X1 + [1] X2 + [0]                   
                               =  [n__first(X1, X2)]                      
                                                                          
               [first(0(), X)] =  [1] X + [0]                             
                               >= [0]                                     
                               =  [nil()]                                 
                                                                          
                 [activate(X)] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [X]                                     
                                                                          
       [activate(n__terms(X))] =  [1] X + [4]                             
                               >  [1] X + [1]                             
                               =  [terms(activate(X))]                    
                                                                          
           [activate(n__s(X))] =  [1] X + [0]                             
                               >= [1] X + [0]                             
                               =  [s(activate(X))]                        
                                                                          
  [activate(n__first(X1, X2))] =  [1] X1 + [1] X2 + [0]                   
                               >= [1] X1 + [1] X2 + [0]                   
                               =  [first(activate(X1), activate(X2))]     
                                                                          

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:
  { terms(X) -> n__terms(X)
  , s(X) -> n__s(X)
  , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }
Weak Trs:
  { terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N)))
  , sqr(0()) -> 0()
  , add(0(), X) -> X
  , dbl(0()) -> 0()
  , first(X1, X2) -> n__first(X1, X2)
  , first(0(), X) -> nil()
  , activate(X) -> X
  , activate(n__terms(X)) -> terms(activate(X))
  , activate(n__s(X)) -> s(activate(X)) }
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: { terms(X) -> n__terms(X) }

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(terms) = {1}, Uargs(cons) = {1}, Uargs(recip) = {1},
    Uargs(s) = {1}, Uargs(first) = {1, 2}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
           [terms](x1) = [1] x1 + [4]         
                                              
        [cons](x1, x2) = [1] x1 + [0]         
                                              
           [recip](x1) = [1] x1 + [0]         
                                              
             [sqr](x1) = [0]                  
                                              
        [n__terms](x1) = [1] x1 + [2]         
                                              
            [n__s](x1) = [1] x1 + [0]         
                                              
                   [0] = [0]                  
                                              
               [s](x1) = [1] x1 + [0]         
                                              
         [add](x1, x2) = [1] x1 + [2] x2 + [0]
                                              
             [dbl](x1) = [4]                  
                                              
       [first](x1, x2) = [1] x1 + [1] x2 + [0]
                                              
                 [nil] = [0]                  
                                              
    [n__first](x1, x2) = [1] x1 + [1] x2 + [0]
                                              
        [activate](x1) = [2] x1 + [0]         
  
  The order satisfies the following ordering constraints:
  
                      [terms(N)] =  [1] N + [4]                             
                                 >  [0]                                     
                                 =  [cons(recip(sqr(N)), n__terms(n__s(N)))]
                                                                            
                      [terms(X)] =  [1] X + [4]                             
                                 >  [1] X + [2]                             
                                 =  [n__terms(X)]                           
                                                                            
                      [sqr(0())] =  [0]                                     
                                 >= [0]                                     
                                 =  [0()]                                   
                                                                            
                          [s(X)] =  [1] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [n__s(X)]                               
                                                                            
                   [add(0(), X)] =  [2] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [X]                                     
                                                                            
                      [dbl(0())] =  [4]                                     
                                 >  [0]                                     
                                 =  [0()]                                   
                                                                            
                 [first(X1, X2)] =  [1] X1 + [1] X2 + [0]                   
                                 >= [1] X1 + [1] X2 + [0]                   
                                 =  [n__first(X1, X2)]                      
                                                                            
                 [first(0(), X)] =  [1] X + [0]                             
                                 >= [0]                                     
                                 =  [nil()]                                 
                                                                            
                   [activate(X)] =  [2] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [X]                                     
                                                                            
         [activate(n__terms(X))] =  [2] X + [4]                             
                                 >= [2] X + [4]                             
                                 =  [terms(activate(X))]                    
                                                                            
             [activate(n__s(X))] =  [2] X + [0]                             
                                 >= [2] X + [0]                             
                                 =  [s(activate(X))]                        
                                                                            
    [activate(n__first(X1, X2))] =  [2] X1 + [2] X2 + [0]                   
                                 >= [2] X1 + [2] X2 + [0]                   
                                 =  [first(activate(X1), activate(X2))]     
                                                                            

We return to the main proof.

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

Strict Trs:
  { s(X) -> n__s(X)
  , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }
Weak Trs:
  { terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N)))
  , terms(X) -> n__terms(X)
  , sqr(0()) -> 0()
  , add(0(), X) -> X
  , dbl(0()) -> 0()
  , first(X1, X2) -> n__first(X1, X2)
  , first(0(), X) -> nil()
  , activate(X) -> X
  , activate(n__terms(X)) -> terms(activate(X))
  , activate(n__s(X)) -> s(activate(X)) }
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: { s(X) -> n__s(X) }

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(terms) = {1}, Uargs(cons) = {1}, Uargs(recip) = {1},
    Uargs(s) = {1}, Uargs(first) = {1, 2}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
           [terms](x1) = [1] x1 + [0]         
                                              
        [cons](x1, x2) = [1] x1 + [0]         
                                              
           [recip](x1) = [1] x1 + [0]         
                                              
             [sqr](x1) = [0]                  
                                              
        [n__terms](x1) = [1] x1 + [0]         
                                              
            [n__s](x1) = [1] x1 + [1]         
                                              
                   [0] = [0]                  
                                              
               [s](x1) = [1] x1 + [2]         
                                              
         [add](x1, x2) = [1] x1 + [4] x2 + [0]
                                              
             [dbl](x1) = [4]                  
                                              
       [first](x1, x2) = [1] x1 + [1] x2 + [1]
                                              
                 [nil] = [0]                  
                                              
    [n__first](x1, x2) = [1] x1 + [1] x2 + [1]
                                              
        [activate](x1) = [7] x1 + [6]         
  
  The order satisfies the following ordering constraints:
  
                      [terms(N)] =  [1] N + [0]                             
                                 >= [0]                                     
                                 =  [cons(recip(sqr(N)), n__terms(n__s(N)))]
                                                                            
                      [terms(X)] =  [1] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [n__terms(X)]                           
                                                                            
                      [sqr(0())] =  [0]                                     
                                 >= [0]                                     
                                 =  [0()]                                   
                                                                            
                          [s(X)] =  [1] X + [2]                             
                                 >  [1] X + [1]                             
                                 =  [n__s(X)]                               
                                                                            
                   [add(0(), X)] =  [4] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [X]                                     
                                                                            
                      [dbl(0())] =  [4]                                     
                                 >  [0]                                     
                                 =  [0()]                                   
                                                                            
                 [first(X1, X2)] =  [1] X1 + [1] X2 + [1]                   
                                 >= [1] X1 + [1] X2 + [1]                   
                                 =  [n__first(X1, X2)]                      
                                                                            
                 [first(0(), X)] =  [1] X + [1]                             
                                 >  [0]                                     
                                 =  [nil()]                                 
                                                                            
                   [activate(X)] =  [7] X + [6]                             
                                 >  [1] X + [0]                             
                                 =  [X]                                     
                                                                            
         [activate(n__terms(X))] =  [7] X + [6]                             
                                 >= [7] X + [6]                             
                                 =  [terms(activate(X))]                    
                                                                            
             [activate(n__s(X))] =  [7] X + [13]                            
                                 >  [7] X + [8]                             
                                 =  [s(activate(X))]                        
                                                                            
    [activate(n__first(X1, X2))] =  [7] X1 + [7] X2 + [13]                  
                                 >= [7] X1 + [7] X2 + [13]                  
                                 =  [first(activate(X1), activate(X2))]     
                                                                            

We return to the main proof.

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

Strict Trs:
  { activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }
Weak Trs:
  { terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N)))
  , terms(X) -> n__terms(X)
  , sqr(0()) -> 0()
  , s(X) -> n__s(X)
  , add(0(), X) -> X
  , dbl(0()) -> 0()
  , first(X1, X2) -> n__first(X1, X2)
  , first(0(), X) -> nil()
  , activate(X) -> X
  , activate(n__terms(X)) -> terms(activate(X))
  , activate(n__s(X)) -> s(activate(X)) }
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:
  { activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }

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(terms) = {1}, Uargs(cons) = {1}, Uargs(recip) = {1},
    Uargs(s) = {1}, Uargs(first) = {1, 2}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
           [terms](x1) = [1] x1 + [0]         
                                              
        [cons](x1, x2) = [1] x1 + [0]         
                                              
           [recip](x1) = [1] x1 + [0]         
                                              
             [sqr](x1) = [0]                  
                                              
        [n__terms](x1) = [1] x1 + [0]         
                                              
            [n__s](x1) = [1] x1 + [0]         
                                              
                   [0] = [0]                  
                                              
               [s](x1) = [1] x1 + [0]         
                                              
         [add](x1, x2) = [1] x1 + [2] x2 + [0]
                                              
             [dbl](x1) = [5]                  
                                              
       [first](x1, x2) = [1] x1 + [1] x2 + [1]
                                              
                 [nil] = [0]                  
                                              
    [n__first](x1, x2) = [1] x1 + [1] x2 + [1]
                                              
        [activate](x1) = [2] x1 + [0]         
  
  The order satisfies the following ordering constraints:
  
                      [terms(N)] =  [1] N + [0]                             
                                 >= [0]                                     
                                 =  [cons(recip(sqr(N)), n__terms(n__s(N)))]
                                                                            
                      [terms(X)] =  [1] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [n__terms(X)]                           
                                                                            
                      [sqr(0())] =  [0]                                     
                                 >= [0]                                     
                                 =  [0()]                                   
                                                                            
                          [s(X)] =  [1] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [n__s(X)]                               
                                                                            
                   [add(0(), X)] =  [2] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [X]                                     
                                                                            
                      [dbl(0())] =  [5]                                     
                                 >  [0]                                     
                                 =  [0()]                                   
                                                                            
                 [first(X1, X2)] =  [1] X1 + [1] X2 + [1]                   
                                 >= [1] X1 + [1] X2 + [1]                   
                                 =  [n__first(X1, X2)]                      
                                                                            
                 [first(0(), X)] =  [1] X + [1]                             
                                 >  [0]                                     
                                 =  [nil()]                                 
                                                                            
                   [activate(X)] =  [2] X + [0]                             
                                 >= [1] X + [0]                             
                                 =  [X]                                     
                                                                            
         [activate(n__terms(X))] =  [2] X + [0]                             
                                 >= [2] X + [0]                             
                                 =  [terms(activate(X))]                    
                                                                            
             [activate(n__s(X))] =  [2] X + [0]                             
                                 >= [2] X + [0]                             
                                 =  [s(activate(X))]                        
                                                                            
    [activate(n__first(X1, X2))] =  [2] X1 + [2] X2 + [2]                   
                                 >  [2] X1 + [2] X2 + [1]                   
                                 =  [first(activate(X1), activate(X2))]     
                                                                            

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:
  { terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N)))
  , terms(X) -> n__terms(X)
  , sqr(0()) -> 0()
  , s(X) -> n__s(X)
  , add(0(), X) -> X
  , dbl(0()) -> 0()
  , first(X1, X2) -> n__first(X1, X2)
  , first(0(), X) -> nil()
  , activate(X) -> X
  , activate(n__terms(X)) -> terms(activate(X))
  , activate(n__s(X)) -> s(activate(X))
  , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

Empty rules are trivially bounded

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