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

Strict Trs:
  { a__fst(X1, X2) -> fst(X1, X2)
  , a__fst(0(), Z) -> nil()
  , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
  , mark(0()) -> 0()
  , mark(nil()) -> nil()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(mark(X))
  , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2))
  , mark(len(X)) -> a__len(mark(X))
  , a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__len(X) -> len(X)
  , a__len(nil()) -> 0()
  , a__len(cons(X, Z)) -> s(len(Z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

The following argument positions are usable:
  Uargs(a__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
  Uargs(a__add) = {1, 2}, Uargs(a__len) = {1}

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

  [a__fst](x1, x2) = [1] x1 + [1] x2 + [4]
                                          
               [0] = [0]                  
                                          
             [nil] = [0]                  
                                          
           [s](x1) = [4]                  
                                          
    [cons](x1, x2) = [1] x1 + [0]         
                                          
        [mark](x1) = [0]                  
                                          
     [fst](x1, x2) = [0]                  
                                          
     [a__from](x1) = [1] x1 + [0]         
                                          
        [from](x1) = [1] x1 + [0]         
                                          
  [a__add](x1, x2) = [1] x1 + [1] x2 + [0]
                                          
     [add](x1, x2) = [1] x2 + [0]         
                                          
      [a__len](x1) = [1] x1 + [0]         
                                          
         [len](x1) = [0]                  

The order satisfies the following ordering constraints:

            [a__fst(X1, X2)] =  [1] X1 + [1] X2 + [4]       
                             >  [0]                         
                             =  [fst(X1, X2)]               
                                                            
            [a__fst(0(), Z)] =  [1] Z + [4]                 
                             >  [0]                         
                             =  [nil()]                     
                                                            
  [a__fst(s(X), cons(Y, Z))] =  [1] Y + [8]                 
                             >  [0]                         
                             =  [cons(mark(Y), fst(X, Z))]  
                                                            
                 [mark(0())] =  [0]                         
                             >= [0]                         
                             =  [0()]                       
                                                            
               [mark(nil())] =  [0]                         
                             >= [0]                         
                             =  [nil()]                     
                                                            
                [mark(s(X))] =  [0]                         
                             ?  [4]                         
                             =  [s(X)]                      
                                                            
        [mark(cons(X1, X2))] =  [0]                         
                             >= [0]                         
                             =  [cons(mark(X1), X2)]        
                                                            
         [mark(fst(X1, X2))] =  [0]                         
                             ?  [4]                         
                             =  [a__fst(mark(X1), mark(X2))]
                                                            
             [mark(from(X))] =  [0]                         
                             >= [0]                         
                             =  [a__from(mark(X))]          
                                                            
         [mark(add(X1, X2))] =  [0]                         
                             >= [0]                         
                             =  [a__add(mark(X1), mark(X2))]
                                                            
              [mark(len(X))] =  [0]                         
                             >= [0]                         
                             =  [a__len(mark(X))]           
                                                            
                [a__from(X)] =  [1] X + [0]                 
                             >= [0]                         
                             =  [cons(mark(X), from(s(X)))] 
                                                            
                [a__from(X)] =  [1] X + [0]                 
                             >= [1] X + [0]                 
                             =  [from(X)]                   
                                                            
            [a__add(X1, X2)] =  [1] X1 + [1] X2 + [0]       
                             >= [1] X2 + [0]                
                             =  [add(X1, X2)]               
                                                            
            [a__add(0(), X)] =  [1] X + [0]                 
                             >= [0]                         
                             =  [mark(X)]                   
                                                            
           [a__add(s(X), Y)] =  [1] Y + [4]                 
                             >= [4]                         
                             =  [s(add(X, Y))]              
                                                            
                 [a__len(X)] =  [1] X + [0]                 
                             >= [0]                         
                             =  [len(X)]                    
                                                            
             [a__len(nil())] =  [0]                         
                             >= [0]                         
                             =  [0()]                       
                                                            
        [a__len(cons(X, Z))] =  [1] X + [0]                 
                             ?  [4]                         
                             =  [s(len(Z))]                 
                                                            

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^2)).

Strict Trs:
  { mark(0()) -> 0()
  , mark(nil()) -> nil()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(mark(X))
  , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2))
  , mark(len(X)) -> a__len(mark(X))
  , a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__len(X) -> len(X)
  , a__len(nil()) -> 0()
  , a__len(cons(X, Z)) -> s(len(Z)) }
Weak Trs:
  { a__fst(X1, X2) -> fst(X1, X2)
  , a__fst(0(), Z) -> nil()
  , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

The following argument positions are usable:
  Uargs(a__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
  Uargs(a__add) = {1, 2}, Uargs(a__len) = {1}

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

  [a__fst](x1, x2) = [1] x1 + [1] x2 + [4]
                                          
               [0] = [4]                  
                                          
             [nil] = [5]                  
                                          
           [s](x1) = [4]                  
                                          
    [cons](x1, x2) = [1] x1 + [0]         
                                          
        [mark](x1) = [1] x1 + [0]         
                                          
     [fst](x1, x2) = [1] x1 + [1] x2 + [0]
                                          
     [a__from](x1) = [1] x1 + [0]         
                                          
        [from](x1) = [1] x1 + [0]         
                                          
  [a__add](x1, x2) = [1] x1 + [1] x2 + [0]
                                          
     [add](x1, x2) = [1] x1 + [1] x2 + [0]
                                          
      [a__len](x1) = [1] x1 + [0]         
                                          
         [len](x1) = [1] x1 + [0]         

The order satisfies the following ordering constraints:

            [a__fst(X1, X2)] =  [1] X1 + [1] X2 + [4]       
                             >  [1] X1 + [1] X2 + [0]       
                             =  [fst(X1, X2)]               
                                                            
            [a__fst(0(), Z)] =  [1] Z + [8]                 
                             >  [5]                         
                             =  [nil()]                     
                                                            
  [a__fst(s(X), cons(Y, Z))] =  [1] Y + [8]                 
                             >  [1] Y + [0]                 
                             =  [cons(mark(Y), fst(X, Z))]  
                                                            
                 [mark(0())] =  [4]                         
                             >= [4]                         
                             =  [0()]                       
                                                            
               [mark(nil())] =  [5]                         
                             >= [5]                         
                             =  [nil()]                     
                                                            
                [mark(s(X))] =  [4]                         
                             >= [4]                         
                             =  [s(X)]                      
                                                            
        [mark(cons(X1, X2))] =  [1] X1 + [0]                
                             >= [1] X1 + [0]                
                             =  [cons(mark(X1), X2)]        
                                                            
         [mark(fst(X1, X2))] =  [1] X1 + [1] X2 + [0]       
                             ?  [1] X1 + [1] X2 + [4]       
                             =  [a__fst(mark(X1), mark(X2))]
                                                            
             [mark(from(X))] =  [1] X + [0]                 
                             >= [1] X + [0]                 
                             =  [a__from(mark(X))]          
                                                            
         [mark(add(X1, X2))] =  [1] X1 + [1] X2 + [0]       
                             >= [1] X1 + [1] X2 + [0]       
                             =  [a__add(mark(X1), mark(X2))]
                                                            
              [mark(len(X))] =  [1] X + [0]                 
                             >= [1] X + [0]                 
                             =  [a__len(mark(X))]           
                                                            
                [a__from(X)] =  [1] X + [0]                 
                             >= [1] X + [0]                 
                             =  [cons(mark(X), from(s(X)))] 
                                                            
                [a__from(X)] =  [1] X + [0]                 
                             >= [1] X + [0]                 
                             =  [from(X)]                   
                                                            
            [a__add(X1, X2)] =  [1] X1 + [1] X2 + [0]       
                             >= [1] X1 + [1] X2 + [0]       
                             =  [add(X1, X2)]               
                                                            
            [a__add(0(), X)] =  [1] X + [4]                 
                             >  [1] X + [0]                 
                             =  [mark(X)]                   
                                                            
           [a__add(s(X), Y)] =  [1] Y + [4]                 
                             >= [4]                         
                             =  [s(add(X, Y))]              
                                                            
                 [a__len(X)] =  [1] X + [0]                 
                             >= [1] X + [0]                 
                             =  [len(X)]                    
                                                            
             [a__len(nil())] =  [5]                         
                             >  [4]                         
                             =  [0()]                       
                                                            
        [a__len(cons(X, Z))] =  [1] X + [0]                 
                             ?  [4]                         
                             =  [s(len(Z))]                 
                                                            

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^2)).

Strict Trs:
  { mark(0()) -> 0()
  , mark(nil()) -> nil()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(mark(X))
  , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2))
  , mark(len(X)) -> a__len(mark(X))
  , a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__len(X) -> len(X)
  , a__len(cons(X, Z)) -> s(len(Z)) }
Weak Trs:
  { a__fst(X1, X2) -> fst(X1, X2)
  , a__fst(0(), Z) -> nil()
  , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
  , a__add(0(), X) -> mark(X)
  , a__len(nil()) -> 0() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

The following argument positions are usable:
  Uargs(a__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
  Uargs(a__add) = {1, 2}, Uargs(a__len) = {1}

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

  [a__fst](x1, x2) = [1] x1 + [1] x2 + [1]
                                          
               [0] = [7]                  
                                          
             [nil] = [7]                  
                                          
           [s](x1) = [7]                  
                                          
    [cons](x1, x2) = [1] x1 + [0]         
                                          
        [mark](x1) = [0]                  
                                          
     [fst](x1, x2) = [0]                  
                                          
     [a__from](x1) = [1] x1 + [1]         
                                          
        [from](x1) = [1] x1 + [0]         
                                          
  [a__add](x1, x2) = [1] x1 + [1] x2 + [1]
                                          
     [add](x1, x2) = [1] x2 + [0]         
                                          
      [a__len](x1) = [1] x1 + [1]         
                                          
         [len](x1) = [0]                  

The order satisfies the following ordering constraints:

            [a__fst(X1, X2)] =  [1] X1 + [1] X2 + [1]       
                             >  [0]                         
                             =  [fst(X1, X2)]               
                                                            
            [a__fst(0(), Z)] =  [1] Z + [8]                 
                             >  [7]                         
                             =  [nil()]                     
                                                            
  [a__fst(s(X), cons(Y, Z))] =  [1] Y + [8]                 
                             >  [0]                         
                             =  [cons(mark(Y), fst(X, Z))]  
                                                            
                 [mark(0())] =  [0]                         
                             ?  [7]                         
                             =  [0()]                       
                                                            
               [mark(nil())] =  [0]                         
                             ?  [7]                         
                             =  [nil()]                     
                                                            
                [mark(s(X))] =  [0]                         
                             ?  [7]                         
                             =  [s(X)]                      
                                                            
        [mark(cons(X1, X2))] =  [0]                         
                             >= [0]                         
                             =  [cons(mark(X1), X2)]        
                                                            
         [mark(fst(X1, X2))] =  [0]                         
                             ?  [1]                         
                             =  [a__fst(mark(X1), mark(X2))]
                                                            
             [mark(from(X))] =  [0]                         
                             ?  [1]                         
                             =  [a__from(mark(X))]          
                                                            
         [mark(add(X1, X2))] =  [0]                         
                             ?  [1]                         
                             =  [a__add(mark(X1), mark(X2))]
                                                            
              [mark(len(X))] =  [0]                         
                             ?  [1]                         
                             =  [a__len(mark(X))]           
                                                            
                [a__from(X)] =  [1] X + [1]                 
                             >  [0]                         
                             =  [cons(mark(X), from(s(X)))] 
                                                            
                [a__from(X)] =  [1] X + [1]                 
                             >  [1] X + [0]                 
                             =  [from(X)]                   
                                                            
            [a__add(X1, X2)] =  [1] X1 + [1] X2 + [1]       
                             >  [1] X2 + [0]                
                             =  [add(X1, X2)]               
                                                            
            [a__add(0(), X)] =  [1] X + [8]                 
                             >  [0]                         
                             =  [mark(X)]                   
                                                            
           [a__add(s(X), Y)] =  [1] Y + [8]                 
                             >  [7]                         
                             =  [s(add(X, Y))]              
                                                            
                 [a__len(X)] =  [1] X + [1]                 
                             >  [0]                         
                             =  [len(X)]                    
                                                            
             [a__len(nil())] =  [8]                         
                             >  [7]                         
                             =  [0()]                       
                                                            
        [a__len(cons(X, Z))] =  [1] X + [1]                 
                             ?  [7]                         
                             =  [s(len(Z))]                 
                                                            

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^2)).

Strict Trs:
  { mark(0()) -> 0()
  , mark(nil()) -> nil()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(mark(X))
  , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2))
  , mark(len(X)) -> a__len(mark(X))
  , a__len(cons(X, Z)) -> s(len(Z)) }
Weak Trs:
  { a__fst(X1, X2) -> fst(X1, X2)
  , a__fst(0(), Z) -> nil()
  , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
  , a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__len(X) -> len(X)
  , a__len(nil()) -> 0() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

The following argument positions are usable:
  Uargs(a__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
  Uargs(a__add) = {1, 2}, Uargs(a__len) = {1}

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

  [a__fst](x1, x2) = [1] x1 + [1] x2 + [1]
                                          
               [0] = [7]                  
                                          
             [nil] = [7]                  
                                          
           [s](x1) = [0]                  
                                          
    [cons](x1, x2) = [1] x1 + [0]         
                                          
        [mark](x1) = [0]                  
                                          
     [fst](x1, x2) = [0]                  
                                          
     [a__from](x1) = [1] x1 + [5]         
                                          
        [from](x1) = [1] x1 + [0]         
                                          
  [a__add](x1, x2) = [1] x1 + [1] x2 + [5]
                                          
     [add](x1, x2) = [1] x2 + [0]         
                                          
      [a__len](x1) = [1] x1 + [1]         
                                          
         [len](x1) = [0]                  

The order satisfies the following ordering constraints:

            [a__fst(X1, X2)] =  [1] X1 + [1] X2 + [1]       
                             >  [0]                         
                             =  [fst(X1, X2)]               
                                                            
            [a__fst(0(), Z)] =  [1] Z + [8]                 
                             >  [7]                         
                             =  [nil()]                     
                                                            
  [a__fst(s(X), cons(Y, Z))] =  [1] Y + [1]                 
                             >  [0]                         
                             =  [cons(mark(Y), fst(X, Z))]  
                                                            
                 [mark(0())] =  [0]                         
                             ?  [7]                         
                             =  [0()]                       
                                                            
               [mark(nil())] =  [0]                         
                             ?  [7]                         
                             =  [nil()]                     
                                                            
                [mark(s(X))] =  [0]                         
                             >= [0]                         
                             =  [s(X)]                      
                                                            
        [mark(cons(X1, X2))] =  [0]                         
                             >= [0]                         
                             =  [cons(mark(X1), X2)]        
                                                            
         [mark(fst(X1, X2))] =  [0]                         
                             ?  [1]                         
                             =  [a__fst(mark(X1), mark(X2))]
                                                            
             [mark(from(X))] =  [0]                         
                             ?  [5]                         
                             =  [a__from(mark(X))]          
                                                            
         [mark(add(X1, X2))] =  [0]                         
                             ?  [5]                         
                             =  [a__add(mark(X1), mark(X2))]
                                                            
              [mark(len(X))] =  [0]                         
                             ?  [1]                         
                             =  [a__len(mark(X))]           
                                                            
                [a__from(X)] =  [1] X + [5]                 
                             >  [0]                         
                             =  [cons(mark(X), from(s(X)))] 
                                                            
                [a__from(X)] =  [1] X + [5]                 
                             >  [1] X + [0]                 
                             =  [from(X)]                   
                                                            
            [a__add(X1, X2)] =  [1] X1 + [1] X2 + [5]       
                             >  [1] X2 + [0]                
                             =  [add(X1, X2)]               
                                                            
            [a__add(0(), X)] =  [1] X + [12]                
                             >  [0]                         
                             =  [mark(X)]                   
                                                            
           [a__add(s(X), Y)] =  [1] Y + [5]                 
                             >  [0]                         
                             =  [s(add(X, Y))]              
                                                            
                 [a__len(X)] =  [1] X + [1]                 
                             >  [0]                         
                             =  [len(X)]                    
                                                            
             [a__len(nil())] =  [8]                         
                             >  [7]                         
                             =  [0()]                       
                                                            
        [a__len(cons(X, Z))] =  [1] X + [1]                 
                             >  [0]                         
                             =  [s(len(Z))]                 
                                                            

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^2)).

Strict Trs:
  { mark(0()) -> 0()
  , mark(nil()) -> nil()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(mark(X))
  , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2))
  , mark(len(X)) -> a__len(mark(X)) }
Weak Trs:
  { a__fst(X1, X2) -> fst(X1, X2)
  , a__fst(0(), Z) -> nil()
  , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
  , a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__len(X) -> len(X)
  , a__len(nil()) -> 0()
  , a__len(cons(X, Z)) -> s(len(Z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

The following argument positions are usable:
  Uargs(a__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
  Uargs(a__add) = {1, 2}, Uargs(a__len) = {1}

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

  [a__fst](x1, x2) = [1] x1 + [1] x2 + [6]
                                          
               [0] = [2]                  
                                          
             [nil] = [4]                  
                                          
           [s](x1) = [0]                  
                                          
    [cons](x1, x2) = [1] x1 + [3]         
                                          
        [mark](x1) = [1]                  
                                          
     [fst](x1, x2) = [0]                  
                                          
     [a__from](x1) = [1] x1 + [7]         
                                          
        [from](x1) = [1] x1 + [0]         
                                          
  [a__add](x1, x2) = [1] x1 + [1] x2 + [6]
                                          
     [add](x1, x2) = [1] x2 + [0]         
                                          
      [a__len](x1) = [1] x1 + [0]         
                                          
         [len](x1) = [0]                  

The order satisfies the following ordering constraints:

            [a__fst(X1, X2)] =  [1] X1 + [1] X2 + [6]       
                             >  [0]                         
                             =  [fst(X1, X2)]               
                                                            
            [a__fst(0(), Z)] =  [1] Z + [8]                 
                             >  [4]                         
                             =  [nil()]                     
                                                            
  [a__fst(s(X), cons(Y, Z))] =  [1] Y + [9]                 
                             >  [4]                         
                             =  [cons(mark(Y), fst(X, Z))]  
                                                            
                 [mark(0())] =  [1]                         
                             ?  [2]                         
                             =  [0()]                       
                                                            
               [mark(nil())] =  [1]                         
                             ?  [4]                         
                             =  [nil()]                     
                                                            
                [mark(s(X))] =  [1]                         
                             >  [0]                         
                             =  [s(X)]                      
                                                            
        [mark(cons(X1, X2))] =  [1]                         
                             ?  [4]                         
                             =  [cons(mark(X1), X2)]        
                                                            
         [mark(fst(X1, X2))] =  [1]                         
                             ?  [8]                         
                             =  [a__fst(mark(X1), mark(X2))]
                                                            
             [mark(from(X))] =  [1]                         
                             ?  [8]                         
                             =  [a__from(mark(X))]          
                                                            
         [mark(add(X1, X2))] =  [1]                         
                             ?  [8]                         
                             =  [a__add(mark(X1), mark(X2))]
                                                            
              [mark(len(X))] =  [1]                         
                             >= [1]                         
                             =  [a__len(mark(X))]           
                                                            
                [a__from(X)] =  [1] X + [7]                 
                             >  [4]                         
                             =  [cons(mark(X), from(s(X)))] 
                                                            
                [a__from(X)] =  [1] X + [7]                 
                             >  [1] X + [0]                 
                             =  [from(X)]                   
                                                            
            [a__add(X1, X2)] =  [1] X1 + [1] X2 + [6]       
                             >  [1] X2 + [0]                
                             =  [add(X1, X2)]               
                                                            
            [a__add(0(), X)] =  [1] X + [8]                 
                             >  [1]                         
                             =  [mark(X)]                   
                                                            
           [a__add(s(X), Y)] =  [1] Y + [6]                 
                             >  [0]                         
                             =  [s(add(X, Y))]              
                                                            
                 [a__len(X)] =  [1] X + [0]                 
                             >= [0]                         
                             =  [len(X)]                    
                                                            
             [a__len(nil())] =  [4]                         
                             >  [2]                         
                             =  [0()]                       
                                                            
        [a__len(cons(X, Z))] =  [1] X + [3]                 
                             >  [0]                         
                             =  [s(len(Z))]                 
                                                            

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^2)).

Strict Trs:
  { mark(0()) -> 0()
  , mark(nil()) -> nil()
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(mark(X))
  , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2))
  , mark(len(X)) -> a__len(mark(X)) }
Weak Trs:
  { a__fst(X1, X2) -> fst(X1, X2)
  , a__fst(0(), Z) -> nil()
  , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
  , mark(s(X)) -> s(X)
  , a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__len(X) -> len(X)
  , a__len(nil()) -> 0()
  , a__len(cons(X, Z)) -> s(len(Z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

The following argument positions are usable:
  Uargs(a__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
  Uargs(a__add) = {1, 2}, Uargs(a__len) = {1}

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

  [a__fst](x1, x2) = [1] x1 + [1] x2 + [7]
                                          
               [0] = [1]                  
                                          
             [nil] = [0]                  
                                          
           [s](x1) = [1]                  
                                          
    [cons](x1, x2) = [1] x1 + [0]         
                                          
        [mark](x1) = [1]                  
                                          
     [fst](x1, x2) = [0]                  
                                          
     [a__from](x1) = [1] x1 + [7]         
                                          
        [from](x1) = [1] x1 + [0]         
                                          
  [a__add](x1, x2) = [1] x1 + [1] x2 + [7]
                                          
     [add](x1, x2) = [1] x2 + [0]         
                                          
      [a__len](x1) = [1] x1 + [4]         
                                          
         [len](x1) = [0]                  

The order satisfies the following ordering constraints:

            [a__fst(X1, X2)] =  [1] X1 + [1] X2 + [7]       
                             >  [0]                         
                             =  [fst(X1, X2)]               
                                                            
            [a__fst(0(), Z)] =  [1] Z + [8]                 
                             >  [0]                         
                             =  [nil()]                     
                                                            
  [a__fst(s(X), cons(Y, Z))] =  [1] Y + [8]                 
                             >  [1]                         
                             =  [cons(mark(Y), fst(X, Z))]  
                                                            
                 [mark(0())] =  [1]                         
                             >= [1]                         
                             =  [0()]                       
                                                            
               [mark(nil())] =  [1]                         
                             >  [0]                         
                             =  [nil()]                     
                                                            
                [mark(s(X))] =  [1]                         
                             >= [1]                         
                             =  [s(X)]                      
                                                            
        [mark(cons(X1, X2))] =  [1]                         
                             >= [1]                         
                             =  [cons(mark(X1), X2)]        
                                                            
         [mark(fst(X1, X2))] =  [1]                         
                             ?  [9]                         
                             =  [a__fst(mark(X1), mark(X2))]
                                                            
             [mark(from(X))] =  [1]                         
                             ?  [8]                         
                             =  [a__from(mark(X))]          
                                                            
         [mark(add(X1, X2))] =  [1]                         
                             ?  [9]                         
                             =  [a__add(mark(X1), mark(X2))]
                                                            
              [mark(len(X))] =  [1]                         
                             ?  [5]                         
                             =  [a__len(mark(X))]           
                                                            
                [a__from(X)] =  [1] X + [7]                 
                             >  [1]                         
                             =  [cons(mark(X), from(s(X)))] 
                                                            
                [a__from(X)] =  [1] X + [7]                 
                             >  [1] X + [0]                 
                             =  [from(X)]                   
                                                            
            [a__add(X1, X2)] =  [1] X1 + [1] X2 + [7]       
                             >  [1] X2 + [0]                
                             =  [add(X1, X2)]               
                                                            
            [a__add(0(), X)] =  [1] X + [8]                 
                             >  [1]                         
                             =  [mark(X)]                   
                                                            
           [a__add(s(X), Y)] =  [1] Y + [8]                 
                             >  [1]                         
                             =  [s(add(X, Y))]              
                                                            
                 [a__len(X)] =  [1] X + [4]                 
                             >  [0]                         
                             =  [len(X)]                    
                                                            
             [a__len(nil())] =  [4]                         
                             >  [1]                         
                             =  [0()]                       
                                                            
        [a__len(cons(X, Z))] =  [1] X + [4]                 
                             >  [1]                         
                             =  [s(len(Z))]                 
                                                            

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^2)).

Strict Trs:
  { mark(0()) -> 0()
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(mark(X))
  , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2))
  , mark(len(X)) -> a__len(mark(X)) }
Weak Trs:
  { a__fst(X1, X2) -> fst(X1, X2)
  , a__fst(0(), Z) -> nil()
  , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
  , mark(nil()) -> nil()
  , mark(s(X)) -> s(X)
  , a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__len(X) -> len(X)
  , a__len(nil()) -> 0()
  , a__len(cons(X, Z)) -> s(len(Z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

The following argument positions are usable:
  Uargs(a__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
  Uargs(a__add) = {1, 2}, Uargs(a__len) = {1}

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

  [a__fst](x1, x2) = [1] x1 + [1] x2 + [7]
                                          
               [0] = [0]                  
                                          
             [nil] = [0]                  
                                          
           [s](x1) = [0]                  
                                          
    [cons](x1, x2) = [1] x1 + [0]         
                                          
        [mark](x1) = [1]                  
                                          
     [fst](x1, x2) = [0]                  
                                          
     [a__from](x1) = [1] x1 + [7]         
                                          
        [from](x1) = [1] x1 + [0]         
                                          
  [a__add](x1, x2) = [1] x1 + [1] x2 + [6]
                                          
     [add](x1, x2) = [1] x2 + [0]         
                                          
      [a__len](x1) = [1] x1 + [0]         
                                          
         [len](x1) = [0]                  

The order satisfies the following ordering constraints:

            [a__fst(X1, X2)] =  [1] X1 + [1] X2 + [7]       
                             >  [0]                         
                             =  [fst(X1, X2)]               
                                                            
            [a__fst(0(), Z)] =  [1] Z + [7]                 
                             >  [0]                         
                             =  [nil()]                     
                                                            
  [a__fst(s(X), cons(Y, Z))] =  [1] Y + [7]                 
                             >  [1]                         
                             =  [cons(mark(Y), fst(X, Z))]  
                                                            
                 [mark(0())] =  [1]                         
                             >  [0]                         
                             =  [0()]                       
                                                            
               [mark(nil())] =  [1]                         
                             >  [0]                         
                             =  [nil()]                     
                                                            
                [mark(s(X))] =  [1]                         
                             >  [0]                         
                             =  [s(X)]                      
                                                            
        [mark(cons(X1, X2))] =  [1]                         
                             >= [1]                         
                             =  [cons(mark(X1), X2)]        
                                                            
         [mark(fst(X1, X2))] =  [1]                         
                             ?  [9]                         
                             =  [a__fst(mark(X1), mark(X2))]
                                                            
             [mark(from(X))] =  [1]                         
                             ?  [8]                         
                             =  [a__from(mark(X))]          
                                                            
         [mark(add(X1, X2))] =  [1]                         
                             ?  [8]                         
                             =  [a__add(mark(X1), mark(X2))]
                                                            
              [mark(len(X))] =  [1]                         
                             >= [1]                         
                             =  [a__len(mark(X))]           
                                                            
                [a__from(X)] =  [1] X + [7]                 
                             >  [1]                         
                             =  [cons(mark(X), from(s(X)))] 
                                                            
                [a__from(X)] =  [1] X + [7]                 
                             >  [1] X + [0]                 
                             =  [from(X)]                   
                                                            
            [a__add(X1, X2)] =  [1] X1 + [1] X2 + [6]       
                             >  [1] X2 + [0]                
                             =  [add(X1, X2)]               
                                                            
            [a__add(0(), X)] =  [1] X + [6]                 
                             >  [1]                         
                             =  [mark(X)]                   
                                                            
           [a__add(s(X), Y)] =  [1] Y + [6]                 
                             >  [0]                         
                             =  [s(add(X, Y))]              
                                                            
                 [a__len(X)] =  [1] X + [0]                 
                             >= [0]                         
                             =  [len(X)]                    
                                                            
             [a__len(nil())] =  [0]                         
                             >= [0]                         
                             =  [0()]                       
                                                            
        [a__len(cons(X, Z))] =  [1] X + [0]                 
                             >= [0]                         
                             =  [s(len(Z))]                 
                                                            

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^2)).

Strict Trs:
  { mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(mark(X))
  , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2))
  , mark(len(X)) -> a__len(mark(X)) }
Weak Trs:
  { a__fst(X1, X2) -> fst(X1, X2)
  , a__fst(0(), Z) -> nil()
  , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
  , mark(0()) -> 0()
  , mark(nil()) -> nil()
  , mark(s(X)) -> s(X)
  , a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__len(X) -> len(X)
  , a__len(nil()) -> 0()
  , a__len(cons(X, Z)) -> s(len(Z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

We use the processor 'matrix interpretation of dimension 2' to
orient following rules strictly.

Trs:
  { mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(mark(X))
  , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2))
  , mark(len(X)) -> a__len(mark(X)) }

The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^2)) . These rules are moved into the corresponding weak
component(s).

Sub-proof:
----------
  The following argument positions are usable:
    Uargs(a__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
    Uargs(a__add) = {1, 2}, Uargs(a__len) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
    [a__fst](x1, x2) = [1 2] x1 + [1 6] x2 + [6]
                       [0 1]      [0 1]      [3]
                                                
                 [0] = [2]                      
                       [2]                      
                                                
               [nil] = [0]                      
                       [4]                      
                                                
             [s](x1) = [1]                      
                       [0]                      
                                                
      [cons](x1, x2) = [1 0] x1 + [0]           
                       [0 1]      [1]           
                                                
          [mark](x1) = [1 3] x1 + [3]           
                       [0 1]      [0]           
                                                
       [fst](x1, x2) = [1 2] x1 + [1 6] x2 + [1]
                       [0 1]      [0 1]      [3]
                                                
       [a__from](x1) = [1 6] x1 + [4]           
                       [0 1]      [1]           
                                                
          [from](x1) = [1 6] x1 + [2]           
                       [0 1]      [1]           
                                                
    [a__add](x1, x2) = [1 4] x1 + [1 3] x2 + [2]
                       [0 1]      [0 1]      [4]
                                                
       [add](x1, x2) = [1 4] x1 + [1 3] x2 + [0]
                       [0 1]      [0 1]      [4]
                                                
        [a__len](x1) = [1 1] x1 + [1]           
                       [0 1]      [2]           
                                                
           [len](x1) = [1 1] x1 + [0]           
                       [0 1]      [2]           
  
  The order satisfies the following ordering constraints:
  
              [a__fst(X1, X2)] = [1 2] X1 + [1 6] X2 + [6]   
                                 [0 1]      [0 1]      [3]   
                               > [1 2] X1 + [1 6] X2 + [1]   
                                 [0 1]      [0 1]      [3]   
                               = [fst(X1, X2)]               
                                                             
              [a__fst(0(), Z)] = [1 6] Z + [12]              
                                 [0 1]     [5]               
                               > [0]                         
                                 [4]                         
                               = [nil()]                     
                                                             
    [a__fst(s(X), cons(Y, Z))] = [1 6] Y + [13]              
                                 [0 1]     [4]               
                               > [1 3] Y + [3]               
                                 [0 1]     [1]               
                               = [cons(mark(Y), fst(X, Z))]  
                                                             
                   [mark(0())] = [11]                        
                                 [2]                         
                               > [2]                         
                                 [2]                         
                               = [0()]                       
                                                             
                 [mark(nil())] = [15]                        
                                 [4]                         
                               > [0]                         
                                 [4]                         
                               = [nil()]                     
                                                             
                  [mark(s(X))] = [4]                         
                                 [0]                         
                               > [1]                         
                                 [0]                         
                               = [s(X)]                      
                                                             
          [mark(cons(X1, X2))] = [1 3] X1 + [6]              
                                 [0 1]      [1]              
                               > [1 3] X1 + [3]              
                                 [0 1]      [1]              
                               = [cons(mark(X1), X2)]        
                                                             
           [mark(fst(X1, X2))] = [1 5] X1 + [1 9] X2 + [13]  
                                 [0 1]      [0 1]      [3]   
                               > [1 5] X1 + [1 9] X2 + [12]  
                                 [0 1]      [0 1]      [3]   
                               = [a__fst(mark(X1), mark(X2))]
                                                             
               [mark(from(X))] = [1 9] X + [8]               
                                 [0 1]     [1]               
                               > [1 9] X + [7]               
                                 [0 1]     [1]               
                               = [a__from(mark(X))]          
                                                             
           [mark(add(X1, X2))] = [1 7] X1 + [1 6] X2 + [15]  
                                 [0 1]      [0 1]      [4]   
                               > [1 7] X1 + [1 6] X2 + [8]   
                                 [0 1]      [0 1]      [4]   
                               = [a__add(mark(X1), mark(X2))]
                                                             
                [mark(len(X))] = [1 4] X + [9]               
                                 [0 1]     [2]               
                               > [1 4] X + [4]               
                                 [0 1]     [2]               
                               = [a__len(mark(X))]           
                                                             
                  [a__from(X)] = [1 6] X + [4]               
                                 [0 1]     [1]               
                               > [1 3] X + [3]               
                                 [0 1]     [1]               
                               = [cons(mark(X), from(s(X)))] 
                                                             
                  [a__from(X)] = [1 6] X + [4]               
                                 [0 1]     [1]               
                               > [1 6] X + [2]               
                                 [0 1]     [1]               
                               = [from(X)]                   
                                                             
              [a__add(X1, X2)] = [1 4] X1 + [1 3] X2 + [2]   
                                 [0 1]      [0 1]      [4]   
                               > [1 4] X1 + [1 3] X2 + [0]   
                                 [0 1]      [0 1]      [4]   
                               = [add(X1, X2)]               
                                                             
              [a__add(0(), X)] = [1 3] X + [12]              
                                 [0 1]     [6]               
                               > [1 3] X + [3]               
                                 [0 1]     [0]               
                               = [mark(X)]                   
                                                             
             [a__add(s(X), Y)] = [1 3] Y + [3]               
                                 [0 1]     [4]               
                               > [1]                         
                                 [0]                         
                               = [s(add(X, Y))]              
                                                             
                   [a__len(X)] = [1 1] X + [1]               
                                 [0 1]     [2]               
                               > [1 1] X + [0]               
                                 [0 1]     [2]               
                               = [len(X)]                    
                                                             
               [a__len(nil())] = [5]                         
                                 [6]                         
                               > [2]                         
                                 [2]                         
                               = [0()]                       
                                                             
          [a__len(cons(X, Z))] = [1 1] X + [2]               
                                 [0 1]     [3]               
                               > [1]                         
                                 [0]                         
                               = [s(len(Z))]                 
                                                             

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:
  { a__fst(X1, X2) -> fst(X1, X2)
  , a__fst(0(), Z) -> nil()
  , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
  , mark(0()) -> 0()
  , mark(nil()) -> nil()
  , mark(s(X)) -> s(X)
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2))
  , mark(from(X)) -> a__from(mark(X))
  , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2))
  , mark(len(X)) -> a__len(mark(X))
  , a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , a__add(X1, X2) -> add(X1, X2)
  , a__add(0(), X) -> mark(X)
  , a__add(s(X), Y) -> s(add(X, Y))
  , a__len(X) -> len(X)
  , a__len(nil()) -> 0()
  , a__len(cons(X, Z)) -> s(len(Z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

Empty rules are trivially bounded

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