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

Strict Trs:
  { minus(x, 0()) -> x
  , minus(s(x), s(y)) -> minus(x, y)
  , quot(0(), s(y)) -> 0()
  , quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
  , app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , shuffle(nil()) -> nil()
  , shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y))
  , less_leaves(x, leaf()) -> false()
  , less_leaves(leaf(), cons(w, z)) -> true()
  , less_leaves(cons(u, v), cons(w, z)) ->
    less_leaves(concat(u, v), concat(w, z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^3))

We add the following dependency tuples:

Strict DPs:
  { minus^#(x, 0()) -> c_1()
  , minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
  , quot^#(0(), s(y)) -> c_3()
  , quot^#(s(x), s(y)) ->
    c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
  , app^#(nil(), y) -> c_5()
  , app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(nil()) -> c_7()
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , shuffle^#(nil()) -> c_9()
  , shuffle^#(add(n, x)) -> c_10(shuffle^#(reverse(x)), reverse^#(x))
  , concat^#(leaf(), y) -> c_11()
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y))
  , less_leaves^#(x, leaf()) -> c_13()
  , less_leaves^#(leaf(), cons(w, z)) -> c_14()
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    c_15(less_leaves^#(concat(u, v), concat(w, z)),
         concat^#(u, v),
         concat^#(w, z)) }

and mark the set of starting terms.

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

Strict DPs:
  { minus^#(x, 0()) -> c_1()
  , minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
  , quot^#(0(), s(y)) -> c_3()
  , quot^#(s(x), s(y)) ->
    c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
  , app^#(nil(), y) -> c_5()
  , app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(nil()) -> c_7()
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , shuffle^#(nil()) -> c_9()
  , shuffle^#(add(n, x)) -> c_10(shuffle^#(reverse(x)), reverse^#(x))
  , concat^#(leaf(), y) -> c_11()
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y))
  , less_leaves^#(x, leaf()) -> c_13()
  , less_leaves^#(leaf(), cons(w, z)) -> c_14()
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    c_15(less_leaves^#(concat(u, v), concat(w, z)),
         concat^#(u, v),
         concat^#(w, z)) }
Weak Trs:
  { minus(x, 0()) -> x
  , minus(s(x), s(y)) -> minus(x, y)
  , quot(0(), s(y)) -> 0()
  , quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
  , app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , shuffle(nil()) -> nil()
  , shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y))
  , less_leaves(x, leaf()) -> false()
  , less_leaves(leaf(), cons(w, z)) -> true()
  , less_leaves(cons(u, v), cons(w, z)) ->
    less_leaves(concat(u, v), concat(w, z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^3))

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

  DPs:
    { 1: minus^#(x, 0()) -> c_1()
    , 2: minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
    , 3: quot^#(0(), s(y)) -> c_3()
    , 4: quot^#(s(x), s(y)) ->
         c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
    , 5: app^#(nil(), y) -> c_5()
    , 6: app^#(add(n, x), y) -> c_6(app^#(x, y))
    , 7: reverse^#(nil()) -> c_7()
    , 8: reverse^#(add(n, x)) ->
         c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
    , 9: shuffle^#(nil()) -> c_9()
    , 10: shuffle^#(add(n, x)) ->
          c_10(shuffle^#(reverse(x)), reverse^#(x))
    , 11: concat^#(leaf(), y) -> c_11()
    , 12: concat^#(cons(u, v), y) -> c_12(concat^#(v, y))
    , 13: less_leaves^#(x, leaf()) -> c_13()
    , 14: less_leaves^#(leaf(), cons(w, z)) -> c_14()
    , 15: less_leaves^#(cons(u, v), cons(w, z)) ->
          c_15(less_leaves^#(concat(u, v), concat(w, z)),
               concat^#(u, v),
               concat^#(w, z)) }

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

Strict DPs:
  { minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
  , quot^#(s(x), s(y)) ->
    c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
  , app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , shuffle^#(add(n, x)) -> c_10(shuffle^#(reverse(x)), reverse^#(x))
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y))
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    c_15(less_leaves^#(concat(u, v), concat(w, z)),
         concat^#(u, v),
         concat^#(w, z)) }
Weak DPs:
  { minus^#(x, 0()) -> c_1()
  , quot^#(0(), s(y)) -> c_3()
  , app^#(nil(), y) -> c_5()
  , reverse^#(nil()) -> c_7()
  , shuffle^#(nil()) -> c_9()
  , concat^#(leaf(), y) -> c_11()
  , less_leaves^#(x, leaf()) -> c_13()
  , less_leaves^#(leaf(), cons(w, z)) -> c_14() }
Weak Trs:
  { minus(x, 0()) -> x
  , minus(s(x), s(y)) -> minus(x, y)
  , quot(0(), s(y)) -> 0()
  , quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
  , app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , shuffle(nil()) -> nil()
  , shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y))
  , less_leaves(x, leaf()) -> false()
  , less_leaves(leaf(), cons(w, z)) -> true()
  , less_leaves(cons(u, v), cons(w, z)) ->
    less_leaves(concat(u, v), concat(w, z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^3))

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

{ minus^#(x, 0()) -> c_1()
, quot^#(0(), s(y)) -> c_3()
, app^#(nil(), y) -> c_5()
, reverse^#(nil()) -> c_7()
, shuffle^#(nil()) -> c_9()
, concat^#(leaf(), y) -> c_11()
, less_leaves^#(x, leaf()) -> c_13()
, less_leaves^#(leaf(), cons(w, z)) -> c_14() }

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

Strict DPs:
  { minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
  , quot^#(s(x), s(y)) ->
    c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
  , app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , shuffle^#(add(n, x)) -> c_10(shuffle^#(reverse(x)), reverse^#(x))
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y))
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    c_15(less_leaves^#(concat(u, v), concat(w, z)),
         concat^#(u, v),
         concat^#(w, z)) }
Weak Trs:
  { minus(x, 0()) -> x
  , minus(s(x), s(y)) -> minus(x, y)
  , quot(0(), s(y)) -> 0()
  , quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
  , app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , shuffle(nil()) -> nil()
  , shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y))
  , less_leaves(x, leaf()) -> false()
  , less_leaves(leaf(), cons(w, z)) -> true()
  , less_leaves(cons(u, v), cons(w, z)) ->
    less_leaves(concat(u, v), concat(w, z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^3))

We replace rewrite rules by usable rules:

  Weak Usable Rules:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y)
    , app(nil(), y) -> y
    , app(add(n, x), y) -> add(n, app(x, y))
    , reverse(nil()) -> nil()
    , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
    , concat(leaf(), y) -> y
    , concat(cons(u, v), y) -> cons(u, concat(v, y)) }

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

Strict DPs:
  { minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
  , quot^#(s(x), s(y)) ->
    c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
  , app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , shuffle^#(add(n, x)) -> c_10(shuffle^#(reverse(x)), reverse^#(x))
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y))
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    c_15(less_leaves^#(concat(u, v), concat(w, z)),
         concat^#(u, v),
         concat^#(w, z)) }
Weak Trs:
  { minus(x, 0()) -> x
  , minus(s(x), s(y)) -> minus(x, y)
  , app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^3))

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

  { quot^#(s(x), s(y)) ->
    c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
  , shuffle^#(add(n, x)) -> c_10(shuffle^#(reverse(x)), reverse^#(x))
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    c_15(less_leaves^#(concat(u, v), concat(w, z)),
         concat^#(u, v),
         concat^#(w, z)) }

and lower component

  { minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
  , app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y)) }

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

{ quot^#(s(x), s(y)) -> minus^#(x, y)
, quot^#(s(x), s(y)) -> quot^#(minus(x, y), s(y))
, shuffle^#(add(n, x)) -> reverse^#(x)
, shuffle^#(add(n, x)) -> shuffle^#(reverse(x))
, less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(u, v)
, less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(w, z)
, less_leaves^#(cons(u, v), cons(w, z)) ->
  less_leaves^#(concat(u, v), concat(w, z)) }

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:
    { quot^#(s(x), s(y)) ->
      c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
    , shuffle^#(add(n, x)) -> c_10(shuffle^#(reverse(x)), reverse^#(x))
    , less_leaves^#(cons(u, v), cons(w, z)) ->
      c_15(less_leaves^#(concat(u, v), concat(w, z)),
           concat^#(u, v),
           concat^#(w, z)) }
  Weak Trs:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y)
    , app(nil(), y) -> y
    , app(add(n, x), y) -> add(n, app(x, y))
    , reverse(nil()) -> nil()
    , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
    , concat(leaf(), y) -> y
    , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
  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:
    { 2: shuffle^#(add(n, x)) ->
         c_10(shuffle^#(reverse(x)), reverse^#(x)) }
  
  Sub-proof:
  ----------
    The following argument positions are usable:
      Uargs(c_4) = {1}, Uargs(c_10) = {1}, Uargs(c_15) = {1}
    
    TcT has computed the following constructor-based matrix
    interpretation satisfying not(EDA).
    
              [minus](x1, x2) = [0]                  
                                                     
                          [0] = [0]                  
                                                     
                      [s](x1) = [0]                  
                                                     
                [app](x1, x2) = [1] x1 + [1] x2 + [0]
                                                     
                        [nil] = [0]                  
                                                     
                [add](x1, x2) = [1] x2 + [1]         
                                                     
                [reverse](x1) = [1] x1 + [0]         
                                                     
             [concat](x1, x2) = [1] x2 + [0]         
                                                     
                       [leaf] = [0]                  
                                                     
               [cons](x1, x2) = [1] x2 + [0]         
                                                     
            [minus^#](x1, x2) = [0]                  
                                                     
             [quot^#](x1, x2) = [4] x2 + [0]         
                                                     
                [c_4](x1, x2) = [1] x1 + [1] x2 + [0]
                                                     
              [reverse^#](x1) = [0]                  
                                                     
              [shuffle^#](x1) = [1] x1 + [4]         
                                                     
               [c_10](x1, x2) = [1] x1 + [1] x2 + [0]
                                                     
           [concat^#](x1, x2) = [0]                  
                                                     
      [less_leaves^#](x1, x2) = [0]                  
                                                     
           [c_15](x1, x2, x3) = [3] x1 + [0]         
    
    The order satisfies the following ordering constraints:
    
                              [minus(x, 0())] =  [0]                                             
                                              ?  [1] x + [0]                                     
                                              =  [x]                                             
                                                                                                 
                          [minus(s(x), s(y))] =  [0]                                             
                                              >= [0]                                             
                                              =  [minus(x, y)]                                   
                                                                                                 
                              [app(nil(), y)] =  [1] y + [0]                                     
                                              >= [1] y + [0]                                     
                                              =  [y]                                             
                                                                                                 
                          [app(add(n, x), y)] =  [1] x + [1] y + [1]                             
                                              >= [1] x + [1] y + [1]                             
                                              =  [add(n, app(x, y))]                             
                                                                                                 
                             [reverse(nil())] =  [0]                                             
                                              >= [0]                                             
                                              =  [nil()]                                         
                                                                                                 
                         [reverse(add(n, x))] =  [1] x + [1]                                     
                                              >= [1] x + [1]                                     
                                              =  [app(reverse(x), add(n, nil()))]                
                                                                                                 
                          [concat(leaf(), y)] =  [1] y + [0]                                     
                                              >= [1] y + [0]                                     
                                              =  [y]                                             
                                                                                                 
                      [concat(cons(u, v), y)] =  [1] y + [0]                                     
                                              >= [1] y + [0]                                     
                                              =  [cons(u, concat(v, y))]                         
                                                                                                 
                         [quot^#(s(x), s(y))] =  [0]                                             
                                              >= [0]                                             
                                              =  [c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))] 
                                                                                                 
                       [shuffle^#(add(n, x))] =  [1] x + [5]                                     
                                              >  [1] x + [4]                                     
                                              =  [c_10(shuffle^#(reverse(x)), reverse^#(x))]     
                                                                                                 
      [less_leaves^#(cons(u, v), cons(w, z))] =  [0]                                             
                                              >= [0]                                             
                                              =  [c_15(less_leaves^#(concat(u, v), concat(w, z)),
                                                       concat^#(u, v),                           
                                                       concat^#(w, z))]                          
                                                                                                 
  
  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:
    { quot^#(s(x), s(y)) ->
      c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
    , less_leaves^#(cons(u, v), cons(w, z)) ->
      c_15(less_leaves^#(concat(u, v), concat(w, z)),
           concat^#(u, v),
           concat^#(w, z)) }
  Weak DPs:
    { shuffle^#(add(n, x)) ->
      c_10(shuffle^#(reverse(x)), reverse^#(x)) }
  Weak Trs:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y)
    , app(nil(), y) -> y
    , app(add(n, x), y) -> add(n, app(x, y))
    , reverse(nil()) -> nil()
    , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
    , concat(leaf(), y) -> y
    , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
  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.
  
  { shuffle^#(add(n, x)) ->
    c_10(shuffle^#(reverse(x)), reverse^#(x)) }
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(n^1)).
  
  Strict DPs:
    { quot^#(s(x), s(y)) ->
      c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
    , less_leaves^#(cons(u, v), cons(w, z)) ->
      c_15(less_leaves^#(concat(u, v), concat(w, z)),
           concat^#(u, v),
           concat^#(w, z)) }
  Weak Trs:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y)
    , app(nil(), y) -> y
    , app(add(n, x), y) -> add(n, app(x, y))
    , reverse(nil()) -> nil()
    , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
    , concat(leaf(), y) -> y
    , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
  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:
  
    { quot^#(s(x), s(y)) ->
      c_4(quot^#(minus(x, y), s(y)), minus^#(x, y))
    , less_leaves^#(cons(u, v), cons(w, z)) ->
      c_15(less_leaves^#(concat(u, v), concat(w, z)),
           concat^#(u, v),
           concat^#(w, z)) }
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(n^1)).
  
  Strict DPs:
    { quot^#(s(x), s(y)) -> c_1(quot^#(minus(x, y), s(y)))
    , less_leaves^#(cons(u, v), cons(w, z)) ->
      c_2(less_leaves^#(concat(u, v), concat(w, z))) }
  Weak Trs:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y)
    , app(nil(), y) -> y
    , app(add(n, x), y) -> add(n, app(x, y))
    , reverse(nil()) -> nil()
    , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
    , concat(leaf(), y) -> y
    , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
  Obligation:
    innermost runtime complexity
  Answer:
    YES(O(1),O(n^1))
  
  We replace rewrite rules by usable rules:
  
    Weak Usable Rules:
      { minus(x, 0()) -> x
      , minus(s(x), s(y)) -> minus(x, y)
      , concat(leaf(), y) -> y
      , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(n^1)).
  
  Strict DPs:
    { quot^#(s(x), s(y)) -> c_1(quot^#(minus(x, y), s(y)))
    , less_leaves^#(cons(u, v), cons(w, z)) ->
      c_2(less_leaves^#(concat(u, v), concat(w, z))) }
  Weak Trs:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y)
    , concat(leaf(), y) -> y
    , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
  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:
    { 2: less_leaves^#(cons(u, v), cons(w, z)) ->
         c_2(less_leaves^#(concat(u, v), concat(w, z))) }
  Trs: { concat(leaf(), y) -> y }
  
  Sub-proof:
  ----------
    The following argument positions are usable:
      Uargs(c_1) = {1}, Uargs(c_2) = {1}
    
    TcT has computed the following constructor-based matrix
    interpretation satisfying not(EDA).
    
              [minus](x1, x2) = [0]                  
                                                     
                          [0] = [0]                  
                                                     
                      [s](x1) = [0]                  
                                                     
                [app](x1, x2) = [0]                  
                                                     
                        [nil] = [0]                  
                                                     
                [add](x1, x2) = [0]                  
                                                     
                [reverse](x1) = [0]                  
                                                     
             [concat](x1, x2) = [1] x1 + [1] x2 + [3]
                                                     
                       [leaf] = [0]                  
                                                     
               [cons](x1, x2) = [1] x1 + [1] x2 + [6]
                                                     
            [minus^#](x1, x2) = [0]                  
                                                     
             [quot^#](x1, x2) = [0]                  
                                                     
                [c_4](x1, x2) = [0]                  
                                                     
              [reverse^#](x1) = [0]                  
                                                     
              [shuffle^#](x1) = [0]                  
                                                     
               [c_10](x1, x2) = [0]                  
                                                     
           [concat^#](x1, x2) = [0]                  
                                                     
      [less_leaves^#](x1, x2) = [1] x2 + [5]         
                                                     
           [c_15](x1, x2, x3) = [0]                  
                                                     
                          [c] = [0]                  
                                                     
                    [c_1](x1) = [2] x1 + [0]         
                                                     
                    [c_2](x1) = [1] x1 + [1]         
    
    The order satisfies the following ordering constraints:
    
                              [minus(x, 0())] =  [0]                                             
                                              ?  [1] x + [0]                                     
                                              =  [x]                                             
                                                                                                 
                          [minus(s(x), s(y))] =  [0]                                             
                                              >= [0]                                             
                                              =  [minus(x, y)]                                   
                                                                                                 
                          [concat(leaf(), y)] =  [1] y + [3]                                     
                                              >  [1] y + [0]                                     
                                              =  [y]                                             
                                                                                                 
                      [concat(cons(u, v), y)] =  [1] y + [1] u + [1] v + [9]                     
                                              >= [1] y + [1] u + [1] v + [9]                     
                                              =  [cons(u, concat(v, y))]                         
                                                                                                 
                         [quot^#(s(x), s(y))] =  [0]                                             
                                              >= [0]                                             
                                              =  [c_1(quot^#(minus(x, y), s(y)))]                
                                                                                                 
      [less_leaves^#(cons(u, v), cons(w, z))] =  [1] w + [1] z + [11]                            
                                              >  [1] w + [1] z + [9]                             
                                              =  [c_2(less_leaves^#(concat(u, v), concat(w, z)))]
                                                                                                 
  
  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:
    { quot^#(s(x), s(y)) -> c_1(quot^#(minus(x, y), s(y))) }
  Weak DPs:
    { less_leaves^#(cons(u, v), cons(w, z)) ->
      c_2(less_leaves^#(concat(u, v), concat(w, z))) }
  Weak Trs:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y)
    , concat(leaf(), y) -> y
    , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
  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.
  
  { less_leaves^#(cons(u, v), cons(w, z)) ->
    c_2(less_leaves^#(concat(u, v), concat(w, z))) }
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(n^1)).
  
  Strict DPs:
    { quot^#(s(x), s(y)) -> c_1(quot^#(minus(x, y), s(y))) }
  Weak Trs:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y)
    , concat(leaf(), y) -> y
    , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
  Obligation:
    innermost runtime complexity
  Answer:
    YES(O(1),O(n^1))
  
  We replace rewrite rules by usable rules:
  
    Weak Usable Rules:
      { minus(x, 0()) -> x
      , minus(s(x), s(y)) -> minus(x, y) }
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(n^1)).
  
  Strict DPs:
    { quot^#(s(x), s(y)) -> c_1(quot^#(minus(x, y), s(y))) }
  Weak Trs:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y) }
  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: quot^#(s(x), s(y)) -> c_1(quot^#(minus(x, y), s(y))) }
  Trs: { minus(s(x), s(y)) -> minus(x, y) }
  
  Sub-proof:
  ----------
    The input was oriented with the instance of 'Small Polynomial Path
    Order (PS,1-bounded)' as induced by the safe mapping
    
     safe(minus) = {1, 2}, safe(0) = {}, safe(s) = {1}, safe(app) = {},
     safe(nil) = {}, safe(add) = {1, 2}, safe(reverse) = {},
     safe(concat) = {}, safe(leaf) = {}, safe(cons) = {1, 2},
     safe(minus^#) = {}, safe(quot^#) = {2}, safe(c_4) = {},
     safe(reverse^#) = {}, safe(shuffle^#) = {}, safe(c_10) = {},
     safe(concat^#) = {}, safe(less_leaves^#) = {}, safe(c_15) = {},
     safe(c) = {}, safe(c_1) = {}, safe(c_2) = {}
    
    and precedence
    
     empty .
    
    Following symbols are considered recursive:
    
     {quot^#}
    
    The recursion depth is 1.
    
    Further, following argument filtering is employed:
    
     pi(minus) = 1, pi(0) = [], pi(s) = [1], pi(app) = [], pi(nil) = [],
     pi(add) = [], pi(reverse) = [], pi(concat) = [], pi(leaf) = [],
     pi(cons) = [], pi(minus^#) = [], pi(quot^#) = [1, 2], pi(c_4) = [],
     pi(reverse^#) = [], pi(shuffle^#) = [], pi(c_10) = [],
     pi(concat^#) = [], pi(less_leaves^#) = [], pi(c_15) = [],
     pi(c) = [], pi(c_1) = [1], pi(c_2) = []
    
    Usable defined function symbols are a subset of:
    
     {minus, minus^#, quot^#, reverse^#, shuffle^#, concat^#,
      less_leaves^#}
    
    For your convenience, here are the satisfied ordering constraints:
    
      pi(quot^#(s(x), s(y))) =  quot^#(s(; x); s(; y))            
                             >  c_1(quot^#(x; s(; y));)           
                             =  pi(c_1(quot^#(minus(x, y), s(y))))
                                                                  
           pi(minus(x, 0())) =  x                                 
                             >= x                                 
                             =  pi(x)                             
                                                                  
       pi(minus(s(x), s(y))) =  s(; x)                            
                             >  x                                 
                             =  pi(minus(x, y))                   
                                                                  
  
  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: { quot^#(s(x), s(y)) -> c_1(quot^#(minus(x, y), s(y))) }
  Weak Trs:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y) }
  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.
  
  { quot^#(s(x), s(y)) -> c_1(quot^#(minus(x, y), s(y))) }
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(1)).
  
  Weak Trs:
    { minus(x, 0()) -> x
    , minus(s(x), s(y)) -> minus(x, y) }
  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^2)).

Strict DPs:
  { minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
  , app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y)) }
Weak DPs:
  { quot^#(s(x), s(y)) -> minus^#(x, y)
  , quot^#(s(x), s(y)) -> quot^#(minus(x, y), s(y))
  , shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x))
  , less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(u, v)
  , less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(w, z)
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    less_leaves^#(concat(u, v), concat(w, z)) }
Weak Trs:
  { minus(x, 0()) -> x
  , minus(s(x), s(y)) -> minus(x, y)
  , app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

DPs:
  { 1: minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
  , 5: quot^#(s(x), s(y)) -> minus^#(x, y)
  , 6: quot^#(s(x), s(y)) -> quot^#(minus(x, y), s(y)) }
Trs: { minus(s(x), s(y)) -> minus(x, y) }

Sub-proof:
----------
  The following argument positions are usable:
    Uargs(c_2) = {1}, Uargs(c_6) = {1}, Uargs(c_8) = {1, 2},
    Uargs(c_12) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
            [minus](x1, x2) = [1] x1 + [0]         
                                                   
                        [0] = [0]                  
                                                   
                    [s](x1) = [1] x1 + [2]         
                                                   
              [app](x1, x2) = [4] x2 + [0]         
                                                   
                      [nil] = [0]                  
                                                   
              [add](x1, x2) = [1] x2 + [0]         
                                                   
              [reverse](x1) = [0]                  
                                                   
           [concat](x1, x2) = [0]                  
                                                   
                     [leaf] = [0]                  
                                                   
             [cons](x1, x2) = [0]                  
                                                   
          [minus^#](x1, x2) = [1] x1 + [4] x2 + [3]
                                                   
                  [c_2](x1) = [1] x1 + [4]         
                                                   
           [quot^#](x1, x2) = [1] x1 + [4] x2 + [0]
                                                   
            [app^#](x1, x2) = [0]                  
                                                   
                  [c_6](x1) = [4] x1 + [0]         
                                                   
            [reverse^#](x1) = [0]                  
                                                   
              [c_8](x1, x2) = [4] x1 + [4] x2 + [0]
                                                   
            [shuffle^#](x1) = [4] x1 + [0]         
                                                   
         [concat^#](x1, x2) = [7]                  
                                                   
                 [c_12](x1) = [1] x1 + [0]         
                                                   
    [less_leaves^#](x1, x2) = [7]                  
  
  The order satisfies the following ordering constraints:
  
                            [minus(x, 0())] =  [1] x + [0]                                          
                                            >= [1] x + [0]                                          
                                            =  [x]                                                  
                                                                                                    
                        [minus(s(x), s(y))] =  [1] x + [2]                                          
                                            >  [1] x + [0]                                          
                                            =  [minus(x, y)]                                        
                                                                                                    
                            [app(nil(), y)] =  [4] y + [0]                                          
                                            >= [1] y + [0]                                          
                                            =  [y]                                                  
                                                                                                    
                        [app(add(n, x), y)] =  [4] y + [0]                                          
                                            >= [4] y + [0]                                          
                                            =  [add(n, app(x, y))]                                  
                                                                                                    
                           [reverse(nil())] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [nil()]                                              
                                                                                                    
                       [reverse(add(n, x))] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [app(reverse(x), add(n, nil()))]                     
                                                                                                    
                        [concat(leaf(), y)] =  [0]                                                  
                                            ?  [1] y + [0]                                          
                                            =  [y]                                                  
                                                                                                    
                    [concat(cons(u, v), y)] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [cons(u, concat(v, y))]                              
                                                                                                    
                      [minus^#(s(x), s(y))] =  [1] x + [4] y + [13]                                 
                                            >  [1] x + [4] y + [7]                                  
                                            =  [c_2(minus^#(x, y))]                                 
                                                                                                    
                       [quot^#(s(x), s(y))] =  [1] x + [4] y + [10]                                 
                                            >  [1] x + [4] y + [3]                                  
                                            =  [minus^#(x, y)]                                      
                                                                                                    
                       [quot^#(s(x), s(y))] =  [1] x + [4] y + [10]                                 
                                            >  [1] x + [4] y + [8]                                  
                                            =  [quot^#(minus(x, y), s(y))]                          
                                                                                                    
                      [app^#(add(n, x), y)] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [c_6(app^#(x, y))]                                   
                                                                                                    
                     [reverse^#(add(n, x))] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))]
                                                                                                    
                     [shuffle^#(add(n, x))] =  [4] x + [0]                                          
                                            >= [0]                                                  
                                            =  [reverse^#(x)]                                       
                                                                                                    
                     [shuffle^#(add(n, x))] =  [4] x + [0]                                          
                                            >= [0]                                                  
                                            =  [shuffle^#(reverse(x))]                              
                                                                                                    
                  [concat^#(cons(u, v), y)] =  [7]                                                  
                                            >= [7]                                                  
                                            =  [c_12(concat^#(v, y))]                               
                                                                                                    
    [less_leaves^#(cons(u, v), cons(w, z))] =  [7]                                                  
                                            >= [7]                                                  
                                            =  [concat^#(u, v)]                                     
                                                                                                    
    [less_leaves^#(cons(u, v), cons(w, z))] =  [7]                                                  
                                            >= [7]                                                  
                                            =  [concat^#(w, z)]                                     
                                                                                                    
    [less_leaves^#(cons(u, v), cons(w, z))] =  [7]                                                  
                                            >= [7]                                                  
                                            =  [less_leaves^#(concat(u, v), concat(w, z))]          
                                                                                                    

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^2)).

Strict DPs:
  { app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y)) }
Weak DPs:
  { minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
  , quot^#(s(x), s(y)) -> minus^#(x, y)
  , quot^#(s(x), s(y)) -> quot^#(minus(x, y), s(y))
  , shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x))
  , less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(u, v)
  , less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(w, z)
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    less_leaves^#(concat(u, v), concat(w, z)) }
Weak Trs:
  { minus(x, 0()) -> x
  , minus(s(x), s(y)) -> minus(x, y)
  , app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
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.

{ minus^#(s(x), s(y)) -> c_2(minus^#(x, y))
, quot^#(s(x), s(y)) -> minus^#(x, y)
, quot^#(s(x), s(y)) -> quot^#(minus(x, y), s(y)) }

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

Strict DPs:
  { app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y)) }
Weak DPs:
  { shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x))
  , less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(u, v)
  , less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(w, z)
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    less_leaves^#(concat(u, v), concat(w, z)) }
Weak Trs:
  { minus(x, 0()) -> x
  , minus(s(x), s(y)) -> minus(x, y)
  , app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

We replace rewrite rules by usable rules:

  Weak Usable Rules:
    { app(nil(), y) -> y
    , app(add(n, x), y) -> add(n, app(x, y))
    , reverse(nil()) -> nil()
    , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
    , concat(leaf(), y) -> y
    , concat(cons(u, v), y) -> cons(u, concat(v, y)) }

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

Strict DPs:
  { app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y)) }
Weak DPs:
  { shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x))
  , less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(u, v)
  , less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(w, z)
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    less_leaves^#(concat(u, v), concat(w, z)) }
Weak Trs:
  { app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

DPs:
  { 3: concat^#(cons(u, v), y) -> c_12(concat^#(v, y))
  , 6: less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(u, v)
  , 7: less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(w, z) }
Trs: { concat(leaf(), y) -> y }

Sub-proof:
----------
  The following argument positions are usable:
    Uargs(c_6) = {1}, Uargs(c_8) = {1, 2}, Uargs(c_12) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
            [minus](x1, x2) = [0]                  
                                                   
                        [0] = [0]                  
                                                   
                    [s](x1) = [0]                  
                                                   
              [app](x1, x2) = [0]                  
                                                   
                      [nil] = [0]                  
                                                   
              [add](x1, x2) = [0]                  
                                                   
              [reverse](x1) = [0]                  
                                                   
           [concat](x1, x2) = [1] x1 + [1] x2 + [4]
                                                   
                     [leaf] = [0]                  
                                                   
             [cons](x1, x2) = [1] x1 + [1] x2 + [4]
                                                   
          [minus^#](x1, x2) = [0]                  
                                                   
                  [c_2](x1) = [0]                  
                                                   
           [quot^#](x1, x2) = [0]                  
                                                   
            [app^#](x1, x2) = [0]                  
                                                   
                  [c_6](x1) = [4] x1 + [0]         
                                                   
            [reverse^#](x1) = [0]                  
                                                   
              [c_8](x1, x2) = [4] x1 + [4] x2 + [0]
                                                   
            [shuffle^#](x1) = [0]                  
                                                   
         [concat^#](x1, x2) = [1] x1 + [1]         
                                                   
                 [c_12](x1) = [1] x1 + [0]         
                                                   
    [less_leaves^#](x1, x2) = [1] x1 + [2] x2 + [0]
  
  The order satisfies the following ordering constraints:
  
                            [app(nil(), y)] =  [0]                                                  
                                            ?  [1] y + [0]                                          
                                            =  [y]                                                  
                                                                                                    
                        [app(add(n, x), y)] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [add(n, app(x, y))]                                  
                                                                                                    
                           [reverse(nil())] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [nil()]                                              
                                                                                                    
                       [reverse(add(n, x))] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [app(reverse(x), add(n, nil()))]                     
                                                                                                    
                        [concat(leaf(), y)] =  [1] y + [4]                                          
                                            >  [1] y + [0]                                          
                                            =  [y]                                                  
                                                                                                    
                    [concat(cons(u, v), y)] =  [1] y + [1] u + [1] v + [8]                          
                                            >= [1] y + [1] u + [1] v + [8]                          
                                            =  [cons(u, concat(v, y))]                              
                                                                                                    
                      [app^#(add(n, x), y)] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [c_6(app^#(x, y))]                                   
                                                                                                    
                     [reverse^#(add(n, x))] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))]
                                                                                                    
                     [shuffle^#(add(n, x))] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [reverse^#(x)]                                       
                                                                                                    
                     [shuffle^#(add(n, x))] =  [0]                                                  
                                            >= [0]                                                  
                                            =  [shuffle^#(reverse(x))]                              
                                                                                                    
                  [concat^#(cons(u, v), y)] =  [1] u + [1] v + [5]                                  
                                            >  [1] v + [1]                                          
                                            =  [c_12(concat^#(v, y))]                               
                                                                                                    
    [less_leaves^#(cons(u, v), cons(w, z))] =  [1] u + [1] v + [2] w + [2] z + [12]                 
                                            >  [1] u + [1]                                          
                                            =  [concat^#(u, v)]                                     
                                                                                                    
    [less_leaves^#(cons(u, v), cons(w, z))] =  [1] u + [1] v + [2] w + [2] z + [12]                 
                                            >  [1] w + [1]                                          
                                            =  [concat^#(w, z)]                                     
                                                                                                    
    [less_leaves^#(cons(u, v), cons(w, z))] =  [1] u + [1] v + [2] w + [2] z + [12]                 
                                            >= [1] u + [1] v + [2] w + [2] z + [12]                 
                                            =  [less_leaves^#(concat(u, v), concat(w, z))]          
                                                                                                    

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^2)).

Strict DPs:
  { app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x)) }
Weak DPs:
  { shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x))
  , concat^#(cons(u, v), y) -> c_12(concat^#(v, y))
  , less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(u, v)
  , less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(w, z)
  , less_leaves^#(cons(u, v), cons(w, z)) ->
    less_leaves^#(concat(u, v), concat(w, z)) }
Weak Trs:
  { app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
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.

{ concat^#(cons(u, v), y) -> c_12(concat^#(v, y))
, less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(u, v)
, less_leaves^#(cons(u, v), cons(w, z)) -> concat^#(w, z)
, less_leaves^#(cons(u, v), cons(w, z)) ->
  less_leaves^#(concat(u, v), concat(w, z)) }

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

Strict DPs:
  { app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x)) }
Weak DPs:
  { shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }
Weak Trs:
  { app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil()))
  , concat(leaf(), y) -> y
  , concat(cons(u, v), y) -> cons(u, concat(v, y)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

We replace rewrite rules by usable rules:

  Weak Usable Rules:
    { app(nil(), y) -> y
    , app(add(n, x), y) -> add(n, app(x, y))
    , reverse(nil()) -> nil()
    , reverse(add(n, x)) -> app(reverse(x), add(n, nil())) }

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

Strict DPs:
  { app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x)) }
Weak DPs:
  { shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }
Weak Trs:
  { app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil())) }
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

  { reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }

and lower component

  { app^#(add(n, x), y) -> c_6(app^#(x, y)) }

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

{ reverse^#(add(n, x)) -> app^#(reverse(x), add(n, nil()))
, reverse^#(add(n, x)) -> reverse^#(x)
, shuffle^#(add(n, x)) -> reverse^#(x)
, shuffle^#(add(n, x)) -> shuffle^#(reverse(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:
    { reverse^#(add(n, x)) ->
      c_8(app^#(reverse(x), add(n, nil())), reverse^#(x)) }
  Weak DPs:
    { shuffle^#(add(n, x)) -> reverse^#(x)
    , shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }
  Weak Trs:
    { app(nil(), y) -> y
    , app(add(n, x), y) -> add(n, app(x, y))
    , reverse(nil()) -> nil()
    , reverse(add(n, x)) -> app(reverse(x), add(n, nil())) }
  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: reverse^#(add(n, x)) ->
         c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
    , 2: shuffle^#(add(n, x)) -> reverse^#(x)
    , 3: shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }
  
  Sub-proof:
  ----------
    The following argument positions are usable:
      Uargs(c_8) = {1, 2}
    
    TcT has computed the following constructor-based matrix
    interpretation satisfying not(EDA).
    
        [app](x1, x2) = [1] x1 + [1] x2 + [0]
                                             
                [nil] = [0]                  
                                             
        [add](x1, x2) = [1] x2 + [2]         
                                             
        [reverse](x1) = [1] x1 + [0]         
                                             
      [app^#](x1, x2) = [1]                  
                                             
      [reverse^#](x1) = [4] x1 + [4]         
                                             
        [c_8](x1, x2) = [1] x1 + [1] x2 + [4]
                                             
      [shuffle^#](x1) = [4] x1 + [6]         
    
    The order satisfies the following ordering constraints:
    
             [app(nil(), y)] =  [1] y + [0]                                          
                             >= [1] y + [0]                                          
                             =  [y]                                                  
                                                                                     
         [app(add(n, x), y)] =  [1] x + [1] y + [2]                                  
                             >= [1] x + [1] y + [2]                                  
                             =  [add(n, app(x, y))]                                  
                                                                                     
            [reverse(nil())] =  [0]                                                  
                             >= [0]                                                  
                             =  [nil()]                                              
                                                                                     
        [reverse(add(n, x))] =  [1] x + [2]                                          
                             >= [1] x + [2]                                          
                             =  [app(reverse(x), add(n, nil()))]                     
                                                                                     
      [reverse^#(add(n, x))] =  [4] x + [12]                                         
                             >  [4] x + [9]                                          
                             =  [c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))]
                                                                                     
      [shuffle^#(add(n, x))] =  [4] x + [14]                                         
                             >  [4] x + [4]                                          
                             =  [reverse^#(x)]                                       
                                                                                     
      [shuffle^#(add(n, x))] =  [4] x + [14]                                         
                             >  [4] x + [6]                                          
                             =  [shuffle^#(reverse(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:
    { reverse^#(add(n, x)) ->
      c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
    , shuffle^#(add(n, x)) -> reverse^#(x)
    , shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }
  Weak Trs:
    { app(nil(), y) -> y
    , app(add(n, x), y) -> add(n, app(x, y))
    , reverse(nil()) -> nil()
    , reverse(add(n, x)) -> app(reverse(x), add(n, nil())) }
  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.
  
  { reverse^#(add(n, x)) ->
    c_8(app^#(reverse(x), add(n, nil())), reverse^#(x))
  , shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(1)).
  
  Weak Trs:
    { app(nil(), y) -> y
    , app(add(n, x), y) -> add(n, app(x, y))
    , reverse(nil()) -> nil()
    , reverse(add(n, x)) -> app(reverse(x), add(n, nil())) }
  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: { app^#(add(n, x), y) -> c_6(app^#(x, y)) }
Weak DPs:
  { reverse^#(add(n, x)) -> app^#(reverse(x), add(n, nil()))
  , reverse^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }
Weak Trs:
  { app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil())) }
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: app^#(add(n, x), y) -> c_6(app^#(x, y))
  , 3: reverse^#(add(n, x)) -> reverse^#(x)
  , 4: shuffle^#(add(n, x)) -> reverse^#(x) }
Trs: { reverse(nil()) -> nil() }

Sub-proof:
----------
  The following argument positions are usable:
    Uargs(c_6) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
      [app](x1, x2) = [1] x1 + [1] x2 + [0]
                                           
              [nil] = [0]                  
                                           
      [add](x1, x2) = [1] x2 + [1]         
                                           
      [reverse](x1) = [1] x1 + [1]         
                                           
    [app^#](x1, x2) = [1] x1 + [6]         
                                           
          [c_6](x1) = [1] x1 + [0]         
                                           
    [reverse^#](x1) = [5] x1 + [2]         
                                           
    [shuffle^#](x1) = [6] x1 + [3]         
  
  The order satisfies the following ordering constraints:
  
           [app(nil(), y)] =  [1] y + [0]                       
                           >= [1] y + [0]                       
                           =  [y]                               
                                                                
       [app(add(n, x), y)] =  [1] x + [1] y + [1]               
                           >= [1] x + [1] y + [1]               
                           =  [add(n, app(x, y))]               
                                                                
          [reverse(nil())] =  [1]                               
                           >  [0]                               
                           =  [nil()]                           
                                                                
      [reverse(add(n, x))] =  [1] x + [2]                       
                           >= [1] x + [2]                       
                           =  [app(reverse(x), add(n, nil()))]  
                                                                
     [app^#(add(n, x), y)] =  [1] x + [7]                       
                           >  [1] x + [6]                       
                           =  [c_6(app^#(x, y))]                
                                                                
    [reverse^#(add(n, x))] =  [5] x + [7]                       
                           >= [1] x + [7]                       
                           =  [app^#(reverse(x), add(n, nil()))]
                                                                
    [reverse^#(add(n, x))] =  [5] x + [7]                       
                           >  [5] x + [2]                       
                           =  [reverse^#(x)]                    
                                                                
    [shuffle^#(add(n, x))] =  [6] x + [9]                       
                           >  [5] x + [2]                       
                           =  [reverse^#(x)]                    
                                                                
    [shuffle^#(add(n, x))] =  [6] x + [9]                       
                           >= [6] x + [9]                       
                           =  [shuffle^#(reverse(x))]           
                                                                

We return to the main proof. Consider the set of all dependency
pairs

:
  { 1: app^#(add(n, x), y) -> c_6(app^#(x, y))
  , 2: reverse^#(add(n, x)) -> app^#(reverse(x), add(n, nil()))
  , 3: reverse^#(add(n, x)) -> reverse^#(x)
  , 4: shuffle^#(add(n, x)) -> reverse^#(x)
  , 5: shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }

Processor 'matrix interpretation of dimension 1' induces the
complexity certificate YES(?,O(n^1)) on application of dependency
pairs {1,3,4}. These cover all (indirect) predecessors of
dependency pairs {1,2,3,4}, their number of application is equally
bounded. The dependency pairs are shifted into the weak component.

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

Weak DPs:
  { app^#(add(n, x), y) -> c_6(app^#(x, y))
  , reverse^#(add(n, x)) -> app^#(reverse(x), add(n, nil()))
  , reverse^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> reverse^#(x)
  , shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }
Weak Trs:
  { app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil())) }
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.

{ app^#(add(n, x), y) -> c_6(app^#(x, y))
, reverse^#(add(n, x)) -> app^#(reverse(x), add(n, nil()))
, reverse^#(add(n, x)) -> reverse^#(x)
, shuffle^#(add(n, x)) -> reverse^#(x)
, shuffle^#(add(n, x)) -> shuffle^#(reverse(x)) }

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

Weak Trs:
  { app(nil(), y) -> y
  , app(add(n, x), y) -> add(n, app(x, y))
  , reverse(nil()) -> nil()
  , reverse(add(n, x)) -> app(reverse(x), add(n, nil())) }
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^3))