We consider the following Problem:

  Strict Trs:
    {  primes() -> sieve(from(s(s(0()))))
     , from(X) -> cons(X, n__from(n__s(X)))
     , head(cons(X, Y)) -> X
     , tail(cons(X, Y)) -> activate(Y)
     , if(true(), X, Y) -> activate(X)
     , if(false(), X, Y) -> activate(Y)
     , filter(s(s(X)), cons(Y, Z)) ->
       if(divides(s(s(X)), Y),
          n__filter(n__s(n__s(X)), activate(Z)),
          n__cons(Y, n__filter(X, n__sieve(Y))))
     , sieve(cons(X, Y)) -> cons(X, n__filter(X, n__sieve(activate(Y))))
     , from(X) -> n__from(X)
     , s(X) -> n__s(X)
     , filter(X1, X2) -> n__filter(X1, X2)
     , cons(X1, X2) -> n__cons(X1, X2)
     , sieve(X) -> n__sieve(X)
     , activate(n__from(X)) -> from(activate(X))
     , activate(n__s(X)) -> s(activate(X))
     , activate(n__filter(X1, X2)) -> filter(activate(X1), activate(X2))
     , activate(n__cons(X1, X2)) -> cons(activate(X1), X2)
     , activate(n__sieve(X)) -> sieve(activate(X))
     , activate(X) -> X}
  StartTerms: basic terms
  Strategy: innermost

Certificate: YES(?,O(n^1))

Proof:
  Arguments of following rules are not normal-forms:
  {  head(cons(X, Y)) -> X
   , tail(cons(X, Y)) -> activate(Y)
   , filter(s(s(X)), cons(Y, Z)) ->
     if(divides(s(s(X)), Y),
        n__filter(n__s(n__s(X)), activate(Z)),
        n__cons(Y, n__filter(X, n__sieve(Y))))
   , sieve(cons(X, Y)) ->
     cons(X, n__filter(X, n__sieve(activate(Y))))}
  
  All above mentioned rules can be savely removed.
  
  We consider the following Problem:
  
    Strict Trs:
      {  primes() -> sieve(from(s(s(0()))))
       , from(X) -> cons(X, n__from(n__s(X)))
       , if(true(), X, Y) -> activate(X)
       , if(false(), X, Y) -> activate(Y)
       , from(X) -> n__from(X)
       , s(X) -> n__s(X)
       , filter(X1, X2) -> n__filter(X1, X2)
       , cons(X1, X2) -> n__cons(X1, X2)
       , sieve(X) -> n__sieve(X)
       , activate(n__from(X)) -> from(activate(X))
       , activate(n__s(X)) -> s(activate(X))
       , activate(n__filter(X1, X2)) -> filter(activate(X1), activate(X2))
       , activate(n__cons(X1, X2)) -> cons(activate(X1), X2)
       , activate(n__sieve(X)) -> sieve(activate(X))
       , activate(X) -> X}
    StartTerms: basic terms
    Strategy: innermost
  
  Certificate: YES(?,O(n^1))
  
  Proof:
    The weightgap principle applies, where following rules are oriented strictly:
    
    TRS Component:
      {  primes() -> sieve(from(s(s(0()))))
       , filter(X1, X2) -> n__filter(X1, X2)
       , cons(X1, X2) -> n__cons(X1, X2)
       , sieve(X) -> n__sieve(X)}
    
    Interpretation of nonconstant growth:
    -------------------------------------
      The following argument positions are usable:
        Uargs(sieve) = {1}, Uargs(from) = {1}, Uargs(s) = {1},
        Uargs(cons) = {1}, Uargs(n__from) = {}, Uargs(n__s) = {},
        Uargs(head) = {}, Uargs(tail) = {}, Uargs(activate) = {},
        Uargs(if) = {}, Uargs(filter) = {1, 2}, Uargs(divides) = {},
        Uargs(n__filter) = {}, Uargs(n__cons) = {}, Uargs(n__sieve) = {}
      We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
      Interpretation Functions:
       primes() = [2]
                  [2]
       sieve(x1) = [1 0] x1 + [1]
                   [0 0]      [1]
       from(x1) = [1 2] x1 + [0]
                  [0 0]      [1]
       s(x1) = [1 0] x1 + [0]
               [0 0]      [0]
       0() = [0]
             [0]
       cons(x1, x2) = [1 1] x1 + [0 0] x2 + [1]
                      [0 0]      [0 0]      [1]
       n__from(x1) = [1 0] x1 + [0]
                     [0 0]      [0]
       n__s(x1) = [1 0] x1 + [0]
                  [0 0]      [0]
       head(x1) = [0 0] x1 + [0]
                  [0 0]      [0]
       tail(x1) = [0 0] x1 + [0]
                  [0 0]      [0]
       activate(x1) = [1 0] x1 + [1]
                      [0 0]      [0]
       if(x1, x2, x3) = [0 0] x1 + [1 0] x2 + [0 0] x3 + [1]
                        [0 0]      [0 0]      [0 0]      [1]
       true() = [0]
                [0]
       false() = [0]
                 [0]
       filter(x1, x2) = [1 0] x1 + [1 0] x2 + [1]
                        [0 0]      [0 0]      [1]
       divides(x1, x2) = [0 0] x1 + [0 0] x2 + [0]
                         [0 0]      [0 0]      [0]
       n__filter(x1, x2) = [1 0] x1 + [1 0] x2 + [0]
                           [0 0]      [0 0]      [0]
       n__cons(x1, x2) = [1 0] x1 + [0 0] x2 + [0]
                         [0 0]      [0 0]      [0]
       n__sieve(x1) = [1 0] x1 + [0]
                      [0 0]      [0]
    
    The strictly oriented rules are moved into the weak component.
    
    We consider the following Problem:
    
      Strict Trs:
        {  from(X) -> cons(X, n__from(n__s(X)))
         , if(true(), X, Y) -> activate(X)
         , if(false(), X, Y) -> activate(Y)
         , from(X) -> n__from(X)
         , s(X) -> n__s(X)
         , activate(n__from(X)) -> from(activate(X))
         , activate(n__s(X)) -> s(activate(X))
         , activate(n__filter(X1, X2)) -> filter(activate(X1), activate(X2))
         , activate(n__cons(X1, X2)) -> cons(activate(X1), X2)
         , activate(n__sieve(X)) -> sieve(activate(X))
         , activate(X) -> X}
      Weak Trs:
        {  primes() -> sieve(from(s(s(0()))))
         , filter(X1, X2) -> n__filter(X1, X2)
         , cons(X1, X2) -> n__cons(X1, X2)
         , sieve(X) -> n__sieve(X)}
      StartTerms: basic terms
      Strategy: innermost
    
    Certificate: YES(?,O(n^1))
    
    Proof:
      The weightgap principle applies, where following rules are oriented strictly:
      
      TRS Component:
        {  from(X) -> cons(X, n__from(n__s(X)))
         , from(X) -> n__from(X)}
      
      Interpretation of nonconstant growth:
      -------------------------------------
        The following argument positions are usable:
          Uargs(sieve) = {1}, Uargs(from) = {1}, Uargs(s) = {1},
          Uargs(cons) = {1}, Uargs(n__from) = {}, Uargs(n__s) = {},
          Uargs(head) = {}, Uargs(tail) = {}, Uargs(activate) = {},
          Uargs(if) = {}, Uargs(filter) = {1, 2}, Uargs(divides) = {},
          Uargs(n__filter) = {}, Uargs(n__cons) = {}, Uargs(n__sieve) = {}
        We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
        Interpretation Functions:
         primes() = [3]
                    [2]
         sieve(x1) = [1 0] x1 + [0]
                     [0 0]      [1]
         from(x1) = [1 2] x1 + [2]
                    [0 0]      [2]
         s(x1) = [1 0] x1 + [0]
                 [0 0]      [0]
         0() = [1]
               [0]
         cons(x1, x2) = [1 1] x1 + [0 0] x2 + [1]
                        [0 0]      [0 0]      [1]
         n__from(x1) = [1 0] x1 + [0]
                       [0 0]      [0]
         n__s(x1) = [1 0] x1 + [0]
                    [0 0]      [0]
         head(x1) = [0 0] x1 + [0]
                    [0 0]      [0]
         tail(x1) = [0 0] x1 + [0]
                    [0 0]      [0]
         activate(x1) = [1 0] x1 + [1]
                        [0 0]      [0]
         if(x1, x2, x3) = [0 0] x1 + [1 0] x2 + [0 0] x3 + [1]
                          [0 0]      [0 0]      [0 0]      [1]
         true() = [0]
                  [0]
         false() = [0]
                   [0]
         filter(x1, x2) = [1 0] x1 + [1 0] x2 + [3]
                          [0 0]      [0 0]      [1]
         divides(x1, x2) = [0 0] x1 + [0 0] x2 + [0]
                           [0 0]      [0 0]      [0]
         n__filter(x1, x2) = [1 0] x1 + [1 0] x2 + [0]
                             [0 0]      [0 0]      [0]
         n__cons(x1, x2) = [1 0] x1 + [0 0] x2 + [0]
                           [0 0]      [0 0]      [0]
         n__sieve(x1) = [1 0] x1 + [0]
                        [0 0]      [0]
      
      The strictly oriented rules are moved into the weak component.
      
      We consider the following Problem:
      
        Strict Trs:
          {  if(true(), X, Y) -> activate(X)
           , if(false(), X, Y) -> activate(Y)
           , s(X) -> n__s(X)
           , activate(n__from(X)) -> from(activate(X))
           , activate(n__s(X)) -> s(activate(X))
           , activate(n__filter(X1, X2)) -> filter(activate(X1), activate(X2))
           , activate(n__cons(X1, X2)) -> cons(activate(X1), X2)
           , activate(n__sieve(X)) -> sieve(activate(X))
           , activate(X) -> X}
        Weak Trs:
          {  from(X) -> cons(X, n__from(n__s(X)))
           , from(X) -> n__from(X)
           , primes() -> sieve(from(s(s(0()))))
           , filter(X1, X2) -> n__filter(X1, X2)
           , cons(X1, X2) -> n__cons(X1, X2)
           , sieve(X) -> n__sieve(X)}
        StartTerms: basic terms
        Strategy: innermost
      
      Certificate: YES(?,O(n^1))
      
      Proof:
        The weightgap principle applies, where following rules are oriented strictly:
        
        TRS Component:
          {  s(X) -> n__s(X)
           , activate(X) -> X}
        
        Interpretation of nonconstant growth:
        -------------------------------------
          The following argument positions are usable:
            Uargs(sieve) = {1}, Uargs(from) = {1}, Uargs(s) = {1},
            Uargs(cons) = {1}, Uargs(n__from) = {}, Uargs(n__s) = {},
            Uargs(head) = {}, Uargs(tail) = {}, Uargs(activate) = {},
            Uargs(if) = {}, Uargs(filter) = {1, 2}, Uargs(divides) = {},
            Uargs(n__filter) = {}, Uargs(n__cons) = {}, Uargs(n__sieve) = {}
          We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
          Interpretation Functions:
           primes() = [3]
                      [2]
           sieve(x1) = [1 0] x1 + [0]
                       [0 0]      [1]
           from(x1) = [1 0] x1 + [0]
                      [0 0]      [1]
           s(x1) = [1 1] x1 + [1]
                   [0 0]      [1]
           0() = [0]
                 [0]
           cons(x1, x2) = [1 0] x1 + [0 0] x2 + [0]
                          [0 0]      [0 0]      [1]
           n__from(x1) = [1 0] x1 + [0]
                         [0 0]      [0]
           n__s(x1) = [1 1] x1 + [0]
                      [0 0]      [0]
           head(x1) = [1 0] x1 + [0]
                      [0 1]      [0]
           tail(x1) = [0 0] x1 + [0]
                      [0 0]      [0]
           activate(x1) = [1 0] x1 + [1]
                          [0 1]      [1]
           if(x1, x2, x3) = [0 0] x1 + [1 0] x2 + [0 0] x3 + [1]
                            [0 0]      [0 0]      [0 0]      [1]
           true() = [0]
                    [0]
           false() = [0]
                     [0]
           filter(x1, x2) = [1 0] x1 + [1 0] x2 + [1]
                            [0 0]      [0 0]      [1]
           divides(x1, x2) = [0 0] x1 + [0 0] x2 + [0]
                             [0 0]      [0 0]      [0]
           n__filter(x1, x2) = [1 0] x1 + [1 0] x2 + [0]
                               [0 0]      [0 0]      [0]
           n__cons(x1, x2) = [1 0] x1 + [0 0] x2 + [0]
                             [0 0]      [0 0]      [0]
           n__sieve(x1) = [1 0] x1 + [0]
                          [0 0]      [0]
        
        The strictly oriented rules are moved into the weak component.
        
        We consider the following Problem:
        
          Strict Trs:
            {  if(true(), X, Y) -> activate(X)
             , if(false(), X, Y) -> activate(Y)
             , activate(n__from(X)) -> from(activate(X))
             , activate(n__s(X)) -> s(activate(X))
             , activate(n__filter(X1, X2)) -> filter(activate(X1), activate(X2))
             , activate(n__cons(X1, X2)) -> cons(activate(X1), X2)
             , activate(n__sieve(X)) -> sieve(activate(X))}
          Weak Trs:
            {  s(X) -> n__s(X)
             , activate(X) -> X
             , from(X) -> cons(X, n__from(n__s(X)))
             , from(X) -> n__from(X)
             , primes() -> sieve(from(s(s(0()))))
             , filter(X1, X2) -> n__filter(X1, X2)
             , cons(X1, X2) -> n__cons(X1, X2)
             , sieve(X) -> n__sieve(X)}
          StartTerms: basic terms
          Strategy: innermost
        
        Certificate: YES(?,O(n^1))
        
        Proof:
          The weightgap principle applies, where following rules are oriented strictly:
          
          TRS Component: {if(false(), X, Y) -> activate(Y)}
          
          Interpretation of nonconstant growth:
          -------------------------------------
            The following argument positions are usable:
              Uargs(sieve) = {1}, Uargs(from) = {1}, Uargs(s) = {1},
              Uargs(cons) = {1}, Uargs(n__from) = {}, Uargs(n__s) = {},
              Uargs(head) = {}, Uargs(tail) = {}, Uargs(activate) = {},
              Uargs(if) = {}, Uargs(filter) = {1, 2}, Uargs(divides) = {},
              Uargs(n__filter) = {}, Uargs(n__cons) = {}, Uargs(n__sieve) = {}
            We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
            Interpretation Functions:
             primes() = [2]
                        [3]
             sieve(x1) = [1 0] x1 + [0]
                         [0 1]      [1]
             from(x1) = [1 0] x1 + [1]
                        [0 0]      [2]
             s(x1) = [1 1] x1 + [0]
                     [0 0]      [0]
             0() = [0]
                   [0]
             cons(x1, x2) = [1 0] x1 + [0 0] x2 + [0]
                            [0 0]      [0 0]      [1]
             n__from(x1) = [1 0] x1 + [0]
                           [0 0]      [0]
             n__s(x1) = [1 1] x1 + [0]
                        [0 0]      [0]
             head(x1) = [0 0] x1 + [0]
                        [0 0]      [0]
             tail(x1) = [0 0] x1 + [0]
                        [0 0]      [0]
             activate(x1) = [1 0] x1 + [0]
                            [0 1]      [0]
             if(x1, x2, x3) = [0 0] x1 + [1 0] x2 + [1 0] x3 + [1]
                              [0 0]      [0 0]      [0 1]      [1]
             true() = [0]
                      [0]
             false() = [0]
                       [0]
             filter(x1, x2) = [1 0] x1 + [1 0] x2 + [0]
                              [0 1]      [0 1]      [1]
             divides(x1, x2) = [0 0] x1 + [0 0] x2 + [0]
                               [0 0]      [0 0]      [0]
             n__filter(x1, x2) = [1 0] x1 + [1 0] x2 + [0]
                                 [0 1]      [0 0]      [0]
             n__cons(x1, x2) = [1 0] x1 + [0 0] x2 + [0]
                               [0 0]      [0 0]      [0]
             n__sieve(x1) = [1 0] x1 + [0]
                            [0 0]      [0]
          
          The strictly oriented rules are moved into the weak component.
          
          We consider the following Problem:
          
            Strict Trs:
              {  if(true(), X, Y) -> activate(X)
               , activate(n__from(X)) -> from(activate(X))
               , activate(n__s(X)) -> s(activate(X))
               , activate(n__filter(X1, X2)) -> filter(activate(X1), activate(X2))
               , activate(n__cons(X1, X2)) -> cons(activate(X1), X2)
               , activate(n__sieve(X)) -> sieve(activate(X))}
            Weak Trs:
              {  if(false(), X, Y) -> activate(Y)
               , s(X) -> n__s(X)
               , activate(X) -> X
               , from(X) -> cons(X, n__from(n__s(X)))
               , from(X) -> n__from(X)
               , primes() -> sieve(from(s(s(0()))))
               , filter(X1, X2) -> n__filter(X1, X2)
               , cons(X1, X2) -> n__cons(X1, X2)
               , sieve(X) -> n__sieve(X)}
            StartTerms: basic terms
            Strategy: innermost
          
          Certificate: YES(?,O(n^1))
          
          Proof:
            The weightgap principle applies, where following rules are oriented strictly:
            
            TRS Component: {if(true(), X, Y) -> activate(X)}
            
            Interpretation of nonconstant growth:
            -------------------------------------
              The following argument positions are usable:
                Uargs(sieve) = {1}, Uargs(from) = {1}, Uargs(s) = {1},
                Uargs(cons) = {1}, Uargs(n__from) = {}, Uargs(n__s) = {},
                Uargs(head) = {}, Uargs(tail) = {}, Uargs(activate) = {},
                Uargs(if) = {}, Uargs(filter) = {1, 2}, Uargs(divides) = {},
                Uargs(n__filter) = {}, Uargs(n__cons) = {}, Uargs(n__sieve) = {}
              We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
              Interpretation Functions:
               primes() = [0]
                          [3]
               sieve(x1) = [1 0] x1 + [0]
                           [0 1]      [1]
               from(x1) = [1 0] x1 + [0]
                          [0 0]      [2]
               s(x1) = [1 1] x1 + [0]
                       [0 0]      [0]
               0() = [0]
                     [0]
               cons(x1, x2) = [1 0] x1 + [0 0] x2 + [0]
                              [0 0]      [0 0]      [1]
               n__from(x1) = [1 0] x1 + [0]
                             [0 0]      [1]
               n__s(x1) = [1 1] x1 + [0]
                          [0 0]      [0]
               head(x1) = [0 0] x1 + [0]
                          [0 0]      [0]
               tail(x1) = [0 0] x1 + [0]
                          [0 0]      [0]
               activate(x1) = [1 0] x1 + [0]
                              [0 1]      [0]
               if(x1, x2, x3) = [0 0] x1 + [1 0] x2 + [1 0] x3 + [1]
                                [0 0]      [0 1]      [0 1]      [1]
               true() = [0]
                        [0]
               false() = [0]
                         [0]
               filter(x1, x2) = [1 0] x1 + [1 0] x2 + [1]
                                [0 0]      [0 1]      [1]
               divides(x1, x2) = [0 0] x1 + [0 0] x2 + [0]
                                 [0 0]      [0 0]      [0]
               n__filter(x1, x2) = [1 0] x1 + [1 0] x2 + [1]
                                   [0 0]      [0 1]      [1]
               n__cons(x1, x2) = [1 0] x1 + [0 0] x2 + [0]
                                 [0 0]      [0 0]      [0]
               n__sieve(x1) = [1 0] x1 + [0]
                              [0 0]      [0]
            
            The strictly oriented rules are moved into the weak component.
            
            We consider the following Problem:
            
              Strict Trs:
                {  activate(n__from(X)) -> from(activate(X))
                 , activate(n__s(X)) -> s(activate(X))
                 , activate(n__filter(X1, X2)) -> filter(activate(X1), activate(X2))
                 , activate(n__cons(X1, X2)) -> cons(activate(X1), X2)
                 , activate(n__sieve(X)) -> sieve(activate(X))}
              Weak Trs:
                {  if(true(), X, Y) -> activate(X)
                 , if(false(), X, Y) -> activate(Y)
                 , s(X) -> n__s(X)
                 , activate(X) -> X
                 , from(X) -> cons(X, n__from(n__s(X)))
                 , from(X) -> n__from(X)
                 , primes() -> sieve(from(s(s(0()))))
                 , filter(X1, X2) -> n__filter(X1, X2)
                 , cons(X1, X2) -> n__cons(X1, X2)
                 , sieve(X) -> n__sieve(X)}
              StartTerms: basic terms
              Strategy: innermost
            
            Certificate: YES(?,O(n^1))
            
            Proof:
              We consider the following Problem:
              
                Strict Trs:
                  {  activate(n__from(X)) -> from(activate(X))
                   , activate(n__s(X)) -> s(activate(X))
                   , activate(n__filter(X1, X2)) -> filter(activate(X1), activate(X2))
                   , activate(n__cons(X1, X2)) -> cons(activate(X1), X2)
                   , activate(n__sieve(X)) -> sieve(activate(X))}
                Weak Trs:
                  {  if(true(), X, Y) -> activate(X)
                   , if(false(), X, Y) -> activate(Y)
                   , s(X) -> n__s(X)
                   , activate(X) -> X
                   , from(X) -> cons(X, n__from(n__s(X)))
                   , from(X) -> n__from(X)
                   , primes() -> sieve(from(s(s(0()))))
                   , filter(X1, X2) -> n__filter(X1, X2)
                   , cons(X1, X2) -> n__cons(X1, X2)
                   , sieve(X) -> n__sieve(X)}
                StartTerms: basic terms
                Strategy: innermost
              
              Certificate: YES(?,O(n^1))
              
              Proof:
                The following argument positions are usable:
                  Uargs(sieve) = {1}, Uargs(from) = {1}, Uargs(s) = {1},
                  Uargs(cons) = {1}, Uargs(n__from) = {}, Uargs(n__s) = {},
                  Uargs(activate) = {}, Uargs(if) = {}, Uargs(filter) = {1, 2},
                  Uargs(n__filter) = {}, Uargs(n__cons) = {}, Uargs(n__sieve) = {}
                We have the following constructor-based EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
                Interpretation Functions:
                 primes() = [3]
                            [2]
                 sieve(x1) = [1 0] x1 + [1]
                             [0 1]      [0]
                 from(x1) = [1 2] x1 + [0]
                            [0 0]      [2]
                 s(x1) = [1 3] x1 + [1]
                         [0 0]      [0]
                 0() = [0]
                       [0]
                 cons(x1, x2) = [1 1] x1 + [0 0] x2 + [0]
                                [0 0]      [0 0]      [1]
                 n__from(x1) = [1 2] x1 + [0]
                               [0 0]      [2]
                 n__s(x1) = [1 3] x1 + [1]
                            [0 0]      [0]
                 activate(x1) = [3 2] x1 + [0]
                                [0 1]      [0]
                 if(x1, x2, x3) = [2 2] x1 + [3 2] x2 + [3 2] x3 + [1]
                                  [1 3]      [0 2]      [0 2]      [0]
                 true() = [2]
                          [2]
                 false() = [0]
                           [0]
                 filter(x1, x2) = [1 0] x1 + [1 3] x2 + [1]
                                  [0 1]      [0 0]      [3]
                 n__filter(x1, x2) = [1 0] x1 + [1 3] x2 + [1]
                                     [0 1]      [0 0]      [3]
                 n__cons(x1, x2) = [1 1] x1 + [0 0] x2 + [0]
                                   [0 0]      [0 0]      [1]
                 n__sieve(x1) = [1 0] x1 + [1]
                                [0 1]      [0]

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