R
↳Dependency Pair Analysis
FOLDB(t, s(n)) -> F(foldB(t, n), B)
FOLDB(t, s(n)) -> FOLDB(t, n)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
FOLDC(t, s(n)) -> FOLDC(t, n)
F(t, x) -> F'(t, g(x))
F(t, x) -> G(x)
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F'(triple(a, b, c), A) -> F''(foldB(triple(s(a), 0, c), b))
F'(triple(a, b, c), A) -> FOLDB(triple(s(a), 0, c), b)
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
FOLD(t, x, s(n)) -> F(fold(t, x, n), x)
FOLD(t, x, s(n)) -> FOLD(t, x, n)
R
↳DPs
→DP Problem 1
↳Usable Rules (Innermost)
→DP Problem 2
↳UsableRules
FOLDB(t, s(n)) -> FOLDB(t, n)
F'(triple(a, b, c), A) -> FOLDB(triple(s(a), 0, c), b)
FOLDC(t, s(n)) -> FOLDC(t, n)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
F'(triple(a, b, c), A) -> F''(foldB(triple(s(a), 0, c), b))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, x) -> F'(t, g(x))
FOLDB(t, s(n)) -> F(foldB(t, n), B)
g(A) -> A
g(B) -> A
g(B) -> B
g(C) -> A
g(C) -> B
g(C) -> C
foldB(t, 0) -> t
foldB(t, s(n)) -> f(foldB(t, n), B)
foldC(t, 0) -> t
foldC(t, s(n)) -> f(foldC(t, n), C)
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
fold(t, x, 0) -> t
fold(t, x, s(n)) -> f(fold(t, x, n), x)
innermost
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 3
↳Modular Removal of Rules
→DP Problem 2
↳UsableRules
FOLDB(t, s(n)) -> FOLDB(t, n)
F'(triple(a, b, c), A) -> FOLDB(triple(s(a), 0, c), b)
FOLDC(t, s(n)) -> FOLDC(t, n)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
F'(triple(a, b, c), A) -> F''(foldB(triple(s(a), 0, c), b))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, x) -> F'(t, g(x))
FOLDB(t, s(n)) -> F(foldB(t, n), B)
g(C) -> A
g(B) -> B
g(A) -> A
g(C) -> B
g(B) -> A
g(C) -> C
foldC(t, s(n)) -> f(foldC(t, n), C)
foldC(t, 0) -> t
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
foldB(t, s(n)) -> f(foldB(t, n), B)
foldB(t, 0) -> t
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
innermost
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
g(C) -> A
g(B) -> B
g(A) -> A
g(C) -> B
g(B) -> A
g(C) -> C
foldC(t, s(n)) -> f(foldC(t, n), C)
foldC(t, 0) -> t
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
foldB(t, s(n)) -> f(foldB(t, n), B)
foldB(t, 0) -> t
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
POL(foldB(x1, x2)) = x1 + x2 POL(FOLDC(x1, x2)) = x1 + x2 POL(triple(x1, x2, x3)) = x1 + x2 + x3 POL(f'(x1, x2)) = 1 + x1 + x2 POL(f(x1, x2)) = 1 + x1 + x2 POL(F(x1, x2)) = 1 + x1 + x2 POL(foldC(x1, x2)) = x1 + x2 POL(FOLDB(x1, x2)) = x1 + x2 POL(F''(x1)) = x1 POL(0) = 0 POL(C) = 0 POL(g(x1)) = x1 POL(B) = 0 POL(F'(x1, x2)) = 1 + x1 + x2 POL(s(x1)) = 1 + x1 POL(f''(x1)) = x1 POL(A) = 0
FOLDB(t, s(n)) -> FOLDB(t, n)
FOLDC(t, s(n)) -> FOLDC(t, n)
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 3
↳MRR
...
→DP Problem 4
↳Negative Polynomial Order
→DP Problem 2
↳UsableRules
F'(triple(a, b, c), A) -> FOLDB(triple(s(a), 0, c), b)
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
F'(triple(a, b, c), A) -> F''(foldB(triple(s(a), 0, c), b))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, x) -> F'(t, g(x))
FOLDB(t, s(n)) -> F(foldB(t, n), B)
g(C) -> A
g(B) -> B
g(A) -> A
g(C) -> B
g(B) -> A
g(C) -> C
foldC(t, s(n)) -> f(foldC(t, n), C)
foldC(t, 0) -> t
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
foldB(t, s(n)) -> f(foldB(t, n), B)
foldB(t, 0) -> t
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
innermost
F'(triple(a, b, c), A) -> FOLDB(triple(s(a), 0, c), b)
g(C) -> A
foldC(t, s(n)) -> f(foldC(t, n), C)
g(B) -> B
foldC(t, 0) -> t
g(A) -> A
g(B) -> A
g(C) -> B
f(t, x) -> f'(t, g(x))
foldB(t, s(n)) -> f(foldB(t, n), B)
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
foldB(t, 0) -> t
g(C) -> C
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
POL( F'(x1, x2) ) = x1 + 1
POL( triple(x1, ..., x3) ) = x2
POL( FOLDB(x1, x2) ) = x1 + x2
POL( 0 ) = 0
POL( FOLDC(x1, x2) ) = x1 + 1
POL( F(x1, x2) ) = x1 + 1
POL( foldC(x1, x2) ) = x1
POL( s(x1) ) = 1
POL( foldB(x1, x2) ) = x1
POL( F''(x1) ) = x1 + 1
POL( g(x1) ) = 0
POL( A ) = 0
POL( f(x1, x2) ) = x1
POL( B ) = 0
POL( f'(x1, x2) ) = x1
POL( f''(x1) ) = x1
POL( C ) = 0
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 3
↳MRR
...
→DP Problem 5
↳Dependency Graph
→DP Problem 2
↳UsableRules
FOLDC(t, s(n)) -> F(foldC(t, n), C)
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
F'(triple(a, b, c), A) -> F''(foldB(triple(s(a), 0, c), b))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, x) -> F'(t, g(x))
FOLDB(t, s(n)) -> F(foldB(t, n), B)
g(C) -> A
g(B) -> B
g(A) -> A
g(C) -> B
g(B) -> A
g(C) -> C
foldC(t, s(n)) -> f(foldC(t, n), C)
foldC(t, 0) -> t
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
foldB(t, s(n)) -> f(foldB(t, n), B)
foldB(t, 0) -> t
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
innermost
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 3
↳MRR
...
→DP Problem 6
↳Negative Polynomial Order
→DP Problem 2
↳UsableRules
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
F'(triple(a, b, c), A) -> F''(foldB(triple(s(a), 0, c), b))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, x) -> F'(t, g(x))
FOLDC(t, s(n)) -> F(foldC(t, n), C)
g(C) -> A
g(B) -> B
g(A) -> A
g(C) -> B
g(B) -> A
g(C) -> C
foldC(t, s(n)) -> f(foldC(t, n), C)
foldC(t, 0) -> t
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
foldB(t, s(n)) -> f(foldB(t, n), B)
foldB(t, 0) -> t
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
innermost
F''(triple(a, b, c)) -> FOLDC(triple(a, b, 0), c)
g(C) -> A
foldC(t, s(n)) -> f(foldC(t, n), C)
g(B) -> B
foldC(t, 0) -> t
g(A) -> A
g(B) -> A
g(C) -> B
f(t, x) -> f'(t, g(x))
foldB(t, s(n)) -> f(foldB(t, n), B)
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
foldB(t, 0) -> t
g(C) -> C
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
POL( F''(x1) ) = x1 + 1
POL( triple(x1, ..., x3) ) = x3
POL( FOLDC(x1, x2) ) = x1 + x2
POL( 0 ) = 0
POL( s(x1) ) = x1 + 1
POL( F(x1, x2) ) = x1 + 1
POL( foldC(x1, x2) ) = x1 + x2
POL( F'(x1, x2) ) = x1 + 1
POL( foldB(x1, x2) ) = x1
POL( g(x1) ) = x1
POL( C ) = 1
POL( A ) = 0
POL( f(x1, x2) ) = x1 + x2
POL( B ) = 0
POL( f'(x1, x2) ) = x1 + x2
POL( f''(x1) ) = x1
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 3
↳MRR
...
→DP Problem 7
↳Dependency Graph
→DP Problem 2
↳UsableRules
F'(triple(a, b, c), A) -> F''(foldB(triple(s(a), 0, c), b))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
F(t, x) -> F'(t, g(x))
FOLDC(t, s(n)) -> F(foldC(t, n), C)
g(C) -> A
g(B) -> B
g(A) -> A
g(C) -> B
g(B) -> A
g(C) -> C
foldC(t, s(n)) -> f(foldC(t, n), C)
foldC(t, 0) -> t
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
foldB(t, s(n)) -> f(foldB(t, n), B)
foldB(t, 0) -> t
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
innermost
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 3
↳MRR
...
→DP Problem 8
↳Usable Rules (Innermost)
→DP Problem 2
↳UsableRules
F(t, x) -> F'(t, g(x))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
g(C) -> A
g(B) -> B
g(A) -> A
g(C) -> B
g(B) -> A
g(C) -> C
foldC(t, s(n)) -> f(foldC(t, n), C)
foldC(t, 0) -> t
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
foldB(t, s(n)) -> f(foldB(t, n), B)
foldB(t, 0) -> t
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
innermost
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 3
↳MRR
...
→DP Problem 9
↳Narrowing Transformation
→DP Problem 2
↳UsableRules
F(t, x) -> F'(t, g(x))
F'(triple(a, b, c), B) -> F(triple(a, b, c), A)
g(C) -> A
g(B) -> B
g(C) -> C
g(A) -> A
g(C) -> B
g(B) -> A
innermost
six new Dependency Pairs are created:
F(t, x) -> F'(t, g(x))
F(t, C) -> F'(t, A)
F(t, B) -> F'(t, B)
F(t, C) -> F'(t, C)
F(t, A) -> F'(t, A)
F(t, C) -> F'(t, B)
F(t, B) -> F'(t, A)
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳Usable Rules (Innermost)
FOLD(t, x, s(n)) -> FOLD(t, x, n)
g(A) -> A
g(B) -> A
g(B) -> B
g(C) -> A
g(C) -> B
g(C) -> C
foldB(t, 0) -> t
foldB(t, s(n)) -> f(foldB(t, n), B)
foldC(t, 0) -> t
foldC(t, s(n)) -> f(foldC(t, n), C)
f(t, x) -> f'(t, g(x))
f'(triple(a, b, c), C) -> triple(a, b, s(c))
f'(triple(a, b, c), B) -> f(triple(a, b, c), A)
f'(triple(a, b, c), A) -> f''(foldB(triple(s(a), 0, c), b))
f''(triple(a, b, c)) -> foldC(triple(a, b, 0), c)
fold(t, x, 0) -> t
fold(t, x, s(n)) -> f(fold(t, x, n), x)
innermost
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 10
↳Size-Change Principle
FOLD(t, x, s(n)) -> FOLD(t, x, n)
none
innermost
|
|
trivial
s(x1) -> s(x1)