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

Strict Trs:
  { perfectp(0()) -> false()
  , perfectp(s(x)) -> f(x, s(0()), s(x), s(x))
  , f(0(), y, 0(), u) -> true()
  , f(0(), y, s(z), u) -> false()
  , f(s(x), 0(), z, u) -> f(x, u, minus(z, s(x)), u)
  , f(s(x), s(y), z, u) ->
    if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We add the following weak dependency pairs:

Strict DPs:
  { perfectp^#(0()) -> c_1()
  , perfectp^#(s(x)) -> c_2(f^#(x, s(0()), s(x), s(x)))
  , f^#(0(), y, 0(), u) -> c_3()
  , f^#(0(), y, s(z), u) -> c_4()
  , f^#(s(x), 0(), z, u) -> c_5(f^#(x, u, minus(z, s(x)), u))
  , f^#(s(x), s(y), z, u) ->
    c_6(f^#(s(x), minus(y, x), z, u), f^#(x, u, z, u)) }

and mark the set of starting terms.

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

Strict DPs:
  { perfectp^#(0()) -> c_1()
  , perfectp^#(s(x)) -> c_2(f^#(x, s(0()), s(x), s(x)))
  , f^#(0(), y, 0(), u) -> c_3()
  , f^#(0(), y, s(z), u) -> c_4()
  , f^#(s(x), 0(), z, u) -> c_5(f^#(x, u, minus(z, s(x)), u))
  , f^#(s(x), s(y), z, u) ->
    c_6(f^#(s(x), minus(y, x), z, u), f^#(x, u, z, u)) }
Strict Trs:
  { perfectp(0()) -> false()
  , perfectp(s(x)) -> f(x, s(0()), s(x), s(x))
  , f(0(), y, 0(), u) -> true()
  , f(0(), y, s(z), u) -> false()
  , f(s(x), 0(), z, u) -> f(x, u, minus(z, s(x)), u)
  , f(s(x), s(y), z, u) ->
    if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^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(n^1)).

Strict DPs:
  { perfectp^#(0()) -> c_1()
  , perfectp^#(s(x)) -> c_2(f^#(x, s(0()), s(x), s(x)))
  , f^#(0(), y, 0(), u) -> c_3()
  , f^#(0(), y, s(z), u) -> c_4()
  , f^#(s(x), 0(), z, u) -> c_5(f^#(x, u, minus(z, s(x)), u))
  , f^#(s(x), s(y), z, u) ->
    c_6(f^#(s(x), minus(y, x), z, u), f^#(x, u, z, u)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

The weightgap principle applies (using the following constant
growth matrix-interpretation)

The following argument positions are usable:
  Uargs(c_2) = {1}, Uargs(c_5) = {1}, Uargs(c_6) = {2}

TcT has computed the following constructor-restricted matrix
interpretation.

                    [0] = [0]           
                          [0]           
                                        
                [s](x1) = [0]           
                          [0]           
                                        
        [minus](x1, x2) = [0]           
                          [0]           
                                        
       [perfectp^#](x1) = [0]           
                          [0]           
                                        
                  [c_1] = [0]           
                          [0]           
                                        
              [c_2](x1) = [1 0] x1 + [0]
                          [0 1]      [0]
                                        
  [f^#](x1, x2, x3, x4) = [1]           
                          [0]           
                                        
                  [c_3] = [0]           
                          [0]           
                                        
                  [c_4] = [0]           
                          [0]           
                                        
              [c_5](x1) = [1 0] x1 + [0]
                          [0 1]      [2]
                                        
          [c_6](x1, x2) = [1 0] x2 + [0]
                          [0 1]      [0]

The order satisfies the following ordering constraints:

        [perfectp^#(0())] =  [0]                                                 
                             [0]                                                 
                          >= [0]                                                 
                             [0]                                                 
                          =  [c_1()]                                             
                                                                                 
       [perfectp^#(s(x))] =  [0]                                                 
                             [0]                                                 
                          ?  [1]                                                 
                             [0]                                                 
                          =  [c_2(f^#(x, s(0()), s(x), s(x)))]                   
                                                                                 
    [f^#(0(), y, 0(), u)] =  [1]                                                 
                             [0]                                                 
                          >  [0]                                                 
                             [0]                                                 
                          =  [c_3()]                                             
                                                                                 
   [f^#(0(), y, s(z), u)] =  [1]                                                 
                             [0]                                                 
                          >  [0]                                                 
                             [0]                                                 
                          =  [c_4()]                                             
                                                                                 
   [f^#(s(x), 0(), z, u)] =  [1]                                                 
                             [0]                                                 
                          ?  [1]                                                 
                             [2]                                                 
                          =  [c_5(f^#(x, u, minus(z, s(x)), u))]                 
                                                                                 
  [f^#(s(x), s(y), z, u)] =  [1]                                                 
                             [0]                                                 
                          >= [1]                                                 
                             [0]                                                 
                          =  [c_6(f^#(s(x), minus(y, x), z, u), f^#(x, u, z, u))]
                                                                                 

Further, it can be verified that all rules not oriented are covered by the weightgap condition.

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

Strict DPs:
  { perfectp^#(0()) -> c_1()
  , perfectp^#(s(x)) -> c_2(f^#(x, s(0()), s(x), s(x)))
  , f^#(s(x), 0(), z, u) -> c_5(f^#(x, u, minus(z, s(x)), u))
  , f^#(s(x), s(y), z, u) ->
    c_6(f^#(s(x), minus(y, x), z, u), f^#(x, u, z, u)) }
Weak DPs:
  { f^#(0(), y, 0(), u) -> c_3()
  , f^#(0(), y, s(z), u) -> c_4() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

We estimate the number of application of {1} by applications of
Pre({1}) = {}. Here rules are labeled as follows:

  DPs:
    { 1: perfectp^#(0()) -> c_1()
    , 2: perfectp^#(s(x)) -> c_2(f^#(x, s(0()), s(x), s(x)))
    , 3: f^#(s(x), 0(), z, u) -> c_5(f^#(x, u, minus(z, s(x)), u))
    , 4: f^#(s(x), s(y), z, u) ->
         c_6(f^#(s(x), minus(y, x), z, u), f^#(x, u, z, u))
    , 5: f^#(0(), y, 0(), u) -> c_3()
    , 6: f^#(0(), y, s(z), u) -> c_4() }

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

Strict DPs:
  { perfectp^#(s(x)) -> c_2(f^#(x, s(0()), s(x), s(x)))
  , f^#(s(x), 0(), z, u) -> c_5(f^#(x, u, minus(z, s(x)), u))
  , f^#(s(x), s(y), z, u) ->
    c_6(f^#(s(x), minus(y, x), z, u), f^#(x, u, z, u)) }
Weak DPs:
  { perfectp^#(0()) -> c_1()
  , f^#(0(), y, 0(), u) -> c_3()
  , f^#(0(), y, s(z), u) -> c_4() }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

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

{ perfectp^#(0()) -> c_1()
, f^#(0(), y, 0(), u) -> c_3()
, f^#(0(), y, s(z), u) -> c_4() }

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

Strict DPs:
  { perfectp^#(s(x)) -> c_2(f^#(x, s(0()), s(x), s(x)))
  , f^#(s(x), 0(), z, u) -> c_5(f^#(x, u, minus(z, s(x)), u))
  , f^#(s(x), s(y), z, u) ->
    c_6(f^#(s(x), minus(y, x), z, u), f^#(x, u, z, u)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

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

  { f^#(s(x), s(y), z, u) ->
    c_6(f^#(s(x), minus(y, x), z, u), f^#(x, u, z, u)) }

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

Strict DPs:
  { perfectp^#(s(x)) -> c_1(f^#(x, s(0()), s(x), s(x)))
  , f^#(s(x), 0(), z, u) -> c_2(f^#(x, u, minus(z, s(x)), u))
  , f^#(s(x), s(y), z, u) -> c_3(f^#(x, u, z, u)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(O(1),O(n^1))

Consider the dependency graph

  1: perfectp^#(s(x)) -> c_1(f^#(x, s(0()), s(x), s(x)))
     -->_1 f^#(s(x), s(y), z, u) -> c_3(f^#(x, u, z, u)) :3
  
  2: f^#(s(x), 0(), z, u) -> c_2(f^#(x, u, minus(z, s(x)), u))
     -->_1 f^#(s(x), s(y), z, u) -> c_3(f^#(x, u, z, u)) :3
     -->_1 f^#(s(x), 0(), z, u) -> c_2(f^#(x, u, minus(z, s(x)), u)) :2
  
  3: f^#(s(x), s(y), z, u) -> c_3(f^#(x, u, z, u))
     -->_1 f^#(s(x), s(y), z, u) -> c_3(f^#(x, u, z, u)) :3
     -->_1 f^#(s(x), 0(), z, u) -> c_2(f^#(x, u, minus(z, s(x)), u)) :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).

  { perfectp^#(s(x)) -> c_1(f^#(x, s(0()), s(x), s(x))) }


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

Strict DPs:
  { f^#(s(x), 0(), z, u) -> c_2(f^#(x, u, minus(z, s(x)), u))
  , f^#(s(x), s(y), z, u) -> c_3(f^#(x, u, z, u)) }
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: f^#(s(x), 0(), z, u) -> c_2(f^#(x, u, minus(z, s(x)), u))
  , 2: f^#(s(x), s(y), z, u) -> c_3(f^#(x, u, z, u)) }

Sub-proof:
----------
  The input was oriented with the instance of 'Small Polynomial Path
  Order (PS,1-bounded)' as induced by the safe mapping
  
   safe(0) = {}, safe(s) = {1}, safe(minus) = {1, 2},
   safe(f^#) = {2, 3}, safe(c_2) = {}, safe(c_3) = {}
  
  and precedence
  
   empty .
  
  Following symbols are considered recursive:
  
   {f^#}
  
  The recursion depth is 1.
  
  Further, following argument filtering is employed:
  
   pi(0) = [], pi(s) = [1], pi(minus) = 2, pi(f^#) = [1, 2, 3, 4],
   pi(c_2) = [1], pi(c_3) = [1]
  
  Usable defined function symbols are a subset of:
  
   {f^#}
  
  For your convenience, here are the satisfied ordering constraints:
  
     pi(f^#(s(x), 0(), z, u)) = f^#(s(; x),  u; 0(),  z)             
                              > c_2(f^#(x,  u; u,  s(; x));)         
                              = pi(c_2(f^#(x, u, minus(z, s(x)), u)))
                                                                     
    pi(f^#(s(x), s(y), z, u)) = f^#(s(; x),  u; s(; y),  z)          
                              > c_3(f^#(x,  u; u,  z);)              
                              = pi(c_3(f^#(x, u, z, u)))             
                                                                     

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:
  { f^#(s(x), 0(), z, u) -> c_2(f^#(x, u, minus(z, s(x)), u))
  , f^#(s(x), s(y), z, u) -> c_3(f^#(x, u, z, u)) }
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.

{ f^#(s(x), 0(), z, u) -> c_2(f^#(x, u, minus(z, s(x)), u))
, f^#(s(x), s(y), z, u) -> c_3(f^#(x, u, z, u)) }

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^1))