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

Strict Trs:
  { a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(from(X)) -> a__from(mark(X))
  , mark(s(X)) -> s(mark(X))
  , mark(nil()) -> nil()
  , mark(0()) -> 0()
  , mark(length(X)) -> a__length(X)
  , mark(length1(X)) -> a__length1(X)
  , a__length(X) -> length(X)
  , a__length(cons(X, Y)) -> s(a__length1(Y))
  , a__length(nil()) -> 0()
  , a__length1(X) -> a__length(X)
  , a__length1(X) -> length1(X) }
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__from) = {1}, Uargs(cons) = {1}, Uargs(s) = {1}

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

     [a__from](x1) = [1] x1 + [4]
                                 
    [cons](x1, x2) = [1] x1 + [0]
                                 
        [mark](x1) = [0]         
                                 
        [from](x1) = [1] x1 + [0]
                                 
           [s](x1) = [1] x1 + [0]
                                 
   [a__length](x1) = [0]         
                                 
             [nil] = [0]         
                                 
               [0] = [0]         
                                 
  [a__length1](x1) = [0]         
                                 
      [length](x1) = [0]         
                                 
     [length1](x1) = [0]         

The order satisfies the following ordering constraints:

             [a__from(X)] =  [1] X + [4]                
                          >  [0]                        
                          =  [cons(mark(X), from(s(X)))]
                                                        
             [a__from(X)] =  [1] X + [4]                
                          >  [1] X + [0]                
                          =  [from(X)]                  
                                                        
     [mark(cons(X1, X2))] =  [0]                        
                          >= [0]                        
                          =  [cons(mark(X1), X2)]       
                                                        
          [mark(from(X))] =  [0]                        
                          ?  [4]                        
                          =  [a__from(mark(X))]         
                                                        
             [mark(s(X))] =  [0]                        
                          >= [0]                        
                          =  [s(mark(X))]               
                                                        
            [mark(nil())] =  [0]                        
                          >= [0]                        
                          =  [nil()]                    
                                                        
              [mark(0())] =  [0]                        
                          >= [0]                        
                          =  [0()]                      
                                                        
        [mark(length(X))] =  [0]                        
                          >= [0]                        
                          =  [a__length(X)]             
                                                        
       [mark(length1(X))] =  [0]                        
                          >= [0]                        
                          =  [a__length1(X)]            
                                                        
           [a__length(X)] =  [0]                        
                          >= [0]                        
                          =  [length(X)]                
                                                        
  [a__length(cons(X, Y))] =  [0]                        
                          >= [0]                        
                          =  [s(a__length1(Y))]         
                                                        
       [a__length(nil())] =  [0]                        
                          >= [0]                        
                          =  [0()]                      
                                                        
          [a__length1(X)] =  [0]                        
                          >= [0]                        
                          =  [a__length(X)]             
                                                        
          [a__length1(X)] =  [0]                        
                          >= [0]                        
                          =  [length1(X)]               
                                                        

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(from(X)) -> a__from(mark(X))
  , mark(s(X)) -> s(mark(X))
  , mark(nil()) -> nil()
  , mark(0()) -> 0()
  , mark(length(X)) -> a__length(X)
  , mark(length1(X)) -> a__length1(X)
  , a__length(X) -> length(X)
  , a__length(cons(X, Y)) -> s(a__length1(Y))
  , a__length(nil()) -> 0()
  , a__length1(X) -> a__length(X)
  , a__length1(X) -> length1(X) }
Weak Trs:
  { a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X) }
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__from) = {1}, Uargs(cons) = {1}, Uargs(s) = {1}

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

     [a__from](x1) = [1] x1 + [6]
                                 
    [cons](x1, x2) = [1] x1 + [0]
                                 
        [mark](x1) = [1] x1 + [1]
                                 
        [from](x1) = [1] x1 + [0]
                                 
           [s](x1) = [1] x1 + [1]
                                 
   [a__length](x1) = [1]         
                                 
             [nil] = [0]         
                                 
               [0] = [0]         
                                 
  [a__length1](x1) = [4]         
                                 
      [length](x1) = [0]         
                                 
     [length1](x1) = [0]         

The order satisfies the following ordering constraints:

             [a__from(X)] =  [1] X + [6]                
                          >  [1] X + [1]                
                          =  [cons(mark(X), from(s(X)))]
                                                        
             [a__from(X)] =  [1] X + [6]                
                          >  [1] X + [0]                
                          =  [from(X)]                  
                                                        
     [mark(cons(X1, X2))] =  [1] X1 + [1]               
                          >= [1] X1 + [1]               
                          =  [cons(mark(X1), X2)]       
                                                        
          [mark(from(X))] =  [1] X + [1]                
                          ?  [1] X + [7]                
                          =  [a__from(mark(X))]         
                                                        
             [mark(s(X))] =  [1] X + [2]                
                          >= [1] X + [2]                
                          =  [s(mark(X))]               
                                                        
            [mark(nil())] =  [1]                        
                          >  [0]                        
                          =  [nil()]                    
                                                        
              [mark(0())] =  [1]                        
                          >  [0]                        
                          =  [0()]                      
                                                        
        [mark(length(X))] =  [1]                        
                          >= [1]                        
                          =  [a__length(X)]             
                                                        
       [mark(length1(X))] =  [1]                        
                          ?  [4]                        
                          =  [a__length1(X)]            
                                                        
           [a__length(X)] =  [1]                        
                          >  [0]                        
                          =  [length(X)]                
                                                        
  [a__length(cons(X, Y))] =  [1]                        
                          ?  [5]                        
                          =  [s(a__length1(Y))]         
                                                        
       [a__length(nil())] =  [1]                        
                          >  [0]                        
                          =  [0()]                      
                                                        
          [a__length1(X)] =  [4]                        
                          >  [1]                        
                          =  [a__length(X)]             
                                                        
          [a__length1(X)] =  [4]                        
                          >  [0]                        
                          =  [length1(X)]               
                                                        

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(from(X)) -> a__from(mark(X))
  , mark(s(X)) -> s(mark(X))
  , mark(length(X)) -> a__length(X)
  , mark(length1(X)) -> a__length1(X)
  , a__length(cons(X, Y)) -> s(a__length1(Y)) }
Weak Trs:
  { a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , mark(nil()) -> nil()
  , mark(0()) -> 0()
  , a__length(X) -> length(X)
  , a__length(nil()) -> 0()
  , a__length1(X) -> a__length(X)
  , a__length1(X) -> length1(X) }
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__from) = {1}, Uargs(cons) = {1}, Uargs(s) = {1}

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

     [a__from](x1) = [1] x1 + [7]
                                 
    [cons](x1, x2) = [1] x1 + [0]
                                 
        [mark](x1) = [1] x1 + [1]
                                 
        [from](x1) = [1] x1 + [0]
                                 
           [s](x1) = [1] x1 + [0]
                                 
   [a__length](x1) = [3]         
                                 
             [nil] = [0]         
                                 
               [0] = [0]         
                                 
  [a__length1](x1) = [4]         
                                 
      [length](x1) = [3]         
                                 
     [length1](x1) = [0]         

The order satisfies the following ordering constraints:

             [a__from(X)] =  [1] X + [7]                
                          >  [1] X + [1]                
                          =  [cons(mark(X), from(s(X)))]
                                                        
             [a__from(X)] =  [1] X + [7]                
                          >  [1] X + [0]                
                          =  [from(X)]                  
                                                        
     [mark(cons(X1, X2))] =  [1] X1 + [1]               
                          >= [1] X1 + [1]               
                          =  [cons(mark(X1), X2)]       
                                                        
          [mark(from(X))] =  [1] X + [1]                
                          ?  [1] X + [8]                
                          =  [a__from(mark(X))]         
                                                        
             [mark(s(X))] =  [1] X + [1]                
                          >= [1] X + [1]                
                          =  [s(mark(X))]               
                                                        
            [mark(nil())] =  [1]                        
                          >  [0]                        
                          =  [nil()]                    
                                                        
              [mark(0())] =  [1]                        
                          >  [0]                        
                          =  [0()]                      
                                                        
        [mark(length(X))] =  [4]                        
                          >  [3]                        
                          =  [a__length(X)]             
                                                        
       [mark(length1(X))] =  [1]                        
                          ?  [4]                        
                          =  [a__length1(X)]            
                                                        
           [a__length(X)] =  [3]                        
                          >= [3]                        
                          =  [length(X)]                
                                                        
  [a__length(cons(X, Y))] =  [3]                        
                          ?  [4]                        
                          =  [s(a__length1(Y))]         
                                                        
       [a__length(nil())] =  [3]                        
                          >  [0]                        
                          =  [0()]                      
                                                        
          [a__length1(X)] =  [4]                        
                          >  [3]                        
                          =  [a__length(X)]             
                                                        
          [a__length1(X)] =  [4]                        
                          >  [0]                        
                          =  [length1(X)]               
                                                        

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(from(X)) -> a__from(mark(X))
  , mark(s(X)) -> s(mark(X))
  , mark(length1(X)) -> a__length1(X)
  , a__length(cons(X, Y)) -> s(a__length1(Y)) }
Weak Trs:
  { a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , mark(nil()) -> nil()
  , mark(0()) -> 0()
  , mark(length(X)) -> a__length(X)
  , a__length(X) -> length(X)
  , a__length(nil()) -> 0()
  , a__length1(X) -> a__length(X)
  , a__length1(X) -> length1(X) }
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__from) = {1}, Uargs(cons) = {1}, Uargs(s) = {1}

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

     [a__from](x1) = [1] x1 + [7]
                                 
    [cons](x1, x2) = [1] x1 + [0]
                                 
        [mark](x1) = [1] x1 + [1]
                                 
        [from](x1) = [1] x1 + [0]
                                 
           [s](x1) = [1] x1 + [0]
                                 
   [a__length](x1) = [4]         
                                 
             [nil] = [0]         
                                 
               [0] = [0]         
                                 
  [a__length1](x1) = [4]         
                                 
      [length](x1) = [4]         
                                 
     [length1](x1) = [4]         

The order satisfies the following ordering constraints:

             [a__from(X)] =  [1] X + [7]                
                          >  [1] X + [1]                
                          =  [cons(mark(X), from(s(X)))]
                                                        
             [a__from(X)] =  [1] X + [7]                
                          >  [1] X + [0]                
                          =  [from(X)]                  
                                                        
     [mark(cons(X1, X2))] =  [1] X1 + [1]               
                          >= [1] X1 + [1]               
                          =  [cons(mark(X1), X2)]       
                                                        
          [mark(from(X))] =  [1] X + [1]                
                          ?  [1] X + [8]                
                          =  [a__from(mark(X))]         
                                                        
             [mark(s(X))] =  [1] X + [1]                
                          >= [1] X + [1]                
                          =  [s(mark(X))]               
                                                        
            [mark(nil())] =  [1]                        
                          >  [0]                        
                          =  [nil()]                    
                                                        
              [mark(0())] =  [1]                        
                          >  [0]                        
                          =  [0()]                      
                                                        
        [mark(length(X))] =  [5]                        
                          >  [4]                        
                          =  [a__length(X)]             
                                                        
       [mark(length1(X))] =  [5]                        
                          >  [4]                        
                          =  [a__length1(X)]            
                                                        
           [a__length(X)] =  [4]                        
                          >= [4]                        
                          =  [length(X)]                
                                                        
  [a__length(cons(X, Y))] =  [4]                        
                          >= [4]                        
                          =  [s(a__length1(Y))]         
                                                        
       [a__length(nil())] =  [4]                        
                          >  [0]                        
                          =  [0()]                      
                                                        
          [a__length1(X)] =  [4]                        
                          >= [4]                        
                          =  [a__length(X)]             
                                                        
          [a__length1(X)] =  [4]                        
                          >= [4]                        
                          =  [length1(X)]               
                                                        

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(from(X)) -> a__from(mark(X))
  , mark(s(X)) -> s(mark(X))
  , a__length(cons(X, Y)) -> s(a__length1(Y)) }
Weak Trs:
  { a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , mark(nil()) -> nil()
  , mark(0()) -> 0()
  , mark(length(X)) -> a__length(X)
  , mark(length1(X)) -> a__length1(X)
  , a__length(X) -> length(X)
  , a__length(nil()) -> 0()
  , a__length1(X) -> a__length(X)
  , a__length1(X) -> length1(X) }
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: { a__length(cons(X, Y)) -> s(a__length1(Y)) }

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(a__from) = {1}, Uargs(cons) = {1}, Uargs(s) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA) and not(IDA(1)).
  
       [a__from](x1) = [1 0] x1 + [6]           
                       [0 0]      [7]           
                                                
      [cons](x1, x2) = [1 0] x1 + [0 1] x2 + [1]
                       [0 0]      [0 1]      [2]
                                                
          [mark](x1) = [1 0] x1 + [1]           
                       [0 4]      [2]           
                                                
          [from](x1) = [1 0] x1 + [6]           
                       [0 0]      [3]           
                                                
             [s](x1) = [1 0] x1 + [0]           
                       [0 0]      [1]           
                                                
     [a__length](x1) = [0 4] x1 + [1]           
                       [0 0]      [1]           
                                                
               [nil] = [0]                      
                       [0]                      
                                                
                 [0] = [0]                      
                       [0]                      
                                                
    [a__length1](x1) = [0 4] x1 + [3]           
                       [0 0]      [1]           
                                                
        [length](x1) = [0 4] x1 + [0]           
                       [0 0]      [0]           
                                                
       [length1](x1) = [0 4] x1 + [2]           
                       [0 0]      [0]           
  
  The order satisfies the following ordering constraints:
  
               [a__from(X)] =  [1 0] X + [6]              
                               [0 0]     [7]              
                            >  [1 0] X + [5]              
                               [0 0]     [5]              
                            =  [cons(mark(X), from(s(X)))]
                                                          
               [a__from(X)] =  [1 0] X + [6]              
                               [0 0]     [7]              
                            >= [1 0] X + [6]              
                               [0 0]     [3]              
                            =  [from(X)]                  
                                                          
       [mark(cons(X1, X2))] =  [1 0] X1 + [0 1] X2 + [2]  
                               [0 0]      [0 4]      [10] 
                            >= [1 0] X1 + [0 1] X2 + [2]  
                               [0 0]      [0 1]      [2]  
                            =  [cons(mark(X1), X2)]       
                                                          
            [mark(from(X))] =  [1 0] X + [7]              
                               [0 0]     [14]             
                            >= [1 0] X + [7]              
                               [0 0]     [7]              
                            =  [a__from(mark(X))]         
                                                          
               [mark(s(X))] =  [1 0] X + [1]              
                               [0 0]     [6]              
                            >= [1 0] X + [1]              
                               [0 0]     [1]              
                            =  [s(mark(X))]               
                                                          
              [mark(nil())] =  [1]                        
                               [2]                        
                            >  [0]                        
                               [0]                        
                            =  [nil()]                    
                                                          
                [mark(0())] =  [1]                        
                               [2]                        
                            >  [0]                        
                               [0]                        
                            =  [0()]                      
                                                          
          [mark(length(X))] =  [0 4] X + [1]              
                               [0 0]     [2]              
                            >= [0 4] X + [1]              
                               [0 0]     [1]              
                            =  [a__length(X)]             
                                                          
         [mark(length1(X))] =  [0 4] X + [3]              
                               [0 0]     [2]              
                            >= [0 4] X + [3]              
                               [0 0]     [1]              
                            =  [a__length1(X)]            
                                                          
             [a__length(X)] =  [0 4] X + [1]              
                               [0 0]     [1]              
                            >  [0 4] X + [0]              
                               [0 0]     [0]              
                            =  [length(X)]                
                                                          
    [a__length(cons(X, Y))] =  [0 4] Y + [9]              
                               [0 0]     [1]              
                            >  [0 4] Y + [3]              
                               [0 0]     [1]              
                            =  [s(a__length1(Y))]         
                                                          
         [a__length(nil())] =  [1]                        
                               [1]                        
                            >  [0]                        
                               [0]                        
                            =  [0()]                      
                                                          
            [a__length1(X)] =  [0 4] X + [3]              
                               [0 0]     [1]              
                            >  [0 4] X + [1]              
                               [0 0]     [1]              
                            =  [a__length(X)]             
                                                          
            [a__length1(X)] =  [0 4] X + [3]              
                               [0 0]     [1]              
                            >  [0 4] X + [2]              
                               [0 0]     [0]              
                            =  [length1(X)]               
                                                          

We return to the main proof.

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(from(X)) -> a__from(mark(X))
  , mark(s(X)) -> s(mark(X)) }
Weak Trs:
  { a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , mark(nil()) -> nil()
  , mark(0()) -> 0()
  , mark(length(X)) -> a__length(X)
  , mark(length1(X)) -> a__length1(X)
  , a__length(X) -> length(X)
  , a__length(cons(X, Y)) -> s(a__length1(Y))
  , a__length(nil()) -> 0()
  , a__length1(X) -> a__length(X)
  , a__length1(X) -> length1(X) }
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(from(X)) -> a__from(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__from) = {1}, Uargs(cons) = {1}, Uargs(s) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__from](x1) = [1 7] x1 + [1]
                       [0 1]      [4]
                                     
      [cons](x1, x2) = [1 0] x1 + [0]
                       [0 1]      [0]
                                     
          [mark](x1) = [1 2] x1 + [1]
                       [0 1]      [0]
                                     
          [from](x1) = [1 7] x1 + [0]
                       [0 1]      [4]
                                     
             [s](x1) = [1 5] x1 + [0]
                       [0 1]      [0]
                                     
     [a__length](x1) = [1]           
                       [0]           
                                     
               [nil] = [0]           
                       [0]           
                                     
                 [0] = [0]           
                       [0]           
                                     
    [a__length1](x1) = [1]           
                       [0]           
                                     
        [length](x1) = [0]           
                       [0]           
                                     
       [length1](x1) = [0]           
                       [0]           
  
  The order satisfies the following ordering constraints:
  
               [a__from(X)] =  [1 7] X + [1]              
                               [0 1]     [4]              
                            >= [1 2] X + [1]              
                               [0 1]     [0]              
                            =  [cons(mark(X), from(s(X)))]
                                                          
               [a__from(X)] =  [1 7] X + [1]              
                               [0 1]     [4]              
                            >  [1 7] X + [0]              
                               [0 1]     [4]              
                            =  [from(X)]                  
                                                          
       [mark(cons(X1, X2))] =  [1 2] X1 + [1]             
                               [0 1]      [0]             
                            >= [1 2] X1 + [1]             
                               [0 1]      [0]             
                            =  [cons(mark(X1), X2)]       
                                                          
            [mark(from(X))] =  [1 9] X + [9]              
                               [0 1]     [4]              
                            >  [1 9] X + [2]              
                               [0 1]     [4]              
                            =  [a__from(mark(X))]         
                                                          
               [mark(s(X))] =  [1 7] X + [1]              
                               [0 1]     [0]              
                            >= [1 7] X + [1]              
                               [0 1]     [0]              
                            =  [s(mark(X))]               
                                                          
              [mark(nil())] =  [1]                        
                               [0]                        
                            >  [0]                        
                               [0]                        
                            =  [nil()]                    
                                                          
                [mark(0())] =  [1]                        
                               [0]                        
                            >  [0]                        
                               [0]                        
                            =  [0()]                      
                                                          
          [mark(length(X))] =  [1]                        
                               [0]                        
                            >= [1]                        
                               [0]                        
                            =  [a__length(X)]             
                                                          
         [mark(length1(X))] =  [1]                        
                               [0]                        
                            >= [1]                        
                               [0]                        
                            =  [a__length1(X)]            
                                                          
             [a__length(X)] =  [1]                        
                               [0]                        
                            >  [0]                        
                               [0]                        
                            =  [length(X)]                
                                                          
    [a__length(cons(X, Y))] =  [1]                        
                               [0]                        
                            >= [1]                        
                               [0]                        
                            =  [s(a__length1(Y))]         
                                                          
         [a__length(nil())] =  [1]                        
                               [0]                        
                            >  [0]                        
                               [0]                        
                            =  [0()]                      
                                                          
            [a__length1(X)] =  [1]                        
                               [0]                        
                            >= [1]                        
                               [0]                        
                            =  [a__length(X)]             
                                                          
            [a__length1(X)] =  [1]                        
                               [0]                        
                            >  [0]                        
                               [0]                        
                            =  [length1(X)]               
                                                          

We return to the main proof.

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(s(X)) -> s(mark(X)) }
Weak Trs:
  { a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , mark(from(X)) -> a__from(mark(X))
  , mark(nil()) -> nil()
  , mark(0()) -> 0()
  , mark(length(X)) -> a__length(X)
  , mark(length1(X)) -> a__length1(X)
  , a__length(X) -> length(X)
  , a__length(cons(X, Y)) -> s(a__length1(Y))
  , a__length(nil()) -> 0()
  , a__length1(X) -> a__length(X)
  , a__length1(X) -> length1(X) }
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) }

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__from) = {1}, Uargs(cons) = {1}, Uargs(s) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
       [a__from](x1) = [1 7] x1 + [7]
                       [0 1]      [3]
                                     
      [cons](x1, x2) = [1 6] x1 + [0]
                       [0 1]      [3]
                                     
          [mark](x1) = [1 1] x1 + [3]
                       [0 1]      [0]
                                     
          [from](x1) = [1 7] x1 + [6]
                       [0 1]      [3]
                                     
             [s](x1) = [1 0] x1 + [0]
                       [0 1]      [0]
                                     
     [a__length](x1) = [7]           
                       [2]           
                                     
               [nil] = [1]           
                       [3]           
                                     
                 [0] = [0]           
                       [0]           
                                     
    [a__length1](x1) = [7]           
                       [2]           
                                     
        [length](x1) = [4]           
                       [2]           
                                     
       [length1](x1) = [4]           
                       [2]           
  
  The order satisfies the following ordering constraints:
  
               [a__from(X)] =  [1 7] X + [7]              
                               [0 1]     [3]              
                            >  [1 7] X + [3]              
                               [0 1]     [3]              
                            =  [cons(mark(X), from(s(X)))]
                                                          
               [a__from(X)] =  [1 7] X + [7]              
                               [0 1]     [3]              
                            >  [1 7] X + [6]              
                               [0 1]     [3]              
                            =  [from(X)]                  
                                                          
       [mark(cons(X1, X2))] =  [1 7] X1 + [6]             
                               [0 1]      [3]             
                            >  [1 7] X1 + [3]             
                               [0 1]      [3]             
                            =  [cons(mark(X1), X2)]       
                                                          
            [mark(from(X))] =  [1 8] X + [12]             
                               [0 1]     [3]              
                            >  [1 8] X + [10]             
                               [0 1]     [3]              
                            =  [a__from(mark(X))]         
                                                          
               [mark(s(X))] =  [1 1] X + [3]              
                               [0 1]     [0]              
                            >= [1 1] X + [3]              
                               [0 1]     [0]              
                            =  [s(mark(X))]               
                                                          
              [mark(nil())] =  [7]                        
                               [3]                        
                            >  [1]                        
                               [3]                        
                            =  [nil()]                    
                                                          
                [mark(0())] =  [3]                        
                               [0]                        
                            >  [0]                        
                               [0]                        
                            =  [0()]                      
                                                          
          [mark(length(X))] =  [9]                        
                               [2]                        
                            >  [7]                        
                               [2]                        
                            =  [a__length(X)]             
                                                          
         [mark(length1(X))] =  [9]                        
                               [2]                        
                            >  [7]                        
                               [2]                        
                            =  [a__length1(X)]            
                                                          
             [a__length(X)] =  [7]                        
                               [2]                        
                            >  [4]                        
                               [2]                        
                            =  [length(X)]                
                                                          
    [a__length(cons(X, Y))] =  [7]                        
                               [2]                        
                            >= [7]                        
                               [2]                        
                            =  [s(a__length1(Y))]         
                                                          
         [a__length(nil())] =  [7]                        
                               [2]                        
                            >  [0]                        
                               [0]                        
                            =  [0()]                      
                                                          
            [a__length1(X)] =  [7]                        
                               [2]                        
                            >= [7]                        
                               [2]                        
                            =  [a__length(X)]             
                                                          
            [a__length1(X)] =  [7]                        
                               [2]                        
                            >  [4]                        
                               [2]                        
                            =  [length1(X)]               
                                                          

We return to the main proof.

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

Strict Trs: { mark(s(X)) -> s(mark(X)) }
Weak Trs:
  { a__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(from(X)) -> a__from(mark(X))
  , mark(nil()) -> nil()
  , mark(0()) -> 0()
  , mark(length(X)) -> a__length(X)
  , mark(length1(X)) -> a__length1(X)
  , a__length(X) -> length(X)
  , a__length(cons(X, Y)) -> s(a__length1(Y))
  , a__length(nil()) -> 0()
  , a__length1(X) -> a__length(X)
  , a__length1(X) -> length1(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

Trs: { mark(s(X)) -> s(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__from) = {1}, Uargs(cons) = {1}, Uargs(s) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA) and not(IDA(2)).
  
                       [1 4 0]      [4]             
       [a__from](x1) = [0 1 0] x1 + [5]             
                       [0 0 0]      [1]             
                                                    
                       [1 0 0]      [0 0 1]      [0]
      [cons](x1, x2) = [0 1 0] x1 + [0 0 0] x2 + [4]
                       [0 0 0]      [0 0 1]      [1]
                                                    
                       [1 2 0]      [4]             
          [mark](x1) = [0 1 0] x1 + [1]             
                       [2 0 1]      [1]             
                                                    
                       [1 4 0]      [0]             
          [from](x1) = [0 1 0] x1 + [5]             
                       [0 0 0]      [0]             
                                                    
                       [1 0 0]      [0]             
             [s](x1) = [0 1 0] x1 + [1]             
                       [0 0 1]      [5]             
                                                    
                       [0 0 4]      [0]             
     [a__length](x1) = [0 0 4] x1 + [3]             
                       [0 0 6]      [0]             
                                                    
                       [0]                          
               [nil] = [0]                          
                       [0]                          
                                                    
                       [0]                          
                 [0] = [0]                          
                       [0]                          
                                                    
                       [0 0 4]      [0]             
    [a__length1](x1) = [0 0 4] x1 + [6]             
                       [0 0 6]      [0]             
                                                    
                       [0 0 3]      [0]             
        [length](x1) = [0 0 4] x1 + [2]             
                       [0 0 0]      [0]             
                                                    
                       [0 0 4]      [0]             
       [length1](x1) = [0 0 4] x1 + [5]             
                       [0 0 0]      [0]             
  
  The order satisfies the following ordering constraints:
  
               [a__from(X)] =  [1 4 0]     [4]               
                               [0 1 0] X + [5]               
                               [0 0 0]     [1]               
                            >= [1 2 0]     [4]               
                               [0 1 0] X + [5]               
                               [0 0 0]     [1]               
                            =  [cons(mark(X), from(s(X)))]   
                                                             
               [a__from(X)] =  [1 4 0]     [4]               
                               [0 1 0] X + [5]               
                               [0 0 0]     [1]               
                            >  [1 4 0]     [0]               
                               [0 1 0] X + [5]               
                               [0 0 0]     [0]               
                            =  [from(X)]                     
                                                             
       [mark(cons(X1, X2))] =  [1 2 0]      [0 0 1]      [12]
                               [0 1 0] X1 + [0 0 0] X2 + [5] 
                               [2 0 0]      [0 0 3]      [2] 
                            >  [1 2 0]      [0 0 1]      [4] 
                               [0 1 0] X1 + [0 0 0] X2 + [5] 
                               [0 0 0]      [0 0 1]      [1] 
                            =  [cons(mark(X1), X2)]          
                                                             
            [mark(from(X))] =  [1 6 0]     [14]              
                               [0 1 0] X + [6]               
                               [2 8 0]     [1]               
                            >  [1 6 0]     [12]              
                               [0 1 0] X + [6]               
                               [0 0 0]     [1]               
                            =  [a__from(mark(X))]            
                                                             
               [mark(s(X))] =  [1 2 0]     [6]               
                               [0 1 0] X + [2]               
                               [2 0 1]     [6]               
                            >  [1 2 0]     [4]               
                               [0 1 0] X + [2]               
                               [2 0 1]     [6]               
                            =  [s(mark(X))]                  
                                                             
              [mark(nil())] =  [4]                           
                               [1]                           
                               [1]                           
                            >  [0]                           
                               [0]                           
                               [0]                           
                            =  [nil()]                       
                                                             
                [mark(0())] =  [4]                           
                               [1]                           
                               [1]                           
                            >  [0]                           
                               [0]                           
                               [0]                           
                            =  [0()]                         
                                                             
          [mark(length(X))] =  [0 0 11]     [8]              
                               [0 0  4] X + [3]              
                               [0 0  6]     [1]              
                            >  [0 0 4]     [0]               
                               [0 0 4] X + [3]               
                               [0 0 6]     [0]               
                            =  [a__length(X)]                
                                                             
         [mark(length1(X))] =  [0 0 12]     [14]             
                               [0 0  4] X + [6]              
                               [0 0  8]     [1]              
                            >  [0 0 4]     [0]               
                               [0 0 4] X + [6]               
                               [0 0 6]     [0]               
                            =  [a__length1(X)]               
                                                             
             [a__length(X)] =  [0 0 4]     [0]               
                               [0 0 4] X + [3]               
                               [0 0 6]     [0]               
                            >= [0 0 3]     [0]               
                               [0 0 4] X + [2]               
                               [0 0 0]     [0]               
                            =  [length(X)]                   
                                                             
    [a__length(cons(X, Y))] =  [0 0 4]     [4]               
                               [0 0 4] Y + [7]               
                               [0 0 6]     [6]               
                            >  [0 0 4]     [0]               
                               [0 0 4] Y + [7]               
                               [0 0 6]     [5]               
                            =  [s(a__length1(Y))]            
                                                             
         [a__length(nil())] =  [0]                           
                               [3]                           
                               [0]                           
                            >= [0]                           
                               [0]                           
                               [0]                           
                            =  [0()]                         
                                                             
            [a__length1(X)] =  [0 0 4]     [0]               
                               [0 0 4] X + [6]               
                               [0 0 6]     [0]               
                            >= [0 0 4]     [0]               
                               [0 0 4] X + [3]               
                               [0 0 6]     [0]               
                            =  [a__length(X)]                
                                                             
            [a__length1(X)] =  [0 0 4]     [0]               
                               [0 0 4] X + [6]               
                               [0 0 6]     [0]               
                            >= [0 0 4]     [0]               
                               [0 0 4] X + [5]               
                               [0 0 0]     [0]               
                            =  [length1(X)]                  
                                                             

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__from(X) -> cons(mark(X), from(s(X)))
  , a__from(X) -> from(X)
  , mark(cons(X1, X2)) -> cons(mark(X1), X2)
  , mark(from(X)) -> a__from(mark(X))
  , mark(s(X)) -> s(mark(X))
  , mark(nil()) -> nil()
  , mark(0()) -> 0()
  , mark(length(X)) -> a__length(X)
  , mark(length1(X)) -> a__length1(X)
  , a__length(X) -> length(X)
  , a__length(cons(X, Y)) -> s(a__length1(Y))
  , a__length(nil()) -> 0()
  , a__length1(X) -> a__length(X)
  , a__length1(X) -> length1(X) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

Empty rules are trivially bounded

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