We consider the following Problem:

  Strict Trs:
    {  -(0(), y) -> 0()
     , -(x, 0()) -> x
     , -(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0())
     , p(0()) -> 0()
     , p(s(x)) -> x}
  StartTerms: basic terms
  Strategy: innermost

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

Proof:
  We consider the following Problem:
  
    Strict Trs:
      {  -(0(), y) -> 0()
       , -(x, 0()) -> x
       , -(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0())
       , p(0()) -> 0()
       , p(s(x)) -> x}
    StartTerms: basic terms
    Strategy: innermost
  
  Certificate: YES(?,O(n^2))
  
  Proof:
    The weightgap principle applies, where following rules are oriented strictly:
    
    TRS Component: {-(0(), y) -> 0()}
    
    Interpretation of nonconstant growth:
    -------------------------------------
      The following argument positions are usable:
        Uargs(-) = {2}, Uargs(s) = {1}, Uargs(if) = {2},
        Uargs(greater) = {}, Uargs(p) = {}
      We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
      Interpretation Functions:
       -(x1, x2) = [1 0] x1 + [1 0] x2 + [1]
                   [1 0]      [1 0]      [1]
       0() = [0]
             [0]
       s(x1) = [1 0] x1 + [0]
               [0 0]      [0]
       if(x1, x2, x3) = [0 0] x1 + [1 0] x2 + [0 0] x3 + [0]
                        [0 0]      [0 0]      [0 0]      [1]
       greater(x1, x2) = [0 0] x1 + [0 0] x2 + [0]
                         [0 0]      [0 0]      [0]
       p(x1) = [1 0] x1 + [0]
               [0 0]      [1]
    
    The strictly oriented rules are moved into the weak component.
    
    We consider the following Problem:
    
      Strict Trs:
        {  -(x, 0()) -> x
         , -(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0())
         , p(0()) -> 0()
         , p(s(x)) -> x}
      Weak Trs: {-(0(), y) -> 0()}
      StartTerms: basic terms
      Strategy: innermost
    
    Certificate: YES(?,O(n^2))
    
    Proof:
      The weightgap principle applies, where following rules are oriented strictly:
      
      TRS Component: {-(x, 0()) -> x}
      
      Interpretation of nonconstant growth:
      -------------------------------------
        The following argument positions are usable:
          Uargs(-) = {2}, Uargs(s) = {1}, Uargs(if) = {2},
          Uargs(greater) = {}, Uargs(p) = {}
        We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
        Interpretation Functions:
         -(x1, x2) = [1 0] x1 + [1 0] x2 + [1]
                     [0 1]      [1 0]      [1]
         0() = [0]
               [0]
         s(x1) = [1 0] x1 + [0]
                 [0 0]      [0]
         if(x1, x2, x3) = [0 0] x1 + [1 0] x2 + [0 0] x3 + [0]
                          [0 0]      [0 0]      [0 0]      [1]
         greater(x1, x2) = [0 0] x1 + [0 0] x2 + [0]
                           [0 0]      [0 0]      [0]
         p(x1) = [1 0] x1 + [0]
                 [0 0]      [1]
      
      The strictly oriented rules are moved into the weak component.
      
      We consider the following Problem:
      
        Strict Trs:
          {  -(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0())
           , p(0()) -> 0()
           , p(s(x)) -> x}
        Weak Trs:
          {  -(x, 0()) -> x
           , -(0(), y) -> 0()}
        StartTerms: basic terms
        Strategy: innermost
      
      Certificate: YES(?,O(n^2))
      
      Proof:
        The weightgap principle applies, where following rules are oriented strictly:
        
        TRS Component: {p(s(x)) -> x}
        
        Interpretation of nonconstant growth:
        -------------------------------------
          The following argument positions are usable:
            Uargs(-) = {2}, Uargs(s) = {1}, Uargs(if) = {2},
            Uargs(greater) = {}, Uargs(p) = {}
          We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
          Interpretation Functions:
           -(x1, x2) = [1 0] x1 + [1 0] x2 + [0]
                       [0 1]      [1 0]      [0]
           0() = [1]
                 [0]
           s(x1) = [1 0] x1 + [1]
                   [0 1]      [0]
           if(x1, x2, x3) = [1 0] x1 + [1 0] x2 + [0 0] x3 + [3]
                            [0 0]      [0 0]      [1 0]      [0]
           greater(x1, x2) = [0 0] x1 + [0 0] x2 + [3]
                             [0 0]      [0 0]      [0]
           p(x1) = [1 0] x1 + [0]
                   [0 1]      [1]
        
        The strictly oriented rules are moved into the weak component.
        
        We consider the following Problem:
        
          Strict Trs:
            {  -(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0())
             , p(0()) -> 0()}
          Weak Trs:
            {  p(s(x)) -> x
             , -(x, 0()) -> x
             , -(0(), y) -> 0()}
          StartTerms: basic terms
          Strategy: innermost
        
        Certificate: YES(?,O(n^2))
        
        Proof:
          The weightgap principle applies, where following rules are oriented strictly:
          
          TRS Component: {p(0()) -> 0()}
          
          Interpretation of nonconstant growth:
          -------------------------------------
            The following argument positions are usable:
              Uargs(-) = {2}, Uargs(s) = {1}, Uargs(if) = {2},
              Uargs(greater) = {}, Uargs(p) = {}
            We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
            Interpretation Functions:
             -(x1, x2) = [1 0] x1 + [1 0] x2 + [0]
                         [0 1]      [0 0]      [1]
             0() = [2]
                   [3]
             s(x1) = [1 0] x1 + [0]
                     [0 1]      [0]
             if(x1, x2, x3) = [1 0] x1 + [1 0] x2 + [0 2] x3 + [3]
                              [0 0]      [0 0]      [0 0]      [1]
             greater(x1, x2) = [0 0] x1 + [0 0] x2 + [2]
                               [0 0]      [0 0]      [0]
             p(x1) = [1 0] x1 + [2]
                     [0 1]      [0]
          
          The strictly oriented rules are moved into the weak component.
          
          We consider the following Problem:
          
            Strict Trs:
              {-(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0())}
            Weak Trs:
              {  p(0()) -> 0()
               , p(s(x)) -> x
               , -(x, 0()) -> x
               , -(0(), y) -> 0()}
            StartTerms: basic terms
            Strategy: innermost
          
          Certificate: YES(?,O(n^2))
          
          Proof:
            We consider the following Problem:
            
              Strict Trs:
                {-(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0())}
              Weak Trs:
                {  p(0()) -> 0()
                 , p(s(x)) -> x
                 , -(x, 0()) -> x
                 , -(0(), y) -> 0()}
              StartTerms: basic terms
              Strategy: innermost
            
            Certificate: YES(?,O(n^2))
            
            Proof:
              The following argument positions are usable:
                Uargs(-) = {2}, Uargs(s) = {1}, Uargs(if) = {2},
                Uargs(greater) = {}, Uargs(p) = {}
              We have the following constructor-based EDA-non-satisfying and IDA(2)-non-satisfying matrix interpretation:
              Interpretation Functions:
               -(x1, x2) = [1 0 0] x1 + [2 0 0] x2 + [0]
                           [0 2 0]      [1 0 1]      [0]
                           [0 1 1]      [2 0 0]      [0]
               0() = [1]
                     [2]
                     [1]
               s(x1) = [1 0 0] x1 + [2]
                       [0 1 1]      [0]
                       [1 0 0]      [0]
               if(x1, x2, x3) = [0 0 0] x1 + [1 0 0] x2 + [1 0 0] x3 + [0]
                                [0 0 0]      [0 0 0]      [0 0 1]      [0]
                                [0 0 0]      [0 0 0]      [1 0 0]      [0]
               greater(x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0]
                                 [0 0 0]      [0 0 0]      [0]
                                 [0 0 0]      [0 0 0]      [0]
               p(x1) = [0 0 1] x1 + [0]
                       [0 1 0]      [2]
                       [0 1 0]      [1]

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