(0) Obligation:

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


The TRS R consists of the following rules:

ordered(Cons(x', Cons(x, xs))) → ordered[Ite](<(x', x), Cons(x', Cons(x, xs)))
ordered(Cons(x, Nil)) → True
ordered(Nil) → True
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs) → ordered(xs)

The (relative) TRS S consists of the following rules:

<(S(x), S(y)) → <(x, y)
<(0, S(y)) → True
<(x, 0) → False
ordered[Ite](True, Cons(x', Cons(x, xs))) → ordered(xs)
ordered[Ite](False, xs) → False

Rewrite Strategy: INNERMOST

(1) RelTrsToTrsProof (UPPER BOUND(ID) transformation)

transformed relative TRS to TRS

(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:

ordered(Cons(x', Cons(x, xs))) → ordered[Ite](<(x', x), Cons(x', Cons(x, xs)))
ordered(Cons(x, Nil)) → True
ordered(Nil) → True
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs) → ordered(xs)
<(S(x), S(y)) → <(x, y)
<(0, S(y)) → True
<(x, 0) → False
ordered[Ite](True, Cons(x', Cons(x, xs))) → ordered(xs)
ordered[Ite](False, xs) → False

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

ordered(Cons(z0, Cons(z1, z2))) → ordered[Ite](<(z0, z1), Cons(z0, Cons(z1, z2)))
ordered(Cons(z0, Nil)) → True
ordered(Nil) → True
notEmpty(Cons(z0, z1)) → True
notEmpty(Nil) → False
goal(z0) → ordered(z0)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
ordered[Ite](True, Cons(z0, Cons(z1, z2))) → ordered(z2)
ordered[Ite](False, z0) → False
Tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
ORDERED(Cons(z0, Nil)) → c1
ORDERED(Nil) → c2
NOTEMPTY(Cons(z0, z1)) → c3
NOTEMPTY(Nil) → c4
GOAL(z0) → c5(ORDERED(z0))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
<'(0, S(z0)) → c7
<'(z0, 0) → c8
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
ORDERED[ITE](False, z0) → c10
S tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
ORDERED(Cons(z0, Nil)) → c1
ORDERED(Nil) → c2
NOTEMPTY(Cons(z0, z1)) → c3
NOTEMPTY(Nil) → c4
GOAL(z0) → c5(ORDERED(z0))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
<'(0, S(z0)) → c7
<'(z0, 0) → c8
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
ORDERED[ITE](False, z0) → c10
K tuples:none
Defined Rule Symbols:

ordered, notEmpty, goal, <, ordered[Ite]

Defined Pair Symbols:

ORDERED, NOTEMPTY, GOAL, <', ORDERED[ITE]

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10

(5) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

GOAL(z0) → c5(ORDERED(z0))
Removed 7 trailing nodes:

NOTEMPTY(Cons(z0, z1)) → c3
<'(0, S(z0)) → c7
NOTEMPTY(Nil) → c4
ORDERED(Nil) → c2
ORDERED(Cons(z0, Nil)) → c1
ORDERED[ITE](False, z0) → c10
<'(z0, 0) → c8

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

ordered(Cons(z0, Cons(z1, z2))) → ordered[Ite](<(z0, z1), Cons(z0, Cons(z1, z2)))
ordered(Cons(z0, Nil)) → True
ordered(Nil) → True
notEmpty(Cons(z0, z1)) → True
notEmpty(Nil) → False
goal(z0) → ordered(z0)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
ordered[Ite](True, Cons(z0, Cons(z1, z2))) → ordered(z2)
ordered[Ite](False, z0) → False
Tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
S tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
K tuples:none
Defined Rule Symbols:

ordered, notEmpty, goal, <, ordered[Ite]

Defined Pair Symbols:

ORDERED, <', ORDERED[ITE]

Compound Symbols:

c, c6, c9

(7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

ordered(Cons(z0, Cons(z1, z2))) → ordered[Ite](<(z0, z1), Cons(z0, Cons(z1, z2)))
ordered(Cons(z0, Nil)) → True
ordered(Nil) → True
notEmpty(Cons(z0, z1)) → True
notEmpty(Nil) → False
goal(z0) → ordered(z0)
ordered[Ite](True, Cons(z0, Cons(z1, z2))) → ordered(z2)
ordered[Ite](False, z0) → False

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
Tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
S tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
K tuples:none
Defined Rule Symbols:

<

Defined Pair Symbols:

ORDERED, <', ORDERED[ITE]

Compound Symbols:

c, c6, c9

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

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

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
We considered the (Usable) Rules:none
And the Tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [3]   
POL(<(x1, x2)) = [3] + [2]x1 + [3]x2   
POL(<'(x1, x2)) = 0   
POL(Cons(x1, x2)) = [1] + x2   
POL(False) = [1]   
POL(ORDERED(x1)) = [1] + x1   
POL(ORDERED[ITE](x1, x2)) = x2   
POL(S(x1)) = [3] + x1   
POL(True) = [1]   
POL(c(x1, x2)) = x1 + x2   
POL(c6(x1)) = x1   
POL(c9(x1)) = x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
Tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
S tuples:

<'(S(z0), S(z1)) → c6(<'(z0, z1))
K tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
Defined Rule Symbols:

<

Defined Pair Symbols:

ORDERED, <', ORDERED[ITE]

Compound Symbols:

c, c6, c9

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

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

<'(S(z0), S(z1)) → c6(<'(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [1]   
POL(<(x1, x2)) = 0   
POL(<'(x1, x2)) = x2   
POL(Cons(x1, x2)) = [2] + x1 + x2   
POL(False) = [2]   
POL(ORDERED(x1)) = [1] + x1 + [2]x12   
POL(ORDERED[ITE](x1, x2)) = [2]x22   
POL(S(x1)) = [1] + x1   
POL(True) = 0   
POL(c(x1, x2)) = x1 + x2   
POL(c6(x1)) = x1   
POL(c9(x1)) = x1   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
Tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
S tuples:none
K tuples:

ORDERED(Cons(z0, Cons(z1, z2))) → c(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1))
ORDERED[ITE](True, Cons(z0, Cons(z1, z2))) → c9(ORDERED(z2))
<'(S(z0), S(z1)) → c6(<'(z0, z1))
Defined Rule Symbols:

<

Defined Pair Symbols:

ORDERED, <', ORDERED[ITE]

Compound Symbols:

c, c6, c9

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

The set S is empty

(14) BOUNDS(1, 1)