(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

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

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

perfectp(0) → false
perfectp(s(z0)) → f(z0, s(0), s(z0), s(z0))
f(0, z0, 0, z1) → true
f(0, z0, s(z1), z2) → false
f(s(z0), 0, z1, z2) → f(z0, z2, minus(z1, s(z0)), z2)
f(s(z0), s(z1), z2, z3) → if(le(z0, z1), f(s(z0), minus(z1, z0), z2, z3), f(z0, z3, z2, z3))
Tuples:

PERFECTP(s(z0)) → c1(F(z0, s(0), s(z0), s(z0)))
F(s(z0), 0, z1, z2) → c4(F(z0, z2, minus(z1, s(z0)), z2))
F(s(z0), s(z1), z2, z3) → c5(F(s(z0), minus(z1, z0), z2, z3), F(z0, z3, z2, z3))
S tuples:

PERFECTP(s(z0)) → c1(F(z0, s(0), s(z0), s(z0)))
F(s(z0), 0, z1, z2) → c4(F(z0, z2, minus(z1, s(z0)), z2))
F(s(z0), s(z1), z2, z3) → c5(F(s(z0), minus(z1, z0), z2, z3), F(z0, z3, z2, z3))
K tuples:none
Defined Rule Symbols:

perfectp, f

Defined Pair Symbols:

PERFECTP, F

Compound Symbols:

c1, c4, c5

(3) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

PERFECTP(s(z0)) → c1(F(z0, s(0), s(z0), s(z0)))

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

perfectp(0) → false
perfectp(s(z0)) → f(z0, s(0), s(z0), s(z0))
f(0, z0, 0, z1) → true
f(0, z0, s(z1), z2) → false
f(s(z0), 0, z1, z2) → f(z0, z2, minus(z1, s(z0)), z2)
f(s(z0), s(z1), z2, z3) → if(le(z0, z1), f(s(z0), minus(z1, z0), z2, z3), f(z0, z3, z2, z3))
Tuples:

F(s(z0), 0, z1, z2) → c4(F(z0, z2, minus(z1, s(z0)), z2))
F(s(z0), s(z1), z2, z3) → c5(F(s(z0), minus(z1, z0), z2, z3), F(z0, z3, z2, z3))
S tuples:

F(s(z0), 0, z1, z2) → c4(F(z0, z2, minus(z1, s(z0)), z2))
F(s(z0), s(z1), z2, z3) → c5(F(s(z0), minus(z1, z0), z2, z3), F(z0, z3, z2, z3))
K tuples:none
Defined Rule Symbols:

perfectp, f

Defined Pair Symbols:

F

Compound Symbols:

c4, c5

(5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

perfectp(0) → false
perfectp(s(z0)) → f(z0, s(0), s(z0), s(z0))
f(0, z0, 0, z1) → true
f(0, z0, s(z1), z2) → false
f(s(z0), 0, z1, z2) → f(z0, z2, minus(z1, s(z0)), z2)
f(s(z0), s(z1), z2, z3) → if(le(z0, z1), f(s(z0), minus(z1, z0), z2, z3), f(z0, z3, z2, z3))
Tuples:

F(s(z0), 0, z1, z2) → c4(F(z0, z2, minus(z1, s(z0)), z2))
F(s(z0), s(z1), z2, z3) → c5(F(z0, z3, z2, z3))
S tuples:

F(s(z0), 0, z1, z2) → c4(F(z0, z2, minus(z1, s(z0)), z2))
F(s(z0), s(z1), z2, z3) → c5(F(z0, z3, z2, z3))
K tuples:none
Defined Rule Symbols:

perfectp, f

Defined Pair Symbols:

F

Compound Symbols:

c4, c5

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

F(s(z0), 0, z1, z2) → c4(F(z0, z2, minus(z1, s(z0)), z2))
F(s(z0), s(z1), z2, z3) → c5(F(z0, z3, z2, z3))
We considered the (Usable) Rules:none
And the Tuples:

F(s(z0), 0, z1, z2) → c4(F(z0, z2, minus(z1, s(z0)), z2))
F(s(z0), s(z1), z2, z3) → c5(F(z0, z3, z2, z3))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(F(x1, x2, x3, x4)) = [2]x1 + [3]x3   
POL(c4(x1)) = x1   
POL(c5(x1)) = x1   
POL(minus(x1, x2)) = [1]   
POL(s(x1)) = [2] + x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

perfectp(0) → false
perfectp(s(z0)) → f(z0, s(0), s(z0), s(z0))
f(0, z0, 0, z1) → true
f(0, z0, s(z1), z2) → false
f(s(z0), 0, z1, z2) → f(z0, z2, minus(z1, s(z0)), z2)
f(s(z0), s(z1), z2, z3) → if(le(z0, z1), f(s(z0), minus(z1, z0), z2, z3), f(z0, z3, z2, z3))
Tuples:

F(s(z0), 0, z1, z2) → c4(F(z0, z2, minus(z1, s(z0)), z2))
F(s(z0), s(z1), z2, z3) → c5(F(z0, z3, z2, z3))
S tuples:none
K tuples:

F(s(z0), 0, z1, z2) → c4(F(z0, z2, minus(z1, s(z0)), z2))
F(s(z0), s(z1), z2, z3) → c5(F(z0, z3, z2, z3))
Defined Rule Symbols:

perfectp, f

Defined Pair Symbols:

F

Compound Symbols:

c4, c5

(9) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(10) BOUNDS(O(1), O(1))