(0) Obligation:

The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

pred(s(x)) → x
minus(x, 0) → x
minus(x, s(y)) → pred(minus(x, y))
quot(0, s(y)) → 0
quot(s(x), s(y)) → s(quot(minus(x, y), s(y)))
log(s(0)) → 0
log(s(s(x))) → s(log(s(quot(x, s(s(0))))))

Rewrite Strategy: FULL

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

Converted rc-obligation to irc-obligation.

The duplicating contexts are:
quot(s(x), s([]))

The defined contexts are:
log(s([]))
quot([], s(x1))
pred([])
minus([], x1)
quot([], s(s(0)))

As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc.

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

pred(s(x)) → x
minus(x, 0) → x
minus(x, s(y)) → pred(minus(x, y))
quot(0, s(y)) → 0
quot(s(x), s(y)) → s(quot(minus(x, y), s(y)))
log(s(0)) → 0
log(s(s(x))) → s(log(s(quot(x, s(s(0))))))

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

pred(s(z0)) → z0
minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
log(s(0)) → 0
log(s(s(z0))) → s(log(s(quot(z0, s(s(0))))))
Tuples:

PRED(s(z0)) → c
MINUS(z0, 0) → c1
MINUS(z0, s(z1)) → c2(PRED(minus(z0, z1)), MINUS(z0, z1))
QUOT(0, s(z0)) → c3
QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(0)) → c5
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
S tuples:

PRED(s(z0)) → c
MINUS(z0, 0) → c1
MINUS(z0, s(z1)) → c2(PRED(minus(z0, z1)), MINUS(z0, z1))
QUOT(0, s(z0)) → c3
QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(0)) → c5
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
K tuples:none
Defined Rule Symbols:

pred, minus, quot, log

Defined Pair Symbols:

PRED, MINUS, QUOT, LOG

Compound Symbols:

c, c1, c2, c3, c4, c5, c6

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

Removed 4 trailing nodes:

MINUS(z0, 0) → c1
PRED(s(z0)) → c
QUOT(0, s(z0)) → c3
LOG(s(0)) → c5

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

pred(s(z0)) → z0
minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
log(s(0)) → 0
log(s(s(z0))) → s(log(s(quot(z0, s(s(0))))))
Tuples:

MINUS(z0, s(z1)) → c2(PRED(minus(z0, z1)), MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
S tuples:

MINUS(z0, s(z1)) → c2(PRED(minus(z0, z1)), MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
K tuples:none
Defined Rule Symbols:

pred, minus, quot, log

Defined Pair Symbols:

MINUS, QUOT, LOG

Compound Symbols:

c2, c4, c6

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

Removed 1 trailing tuple parts

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

pred(s(z0)) → z0
minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
log(s(0)) → 0
log(s(s(z0))) → s(log(s(quot(z0, s(s(0))))))
Tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
S tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
K tuples:none
Defined Rule Symbols:

pred, minus, quot, log

Defined Pair Symbols:

QUOT, LOG, MINUS

Compound Symbols:

c4, c6, c2

(9) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

log(s(0)) → 0
log(s(s(z0))) → s(log(s(quot(z0, s(s(0))))))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
pred(s(z0)) → z0
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
Tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
S tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
K tuples:none
Defined Rule Symbols:

minus, pred, quot

Defined Pair Symbols:

QUOT, LOG, MINUS

Compound Symbols:

c4, c6, c2

(11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

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

LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
We considered the (Usable) Rules:

quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
minus(z0, s(z1)) → pred(minus(z0, z1))
minus(z0, 0) → z0
quot(0, s(z0)) → 0
pred(s(z0)) → z0
And the Tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(LOG(x1)) = x1   
POL(MINUS(x1, x2)) = 0   
POL(QUOT(x1, x2)) = 0   
POL(c2(x1)) = x1   
POL(c4(x1, x2)) = x1 + x2   
POL(c6(x1, x2)) = x1 + x2   
POL(minus(x1, x2)) = x1   
POL(pred(x1)) = x1   
POL(quot(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
pred(s(z0)) → z0
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
Tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
S tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
K tuples:

LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
Defined Rule Symbols:

minus, pred, quot

Defined Pair Symbols:

QUOT, LOG, MINUS

Compound Symbols:

c4, c6, c2

(13) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

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

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
We considered the (Usable) Rules:

quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
minus(z0, s(z1)) → pred(minus(z0, z1))
minus(z0, 0) → z0
quot(0, s(z0)) → 0
pred(s(z0)) → z0
And the Tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(LOG(x1)) = x12   
POL(MINUS(x1, x2)) = 0   
POL(QUOT(x1, x2)) = [2]x1   
POL(c2(x1)) = x1   
POL(c4(x1, x2)) = x1 + x2   
POL(c6(x1, x2)) = x1 + x2   
POL(minus(x1, x2)) = x1   
POL(pred(x1)) = x1   
POL(quot(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
pred(s(z0)) → z0
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
Tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
S tuples:

MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
K tuples:

LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
Defined Rule Symbols:

minus, pred, quot

Defined Pair Symbols:

QUOT, LOG, MINUS

Compound Symbols:

c4, c6, c2

(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

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

MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
We considered the (Usable) Rules:

quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
minus(z0, s(z1)) → pred(minus(z0, z1))
minus(z0, 0) → z0
quot(0, s(z0)) → 0
pred(s(z0)) → z0
And the Tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(LOG(x1)) = x12   
POL(MINUS(x1, x2)) = [1] + x2   
POL(QUOT(x1, x2)) = x1·x2   
POL(c2(x1)) = x1   
POL(c4(x1, x2)) = x1 + x2   
POL(c6(x1, x2)) = x1 + x2   
POL(minus(x1, x2)) = x1   
POL(pred(x1)) = x1   
POL(quot(x1, x2)) = x1   
POL(s(x1)) = [2] + x1   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(z0, s(z1)) → pred(minus(z0, z1))
pred(s(z0)) → z0
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
Tuples:

QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
S tuples:none
K tuples:

LOG(s(s(z0))) → c6(LOG(s(quot(z0, s(s(0))))), QUOT(z0, s(s(0))))
QUOT(s(z0), s(z1)) → c4(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
MINUS(z0, s(z1)) → c2(MINUS(z0, z1))
Defined Rule Symbols:

minus, pred, quot

Defined Pair Symbols:

QUOT, LOG, MINUS

Compound Symbols:

c4, c6, c2

(17) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(18) BOUNDS(1, 1)