R
↳Removing Redundant Rules for Innermost Termination
take(0, X) -> nil
take(s(X), cons(Y, L)) -> cons(activate(Y), ntake(activate(X), activate(L)))
R
↳RRRI
→TRS2
↳Dependency Pair Analysis
EQ(ns(X), ns(Y)) -> EQ(activate(X), activate(Y))
EQ(ns(X), ns(Y)) -> ACTIVATE(X)
EQ(ns(X), ns(Y)) -> ACTIVATE(Y)
ACTIVATE(n0) -> 0'
ACTIVATE(ns(X)) -> S(X)
ACTIVATE(ninf(X)) -> INF(X)
ACTIVATE(ntake(X1, X2)) -> TAKE(X1, X2)
ACTIVATE(nlength(X)) -> LENGTH(X)
INF(X) -> S(X)
LENGTH(nil) -> 0'
LENGTH(cons(X, L)) -> S(nlength(activate(L)))
LENGTH(cons(X, L)) -> ACTIVATE(L)
R
↳RRRI
→TRS2
↳DPs
→DP Problem 1
↳Size-Change Principle
→DP Problem 2
↳Nar
LENGTH(cons(X, L)) -> ACTIVATE(L)
ACTIVATE(nlength(X)) -> LENGTH(X)
eq(n0, n0) -> true
eq(ns(X), ns(Y)) -> eq(activate(X), activate(Y))
eq(X, Y) -> false
activate(n0) -> 0
activate(ns(X)) -> s(X)
activate(ninf(X)) -> inf(X)
activate(ntake(X1, X2)) -> take(X1, X2)
activate(nlength(X)) -> length(X)
activate(X) -> X
inf(X) -> cons(X, ninf(s(X)))
inf(X) -> ninf(X)
s(X) -> ns(X)
take(X1, X2) -> ntake(X1, X2)
length(nil) -> 0
length(cons(X, L)) -> s(nlength(activate(L)))
length(X) -> nlength(X)
0 -> n0
|
|
|
|
trivial
nlength(x1) -> nlength(x1)
cons(x1, x2) -> cons(x1, x2)
R
↳RRRI
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳Narrowing Transformation
EQ(ns(X), ns(Y)) -> EQ(activate(X), activate(Y))
eq(n0, n0) -> true
eq(ns(X), ns(Y)) -> eq(activate(X), activate(Y))
eq(X, Y) -> false
activate(n0) -> 0
activate(ns(X)) -> s(X)
activate(ninf(X)) -> inf(X)
activate(ntake(X1, X2)) -> take(X1, X2)
activate(nlength(X)) -> length(X)
activate(X) -> X
inf(X) -> cons(X, ninf(s(X)))
inf(X) -> ninf(X)
s(X) -> ns(X)
take(X1, X2) -> ntake(X1, X2)
length(nil) -> 0
length(cons(X, L)) -> s(nlength(activate(L)))
length(X) -> nlength(X)
0 -> n0
12 new Dependency Pairs are created:
EQ(ns(X), ns(Y)) -> EQ(activate(X), activate(Y))
EQ(ns(n0), ns(Y)) -> EQ(0, activate(Y))
EQ(ns(ns(X'')), ns(Y)) -> EQ(s(X''), activate(Y))
EQ(ns(ninf(X'')), ns(Y)) -> EQ(inf(X''), activate(Y))
EQ(ns(ntake(X1', X2')), ns(Y)) -> EQ(take(X1', X2'), activate(Y))
EQ(ns(nlength(X'')), ns(Y)) -> EQ(length(X''), activate(Y))
EQ(ns(X''), ns(Y)) -> EQ(X'', activate(Y))
EQ(ns(X), ns(n0)) -> EQ(activate(X), 0)
EQ(ns(X), ns(ns(X''))) -> EQ(activate(X), s(X''))
EQ(ns(X), ns(ninf(X''))) -> EQ(activate(X), inf(X''))
EQ(ns(X), ns(ntake(X1', X2'))) -> EQ(activate(X), take(X1', X2'))
EQ(ns(X), ns(nlength(X''))) -> EQ(activate(X), length(X''))
EQ(ns(X), ns(Y')) -> EQ(activate(X), Y')
R
↳RRRI
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳Nar
...
→DP Problem 3
↳Negative Polynomial Order
EQ(ns(X), ns(Y')) -> EQ(activate(X), Y')
EQ(ns(X), ns(nlength(X''))) -> EQ(activate(X), length(X''))
EQ(ns(X), ns(ntake(X1', X2'))) -> EQ(activate(X), take(X1', X2'))
EQ(ns(X), ns(ninf(X''))) -> EQ(activate(X), inf(X''))
EQ(ns(X), ns(ns(X''))) -> EQ(activate(X), s(X''))
EQ(ns(X), ns(n0)) -> EQ(activate(X), 0)
EQ(ns(X''), ns(Y)) -> EQ(X'', activate(Y))
EQ(ns(nlength(X'')), ns(Y)) -> EQ(length(X''), activate(Y))
EQ(ns(ntake(X1', X2')), ns(Y)) -> EQ(take(X1', X2'), activate(Y))
EQ(ns(ninf(X'')), ns(Y)) -> EQ(inf(X''), activate(Y))
EQ(ns(ns(X'')), ns(Y)) -> EQ(s(X''), activate(Y))
EQ(ns(n0), ns(Y)) -> EQ(0, activate(Y))
eq(n0, n0) -> true
eq(ns(X), ns(Y)) -> eq(activate(X), activate(Y))
eq(X, Y) -> false
activate(n0) -> 0
activate(ns(X)) -> s(X)
activate(ninf(X)) -> inf(X)
activate(ntake(X1, X2)) -> take(X1, X2)
activate(nlength(X)) -> length(X)
activate(X) -> X
inf(X) -> cons(X, ninf(s(X)))
inf(X) -> ninf(X)
s(X) -> ns(X)
take(X1, X2) -> ntake(X1, X2)
length(nil) -> 0
length(cons(X, L)) -> s(nlength(activate(L)))
length(X) -> nlength(X)
0 -> n0
EQ(ns(X), ns(Y')) -> EQ(activate(X), Y')
EQ(ns(X), ns(ntake(X1', X2'))) -> EQ(activate(X), take(X1', X2'))
EQ(ns(X), ns(ninf(X''))) -> EQ(activate(X), inf(X''))
EQ(ns(X), ns(ns(X''))) -> EQ(activate(X), s(X''))
EQ(ns(X), ns(n0)) -> EQ(activate(X), 0)
activate(n0) -> 0
activate(ns(X)) -> s(X)
activate(ninf(X)) -> inf(X)
activate(ntake(X1, X2)) -> take(X1, X2)
activate(nlength(X)) -> length(X)
activate(X) -> X
length(nil) -> 0
length(cons(X, L)) -> s(nlength(activate(L)))
length(X) -> nlength(X)
take(X1, X2) -> ntake(X1, X2)
inf(X) -> cons(X, ninf(s(X)))
inf(X) -> ninf(X)
s(X) -> ns(X)
0 -> n0
POL( EQ(x1, x2) ) = x2
POL( ns(x1) ) = x1 + 1
POL( activate(x1) ) = x1 + 1
POL( ninf(x1) ) = 0
POL( inf(x1) ) = 0
POL( ntake(x1, x2) ) = 0
POL( take(x1, x2) ) = 0
POL( s(x1) ) = x1 + 1
POL( nlength(x1) ) = 0
POL( length(x1) ) = 1
POL( n0 ) = 0
POL( 0 ) = 0
POL( cons(x1, x2) ) = 0
R
↳RRRI
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳Nar
...
→DP Problem 4
↳Negative Polynomial Order
EQ(ns(X), ns(nlength(X''))) -> EQ(activate(X), length(X''))
EQ(ns(X''), ns(Y)) -> EQ(X'', activate(Y))
EQ(ns(nlength(X'')), ns(Y)) -> EQ(length(X''), activate(Y))
EQ(ns(ntake(X1', X2')), ns(Y)) -> EQ(take(X1', X2'), activate(Y))
EQ(ns(ninf(X'')), ns(Y)) -> EQ(inf(X''), activate(Y))
EQ(ns(ns(X'')), ns(Y)) -> EQ(s(X''), activate(Y))
EQ(ns(n0), ns(Y)) -> EQ(0, activate(Y))
eq(n0, n0) -> true
eq(ns(X), ns(Y)) -> eq(activate(X), activate(Y))
eq(X, Y) -> false
activate(n0) -> 0
activate(ns(X)) -> s(X)
activate(ninf(X)) -> inf(X)
activate(ntake(X1, X2)) -> take(X1, X2)
activate(nlength(X)) -> length(X)
activate(X) -> X
inf(X) -> cons(X, ninf(s(X)))
inf(X) -> ninf(X)
s(X) -> ns(X)
take(X1, X2) -> ntake(X1, X2)
length(nil) -> 0
length(cons(X, L)) -> s(nlength(activate(L)))
length(X) -> nlength(X)
0 -> n0
EQ(ns(X''), ns(Y)) -> EQ(X'', activate(Y))
EQ(ns(ntake(X1', X2')), ns(Y)) -> EQ(take(X1', X2'), activate(Y))
EQ(ns(ninf(X'')), ns(Y)) -> EQ(inf(X''), activate(Y))
EQ(ns(ns(X'')), ns(Y)) -> EQ(s(X''), activate(Y))
EQ(ns(n0), ns(Y)) -> EQ(0, activate(Y))
activate(n0) -> 0
activate(ns(X)) -> s(X)
activate(ninf(X)) -> inf(X)
activate(ntake(X1, X2)) -> take(X1, X2)
activate(nlength(X)) -> length(X)
activate(X) -> X
length(nil) -> 0
length(cons(X, L)) -> s(nlength(activate(L)))
length(X) -> nlength(X)
take(X1, X2) -> ntake(X1, X2)
inf(X) -> cons(X, ninf(s(X)))
inf(X) -> ninf(X)
s(X) -> ns(X)
0 -> n0
POL( EQ(x1, x2) ) = x1
POL( ns(x1) ) = x1 + 1
POL( ninf(x1) ) = 0
POL( inf(x1) ) = 0
POL( s(x1) ) = x1 + 1
POL( ntake(x1, x2) ) = 0
POL( take(x1, x2) ) = 0
POL( activate(x1) ) = x1 + 1
POL( nlength(x1) ) = 0
POL( length(x1) ) = 1
POL( n0 ) = 0
POL( 0 ) = 0
POL( cons(x1, x2) ) = 0
R
↳RRRI
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳Nar
...
→DP Problem 5
↳Remaining Obligation(s)
EQ(ns(X), ns(nlength(X''))) -> EQ(activate(X), length(X''))
EQ(ns(nlength(X'')), ns(Y)) -> EQ(length(X''), activate(Y))
eq(n0, n0) -> true
eq(ns(X), ns(Y)) -> eq(activate(X), activate(Y))
eq(X, Y) -> false
activate(n0) -> 0
activate(ns(X)) -> s(X)
activate(ninf(X)) -> inf(X)
activate(ntake(X1, X2)) -> take(X1, X2)
activate(nlength(X)) -> length(X)
activate(X) -> X
inf(X) -> cons(X, ninf(s(X)))
inf(X) -> ninf(X)
s(X) -> ns(X)
take(X1, X2) -> ntake(X1, X2)
length(nil) -> 0
length(cons(X, L)) -> s(nlength(activate(L)))
length(X) -> nlength(X)
0 -> n0