(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
isort(Cons(x, xs), r) → isort(xs, insert(x, r))
insert(x', Cons(x, xs)) → insert[Ite][False][Ite](<(x', x), x', Cons(x, xs))
isort(Nil, r) → r
insert(x, Nil) → Cons(x, Nil)
inssort(xs) → isort(xs, Nil)
The (relative) TRS S consists of the following rules:
<(S(x), S(y)) → <(x, y)
<(0, S(y)) → True
<(x, 0) → False
insert[Ite][False][Ite](False, x', Cons(x, xs)) → Cons(x, insert(x', xs))
insert[Ite][False][Ite](True, x, r) → Cons(x, r)
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (UPPER BOUND(ID) transformation)
Converted Cpx (relative) TRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
insert[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, insert(z0, z2))
insert[Ite][False][Ite](True, z0, z1) → Cons(z0, z1)
isort(Cons(z0, z1), z2) → isort(z1, insert(z0, z2))
isort(Nil, z0) → z0
insert(z0, Cons(z1, z2)) → insert[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
insert(z0, Nil) → Cons(z0, Nil)
inssort(z0) → isort(z0, Nil)
Tuples:
<'(S(z0), S(z1)) → c(<'(z0, z1))
<'(0, S(z0)) → c1
<'(z0, 0) → c2
INSERT[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c3(INSERT(z0, z2))
INSERT[ITE][FALSE][ITE](True, z0, z1) → c4
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
ISORT(Nil, z0) → c6
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
INSSORT(z0) → c9(ISORT(z0, Nil))
S tuples:
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
ISORT(Nil, z0) → c6
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
INSSORT(z0) → c9(ISORT(z0, Nil))
K tuples:none
Defined Rule Symbols:
isort, insert, inssort, <, insert[Ite][False][Ite]
Defined Pair Symbols:
<', INSERT[ITE][FALSE][ITE], ISORT, INSERT, INSSORT
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8, c9
(3) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)
Removed 1 leading nodes:
INSSORT(z0) → c9(ISORT(z0, Nil))
Removed 4 trailing nodes:
<'(0, S(z0)) → c1
ISORT(Nil, z0) → c6
<'(z0, 0) → c2
INSERT[ITE][FALSE][ITE](True, z0, z1) → c4
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
insert[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, insert(z0, z2))
insert[Ite][False][Ite](True, z0, z1) → Cons(z0, z1)
isort(Cons(z0, z1), z2) → isort(z1, insert(z0, z2))
isort(Nil, z0) → z0
insert(z0, Cons(z1, z2)) → insert[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
insert(z0, Nil) → Cons(z0, Nil)
inssort(z0) → isort(z0, Nil)
Tuples:
<'(S(z0), S(z1)) → c(<'(z0, z1))
INSERT[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c3(INSERT(z0, z2))
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
S tuples:
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
K tuples:none
Defined Rule Symbols:
isort, insert, inssort, <, insert[Ite][False][Ite]
Defined Pair Symbols:
<', INSERT[ITE][FALSE][ITE], ISORT, INSERT
Compound Symbols:
c, c3, c5, c7, c8
(5) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
isort(Cons(z0, z1), z2) → isort(z1, insert(z0, z2))
isort(Nil, z0) → z0
inssort(z0) → isort(z0, Nil)
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
insert(z0, Cons(z1, z2)) → insert[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
insert(z0, Nil) → Cons(z0, Nil)
insert[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, insert(z0, z2))
insert[Ite][False][Ite](True, z0, z1) → Cons(z0, z1)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
Tuples:
<'(S(z0), S(z1)) → c(<'(z0, z1))
INSERT[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c3(INSERT(z0, z2))
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
S tuples:
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
K tuples:none
Defined Rule Symbols:
insert, insert[Ite][False][Ite], <
Defined Pair Symbols:
<', INSERT[ITE][FALSE][ITE], ISORT, INSERT
Compound Symbols:
c, c3, c5, c7, c8
(7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
We considered the (Usable) Rules:none
And the Tuples:
<'(S(z0), S(z1)) → c(<'(z0, z1))
INSERT[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c3(INSERT(z0, z2))
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = [2]
POL(<(x1, x2)) = [2] + [4]x1 + [4]x2
POL(<'(x1, x2)) = 0
POL(Cons(x1, x2)) = [4] + x1 + x2
POL(False) = [3]
POL(INSERT(x1, x2)) = 0
POL(INSERT[ITE][FALSE][ITE](x1, x2, x3)) = 0
POL(ISORT(x1, x2)) = [4]x1
POL(Nil) = [3]
POL(S(x1)) = [2]
POL(True) = [2]
POL(c(x1)) = x1
POL(c3(x1)) = x1
POL(c5(x1, x2)) = x1 + x2
POL(c7(x1, x2)) = x1 + x2
POL(c8) = 0
POL(insert(x1, x2)) = [4]x1 + [5]x2
POL(insert[Ite][False][Ite](x1, x2, x3)) = [2] + [3]x2 + [2]x3
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
insert(z0, Cons(z1, z2)) → insert[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
insert(z0, Nil) → Cons(z0, Nil)
insert[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, insert(z0, z2))
insert[Ite][False][Ite](True, z0, z1) → Cons(z0, z1)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
Tuples:
<'(S(z0), S(z1)) → c(<'(z0, z1))
INSERT[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c3(INSERT(z0, z2))
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
S tuples:
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
K tuples:
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
Defined Rule Symbols:
insert, insert[Ite][False][Ite], <
Defined Pair Symbols:
<', INSERT[ITE][FALSE][ITE], ISORT, INSERT
Compound Symbols:
c, c3, c5, c7, c8
(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.
INSERT(z0, Nil) → c8
We considered the (Usable) Rules:none
And the Tuples:
<'(S(z0), S(z1)) → c(<'(z0, z1))
INSERT[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c3(INSERT(z0, z2))
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = [2]
POL(<(x1, x2)) = [3]x1
POL(<'(x1, x2)) = 0
POL(Cons(x1, x2)) = [1] + x2
POL(False) = 0
POL(INSERT(x1, x2)) = [1]
POL(INSERT[ITE][FALSE][ITE](x1, x2, x3)) = [1]
POL(ISORT(x1, x2)) = x1
POL(Nil) = [2]
POL(S(x1)) = [3]
POL(True) = [2]
POL(c(x1)) = x1
POL(c3(x1)) = x1
POL(c5(x1, x2)) = x1 + x2
POL(c7(x1, x2)) = x1 + x2
POL(c8) = 0
POL(insert(x1, x2)) = [2]x1
POL(insert[Ite][False][Ite](x1, x2, x3)) = [2] + [2]x1 + [5]x2
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
insert(z0, Cons(z1, z2)) → insert[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
insert(z0, Nil) → Cons(z0, Nil)
insert[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, insert(z0, z2))
insert[Ite][False][Ite](True, z0, z1) → Cons(z0, z1)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
Tuples:
<'(S(z0), S(z1)) → c(<'(z0, z1))
INSERT[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c3(INSERT(z0, z2))
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
S tuples:
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
K tuples:
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Nil) → c8
Defined Rule Symbols:
insert, insert[Ite][False][Ite], <
Defined Pair Symbols:
<', INSERT[ITE][FALSE][ITE], ISORT, INSERT
Compound Symbols:
c, c3, c5, c7, c8
(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.
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
We considered the (Usable) Rules:
insert(z0, Cons(z1, z2)) → insert[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
insert[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, insert(z0, z2))
insert(z0, Nil) → Cons(z0, Nil)
insert[Ite][False][Ite](True, z0, z1) → Cons(z0, z1)
And the Tuples:
<'(S(z0), S(z1)) → c(<'(z0, z1))
INSERT[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c3(INSERT(z0, z2))
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(<(x1, x2)) = 0
POL(<'(x1, x2)) = 0
POL(Cons(x1, x2)) = [1] + x2
POL(False) = 0
POL(INSERT(x1, x2)) = [3] + x2
POL(INSERT[ITE][FALSE][ITE](x1, x2, x3)) = [2] + x3
POL(ISORT(x1, x2)) = x1 + [2]x1·x2 + [2]x12
POL(Nil) = 0
POL(S(x1)) = 0
POL(True) = 0
POL(c(x1)) = x1
POL(c3(x1)) = x1
POL(c5(x1, x2)) = x1 + x2
POL(c7(x1, x2)) = x1 + x2
POL(c8) = 0
POL(insert(x1, x2)) = [1] + x2
POL(insert[Ite][False][Ite](x1, x2, x3)) = [1] + x3
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
insert(z0, Cons(z1, z2)) → insert[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
insert(z0, Nil) → Cons(z0, Nil)
insert[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, insert(z0, z2))
insert[Ite][False][Ite](True, z0, z1) → Cons(z0, z1)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
Tuples:
<'(S(z0), S(z1)) → c(<'(z0, z1))
INSERT[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c3(INSERT(z0, z2))
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
INSERT(z0, Nil) → c8
S tuples:none
K tuples:
ISORT(Cons(z0, z1), z2) → c5(ISORT(z1, insert(z0, z2)), INSERT(z0, z2))
INSERT(z0, Nil) → c8
INSERT(z0, Cons(z1, z2)) → c7(INSERT[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
Defined Rule Symbols:
insert, insert[Ite][False][Ite], <
Defined Pair Symbols:
<', INSERT[ITE][FALSE][ITE], ISORT, INSERT
Compound Symbols:
c, c3, c5, c7, c8
(13) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(14) BOUNDS(1, 1)