(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
@(Cons(x, xs), ys) → Cons(x, @(xs, ys))
@(Nil, ys) → ys
game(p1, p2, Cons(Capture, xs)) → game[Ite][False][Ite][False][Ite](True, p1, p2, Cons(Capture, xs))
game(p1, p2, Cons(Swap, xs)) → game(p2, p1, xs)
equal(Capture, Capture) → True
equal(Capture, Swap) → False
equal(Swap, Capture) → False
equal(Swap, Swap) → True
game(p1, p2, Nil) → @(p1, p2)
goal(p1, p2, moves) → game(p1, p2, moves)
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
@(Cons(z0, z1), z2) → Cons(z0, @(z1, z2))
@(Nil, z0) → z0
game(z0, z1, Cons(Capture, z2)) → game[Ite][False][Ite][False][Ite](True, z0, z1, Cons(Capture, z2))
game(z0, z1, Cons(Swap, z2)) → game(z1, z0, z2)
game(z0, z1, Nil) → @(z0, z1)
equal(Capture, Capture) → True
equal(Capture, Swap) → False
equal(Swap, Capture) → False
equal(Swap, Swap) → True
goal(z0, z1, z2) → game(z0, z1, z2)
Tuples:
@'(Cons(z0, z1), z2) → c(@'(z1, z2))
@'(Nil, z0) → c1
GAME(z0, z1, Cons(Capture, z2)) → c2
GAME(z0, z1, Cons(Swap, z2)) → c3(GAME(z1, z0, z2))
GAME(z0, z1, Nil) → c4(@'(z0, z1))
EQUAL(Capture, Capture) → c5
EQUAL(Capture, Swap) → c6
EQUAL(Swap, Capture) → c7
EQUAL(Swap, Swap) → c8
GOAL(z0, z1, z2) → c9(GAME(z0, z1, z2))
S tuples:
@'(Cons(z0, z1), z2) → c(@'(z1, z2))
@'(Nil, z0) → c1
GAME(z0, z1, Cons(Capture, z2)) → c2
GAME(z0, z1, Cons(Swap, z2)) → c3(GAME(z1, z0, z2))
GAME(z0, z1, Nil) → c4(@'(z0, z1))
EQUAL(Capture, Capture) → c5
EQUAL(Capture, Swap) → c6
EQUAL(Swap, Capture) → c7
EQUAL(Swap, Swap) → c8
GOAL(z0, z1, z2) → c9(GAME(z0, z1, z2))
K tuples:none
Defined Rule Symbols:
@, game, equal, goal
Defined Pair Symbols:
@', GAME, EQUAL, GOAL
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8, c9
(3) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)
Removed 1 leading nodes:
GOAL(z0, z1, z2) → c9(GAME(z0, z1, z2))
Removed 6 trailing nodes:
EQUAL(Capture, Swap) → c6
GAME(z0, z1, Cons(Capture, z2)) → c2
@'(Nil, z0) → c1
EQUAL(Swap, Capture) → c7
EQUAL(Swap, Swap) → c8
EQUAL(Capture, Capture) → c5
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
@(Cons(z0, z1), z2) → Cons(z0, @(z1, z2))
@(Nil, z0) → z0
game(z0, z1, Cons(Capture, z2)) → game[Ite][False][Ite][False][Ite](True, z0, z1, Cons(Capture, z2))
game(z0, z1, Cons(Swap, z2)) → game(z1, z0, z2)
game(z0, z1, Nil) → @(z0, z1)
equal(Capture, Capture) → True
equal(Capture, Swap) → False
equal(Swap, Capture) → False
equal(Swap, Swap) → True
goal(z0, z1, z2) → game(z0, z1, z2)
Tuples:
@'(Cons(z0, z1), z2) → c(@'(z1, z2))
GAME(z0, z1, Cons(Swap, z2)) → c3(GAME(z1, z0, z2))
GAME(z0, z1, Nil) → c4(@'(z0, z1))
S tuples:
@'(Cons(z0, z1), z2) → c(@'(z1, z2))
GAME(z0, z1, Cons(Swap, z2)) → c3(GAME(z1, z0, z2))
GAME(z0, z1, Nil) → c4(@'(z0, z1))
K tuples:none
Defined Rule Symbols:
@, game, equal, goal
Defined Pair Symbols:
@', GAME
Compound Symbols:
c, c3, c4
(5) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
@(Cons(z0, z1), z2) → Cons(z0, @(z1, z2))
@(Nil, z0) → z0
game(z0, z1, Cons(Capture, z2)) → game[Ite][False][Ite][False][Ite](True, z0, z1, Cons(Capture, z2))
game(z0, z1, Cons(Swap, z2)) → game(z1, z0, z2)
game(z0, z1, Nil) → @(z0, z1)
equal(Capture, Capture) → True
equal(Capture, Swap) → False
equal(Swap, Capture) → False
equal(Swap, Swap) → True
goal(z0, z1, z2) → game(z0, z1, z2)
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
@'(Cons(z0, z1), z2) → c(@'(z1, z2))
GAME(z0, z1, Cons(Swap, z2)) → c3(GAME(z1, z0, z2))
GAME(z0, z1, Nil) → c4(@'(z0, z1))
S tuples:
@'(Cons(z0, z1), z2) → c(@'(z1, z2))
GAME(z0, z1, Cons(Swap, z2)) → c3(GAME(z1, z0, z2))
GAME(z0, z1, Nil) → c4(@'(z0, z1))
K tuples:none
Defined Rule Symbols:none
Defined Pair Symbols:
@', GAME
Compound Symbols:
c, c3, c4
(7) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
@'(Cons(z0, z1), z2) → c(@'(z1, z2))
GAME(z0, z1, Cons(Swap, z2)) → c3(GAME(z1, z0, z2))
GAME(z0, z1, Nil) → c4(@'(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:
@'(Cons(z0, z1), z2) → c(@'(z1, z2))
GAME(z0, z1, Cons(Swap, z2)) → c3(GAME(z1, z0, z2))
GAME(z0, z1, Nil) → c4(@'(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(@'(x1, x2)) = [3] + [2]x1 + [2]x2
POL(Cons(x1, x2)) = [5] + x1 + x2
POL(GAME(x1, x2, x3)) = [4] + [5]x1 + [5]x2 + [5]x3
POL(Nil) = [4]
POL(Swap) = [5]
POL(c(x1)) = x1
POL(c3(x1)) = x1
POL(c4(x1)) = x1
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
@'(Cons(z0, z1), z2) → c(@'(z1, z2))
GAME(z0, z1, Cons(Swap, z2)) → c3(GAME(z1, z0, z2))
GAME(z0, z1, Nil) → c4(@'(z0, z1))
S tuples:none
K tuples:
@'(Cons(z0, z1), z2) → c(@'(z1, z2))
GAME(z0, z1, Cons(Swap, z2)) → c3(GAME(z1, z0, z2))
GAME(z0, z1, Nil) → c4(@'(z0, z1))
Defined Rule Symbols:none
Defined Pair Symbols:
@', GAME
Compound Symbols:
c, c3, c4
(9) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(10) BOUNDS(O(1), O(1))