We consider the following Problem:

  Strict Trs:
    {  a__f(g(X), Y) -> a__f(mark(X), f(g(X), Y))
     , mark(f(X1, X2)) -> a__f(mark(X1), X2)
     , mark(g(X)) -> g(mark(X))
     , a__f(X1, X2) -> f(X1, X2)}
  StartTerms: basic terms
  Strategy: innermost

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

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

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