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

Strict Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X))
  , purge(nil()) -> nil()
  , purge(add(N, X)) -> add(N, purge(rm(N, X))) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

We add the following dependency tuples:

Strict DPs:
  { eq^#(0(), 0()) -> c_1()
  , eq^#(0(), s(X)) -> c_2()
  , eq^#(s(X), 0()) -> c_3()
  , eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y))
  , rm^#(N, nil()) -> c_5()
  , rm^#(N, add(M, X)) ->
    c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))
  , ifrm^#(true(), N, add(M, X)) -> c_7(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_8(rm^#(N, X))
  , purge^#(nil()) -> c_9()
  , purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }

and mark the set of starting terms.

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

Strict DPs:
  { eq^#(0(), 0()) -> c_1()
  , eq^#(0(), s(X)) -> c_2()
  , eq^#(s(X), 0()) -> c_3()
  , eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y))
  , rm^#(N, nil()) -> c_5()
  , rm^#(N, add(M, X)) ->
    c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))
  , ifrm^#(true(), N, add(M, X)) -> c_7(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_8(rm^#(N, X))
  , purge^#(nil()) -> c_9()
  , purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }
Weak Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X))
  , purge(nil()) -> nil()
  , purge(add(N, X)) -> add(N, purge(rm(N, X))) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

  DPs:
    { 1: eq^#(0(), 0()) -> c_1()
    , 2: eq^#(0(), s(X)) -> c_2()
    , 3: eq^#(s(X), 0()) -> c_3()
    , 4: eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y))
    , 5: rm^#(N, nil()) -> c_5()
    , 6: rm^#(N, add(M, X)) ->
         c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))
    , 7: ifrm^#(true(), N, add(M, X)) -> c_7(rm^#(N, X))
    , 8: ifrm^#(false(), N, add(M, X)) -> c_8(rm^#(N, X))
    , 9: purge^#(nil()) -> c_9()
    , 10: purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }

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

Strict DPs:
  { eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y))
  , rm^#(N, add(M, X)) ->
    c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))
  , ifrm^#(true(), N, add(M, X)) -> c_7(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_8(rm^#(N, X))
  , purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }
Weak DPs:
  { eq^#(0(), 0()) -> c_1()
  , eq^#(0(), s(X)) -> c_2()
  , eq^#(s(X), 0()) -> c_3()
  , rm^#(N, nil()) -> c_5()
  , purge^#(nil()) -> c_9() }
Weak Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X))
  , purge(nil()) -> nil()
  , purge(add(N, X)) -> add(N, purge(rm(N, X))) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

{ eq^#(0(), 0()) -> c_1()
, eq^#(0(), s(X)) -> c_2()
, eq^#(s(X), 0()) -> c_3()
, rm^#(N, nil()) -> c_5()
, purge^#(nil()) -> c_9() }

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

Strict DPs:
  { eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y))
  , rm^#(N, add(M, X)) ->
    c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))
  , ifrm^#(true(), N, add(M, X)) -> c_7(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_8(rm^#(N, X))
  , purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }
Weak Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X))
  , purge(nil()) -> nil()
  , purge(add(N, X)) -> add(N, purge(rm(N, X))) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

We replace rewrite rules by usable rules:

  Weak Usable Rules:
    { eq(0(), 0()) -> true()
    , eq(0(), s(X)) -> false()
    , eq(s(X), 0()) -> false()
    , eq(s(X), s(Y)) -> eq(X, Y)
    , rm(N, nil()) -> nil()
    , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
    , ifrm(true(), N, add(M, X)) -> rm(N, X)
    , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }

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

Strict DPs:
  { eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y))
  , rm^#(N, add(M, X)) ->
    c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))
  , ifrm^#(true(), N, add(M, X)) -> c_7(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_8(rm^#(N, X))
  , purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }
Weak Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

We decompose the input problem according to the dependency graph
into the upper component

  { purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }

and lower component

  { eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y))
  , rm^#(N, add(M, X)) ->
    c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))
  , ifrm^#(true(), N, add(M, X)) -> c_7(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_8(rm^#(N, X)) }

Further, following extension rules are added to the lower
component.

{ purge^#(add(N, X)) -> rm^#(N, X)
, purge^#(add(N, X)) -> purge^#(rm(N, X)) }

TcT solves the upper component with certificate YES(O(1),O(n^1)).

Sub-proof:
----------
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(n^1)).
  
  Strict DPs:
    { purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }
  Weak Trs:
    { eq(0(), 0()) -> true()
    , eq(0(), s(X)) -> false()
    , eq(s(X), 0()) -> false()
    , eq(s(X), s(Y)) -> eq(X, Y)
    , rm(N, nil()) -> nil()
    , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
    , ifrm(true(), N, add(M, X)) -> rm(N, X)
    , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }
  Obligation:
    innermost runtime complexity
  Answer:
    YES(O(1),O(n^1))
  
  We use the processor 'Small Polynomial Path Order (PS,1-bounded)'
  to orient following rules strictly.
  
  DPs:
    { 1: purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }
  Trs: { ifrm(true(), N, add(M, X)) -> rm(N, X) }
  
  Sub-proof:
  ----------
    The input was oriented with the instance of 'Small Polynomial Path
    Order (PS,1-bounded)' as induced by the safe mapping
    
     safe(eq) = {1, 2}, safe(0) = {}, safe(true) = {}, safe(s) = {1},
     safe(false) = {}, safe(rm) = {2}, safe(nil) = {},
     safe(add) = {1, 2}, safe(ifrm) = {1, 3}, safe(rm^#) = {},
     safe(purge^#) = {}, safe(c_10) = {}
    
    and precedence
    
     empty .
    
    Following symbols are considered recursive:
    
     {purge^#}
    
    The recursion depth is 1.
    
    Further, following argument filtering is employed:
    
     pi(eq) = [1, 2], pi(0) = [], pi(true) = [], pi(s) = [],
     pi(false) = [], pi(rm) = 2, pi(nil) = [], pi(add) = [2],
     pi(ifrm) = 3, pi(rm^#) = [], pi(purge^#) = [1], pi(c_10) = [1, 2]
    
    Usable defined function symbols are a subset of:
    
     {rm, ifrm, rm^#, purge^#}
    
    For your convenience, here are the satisfied ordering constraints:
    
               pi(purge^#(add(N, X))) =  purge^#(add(; X);)                     
                                      >  c_10(purge^#(X;),  rm^#();)            
                                      =  pi(c_10(purge^#(rm(N, X)), rm^#(N, X)))
                                                                                
                     pi(rm(N, nil())) =  nil()                                  
                                      >= nil()                                  
                                      =  pi(nil())                              
                                                                                
                 pi(rm(N, add(M, X))) =  add(; X)                               
                                      >= add(; X)                               
                                      =  pi(ifrm(eq(N, M), N, add(M, X)))       
                                                                                
       pi(ifrm(true(), N, add(M, X))) =  add(; X)                               
                                      >  X                                      
                                      =  pi(rm(N, X))                           
                                                                                
      pi(ifrm(false(), N, add(M, X))) =  add(; X)                               
                                      >= add(; X)                               
                                      =  pi(add(M, rm(N, X)))                   
                                                                                
  
  The strictly oriented rules are moved into the weak component.
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(1)).
  
  Weak DPs:
    { purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }
  Weak Trs:
    { eq(0(), 0()) -> true()
    , eq(0(), s(X)) -> false()
    , eq(s(X), 0()) -> false()
    , eq(s(X), s(Y)) -> eq(X, Y)
    , rm(N, nil()) -> nil()
    , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
    , ifrm(true(), N, add(M, X)) -> rm(N, X)
    , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }
  Obligation:
    innermost runtime complexity
  Answer:
    YES(O(1),O(1))
  
  The following weak DPs constitute a sub-graph of the DG that is
  closed under successors. The DPs are removed.
  
  { purge^#(add(N, X)) -> c_10(purge^#(rm(N, X)), rm^#(N, X)) }
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(1)).
  
  Weak Trs:
    { eq(0(), 0()) -> true()
    , eq(0(), s(X)) -> false()
    , eq(s(X), 0()) -> false()
    , eq(s(X), s(Y)) -> eq(X, Y)
    , rm(N, nil()) -> nil()
    , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
    , ifrm(true(), N, add(M, X)) -> rm(N, X)
    , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }
  Obligation:
    innermost runtime complexity
  Answer:
    YES(O(1),O(1))
  
  No rule is usable, rules are removed from the input problem.
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(1)).
  
  Rules: Empty
  Obligation:
    innermost runtime complexity
  Answer:
    YES(O(1),O(1))
  
  Empty rules are trivially bounded

We return to the main proof.

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

Strict DPs:
  { eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y))
  , rm^#(N, add(M, X)) ->
    c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))
  , ifrm^#(true(), N, add(M, X)) -> c_7(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_8(rm^#(N, X)) }
Weak DPs:
  { purge^#(add(N, X)) -> rm^#(N, X)
  , purge^#(add(N, X)) -> purge^#(rm(N, X)) }
Weak Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

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

DPs:
  { 1: eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y)) }

Sub-proof:
----------
  The following argument positions are usable:
    Uargs(c_4) = {1}, Uargs(c_6) = {1, 2}, Uargs(c_7) = {1},
    Uargs(c_8) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA) and not(IDA(1)).
  
            [eq](x1, x2) = [0]                      
                           [0]                      
                                                    
                     [0] = [0]                      
                           [0]                      
                                                    
                  [true] = [0]                      
                           [0]                      
                                                    
                 [s](x1) = [1 0] x1 + [4]           
                           [0 0]      [3]           
                                                    
                 [false] = [0]                      
                           [0]                      
                                                    
            [rm](x1, x2) = [0 1] x2 + [0]           
                           [0 1]      [0]           
                                                    
                   [nil] = [0]                      
                           [0]                      
                                                    
           [add](x1, x2) = [0 0] x1 + [0 1] x2 + [0]
                           [1 0]      [0 1]      [0]
                                                    
      [ifrm](x1, x2, x3) = [1 0] x3 + [0]           
                           [0 1]      [0]           
                                                    
          [eq^#](x1, x2) = [1 0] x2 + [0]           
                           [0 0]      [0]           
                                                    
               [c_4](x1) = [1 0] x1 + [1]           
                           [0 0]      [0]           
                                                    
          [rm^#](x1, x2) = [4 0] x1 + [0 7] x2 + [0]
                           [0 0]      [0 0]      [0]
                                                    
           [c_6](x1, x2) = [1 1] x1 + [1 1] x2 + [0]
                           [0 0]      [0 0]      [0]
                                                    
    [ifrm^#](x1, x2, x3) = [4 0] x2 + [2 5] x3 + [0]
                           [0 0]      [0 0]      [0]
                                                    
               [c_7](x1) = [1 1] x1 + [0]           
                           [0 0]      [0]           
                                                    
               [c_8](x1) = [1 1] x1 + [0]           
                           [0 0]      [0]           
                                                    
           [purge^#](x1) = [3 4] x1 + [0]           
                           [0 0]      [0]           
  
  The order satisfies the following ordering constraints:
  
                     [eq(0(), 0())] =  [0]                                              
                                       [0]                                              
                                    >= [0]                                              
                                       [0]                                              
                                    =  [true()]                                         
                                                                                        
                    [eq(0(), s(X))] =  [0]                                              
                                       [0]                                              
                                    >= [0]                                              
                                       [0]                                              
                                    =  [false()]                                        
                                                                                        
                    [eq(s(X), 0())] =  [0]                                              
                                       [0]                                              
                                    >= [0]                                              
                                       [0]                                              
                                    =  [false()]                                        
                                                                                        
                   [eq(s(X), s(Y))] =  [0]                                              
                                       [0]                                              
                                    >= [0]                                              
                                       [0]                                              
                                    =  [eq(X, Y)]                                       
                                                                                        
                     [rm(N, nil())] =  [0]                                              
                                       [0]                                              
                                    >= [0]                                              
                                       [0]                                              
                                    =  [nil()]                                          
                                                                                        
                 [rm(N, add(M, X))] =  [0 1] X + [1 0] M + [0]                          
                                       [0 1]     [1 0]     [0]                          
                                    >= [0 1] X + [0 0] M + [0]                          
                                       [0 1]     [1 0]     [0]                          
                                    =  [ifrm(eq(N, M), N, add(M, X))]                   
                                                                                        
       [ifrm(true(), N, add(M, X))] =  [0 1] X + [0 0] M + [0]                          
                                       [0 1]     [1 0]     [0]                          
                                    >= [0 1] X + [0]                                    
                                       [0 1]     [0]                                    
                                    =  [rm(N, X)]                                       
                                                                                        
      [ifrm(false(), N, add(M, X))] =  [0 1] X + [0 0] M + [0]                          
                                       [0 1]     [1 0]     [0]                          
                                    >= [0 1] X + [0 0] M + [0]                          
                                       [0 1]     [1 0]     [0]                          
                                    =  [add(M, rm(N, X))]                               
                                                                                        
                 [eq^#(s(X), s(Y))] =  [1 0] Y + [4]                                    
                                       [0 0]     [0]                                    
                                    >  [1 0] Y + [1]                                    
                                       [0 0]     [0]                                    
                                    =  [c_4(eq^#(X, Y))]                                
                                                                                        
               [rm^#(N, add(M, X))] =  [0 7] X + [4 0] N + [7 0] M + [0]                
                                       [0 0]     [0 0]     [0 0]     [0]                
                                    >= [0 7] X + [4 0] N + [6 0] M + [0]                
                                       [0 0]     [0 0]     [0 0]     [0]                
                                    =  [c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))]
                                                                                        
     [ifrm^#(true(), N, add(M, X))] =  [0 7] X + [4 0] N + [5 0] M + [0]                
                                       [0 0]     [0 0]     [0 0]     [0]                
                                    >= [0 7] X + [4 0] N + [0]                          
                                       [0 0]     [0 0]     [0]                          
                                    =  [c_7(rm^#(N, X))]                                
                                                                                        
    [ifrm^#(false(), N, add(M, X))] =  [0 7] X + [4 0] N + [5 0] M + [0]                
                                       [0 0]     [0 0]     [0 0]     [0]                
                                    >= [0 7] X + [4 0] N + [0]                          
                                       [0 0]     [0 0]     [0]                          
                                    =  [c_8(rm^#(N, X))]                                
                                                                                        
               [purge^#(add(N, X))] =  [0 7] X + [4 0] N + [0]                          
                                       [0 0]     [0 0]     [0]                          
                                    >= [0 7] X + [4 0] N + [0]                          
                                       [0 0]     [0 0]     [0]                          
                                    =  [rm^#(N, X)]                                     
                                                                                        
               [purge^#(add(N, X))] =  [0 7] X + [4 0] N + [0]                          
                                       [0 0]     [0 0]     [0]                          
                                    >= [0 7] X + [0]                                    
                                       [0 0]     [0]                                    
                                    =  [purge^#(rm(N, X))]                              
                                                                                        

The strictly oriented rules are moved into the weak component.

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

Strict DPs:
  { rm^#(N, add(M, X)) ->
    c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))
  , ifrm^#(true(), N, add(M, X)) -> c_7(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_8(rm^#(N, X)) }
Weak DPs:
  { eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y))
  , purge^#(add(N, X)) -> rm^#(N, X)
  , purge^#(add(N, X)) -> purge^#(rm(N, X)) }
Weak Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

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

{ eq^#(s(X), s(Y)) -> c_4(eq^#(X, Y)) }

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

Strict DPs:
  { rm^#(N, add(M, X)) ->
    c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M))
  , ifrm^#(true(), N, add(M, X)) -> c_7(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_8(rm^#(N, X)) }
Weak DPs:
  { purge^#(add(N, X)) -> rm^#(N, X)
  , purge^#(add(N, X)) -> purge^#(rm(N, X)) }
Weak Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

Due to missing edges in the dependency-graph, the right-hand sides
of following rules could be simplified:

  { rm^#(N, add(M, X)) ->
    c_6(ifrm^#(eq(N, M), N, add(M, X)), eq^#(N, M)) }

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

Strict DPs:
  { rm^#(N, add(M, X)) -> c_1(ifrm^#(eq(N, M), N, add(M, X)))
  , ifrm^#(true(), N, add(M, X)) -> c_2(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_3(rm^#(N, X)) }
Weak DPs:
  { purge^#(add(N, X)) -> c_4(rm^#(N, X))
  , purge^#(add(N, X)) -> c_5(purge^#(rm(N, X))) }
Weak Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

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

DPs:
  { 1: rm^#(N, add(M, X)) -> c_1(ifrm^#(eq(N, M), N, add(M, X)))
  , 2: ifrm^#(true(), N, add(M, X)) -> c_2(rm^#(N, X))
  , 3: ifrm^#(false(), N, add(M, X)) -> c_3(rm^#(N, X))
  , 4: purge^#(add(N, X)) -> c_4(rm^#(N, X))
  , 5: purge^#(add(N, X)) -> c_5(purge^#(rm(N, X))) }
Trs:
  { eq(0(), s(X)) -> false()
  , ifrm(true(), N, add(M, X)) -> rm(N, X) }

Sub-proof:
----------
  The following argument positions are usable:
    Uargs(c_1) = {1}, Uargs(c_2) = {1}, Uargs(c_3) = {1},
    Uargs(c_4) = {1}, Uargs(c_5) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
            [eq](x1, x2) = [1] x1 + [0]
                                       
                     [0] = [1]         
                                       
                  [true] = [1]         
                                       
                 [s](x1) = [1] x1 + [0]
                                       
                 [false] = [0]         
                                       
            [rm](x1, x2) = [1] x2 + [0]
                                       
                   [nil] = [0]         
                                       
           [add](x1, x2) = [1] x2 + [2]
                                       
      [ifrm](x1, x2, x3) = [1] x3 + [0]
                                       
          [eq^#](x1, x2) = [0]         
                                       
               [c_4](x1) = [0]         
                                       
          [rm^#](x1, x2) = [6] x2 + [3]
                                       
           [c_6](x1, x2) = [0]         
                                       
    [ifrm^#](x1, x2, x3) = [6] x3 + [0]
                                       
               [c_7](x1) = [0]         
                                       
               [c_8](x1) = [0]         
                                       
           [purge^#](x1) = [6] x1 + [3]
                                       
                     [c] = [0]         
                                       
               [c_1](x1) = [1] x1 + [1]
                                       
               [c_2](x1) = [1] x1 + [0]
                                       
               [c_3](x1) = [1] x1 + [1]
                                       
               [c_4](x1) = [1] x1 + [0]
                                       
               [c_5](x1) = [1] x1 + [0]
  
  The order satisfies the following ordering constraints:
  
                     [eq(0(), 0())] =  [1]                                  
                                    >= [1]                                  
                                    =  [true()]                             
                                                                            
                    [eq(0(), s(X))] =  [1]                                  
                                    >  [0]                                  
                                    =  [false()]                            
                                                                            
                    [eq(s(X), 0())] =  [1] X + [0]                          
                                    >= [0]                                  
                                    =  [false()]                            
                                                                            
                   [eq(s(X), s(Y))] =  [1] X + [0]                          
                                    >= [1] X + [0]                          
                                    =  [eq(X, Y)]                           
                                                                            
                     [rm(N, nil())] =  [0]                                  
                                    >= [0]                                  
                                    =  [nil()]                              
                                                                            
                 [rm(N, add(M, X))] =  [1] X + [2]                          
                                    >= [1] X + [2]                          
                                    =  [ifrm(eq(N, M), N, add(M, X))]       
                                                                            
       [ifrm(true(), N, add(M, X))] =  [1] X + [2]                          
                                    >  [1] X + [0]                          
                                    =  [rm(N, X)]                           
                                                                            
      [ifrm(false(), N, add(M, X))] =  [1] X + [2]                          
                                    >= [1] X + [2]                          
                                    =  [add(M, rm(N, X))]                   
                                                                            
               [rm^#(N, add(M, X))] =  [6] X + [15]                         
                                    >  [6] X + [13]                         
                                    =  [c_1(ifrm^#(eq(N, M), N, add(M, X)))]
                                                                            
     [ifrm^#(true(), N, add(M, X))] =  [6] X + [12]                         
                                    >  [6] X + [3]                          
                                    =  [c_2(rm^#(N, X))]                    
                                                                            
    [ifrm^#(false(), N, add(M, X))] =  [6] X + [12]                         
                                    >  [6] X + [4]                          
                                    =  [c_3(rm^#(N, X))]                    
                                                                            
               [purge^#(add(N, X))] =  [6] X + [15]                         
                                    >  [6] X + [3]                          
                                    =  [c_4(rm^#(N, X))]                    
                                                                            
               [purge^#(add(N, X))] =  [6] X + [15]                         
                                    >  [6] X + [3]                          
                                    =  [c_5(purge^#(rm(N, X)))]             
                                                                            

The strictly oriented rules are moved into the weak component.

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

Weak DPs:
  { rm^#(N, add(M, X)) -> c_1(ifrm^#(eq(N, M), N, add(M, X)))
  , ifrm^#(true(), N, add(M, X)) -> c_2(rm^#(N, X))
  , ifrm^#(false(), N, add(M, X)) -> c_3(rm^#(N, X))
  , purge^#(add(N, X)) -> c_4(rm^#(N, X))
  , purge^#(add(N, X)) -> c_5(purge^#(rm(N, X))) }
Weak Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

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

{ rm^#(N, add(M, X)) -> c_1(ifrm^#(eq(N, M), N, add(M, X)))
, ifrm^#(true(), N, add(M, X)) -> c_2(rm^#(N, X))
, ifrm^#(false(), N, add(M, X)) -> c_3(rm^#(N, X))
, purge^#(add(N, X)) -> c_4(rm^#(N, X))
, purge^#(add(N, X)) -> c_5(purge^#(rm(N, X))) }

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

Weak Trs:
  { eq(0(), 0()) -> true()
  , eq(0(), s(X)) -> false()
  , eq(s(X), 0()) -> false()
  , eq(s(X), s(Y)) -> eq(X, Y)
  , rm(N, nil()) -> nil()
  , rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
  , ifrm(true(), N, add(M, X)) -> rm(N, X)
  , ifrm(false(), N, add(M, X)) -> add(M, rm(N, X)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

No rule is usable, rules are removed from the input problem.

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

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

Empty rules are trivially bounded

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