(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:
member(x', Cons(x, xs)) → member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs))
member(x, Nil) → False
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(x, xs) → member(x, xs)
The (relative) TRS S consists of the following rules:
!EQ(S(x), S(y)) → !EQ(x, y)
!EQ(0, S(y)) → False
!EQ(S(x), 0) → False
!EQ(0, 0) → True
member[Ite][True][Ite](False, x', Cons(x, xs)) → member(x', xs)
member[Ite][True][Ite](True, x, xs) → True
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:
member(x', Cons(x, xs)) → member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs))
member(x, Nil) → False
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(x, xs) → member(x, xs)
!EQ(S(x), S(y)) → !EQ(x, y)
!EQ(0, S(y)) → False
!EQ(S(x), 0) → False
!EQ(0, 0) → True
member[Ite][True][Ite](False, x', Cons(x, xs)) → member(x', xs)
member[Ite][True][Ite](True, x, xs) → True
Rewrite Strategy: INNERMOST
(3) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
member(z0, Cons(z1, z2)) → member[Ite][True][Ite](!EQ(z0, z1), z0, Cons(z1, z2))
member(z0, Nil) → False
notEmpty(Cons(z0, z1)) → True
notEmpty(Nil) → False
goal(z0, z1) → member(z0, z1)
!EQ(S(z0), S(z1)) → !EQ(z0, z1)
!EQ(0, S(z0)) → False
!EQ(S(z0), 0) → False
!EQ(0, 0) → True
member[Ite][True][Ite](False, z0, Cons(z1, z2)) → member(z0, z2)
member[Ite][True][Ite](True, z0, z1) → True
Tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
MEMBER(z0, Nil) → c1
NOTEMPTY(Cons(z0, z1)) → c2
NOTEMPTY(Nil) → c3
GOAL(z0, z1) → c4(MEMBER(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
!EQ'(0, S(z0)) → c6
!EQ'(S(z0), 0) → c7
!EQ'(0, 0) → c8
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
MEMBER[ITE][TRUE][ITE](True, z0, z1) → c10
S tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
MEMBER(z0, Nil) → c1
NOTEMPTY(Cons(z0, z1)) → c2
NOTEMPTY(Nil) → c3
GOAL(z0, z1) → c4(MEMBER(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
!EQ'(0, S(z0)) → c6
!EQ'(S(z0), 0) → c7
!EQ'(0, 0) → c8
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
MEMBER[ITE][TRUE][ITE](True, z0, z1) → c10
K tuples:none
Defined Rule Symbols:
member, notEmpty, goal, !EQ, member[Ite][True][Ite]
Defined Pair Symbols:
MEMBER, NOTEMPTY, GOAL, !EQ', MEMBER[ITE][TRUE][ITE]
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10
(5) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)
Removed 1 leading nodes:
GOAL(z0, z1) → c4(MEMBER(z0, z1))
Removed 7 trailing nodes:
!EQ'(0, 0) → c8
!EQ'(0, S(z0)) → c6
NOTEMPTY(Nil) → c3
MEMBER[ITE][TRUE][ITE](True, z0, z1) → c10
!EQ'(S(z0), 0) → c7
MEMBER(z0, Nil) → c1
NOTEMPTY(Cons(z0, z1)) → c2
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
member(z0, Cons(z1, z2)) → member[Ite][True][Ite](!EQ(z0, z1), z0, Cons(z1, z2))
member(z0, Nil) → False
notEmpty(Cons(z0, z1)) → True
notEmpty(Nil) → False
goal(z0, z1) → member(z0, z1)
!EQ(S(z0), S(z1)) → !EQ(z0, z1)
!EQ(0, S(z0)) → False
!EQ(S(z0), 0) → False
!EQ(0, 0) → True
member[Ite][True][Ite](False, z0, Cons(z1, z2)) → member(z0, z2)
member[Ite][True][Ite](True, z0, z1) → True
Tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
S tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
K tuples:none
Defined Rule Symbols:
member, notEmpty, goal, !EQ, member[Ite][True][Ite]
Defined Pair Symbols:
MEMBER, !EQ', MEMBER[ITE][TRUE][ITE]
Compound Symbols:
c, c5, c9
(7) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
member(z0, Cons(z1, z2)) → member[Ite][True][Ite](!EQ(z0, z1), z0, Cons(z1, z2))
member(z0, Nil) → False
notEmpty(Cons(z0, z1)) → True
notEmpty(Nil) → False
goal(z0, z1) → member(z0, z1)
member[Ite][True][Ite](False, z0, Cons(z1, z2)) → member(z0, z2)
member[Ite][True][Ite](True, z0, z1) → True
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
!EQ(S(z0), S(z1)) → !EQ(z0, z1)
!EQ(0, S(z0)) → False
!EQ(S(z0), 0) → False
!EQ(0, 0) → True
Tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
S tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
K tuples:none
Defined Rule Symbols:
!EQ
Defined Pair Symbols:
MEMBER, !EQ', MEMBER[ITE][TRUE][ITE]
Compound Symbols:
c, c5, 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.
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
We considered the (Usable) Rules:none
And the Tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(!EQ(x1, x2)) = 0
POL(!EQ'(x1, x2)) = 0
POL(0) = 0
POL(Cons(x1, x2)) = [1] + x2
POL(False) = 0
POL(MEMBER(x1, x2)) = [1] + x2
POL(MEMBER[ITE][TRUE][ITE](x1, x2, x3)) = [1] + x3
POL(S(x1)) = 0
POL(True) = 0
POL(c(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(c9(x1)) = x1
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
!EQ(S(z0), S(z1)) → !EQ(z0, z1)
!EQ(0, S(z0)) → False
!EQ(S(z0), 0) → False
!EQ(0, 0) → True
Tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
S tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
K tuples:
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
Defined Rule Symbols:
!EQ
Defined Pair Symbols:
MEMBER, !EQ', MEMBER[ITE][TRUE][ITE]
Compound Symbols:
c, c5, c9
(11) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)
The following tuples could be moved from S to K by knowledge propagation:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
!EQ(S(z0), S(z1)) → !EQ(z0, z1)
!EQ(0, S(z0)) → False
!EQ(S(z0), 0) → False
!EQ(0, 0) → True
Tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
S tuples:
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
K tuples:
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
Defined Rule Symbols:
!EQ
Defined Pair Symbols:
MEMBER, !EQ', MEMBER[ITE][TRUE][ITE]
Compound Symbols:
c, c5, c9
(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.
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(!EQ(x1, x2)) = [2]x12
POL(!EQ'(x1, x2)) = x2
POL(0) = 0
POL(Cons(x1, x2)) = [2] + x1 + x2
POL(False) = 0
POL(MEMBER(x1, x2)) = [1] + x1 + x2 + [2]x22 + [2]x1·x2
POL(MEMBER[ITE][TRUE][ITE](x1, x2, x3)) = [2]x32 + [2]x2·x3
POL(S(x1)) = [1] + x1
POL(True) = [1]
POL(c(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(c9(x1)) = x1
(14) Obligation:
Complexity Dependency Tuples Problem
Rules:
!EQ(S(z0), S(z1)) → !EQ(z0, z1)
!EQ(0, S(z0)) → False
!EQ(S(z0), 0) → False
!EQ(0, 0) → True
Tuples:
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
S tuples:none
K tuples:
MEMBER[ITE][TRUE][ITE](False, z0, Cons(z1, z2)) → c9(MEMBER(z0, z2))
MEMBER(z0, Cons(z1, z2)) → c(MEMBER[ITE][TRUE][ITE](!EQ(z0, z1), z0, Cons(z1, z2)), !EQ'(z0, z1))
!EQ'(S(z0), S(z1)) → c5(!EQ'(z0, z1))
Defined Rule Symbols:
!EQ
Defined Pair Symbols:
MEMBER, !EQ', MEMBER[ITE][TRUE][ITE]
Compound Symbols:
c, c5, c9
(15) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(16) BOUNDS(1, 1)