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

Strict Trs:
  { strmatch(patstr, str) -> domatch(patstr, str, Nil())
  , prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , notEmpty(Nil()) -> False()
  , notEmpty(Cons(x, xs)) -> True()
  , eqNatList(Nil(), Nil()) -> True()
  , eqNatList(Nil(), Cons(y, ys)) -> False()
  , eqNatList(Cons(x, xs), Nil()) -> False()
  , eqNatList(Cons(x, xs), Cons(y, ys)) ->
    eqNatList[Ite](!EQ(x, y), y, ys, x, xs)
  , domatch(patcs, Cons(x, xs), n) ->
    domatch[Ite](prefix(patcs, Cons(x, xs)), patcs, Cons(x, xs), n)
  , domatch(Nil(), Nil(), n) -> Cons(n, Nil())
  , domatch(Cons(x, xs), Nil(), n) -> Nil() }
Weak Trs:
  { domatch[Ite](True(), patcs, Cons(x, xs), n) ->
    Cons(n, domatch(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite](False(), patcs, Cons(x, xs), n) ->
    domatch(patcs, xs, Cons(n, Cons(Nil(), Nil())))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , eqNatList[Ite](True(), y, ys, x, xs) -> eqNatList(xs, ys)
  , eqNatList[Ite](False(), y, ys, x, xs) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

We add the following dependency tuples:

Strict DPs:
  { strmatch^#(patstr, str) -> c_1(domatch^#(patstr, str, Nil()))
  , domatch^#(patcs, Cons(x, xs), n) ->
    c_11(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                        patcs,
                        Cons(x, xs),
                        n),
         prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Nil(), Nil(), n) -> c_12()
  , domatch^#(Cons(x, xs), Nil(), n) -> c_13()
  , prefix^#(Nil(), cs) -> c_2()
  , prefix^#(Cons(x, xs), Nil()) -> c_3()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) ->
    c_4(and^#(!EQ(x', x), prefix(xs', xs)),
        !EQ^#(x', x),
        prefix^#(xs', xs))
  , notEmpty^#(Nil()) -> c_5()
  , notEmpty^#(Cons(x, xs)) -> c_6()
  , eqNatList^#(Nil(), Nil()) -> c_7()
  , eqNatList^#(Nil(), Cons(y, ys)) -> c_8()
  , eqNatList^#(Cons(x, xs), Nil()) -> c_9()
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_10(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs), !EQ^#(x, y)) }
Weak DPs:
  { and^#(True(), True()) -> c_16()
  , and^#(True(), False()) -> c_17()
  , and^#(False(), True()) -> c_18()
  , and^#(False(), False()) -> c_19()
  , !EQ^#(S(x), S(y)) -> c_22(!EQ^#(x, y))
  , !EQ^#(S(x), 0()) -> c_23()
  , !EQ^#(0(), S(y)) -> c_24()
  , !EQ^#(0(), 0()) -> c_25()
  , eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_20(eqNatList^#(xs, ys))
  , eqNatList[Ite]^#(False(), y, ys, x, xs) -> c_21()
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_14(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_15(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }

and mark the set of starting terms.

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

Strict DPs:
  { strmatch^#(patstr, str) -> c_1(domatch^#(patstr, str, Nil()))
  , domatch^#(patcs, Cons(x, xs), n) ->
    c_11(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                        patcs,
                        Cons(x, xs),
                        n),
         prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Nil(), Nil(), n) -> c_12()
  , domatch^#(Cons(x, xs), Nil(), n) -> c_13()
  , prefix^#(Nil(), cs) -> c_2()
  , prefix^#(Cons(x, xs), Nil()) -> c_3()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) ->
    c_4(and^#(!EQ(x', x), prefix(xs', xs)),
        !EQ^#(x', x),
        prefix^#(xs', xs))
  , notEmpty^#(Nil()) -> c_5()
  , notEmpty^#(Cons(x, xs)) -> c_6()
  , eqNatList^#(Nil(), Nil()) -> c_7()
  , eqNatList^#(Nil(), Cons(y, ys)) -> c_8()
  , eqNatList^#(Cons(x, xs), Nil()) -> c_9()
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_10(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs), !EQ^#(x, y)) }
Weak DPs:
  { and^#(True(), True()) -> c_16()
  , and^#(True(), False()) -> c_17()
  , and^#(False(), True()) -> c_18()
  , and^#(False(), False()) -> c_19()
  , !EQ^#(S(x), S(y)) -> c_22(!EQ^#(x, y))
  , !EQ^#(S(x), 0()) -> c_23()
  , !EQ^#(0(), S(y)) -> c_24()
  , !EQ^#(0(), 0()) -> c_25()
  , eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_20(eqNatList^#(xs, ys))
  , eqNatList[Ite]^#(False(), y, ys, x, xs) -> c_21()
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_14(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_15(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { domatch[Ite](True(), patcs, Cons(x, xs), n) ->
    Cons(n, domatch(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite](False(), patcs, Cons(x, xs), n) ->
    domatch(patcs, xs, Cons(n, Cons(Nil(), Nil())))
  , strmatch(patstr, str) -> domatch(patstr, str, Nil())
  , prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , eqNatList[Ite](True(), y, ys, x, xs) -> eqNatList(xs, ys)
  , eqNatList[Ite](False(), y, ys, x, xs) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True()
  , notEmpty(Nil()) -> False()
  , notEmpty(Cons(x, xs)) -> True()
  , eqNatList(Nil(), Nil()) -> True()
  , eqNatList(Nil(), Cons(y, ys)) -> False()
  , eqNatList(Cons(x, xs), Nil()) -> False()
  , eqNatList(Cons(x, xs), Cons(y, ys)) ->
    eqNatList[Ite](!EQ(x, y), y, ys, x, xs)
  , domatch(patcs, Cons(x, xs), n) ->
    domatch[Ite](prefix(patcs, Cons(x, xs)), patcs, Cons(x, xs), n)
  , domatch(Nil(), Nil(), n) -> Cons(n, Nil())
  , domatch(Cons(x, xs), Nil(), n) -> Nil() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

  DPs:
    { 1: strmatch^#(patstr, str) -> c_1(domatch^#(patstr, str, Nil()))
    , 2: domatch^#(patcs, Cons(x, xs), n) ->
         c_11(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                             patcs,
                             Cons(x, xs),
                             n),
              prefix^#(patcs, Cons(x, xs)))
    , 3: domatch^#(Nil(), Nil(), n) -> c_12()
    , 4: domatch^#(Cons(x, xs), Nil(), n) -> c_13()
    , 5: prefix^#(Nil(), cs) -> c_2()
    , 6: prefix^#(Cons(x, xs), Nil()) -> c_3()
    , 7: prefix^#(Cons(x', xs'), Cons(x, xs)) ->
         c_4(and^#(!EQ(x', x), prefix(xs', xs)),
             !EQ^#(x', x),
             prefix^#(xs', xs))
    , 8: notEmpty^#(Nil()) -> c_5()
    , 9: notEmpty^#(Cons(x, xs)) -> c_6()
    , 10: eqNatList^#(Nil(), Nil()) -> c_7()
    , 11: eqNatList^#(Nil(), Cons(y, ys)) -> c_8()
    , 12: eqNatList^#(Cons(x, xs), Nil()) -> c_9()
    , 13: eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
          c_10(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs), !EQ^#(x, y))
    , 14: and^#(True(), True()) -> c_16()
    , 15: and^#(True(), False()) -> c_17()
    , 16: and^#(False(), True()) -> c_18()
    , 17: and^#(False(), False()) -> c_19()
    , 18: !EQ^#(S(x), S(y)) -> c_22(!EQ^#(x, y))
    , 19: !EQ^#(S(x), 0()) -> c_23()
    , 20: !EQ^#(0(), S(y)) -> c_24()
    , 21: !EQ^#(0(), 0()) -> c_25()
    , 22: eqNatList[Ite]^#(True(), y, ys, x, xs) ->
          c_20(eqNatList^#(xs, ys))
    , 23: eqNatList[Ite]^#(False(), y, ys, x, xs) -> c_21()
    , 24: domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
          c_14(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
    , 25: domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
          c_15(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }

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

Strict DPs:
  { strmatch^#(patstr, str) -> c_1(domatch^#(patstr, str, Nil()))
  , domatch^#(patcs, Cons(x, xs), n) ->
    c_11(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                        patcs,
                        Cons(x, xs),
                        n),
         prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Nil(), Nil(), n) -> c_12()
  , domatch^#(Cons(x, xs), Nil(), n) -> c_13()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) ->
    c_4(and^#(!EQ(x', x), prefix(xs', xs)),
        !EQ^#(x', x),
        prefix^#(xs', xs))
  , eqNatList^#(Nil(), Nil()) -> c_7()
  , eqNatList^#(Nil(), Cons(y, ys)) -> c_8()
  , eqNatList^#(Cons(x, xs), Nil()) -> c_9()
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_10(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs), !EQ^#(x, y)) }
Weak DPs:
  { prefix^#(Nil(), cs) -> c_2()
  , prefix^#(Cons(x, xs), Nil()) -> c_3()
  , and^#(True(), True()) -> c_16()
  , and^#(True(), False()) -> c_17()
  , and^#(False(), True()) -> c_18()
  , and^#(False(), False()) -> c_19()
  , !EQ^#(S(x), S(y)) -> c_22(!EQ^#(x, y))
  , !EQ^#(S(x), 0()) -> c_23()
  , !EQ^#(0(), S(y)) -> c_24()
  , !EQ^#(0(), 0()) -> c_25()
  , notEmpty^#(Nil()) -> c_5()
  , notEmpty^#(Cons(x, xs)) -> c_6()
  , eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_20(eqNatList^#(xs, ys))
  , eqNatList[Ite]^#(False(), y, ys, x, xs) -> c_21()
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_14(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_15(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { domatch[Ite](True(), patcs, Cons(x, xs), n) ->
    Cons(n, domatch(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite](False(), patcs, Cons(x, xs), n) ->
    domatch(patcs, xs, Cons(n, Cons(Nil(), Nil())))
  , strmatch(patstr, str) -> domatch(patstr, str, Nil())
  , prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , eqNatList[Ite](True(), y, ys, x, xs) -> eqNatList(xs, ys)
  , eqNatList[Ite](False(), y, ys, x, xs) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True()
  , notEmpty(Nil()) -> False()
  , notEmpty(Cons(x, xs)) -> True()
  , eqNatList(Nil(), Nil()) -> True()
  , eqNatList(Nil(), Cons(y, ys)) -> False()
  , eqNatList(Cons(x, xs), Nil()) -> False()
  , eqNatList(Cons(x, xs), Cons(y, ys)) ->
    eqNatList[Ite](!EQ(x, y), y, ys, x, xs)
  , domatch(patcs, Cons(x, xs), n) ->
    domatch[Ite](prefix(patcs, Cons(x, xs)), patcs, Cons(x, xs), n)
  , domatch(Nil(), Nil(), n) -> Cons(n, Nil())
  , domatch(Cons(x, xs), Nil(), n) -> Nil() }
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.

{ prefix^#(Nil(), cs) -> c_2()
, prefix^#(Cons(x, xs), Nil()) -> c_3()
, and^#(True(), True()) -> c_16()
, and^#(True(), False()) -> c_17()
, and^#(False(), True()) -> c_18()
, and^#(False(), False()) -> c_19()
, !EQ^#(S(x), S(y)) -> c_22(!EQ^#(x, y))
, !EQ^#(S(x), 0()) -> c_23()
, !EQ^#(0(), S(y)) -> c_24()
, !EQ^#(0(), 0()) -> c_25()
, notEmpty^#(Nil()) -> c_5()
, notEmpty^#(Cons(x, xs)) -> c_6()
, eqNatList[Ite]^#(False(), y, ys, x, xs) -> c_21() }

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

Strict DPs:
  { strmatch^#(patstr, str) -> c_1(domatch^#(patstr, str, Nil()))
  , domatch^#(patcs, Cons(x, xs), n) ->
    c_11(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                        patcs,
                        Cons(x, xs),
                        n),
         prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Nil(), Nil(), n) -> c_12()
  , domatch^#(Cons(x, xs), Nil(), n) -> c_13()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) ->
    c_4(and^#(!EQ(x', x), prefix(xs', xs)),
        !EQ^#(x', x),
        prefix^#(xs', xs))
  , eqNatList^#(Nil(), Nil()) -> c_7()
  , eqNatList^#(Nil(), Cons(y, ys)) -> c_8()
  , eqNatList^#(Cons(x, xs), Nil()) -> c_9()
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_10(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs), !EQ^#(x, y)) }
Weak DPs:
  { eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_20(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_14(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_15(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { domatch[Ite](True(), patcs, Cons(x, xs), n) ->
    Cons(n, domatch(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite](False(), patcs, Cons(x, xs), n) ->
    domatch(patcs, xs, Cons(n, Cons(Nil(), Nil())))
  , strmatch(patstr, str) -> domatch(patstr, str, Nil())
  , prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , eqNatList[Ite](True(), y, ys, x, xs) -> eqNatList(xs, ys)
  , eqNatList[Ite](False(), y, ys, x, xs) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True()
  , notEmpty(Nil()) -> False()
  , notEmpty(Cons(x, xs)) -> True()
  , eqNatList(Nil(), Nil()) -> True()
  , eqNatList(Nil(), Cons(y, ys)) -> False()
  , eqNatList(Cons(x, xs), Nil()) -> False()
  , eqNatList(Cons(x, xs), Cons(y, ys)) ->
    eqNatList[Ite](!EQ(x, y), y, ys, x, xs)
  , domatch(patcs, Cons(x, xs), n) ->
    domatch[Ite](prefix(patcs, Cons(x, xs)), patcs, Cons(x, xs), n)
  , domatch(Nil(), Nil(), n) -> Cons(n, Nil())
  , domatch(Cons(x, xs), Nil(), n) -> Nil() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

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

  { prefix^#(Cons(x', xs'), Cons(x, xs)) ->
    c_4(and^#(!EQ(x', x), prefix(xs', xs)),
        !EQ^#(x', x),
        prefix^#(xs', xs))
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_10(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs), !EQ^#(x, y)) }

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

Strict DPs:
  { strmatch^#(patstr, str) -> c_1(domatch^#(patstr, str, Nil()))
  , domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Nil(), Nil(), n) -> c_3()
  , domatch^#(Cons(x, xs), Nil(), n) -> c_4()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , eqNatList^#(Nil(), Nil()) -> c_6()
  , eqNatList^#(Nil(), Cons(y, ys)) -> c_7()
  , eqNatList^#(Cons(x, xs), Nil()) -> c_8()
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs)) }
Weak DPs:
  { eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_10(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { domatch[Ite](True(), patcs, Cons(x, xs), n) ->
    Cons(n, domatch(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite](False(), patcs, Cons(x, xs), n) ->
    domatch(patcs, xs, Cons(n, Cons(Nil(), Nil())))
  , strmatch(patstr, str) -> domatch(patstr, str, Nil())
  , prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , eqNatList[Ite](True(), y, ys, x, xs) -> eqNatList(xs, ys)
  , eqNatList[Ite](False(), y, ys, x, xs) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True()
  , notEmpty(Nil()) -> False()
  , notEmpty(Cons(x, xs)) -> True()
  , eqNatList(Nil(), Nil()) -> True()
  , eqNatList(Nil(), Cons(y, ys)) -> False()
  , eqNatList(Cons(x, xs), Nil()) -> False()
  , eqNatList(Cons(x, xs), Cons(y, ys)) ->
    eqNatList[Ite](!EQ(x, y), y, ys, x, xs)
  , domatch(patcs, Cons(x, xs), n) ->
    domatch[Ite](prefix(patcs, Cons(x, xs)), patcs, Cons(x, xs), n)
  , domatch(Nil(), Nil(), n) -> Cons(n, Nil())
  , domatch(Cons(x, xs), Nil(), n) -> Nil() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

We replace rewrite rules by usable rules:

  Weak Usable Rules:
    { prefix(Nil(), cs) -> True()
    , prefix(Cons(x, xs), Nil()) -> False()
    , prefix(Cons(x', xs'), Cons(x, xs)) ->
      and(!EQ(x', x), prefix(xs', xs))
    , and(True(), True()) -> True()
    , and(True(), False()) -> False()
    , and(False(), True()) -> False()
    , and(False(), False()) -> False()
    , !EQ(S(x), S(y)) -> !EQ(x, y)
    , !EQ(S(x), 0()) -> False()
    , !EQ(0(), S(y)) -> False()
    , !EQ(0(), 0()) -> True() }

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

Strict DPs:
  { strmatch^#(patstr, str) -> c_1(domatch^#(patstr, str, Nil()))
  , domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Nil(), Nil(), n) -> c_3()
  , domatch^#(Cons(x, xs), Nil(), n) -> c_4()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , eqNatList^#(Nil(), Nil()) -> c_6()
  , eqNatList^#(Nil(), Cons(y, ys)) -> c_7()
  , eqNatList^#(Cons(x, xs), Nil()) -> c_8()
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs)) }
Weak DPs:
  { eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_10(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^2))

Consider the dependency graph

  1: strmatch^#(patstr, str) -> c_1(domatch^#(patstr, str, Nil()))
     -->_1 domatch^#(patcs, Cons(x, xs), n) ->
           c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                              patcs,
                              Cons(x, xs),
                              n),
               prefix^#(patcs, Cons(x, xs))) :2
     -->_1 domatch^#(Cons(x, xs), Nil(), n) -> c_4() :4
     -->_1 domatch^#(Nil(), Nil(), n) -> c_3() :3
  
  2: domatch^#(patcs, Cons(x, xs), n) ->
     c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                        patcs,
                        Cons(x, xs),
                        n),
         prefix^#(patcs, Cons(x, xs)))
     -->_1 domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
           c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) :12
     -->_1 domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
           c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) :11
     -->_2 prefix^#(Cons(x', xs'), Cons(x, xs)) ->
           c_5(prefix^#(xs', xs)) :5
  
  3: domatch^#(Nil(), Nil(), n) -> c_3()
  
  4: domatch^#(Cons(x, xs), Nil(), n) -> c_4()
  
  5: prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
     -->_1 prefix^#(Cons(x', xs'), Cons(x, xs)) ->
           c_5(prefix^#(xs', xs)) :5
  
  6: eqNatList^#(Nil(), Nil()) -> c_6()
  
  7: eqNatList^#(Nil(), Cons(y, ys)) -> c_7()
  
  8: eqNatList^#(Cons(x, xs), Nil()) -> c_8()
  
  9: eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
     c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs))
     -->_1 eqNatList[Ite]^#(True(), y, ys, x, xs) ->
           c_10(eqNatList^#(xs, ys)) :10
  
  10: eqNatList[Ite]^#(True(), y, ys, x, xs) ->
      c_10(eqNatList^#(xs, ys))
     -->_1 eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
           c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs)) :9
     -->_1 eqNatList^#(Cons(x, xs), Nil()) -> c_8() :8
     -->_1 eqNatList^#(Nil(), Cons(y, ys)) -> c_7() :7
     -->_1 eqNatList^#(Nil(), Nil()) -> c_6() :6
  
  11: domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
      c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
     -->_1 domatch^#(Cons(x, xs), Nil(), n) -> c_4() :4
     -->_1 domatch^#(Nil(), Nil(), n) -> c_3() :3
     -->_1 domatch^#(patcs, Cons(x, xs), n) ->
           c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                              patcs,
                              Cons(x, xs),
                              n),
               prefix^#(patcs, Cons(x, xs))) :2
  
  12: domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
      c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
     -->_1 domatch^#(Cons(x, xs), Nil(), n) -> c_4() :4
     -->_1 domatch^#(Nil(), Nil(), n) -> c_3() :3
     -->_1 domatch^#(patcs, Cons(x, xs), n) ->
           c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                              patcs,
                              Cons(x, xs),
                              n),
               prefix^#(patcs, Cons(x, xs))) :2
  

Following roots of the dependency graph are removed, as the
considered set of starting terms is closed under reduction with
respect to these rules (modulo compound contexts).

  { strmatch^#(patstr, str) -> c_1(domatch^#(patstr, str, Nil())) }


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

Strict DPs:
  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Nil(), Nil(), n) -> c_3()
  , domatch^#(Cons(x, xs), Nil(), n) -> c_4()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , eqNatList^#(Nil(), Nil()) -> c_6()
  , eqNatList^#(Nil(), Cons(y, ys)) -> c_7()
  , eqNatList^#(Cons(x, xs), Nil()) -> c_8()
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs)) }
Weak DPs:
  { eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_10(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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:
  { 5: eqNatList^#(Nil(), Nil()) -> c_6()
  , 6: eqNatList^#(Nil(), Cons(y, ys)) -> c_7()
  , 7: eqNatList^#(Cons(x, xs), Nil()) -> c_8() }
Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False() }

Sub-proof:
----------
  The following argument positions are usable:
    Uargs(c_2) = {1, 2}, Uargs(c_5) = {1}, Uargs(c_9) = {1},
    Uargs(c_10) = {1}, Uargs(c_11) = {1}, Uargs(c_12) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
                                    [True] = [4]                  
                                                                  
                          [prefix](x1, x2) = [3] x1 + [3] x2 + [5]
                                                                  
                                     [Nil] = [1]                  
                                                                  
                             [and](x1, x2) = [2] x1 + [0]         
                                                                  
                             [!EQ](x1, x2) = [0]                  
                                                                  
                                   [S](x1) = [1] x1 + [0]         
                                                                  
                            [Cons](x1, x2) = [0]                  
                                                                  
                                       [0] = [0]                  
                                                                  
                                   [False] = [0]                  
                                                                  
                   [domatch^#](x1, x2, x3) = [0]                  
                                                                  
                        [prefix^#](x1, x2) = [0]                  
                                                                  
                     [eqNatList^#](x1, x2) = [4]                  
                                                                  
    [eqNatList[Ite]^#](x1, x2, x3, x4, x5) = [4]                  
                                                                  
          [domatch[Ite]^#](x1, x2, x3, x4) = [2] x3 + [0]         
                                                                  
                             [c_2](x1, x2) = [5] x1 + [5] x2 + [0]
                                                                  
                                     [c_3] = [0]                  
                                                                  
                                     [c_4] = [0]                  
                                                                  
                                 [c_5](x1) = [2] x1 + [0]         
                                                                  
                                     [c_6] = [1]                  
                                                                  
                                     [c_7] = [0]                  
                                                                  
                                     [c_8] = [0]                  
                                                                  
                                 [c_9](x1) = [1] x1 + [0]         
                                                                  
                                [c_10](x1) = [1] x1 + [0]         
                                                                  
                                [c_11](x1) = [2] x1 + [0]         
                                                                  
                                [c_12](x1) = [4] x1 + [0]         
  
  The order satisfies the following ordering constraints:
  
                                 [prefix(Nil(), cs)] =  [3] cs + [8]                                             
                                                     >  [4]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                        [prefix(Cons(x, xs), Nil())] =  [8]                                                      
                                                     >  [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                [prefix(Cons(x', xs'), Cons(x, xs))] =  [5]                                                      
                                                     >  [0]                                                      
                                                     =  [and(!EQ(x', x), prefix(xs', xs))]                       
                                                                                                                 
                               [and(True(), True())] =  [8]                                                      
                                                     >  [4]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                              [and(True(), False())] =  [8]                                                      
                                                     >  [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                              [and(False(), True())] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                             [and(False(), False())] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                   [!EQ(S(x), S(y))] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [!EQ(x, y)]                                              
                                                                                                                 
                                    [!EQ(S(x), 0())] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                    [!EQ(0(), S(y))] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                     [!EQ(0(), 0())] =  [0]                                                      
                                                     ?  [4]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                  [domatch^#(patcs, Cons(x, xs), n)] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),          
                                                                            patcs,                               
                                                                            Cons(x, xs),                         
                                                                            n),                                  
                                                             prefix^#(patcs, Cons(x, xs)))]                      
                                                                                                                 
                        [domatch^#(Nil(), Nil(), n)] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [c_3()]                                                  
                                                                                                                 
                  [domatch^#(Cons(x, xs), Nil(), n)] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [c_4()]                                                  
                                                                                                                 
              [prefix^#(Cons(x', xs'), Cons(x, xs))] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [c_5(prefix^#(xs', xs))]                                 
                                                                                                                 
                         [eqNatList^#(Nil(), Nil())] =  [4]                                                      
                                                     >  [1]                                                      
                                                     =  [c_6()]                                                  
                                                                                                                 
                   [eqNatList^#(Nil(), Cons(y, ys))] =  [4]                                                      
                                                     >  [0]                                                      
                                                     =  [c_7()]                                                  
                                                                                                                 
                   [eqNatList^#(Cons(x, xs), Nil())] =  [4]                                                      
                                                     >  [0]                                                      
                                                     =  [c_8()]                                                  
                                                                                                                 
             [eqNatList^#(Cons(x, xs), Cons(y, ys))] =  [4]                                                      
                                                     >= [4]                                                      
                                                     =  [c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs))]         
                                                                                                                 
            [eqNatList[Ite]^#(True(), y, ys, x, xs)] =  [4]                                                      
                                                     >= [4]                                                      
                                                     =  [c_10(eqNatList^#(xs, ys))]                              
                                                                                                                 
     [domatch[Ite]^#(True(), patcs, Cons(x, xs), n)] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))]
                                                                                                                 
    [domatch[Ite]^#(False(), patcs, Cons(x, xs), n)] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))]
                                                                                                                 

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:
  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Nil(), Nil(), n) -> c_3()
  , domatch^#(Cons(x, xs), Nil(), n) -> c_4()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs)) }
Weak DPs:
  { eqNatList^#(Nil(), Nil()) -> c_6()
  , eqNatList^#(Nil(), Cons(y, ys)) -> c_7()
  , eqNatList^#(Cons(x, xs), Nil()) -> c_8()
  , eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_10(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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.

{ eqNatList^#(Nil(), Nil()) -> c_6()
, eqNatList^#(Nil(), Cons(y, ys)) -> c_7()
, eqNatList^#(Cons(x, xs), Nil()) -> c_8() }

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

Strict DPs:
  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Nil(), Nil(), n) -> c_3()
  , domatch^#(Cons(x, xs), Nil(), n) -> c_4()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs)) }
Weak DPs:
  { eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_10(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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:
  { 2: domatch^#(Nil(), Nil(), n) -> c_3() }

Sub-proof:
----------
  The following argument positions are usable:
    Uargs(c_2) = {1, 2}, Uargs(c_5) = {1}, Uargs(c_9) = {1},
    Uargs(c_10) = {1}, Uargs(c_11) = {1}, Uargs(c_12) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
                                    [True] = [0]                  
                                                                  
                          [prefix](x1, x2) = [0]                  
                                                                  
                                     [Nil] = [2]                  
                                                                  
                             [and](x1, x2) = [0]                  
                                                                  
                             [!EQ](x1, x2) = [0]                  
                                                                  
                                   [S](x1) = [1] x1 + [0]         
                                                                  
                            [Cons](x1, x2) = [1] x1 + [1] x2 + [0]
                                                                  
                                       [0] = [0]                  
                                                                  
                                   [False] = [0]                  
                                                                  
                   [domatch^#](x1, x2, x3) = [4] x1 + [0]         
                                                                  
                        [prefix^#](x1, x2) = [0]                  
                                                                  
                     [eqNatList^#](x1, x2) = [4] x1 + [0]         
                                                                  
    [eqNatList[Ite]^#](x1, x2, x3, x4, x5) = [4] x5 + [0]         
                                                                  
          [domatch[Ite]^#](x1, x2, x3, x4) = [4] x2 + [0]         
                                                                  
                             [c_2](x1, x2) = [1] x1 + [4] x2 + [0]
                                                                  
                                     [c_3] = [0]                  
                                                                  
                                     [c_4] = [0]                  
                                                                  
                                 [c_5](x1) = [4] x1 + [0]         
                                                                  
                                     [c_6] = [0]                  
                                                                  
                                     [c_7] = [0]                  
                                                                  
                                     [c_8] = [0]                  
                                                                  
                                 [c_9](x1) = [1] x1 + [0]         
                                                                  
                                [c_10](x1) = [1] x1 + [0]         
                                                                  
                                [c_11](x1) = [1] x1 + [0]         
                                                                  
                                [c_12](x1) = [1] x1 + [0]         
  
  The order satisfies the following ordering constraints:
  
                                 [prefix(Nil(), cs)] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                        [prefix(Cons(x, xs), Nil())] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                [prefix(Cons(x', xs'), Cons(x, xs))] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [and(!EQ(x', x), prefix(xs', xs))]                       
                                                                                                                 
                               [and(True(), True())] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                              [and(True(), False())] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                              [and(False(), True())] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                             [and(False(), False())] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                   [!EQ(S(x), S(y))] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [!EQ(x, y)]                                              
                                                                                                                 
                                    [!EQ(S(x), 0())] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                    [!EQ(0(), S(y))] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                     [!EQ(0(), 0())] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                  [domatch^#(patcs, Cons(x, xs), n)] =  [4] patcs + [0]                                          
                                                     >= [4] patcs + [0]                                          
                                                     =  [c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),          
                                                                            patcs,                               
                                                                            Cons(x, xs),                         
                                                                            n),                                  
                                                             prefix^#(patcs, Cons(x, xs)))]                      
                                                                                                                 
                        [domatch^#(Nil(), Nil(), n)] =  [8]                                                      
                                                     >  [0]                                                      
                                                     =  [c_3()]                                                  
                                                                                                                 
                  [domatch^#(Cons(x, xs), Nil(), n)] =  [4] x + [4] xs + [0]                                     
                                                     >= [0]                                                      
                                                     =  [c_4()]                                                  
                                                                                                                 
              [prefix^#(Cons(x', xs'), Cons(x, xs))] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [c_5(prefix^#(xs', xs))]                                 
                                                                                                                 
             [eqNatList^#(Cons(x, xs), Cons(y, ys))] =  [4] x + [4] xs + [0]                                     
                                                     >= [4] xs + [0]                                             
                                                     =  [c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs))]         
                                                                                                                 
            [eqNatList[Ite]^#(True(), y, ys, x, xs)] =  [4] xs + [0]                                             
                                                     >= [4] xs + [0]                                             
                                                     =  [c_10(eqNatList^#(xs, ys))]                              
                                                                                                                 
     [domatch[Ite]^#(True(), patcs, Cons(x, xs), n)] =  [4] patcs + [0]                                          
                                                     >= [4] patcs + [0]                                          
                                                     =  [c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))]
                                                                                                                 
    [domatch[Ite]^#(False(), patcs, Cons(x, xs), n)] =  [4] patcs + [0]                                          
                                                     >= [4] patcs + [0]                                          
                                                     =  [c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))]
                                                                                                                 

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:
  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Cons(x, xs), Nil(), n) -> c_4()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs)) }
Weak DPs:
  { domatch^#(Nil(), Nil(), n) -> c_3()
  , eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_10(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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.

{ domatch^#(Nil(), Nil(), n) -> c_3() }

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

Strict DPs:
  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , domatch^#(Cons(x, xs), Nil(), n) -> c_4()
  , prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs)) }
Weak DPs:
  { eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_10(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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:
  { 2: domatch^#(Cons(x, xs), Nil(), n) -> c_4() }

Sub-proof:
----------
  The following argument positions are usable:
    Uargs(c_2) = {1, 2}, Uargs(c_5) = {1}, Uargs(c_9) = {1},
    Uargs(c_10) = {1}, Uargs(c_11) = {1}, Uargs(c_12) = {1}
  
  TcT has computed the following constructor-restricted matrix
  interpretation. Note that the diagonal of the component-wise maxima
  of interpretation-entries (of constructors) contains no more than 0
  non-zero entries.
  
                                    [True] = [5]                  
                                                                  
                          [prefix](x1, x2) = [5]                  
                                                                  
                                     [Nil] = [0]                  
                                                                  
                             [and](x1, x2) = [5]                  
                                                                  
                             [!EQ](x1, x2) = [0]                  
                                                                  
                                   [S](x1) = [0]                  
                                                                  
                            [Cons](x1, x2) = [3]                  
                                                                  
                                       [0] = [0]                  
                                                                  
                                   [False] = [5]                  
                                                                  
                   [domatch^#](x1, x2, x3) = [3] x1 + [6]         
                                                                  
                        [prefix^#](x1, x2) = [0]                  
                                                                  
                     [eqNatList^#](x1, x2) = [0]                  
                                                                  
    [eqNatList[Ite]^#](x1, x2, x3, x4, x5) = [0]                  
                                                                  
          [domatch[Ite]^#](x1, x2, x3, x4) = [1] x1 + [3] x2 + [1]
                                                                  
                             [c_2](x1, x2) = [1] x1 + [1] x2 + [0]
                                                                  
                                     [c_3] = [0]                  
                                                                  
                                     [c_4] = [1]                  
                                                                  
                                 [c_5](x1) = [1] x1 + [0]         
                                                                  
                                     [c_6] = [0]                  
                                                                  
                                     [c_7] = [0]                  
                                                                  
                                     [c_8] = [0]                  
                                                                  
                                 [c_9](x1) = [5] x1 + [0]         
                                                                  
                                [c_10](x1) = [4] x1 + [0]         
                                                                  
                                [c_11](x1) = [1] x1 + [0]         
                                                                  
                                [c_12](x1) = [1] x1 + [0]         
  
  The order satisfies the following ordering constraints:
  
                                 [prefix(Nil(), cs)] =  [5]                                                      
                                                     >= [5]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                        [prefix(Cons(x, xs), Nil())] =  [5]                                                      
                                                     >= [5]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                [prefix(Cons(x', xs'), Cons(x, xs))] =  [5]                                                      
                                                     >= [5]                                                      
                                                     =  [and(!EQ(x', x), prefix(xs', xs))]                       
                                                                                                                 
                               [and(True(), True())] =  [5]                                                      
                                                     >= [5]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                              [and(True(), False())] =  [5]                                                      
                                                     >= [5]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                              [and(False(), True())] =  [5]                                                      
                                                     >= [5]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                             [and(False(), False())] =  [5]                                                      
                                                     >= [5]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                   [!EQ(S(x), S(y))] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [!EQ(x, y)]                                              
                                                                                                                 
                                    [!EQ(S(x), 0())] =  [0]                                                      
                                                     ?  [5]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                    [!EQ(0(), S(y))] =  [0]                                                      
                                                     ?  [5]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                     [!EQ(0(), 0())] =  [0]                                                      
                                                     ?  [5]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                  [domatch^#(patcs, Cons(x, xs), n)] =  [3] patcs + [6]                                          
                                                     >= [3] patcs + [6]                                          
                                                     =  [c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),          
                                                                            patcs,                               
                                                                            Cons(x, xs),                         
                                                                            n),                                  
                                                             prefix^#(patcs, Cons(x, xs)))]                      
                                                                                                                 
                  [domatch^#(Cons(x, xs), Nil(), n)] =  [15]                                                     
                                                     >  [1]                                                      
                                                     =  [c_4()]                                                  
                                                                                                                 
              [prefix^#(Cons(x', xs'), Cons(x, xs))] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [c_5(prefix^#(xs', xs))]                                 
                                                                                                                 
             [eqNatList^#(Cons(x, xs), Cons(y, ys))] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs))]         
                                                                                                                 
            [eqNatList[Ite]^#(True(), y, ys, x, xs)] =  [0]                                                      
                                                     >= [0]                                                      
                                                     =  [c_10(eqNatList^#(xs, ys))]                              
                                                                                                                 
     [domatch[Ite]^#(True(), patcs, Cons(x, xs), n)] =  [3] patcs + [6]                                          
                                                     >= [3] patcs + [6]                                          
                                                     =  [c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))]
                                                                                                                 
    [domatch[Ite]^#(False(), patcs, Cons(x, xs), n)] =  [3] patcs + [6]                                          
                                                     >= [3] patcs + [6]                                          
                                                     =  [c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))]
                                                                                                                 

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:
  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs)) }
Weak DPs:
  { domatch^#(Cons(x, xs), Nil(), n) -> c_4()
  , eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_10(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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.

{ domatch^#(Cons(x, xs), Nil(), n) -> c_4() }

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

Strict DPs:
  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs)) }
Weak DPs:
  { eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_10(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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: domatch^#(patcs, Cons(x, xs), n) ->
       c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                          patcs,
                          Cons(x, xs),
                          n),
           prefix^#(patcs, Cons(x, xs)))
  , 3: eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
       c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs))
  , 4: eqNatList[Ite]^#(True(), y, ys, x, xs) ->
       c_10(eqNatList^#(xs, ys)) }

Sub-proof:
----------
  The following argument positions are usable:
    Uargs(c_2) = {1, 2}, Uargs(c_5) = {1}, Uargs(c_9) = {1},
    Uargs(c_10) = {1}, Uargs(c_11) = {1}, Uargs(c_12) = {1}
  
  TcT has computed the following constructor-based matrix
  interpretation satisfying not(EDA).
  
                                    [True] = [1]                  
                                                                  
                          [prefix](x1, x2) = [1]                  
                                                                  
                                     [Nil] = [0]                  
                                                                  
                             [and](x1, x2) = [1]                  
                                                                  
                             [!EQ](x1, x2) = [1]                  
                                                                  
                                   [S](x1) = [1] x1 + [0]         
                                                                  
                            [Cons](x1, x2) = [1] x2 + [1]         
                                                                  
                                       [0] = [0]                  
                                                                  
                                   [False] = [1]                  
                                                                  
                   [domatch^#](x1, x2, x3) = [4] x2 + [7]         
                                                                  
                        [prefix^#](x1, x2) = [1]                  
                                                                  
                     [eqNatList^#](x1, x2) = [2] x1 + [6]         
                                                                  
    [eqNatList[Ite]^#](x1, x2, x3, x4, x5) = [1] x1 + [2] x5 + [6]
                                                                  
          [domatch[Ite]^#](x1, x2, x3, x4) = [3] x1 + [4] x3 + [0]
                                                                  
                             [c_2](x1, x2) = [1] x1 + [3] x2 + [0]
                                                                  
                                     [c_3] = [0]                  
                                                                  
                                     [c_4] = [0]                  
                                                                  
                                 [c_5](x1) = [1] x1 + [0]         
                                                                  
                                     [c_6] = [0]                  
                                                                  
                                     [c_7] = [0]                  
                                                                  
                                     [c_8] = [0]                  
                                                                  
                                 [c_9](x1) = [1] x1 + [0]         
                                                                  
                                [c_10](x1) = [1] x1 + [0]         
                                                                  
                                [c_11](x1) = [1] x1 + [0]         
                                                                  
                                [c_12](x1) = [1] x1 + [0]         
  
  The order satisfies the following ordering constraints:
  
                                 [prefix(Nil(), cs)] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                        [prefix(Cons(x, xs), Nil())] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                [prefix(Cons(x', xs'), Cons(x, xs))] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [and(!EQ(x', x), prefix(xs', xs))]                       
                                                                                                                 
                               [and(True(), True())] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                              [and(True(), False())] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                              [and(False(), True())] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                             [and(False(), False())] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                   [!EQ(S(x), S(y))] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [!EQ(x, y)]                                              
                                                                                                                 
                                    [!EQ(S(x), 0())] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                    [!EQ(0(), S(y))] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [False()]                                                
                                                                                                                 
                                     [!EQ(0(), 0())] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [True()]                                                 
                                                                                                                 
                  [domatch^#(patcs, Cons(x, xs), n)] =  [4] xs + [11]                                            
                                                     >  [4] xs + [10]                                            
                                                     =  [c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),          
                                                                            patcs,                               
                                                                            Cons(x, xs),                         
                                                                            n),                                  
                                                             prefix^#(patcs, Cons(x, xs)))]                      
                                                                                                                 
              [prefix^#(Cons(x', xs'), Cons(x, xs))] =  [1]                                                      
                                                     >= [1]                                                      
                                                     =  [c_5(prefix^#(xs', xs))]                                 
                                                                                                                 
             [eqNatList^#(Cons(x, xs), Cons(y, ys))] =  [2] xs + [8]                                             
                                                     >  [2] xs + [7]                                             
                                                     =  [c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs))]         
                                                                                                                 
            [eqNatList[Ite]^#(True(), y, ys, x, xs)] =  [2] xs + [7]                                             
                                                     >  [2] xs + [6]                                             
                                                     =  [c_10(eqNatList^#(xs, ys))]                              
                                                                                                                 
     [domatch[Ite]^#(True(), patcs, Cons(x, xs), n)] =  [4] xs + [7]                                             
                                                     >= [4] xs + [7]                                             
                                                     =  [c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))]
                                                                                                                 
    [domatch[Ite]^#(False(), patcs, Cons(x, xs), n)] =  [4] xs + [7]                                             
                                                     >= [4] xs + [7]                                             
                                                     =  [c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))]
                                                                                                                 

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

:
  { 1: domatch^#(patcs, Cons(x, xs), n) ->
       c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                          patcs,
                          Cons(x, xs),
                          n),
           prefix^#(patcs, Cons(x, xs)))
  , 2: prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , 3: eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
       c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs))
  , 4: eqNatList[Ite]^#(True(), y, ys, x, xs) ->
       c_10(eqNatList^#(xs, ys))
  , 5: domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
       c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , 6: domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
       c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }

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,3,4,5,6}, 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(n^2)).

Strict DPs:
  { prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs)) }
Weak DPs:
  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
    c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs))
  , eqNatList[Ite]^#(True(), y, ys, x, xs) ->
    c_10(eqNatList^#(xs, ys))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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.

{ eqNatList^#(Cons(x, xs), Cons(y, ys)) ->
  c_9(eqNatList[Ite]^#(!EQ(x, y), y, ys, x, xs))
, eqNatList[Ite]^#(True(), y, ys, x, xs) ->
  c_10(eqNatList^#(xs, ys)) }

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

Strict DPs:
  { prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs)) }
Weak DPs:
  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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

  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }

and lower component

  { prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs)) }

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

{ domatch^#(patcs, Cons(x, xs), n) -> prefix^#(patcs, Cons(x, xs))
, domatch^#(patcs, Cons(x, xs), n) ->
  domatch[Ite]^#(prefix(patcs, Cons(x, xs)), patcs, Cons(x, xs), n)
, domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
  domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))
, domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
  domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))) }

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:
    { domatch^#(patcs, Cons(x, xs), n) ->
      c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                         patcs,
                         Cons(x, xs),
                         n),
          prefix^#(patcs, Cons(x, xs))) }
  Weak DPs:
    { domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
      c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
    , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
      c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
  Weak Trs:
    { prefix(Nil(), cs) -> True()
    , prefix(Cons(x, xs), Nil()) -> False()
    , prefix(Cons(x', xs'), Cons(x, xs)) ->
      and(!EQ(x', x), prefix(xs', xs))
    , and(True(), True()) -> True()
    , and(True(), False()) -> False()
    , and(False(), True()) -> False()
    , and(False(), False()) -> False()
    , !EQ(S(x), S(y)) -> !EQ(x, y)
    , !EQ(S(x), 0()) -> False()
    , !EQ(0(), S(y)) -> False()
    , !EQ(0(), 0()) -> True() }
  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: domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
         c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
    , 3: domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
         c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
  
  Sub-proof:
  ----------
    The following argument positions are usable:
      Uargs(c_2) = {1}, Uargs(c_11) = {1}, Uargs(c_12) = {1}
    
    TcT has computed the following constructor-based matrix
    interpretation satisfying not(EDA).
    
                                [True] = [0]         
                                                     
                      [prefix](x1, x2) = [0]         
                                                     
                                 [Nil] = [1]         
                                                     
                         [and](x1, x2) = [0]         
                                                     
                         [!EQ](x1, x2) = [0]         
                                                     
                               [S](x1) = [1] x1 + [0]
                                                     
                        [Cons](x1, x2) = [1] x2 + [1]
                                                     
                                   [0] = [0]         
                                                     
                               [False] = [0]         
                                                     
               [domatch^#](x1, x2, x3) = [1] x2 + [0]
                                                     
                    [prefix^#](x1, x2) = [1] x2 + [0]
                                                     
      [domatch[Ite]^#](x1, x2, x3, x4) = [1] x3 + [0]
                                                     
                         [c_2](x1, x2) = [1] x1 + [0]
                                                     
                            [c_11](x1) = [1] x1 + [0]
                                                     
                            [c_12](x1) = [1] x1 + [0]
    
    The order satisfies the following ordering constraints:
    
                                   [prefix(Nil(), cs)] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [True()]                                                 
                                                                                                                   
                          [prefix(Cons(x, xs), Nil())] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [False()]                                                
                                                                                                                   
                  [prefix(Cons(x', xs'), Cons(x, xs))] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [and(!EQ(x', x), prefix(xs', xs))]                       
                                                                                                                   
                                 [and(True(), True())] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [True()]                                                 
                                                                                                                   
                                [and(True(), False())] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [False()]                                                
                                                                                                                   
                                [and(False(), True())] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [False()]                                                
                                                                                                                   
                               [and(False(), False())] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [False()]                                                
                                                                                                                   
                                     [!EQ(S(x), S(y))] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [!EQ(x, y)]                                              
                                                                                                                   
                                      [!EQ(S(x), 0())] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [False()]                                                
                                                                                                                   
                                      [!EQ(0(), S(y))] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [False()]                                                
                                                                                                                   
                                       [!EQ(0(), 0())] =  [0]                                                      
                                                       >= [0]                                                      
                                                       =  [True()]                                                 
                                                                                                                   
                    [domatch^#(patcs, Cons(x, xs), n)] =  [1] xs + [1]                                             
                                                       >= [1] xs + [1]                                             
                                                       =  [c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),          
                                                                              patcs,                               
                                                                              Cons(x, xs),                         
                                                                              n),                                  
                                                               prefix^#(patcs, Cons(x, xs)))]                      
                                                                                                                   
       [domatch[Ite]^#(True(), patcs, Cons(x, xs), n)] =  [1] xs + [1]                                             
                                                       >  [1] xs + [0]                                             
                                                       =  [c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))]
                                                                                                                   
      [domatch[Ite]^#(False(), patcs, Cons(x, xs), n)] =  [1] xs + [1]                                             
                                                       >  [1] xs + [0]                                             
                                                       =  [c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))]
                                                                                                                   
  
  We return to the main proof. Consider the set of all dependency
  pairs
  
  :
    { 1: domatch^#(patcs, Cons(x, xs), n) ->
         c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                            patcs,
                            Cons(x, xs),
                            n),
             prefix^#(patcs, Cons(x, xs)))
    , 2: domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
         c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
    , 3: domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
         c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
  
  Processor 'matrix interpretation of dimension 1' induces the
  complexity certificate YES(?,O(n^1)) on application of dependency
  pairs {2,3}. These cover all (indirect) predecessors of dependency
  pairs {1,2,3}, 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:
    { domatch^#(patcs, Cons(x, xs), n) ->
      c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                         patcs,
                         Cons(x, xs),
                         n),
          prefix^#(patcs, Cons(x, xs)))
    , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
      c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
    , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
      c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
  Weak Trs:
    { prefix(Nil(), cs) -> True()
    , prefix(Cons(x, xs), Nil()) -> False()
    , prefix(Cons(x', xs'), Cons(x, xs)) ->
      and(!EQ(x', x), prefix(xs', xs))
    , and(True(), True()) -> True()
    , and(True(), False()) -> False()
    , and(False(), True()) -> False()
    , and(False(), False()) -> False()
    , !EQ(S(x), S(y)) -> !EQ(x, y)
    , !EQ(S(x), 0()) -> False()
    , !EQ(0(), S(y)) -> False()
    , !EQ(0(), 0()) -> True() }
  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.
  
  { domatch^#(patcs, Cons(x, xs), n) ->
    c_2(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),
                       patcs,
                       Cons(x, xs),
                       n),
        prefix^#(patcs, Cons(x, xs)))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    c_11(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    c_12(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))) }
  
  We are left with following problem, upon which TcT provides the
  certificate YES(O(1),O(1)).
  
  Weak Trs:
    { prefix(Nil(), cs) -> True()
    , prefix(Cons(x, xs), Nil()) -> False()
    , prefix(Cons(x', xs'), Cons(x, xs)) ->
      and(!EQ(x', x), prefix(xs', xs))
    , and(True(), True()) -> True()
    , and(True(), False()) -> False()
    , and(False(), True()) -> False()
    , and(False(), False()) -> False()
    , !EQ(S(x), S(y)) -> !EQ(x, y)
    , !EQ(S(x), 0()) -> False()
    , !EQ(0(), S(y)) -> False()
    , !EQ(0(), 0()) -> True() }
  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:
  { prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs)) }
Weak DPs:
  { domatch^#(patcs, Cons(x, xs), n) -> prefix^#(patcs, Cons(x, xs))
  , domatch^#(patcs, Cons(x, xs), n) ->
    domatch[Ite]^#(prefix(patcs, Cons(x, xs)), patcs, Cons(x, xs), n)
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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: prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , 2: domatch^#(patcs, Cons(x, xs), n) ->
       prefix^#(patcs, Cons(x, xs)) }

Sub-proof:
----------
  The input was oriented with the instance of 'Small Polynomial Path
  Order (PS,1-bounded)' as induced by the safe mapping
  
   safe(True) = {}, safe(prefix) = {1, 2}, safe(Nil) = {},
   safe(and) = {}, safe(!EQ) = {1, 2}, safe(S) = {1},
   safe(Cons) = {1, 2}, safe(0) = {}, safe(False) = {},
   safe(domatch^#) = {3}, safe(prefix^#) = {2},
   safe(domatch[Ite]^#) = {1}, safe(c_5) = {}
  
  and precedence
  
   prefix > and, domatch^# > prefix^#, domatch^# ~ domatch[Ite]^# .
  
  Following symbols are considered recursive:
  
   {prefix^#}
  
  The recursion depth is 1.
  
  Further, following argument filtering is employed:
  
   pi(True) = [], pi(prefix) = [2], pi(Nil) = [], pi(and) = [2],
   pi(!EQ) = [1, 2], pi(S) = [], pi(Cons) = [2], pi(0) = [],
   pi(False) = [], pi(domatch^#) = [1], pi(prefix^#) = [1],
   pi(domatch[Ite]^#) = [2], pi(c_5) = [1]
  
  Usable defined function symbols are a subset of:
  
   {domatch^#, prefix^#, domatch[Ite]^#}
  
  For your convenience, here are the satisfied ordering constraints:
  
                  pi(domatch^#(patcs, Cons(x, xs), n)) =  domatch^#(patcs;)                                    
                                                       >  prefix^#(patcs;)                                     
                                                       =  pi(prefix^#(patcs, Cons(x, xs)))                     
                                                                                                               
                  pi(domatch^#(patcs, Cons(x, xs), n)) =  domatch^#(patcs;)                                    
                                                       >= domatch[Ite]^#(patcs;)                               
                                                       =  pi(domatch[Ite]^#(prefix(patcs, Cons(x, xs)),        
                                                                            patcs,                             
                                                                            Cons(x, xs),                       
                                                                            n))                                
                                                                                                               
              pi(prefix^#(Cons(x', xs'), Cons(x, xs))) =  prefix^#(Cons(; xs');)                               
                                                       >  c_5(prefix^#(xs';);)                                 
                                                       =  pi(c_5(prefix^#(xs', xs)))                           
                                                                                                               
     pi(domatch[Ite]^#(True(), patcs, Cons(x, xs), n)) =  domatch[Ite]^#(patcs;)                               
                                                       >= domatch^#(patcs;)                                    
                                                       =  pi(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
                                                                                                               
    pi(domatch[Ite]^#(False(), patcs, Cons(x, xs), n)) =  domatch[Ite]^#(patcs;)                               
                                                       >= domatch^#(patcs;)                                    
                                                       =  pi(domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))))
                                                                                                               

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:
  { domatch^#(patcs, Cons(x, xs), n) -> prefix^#(patcs, Cons(x, xs))
  , domatch^#(patcs, Cons(x, xs), n) ->
    domatch[Ite]^#(prefix(patcs, Cons(x, xs)), patcs, Cons(x, xs), n)
  , prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
  , domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
    domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))
  , domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
    domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))) }
Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
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.

{ domatch^#(patcs, Cons(x, xs), n) -> prefix^#(patcs, Cons(x, xs))
, domatch^#(patcs, Cons(x, xs), n) ->
  domatch[Ite]^#(prefix(patcs, Cons(x, xs)), patcs, Cons(x, xs), n)
, prefix^#(Cons(x', xs'), Cons(x, xs)) -> c_5(prefix^#(xs', xs))
, domatch[Ite]^#(True(), patcs, Cons(x, xs), n) ->
  domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil())))
, domatch[Ite]^#(False(), patcs, Cons(x, xs), n) ->
  domatch^#(patcs, xs, Cons(n, Cons(Nil(), Nil()))) }

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

Weak Trs:
  { prefix(Nil(), cs) -> True()
  , prefix(Cons(x, xs), Nil()) -> False()
  , prefix(Cons(x', xs'), Cons(x, xs)) ->
    and(!EQ(x', x), prefix(xs', xs))
  , and(True(), True()) -> True()
  , and(True(), False()) -> False()
  , and(False(), True()) -> False()
  , and(False(), False()) -> False()
  , !EQ(S(x), S(y)) -> !EQ(x, y)
  , !EQ(S(x), 0()) -> False()
  , !EQ(0(), S(y)) -> False()
  , !EQ(0(), 0()) -> True() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(1))

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

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

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

Empty rules are trivially bounded

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