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

Strict Trs:
  { terms(N) -> cons(recip(sqr(N)))
  , sqr(0()) -> 0()
  , sqr(s()) -> s()
  , dbl(0()) -> 0()
  , dbl(s()) -> s()
  , add(0(), X) -> X
  , add(s(), Y) -> s()
  , first(0(), X) -> nil()
  , first(s(), cons(Y)) -> cons(Y) }
Obligation:
  runtime complexity
Answer:
  YES(O(1),O(1))

The input is overlay and right-linear. Switching to innermost
rewriting.

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

Strict Trs:
  { terms(N) -> cons(recip(sqr(N)))
  , sqr(0()) -> 0()
  , sqr(s()) -> s()
  , dbl(0()) -> 0()
  , dbl(s()) -> s()
  , add(0(), X) -> X
  , add(s(), Y) -> s()
  , first(0(), X) -> nil()
  , first(s(), cons(Y)) -> cons(Y) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

We add the following weak dependency pairs:

Strict DPs:
  { terms^#(N) -> c_1(sqr^#(N))
  , sqr^#(0()) -> c_2()
  , sqr^#(s()) -> c_3()
  , dbl^#(0()) -> c_4()
  , dbl^#(s()) -> c_5()
  , add^#(0(), X) -> c_6()
  , add^#(s(), Y) -> c_7()
  , first^#(0(), X) -> c_8()
  , first^#(s(), cons(Y)) -> c_9() }

and mark the set of starting terms.

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

Strict DPs:
  { terms^#(N) -> c_1(sqr^#(N))
  , sqr^#(0()) -> c_2()
  , sqr^#(s()) -> c_3()
  , dbl^#(0()) -> c_4()
  , dbl^#(s()) -> c_5()
  , add^#(0(), X) -> c_6()
  , add^#(s(), Y) -> c_7()
  , first^#(0(), X) -> c_8()
  , first^#(s(), cons(Y)) -> c_9() }
Strict Trs:
  { terms(N) -> cons(recip(sqr(N)))
  , sqr(0()) -> 0()
  , sqr(s()) -> s()
  , dbl(0()) -> 0()
  , dbl(s()) -> s()
  , add(0(), X) -> X
  , add(s(), Y) -> s()
  , first(0(), X) -> nil()
  , first(s(), cons(Y)) -> cons(Y) }
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)).

Strict DPs:
  { terms^#(N) -> c_1(sqr^#(N))
  , sqr^#(0()) -> c_2()
  , sqr^#(s()) -> c_3()
  , dbl^#(0()) -> c_4()
  , dbl^#(s()) -> c_5()
  , add^#(0(), X) -> c_6()
  , add^#(s(), Y) -> c_7()
  , first^#(0(), X) -> c_8()
  , first^#(s(), cons(Y)) -> c_9() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

The weightgap principle applies (using the following constant
growth matrix-interpretation)

The following argument positions are usable:
  Uargs(c_1) = {1}

TcT has computed the following constructor-restricted matrix
interpretation.

         [cons](x1) = [0]           
                      [0]           
                                    
                [0] = [0]           
                      [0]           
                                    
                [s] = [1]           
                      [1]           
                                    
      [terms^#](x1) = [1 2] x1 + [2]
                      [2 1]      [2]
                                    
          [c_1](x1) = [1 0] x1 + [0]
                      [0 1]      [0]
                                    
        [sqr^#](x1) = [0]           
                      [0]           
                                    
              [c_2] = [0]           
                      [0]           
                                    
              [c_3] = [0]           
                      [0]           
                                    
        [dbl^#](x1) = [0]           
                      [0]           
                                    
              [c_4] = [0]           
                      [0]           
                                    
              [c_5] = [0]           
                      [0]           
                                    
    [add^#](x1, x2) = [0]           
                      [0]           
                                    
              [c_6] = [0]           
                      [0]           
                                    
              [c_7] = [0]           
                      [0]           
                                    
  [first^#](x1, x2) = [1 0] x1 + [0]
                      [0 0]      [0]
                                    
              [c_8] = [0]           
                      [0]           
                                    
              [c_9] = [0]           
                      [0]           

The order satisfies the following ordering constraints:

             [terms^#(N)] =  [1 2] N + [2]  
                             [2 1]     [2]  
                          >  [0]            
                             [0]            
                          =  [c_1(sqr^#(N))]
                                            
             [sqr^#(0())] =  [0]            
                             [0]            
                          >= [0]            
                             [0]            
                          =  [c_2()]        
                                            
             [sqr^#(s())] =  [0]            
                             [0]            
                          >= [0]            
                             [0]            
                          =  [c_3()]        
                                            
             [dbl^#(0())] =  [0]            
                             [0]            
                          >= [0]            
                             [0]            
                          =  [c_4()]        
                                            
             [dbl^#(s())] =  [0]            
                             [0]            
                          >= [0]            
                             [0]            
                          =  [c_5()]        
                                            
          [add^#(0(), X)] =  [0]            
                             [0]            
                          >= [0]            
                             [0]            
                          =  [c_6()]        
                                            
          [add^#(s(), Y)] =  [0]            
                             [0]            
                          >= [0]            
                             [0]            
                          =  [c_7()]        
                                            
        [first^#(0(), X)] =  [0]            
                             [0]            
                          >= [0]            
                             [0]            
                          =  [c_8()]        
                                            
  [first^#(s(), cons(Y))] =  [1]            
                             [0]            
                          >  [0]            
                             [0]            
                          =  [c_9()]        
                                            

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:
  { sqr^#(0()) -> c_2()
  , sqr^#(s()) -> c_3()
  , dbl^#(0()) -> c_4()
  , dbl^#(s()) -> c_5()
  , add^#(0(), X) -> c_6()
  , add^#(s(), Y) -> c_7()
  , first^#(0(), X) -> c_8() }
Weak DPs:
  { terms^#(N) -> c_1(sqr^#(N))
  , first^#(s(), cons(Y)) -> c_9() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

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

  DPs:
    { 1: sqr^#(0()) -> c_2()
    , 2: sqr^#(s()) -> c_3()
    , 3: dbl^#(0()) -> c_4()
    , 4: dbl^#(s()) -> c_5()
    , 5: add^#(0(), X) -> c_6()
    , 6: add^#(s(), Y) -> c_7()
    , 7: first^#(0(), X) -> c_8()
    , 8: terms^#(N) -> c_1(sqr^#(N))
    , 9: first^#(s(), cons(Y)) -> c_9() }

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

Strict DPs:
  { sqr^#(0()) -> c_2()
  , sqr^#(s()) -> c_3() }
Weak DPs:
  { terms^#(N) -> c_1(sqr^#(N))
  , dbl^#(0()) -> c_4()
  , dbl^#(s()) -> c_5()
  , add^#(0(), X) -> c_6()
  , add^#(s(), Y) -> c_7()
  , first^#(0(), X) -> c_8()
  , first^#(s(), cons(Y)) -> c_9() }
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.

{ dbl^#(0()) -> c_4()
, dbl^#(s()) -> c_5()
, add^#(0(), X) -> c_6()
, add^#(s(), Y) -> c_7()
, first^#(0(), X) -> c_8()
, first^#(s(), cons(Y)) -> c_9() }

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

Strict DPs:
  { sqr^#(0()) -> c_2()
  , sqr^#(s()) -> c_3() }
Weak DPs: { terms^#(N) -> c_1(sqr^#(N)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

Consider the dependency graph

  1: sqr^#(0()) -> c_2()
  
  2: sqr^#(s()) -> c_3()
  
  3: terms^#(N) -> c_1(sqr^#(N))
     -->_1 sqr^#(s()) -> c_3() :2
     -->_1 sqr^#(0()) -> c_2() :1
  

Following roots of the dependency graph are removed, as the
considered set of starting terms is closed under reduction with
respect to these rules (modulo compound contexts).

  { terms^#(N) -> c_1(sqr^#(N)) }


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

Strict DPs:
  { sqr^#(0()) -> c_2()
  , sqr^#(s()) -> c_3() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

Consider the dependency graph

  1: sqr^#(0()) -> c_2()
  
  2: sqr^#(s()) -> c_3()
  

Following roots of the dependency graph are removed, as the
considered set of starting terms is closed under reduction with
respect to these rules (modulo compound contexts).

  { sqr^#(0()) -> c_2()
  , sqr^#(s()) -> c_3() }


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