Term Rewriting System R:
[X, Y, N, M]
eq(0, 0) -> true
eq(0, s(X)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(X, Y)
rm(N, nil) -> nil
rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) -> rm(N, X)
ifrm(false, N, add(M, X)) -> add(M, rm(N, X))
purge(nil) -> nil
purge(add(N, X)) -> add(N, purge(rm(N, X)))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

EQ(s(X), s(Y)) -> EQ(X, Y)
RM(N, add(M, X)) -> IFRM(eq(N, M), N, add(M, X))
RM(N, add(M, X)) -> EQ(N, M)
IFRM(true, N, add(M, X)) -> RM(N, X)
IFRM(false, N, add(M, X)) -> RM(N, X)
PURGE(add(N, X)) -> PURGE(rm(N, X))
PURGE(add(N, X)) -> RM(N, X)

Furthermore, R contains three SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
Nar
       →DP Problem 3
Remaining


Dependency Pair:

EQ(s(X), s(Y)) -> EQ(X, Y)


Rules:


eq(0, 0) -> true
eq(0, s(X)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(X, Y)
rm(N, nil) -> nil
rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) -> rm(N, X)
ifrm(false, N, add(M, X)) -> add(M, rm(N, X))
purge(nil) -> nil
purge(add(N, X)) -> add(N, purge(rm(N, X)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

EQ(s(X), s(Y)) -> EQ(X, Y)


There are no usable rules for innermost that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
EQ(x1, x2) -> EQ(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 4
Dependency Graph
       →DP Problem 2
Nar
       →DP Problem 3
Remaining


Dependency Pair:


Rules:


eq(0, 0) -> true
eq(0, s(X)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(X, Y)
rm(N, nil) -> nil
rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) -> rm(N, X)
ifrm(false, N, add(M, X)) -> add(M, rm(N, X))
purge(nil) -> nil
purge(add(N, X)) -> add(N, purge(rm(N, X)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Narrowing Transformation
       →DP Problem 3
Remaining


Dependency Pairs:

IFRM(false, N, add(M, X)) -> RM(N, X)
IFRM(true, N, add(M, X)) -> RM(N, X)
RM(N, add(M, X)) -> IFRM(eq(N, M), N, add(M, X))


Rules:


eq(0, 0) -> true
eq(0, s(X)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(X, Y)
rm(N, nil) -> nil
rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) -> rm(N, X)
ifrm(false, N, add(M, X)) -> add(M, rm(N, X))
purge(nil) -> nil
purge(add(N, X)) -> add(N, purge(rm(N, X)))


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

RM(N, add(M, X)) -> IFRM(eq(N, M), N, add(M, X))
four new Dependency Pairs are created:

RM(0, add(0, X)) -> IFRM(true, 0, add(0, X))
RM(0, add(s(X''), X)) -> IFRM(false, 0, add(s(X''), X))
RM(s(X''), add(0, X)) -> IFRM(false, s(X''), add(0, X))
RM(s(X''), add(s(Y'), X)) -> IFRM(eq(X'', Y'), s(X''), add(s(Y'), X))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Nar
           →DP Problem 5
Instantiation Transformation
       →DP Problem 3
Remaining


Dependency Pairs:

RM(s(X''), add(s(Y'), X)) -> IFRM(eq(X'', Y'), s(X''), add(s(Y'), X))
RM(s(X''), add(0, X)) -> IFRM(false, s(X''), add(0, X))
RM(0, add(s(X''), X)) -> IFRM(false, 0, add(s(X''), X))
IFRM(true, N, add(M, X)) -> RM(N, X)
RM(0, add(0, X)) -> IFRM(true, 0, add(0, X))
IFRM(false, N, add(M, X)) -> RM(N, X)


Rules:


eq(0, 0) -> true
eq(0, s(X)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(X, Y)
rm(N, nil) -> nil
rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) -> rm(N, X)
ifrm(false, N, add(M, X)) -> add(M, rm(N, X))
purge(nil) -> nil
purge(add(N, X)) -> add(N, purge(rm(N, X)))


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFRM(true, N, add(M, X)) -> RM(N, X)
two new Dependency Pairs are created:

IFRM(true, 0, add(0, X'')) -> RM(0, X'')
IFRM(true, s(X''''), add(s(Y'''), X'')) -> RM(s(X''''), X'')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Nar
           →DP Problem 5
Inst
             ...
               →DP Problem 6
Instantiation Transformation
       →DP Problem 3
Remaining


Dependency Pairs:

IFRM(true, s(X''''), add(s(Y'''), X'')) -> RM(s(X''''), X'')
RM(s(X''), add(0, X)) -> IFRM(false, s(X''), add(0, X))
RM(0, add(s(X''), X)) -> IFRM(false, 0, add(s(X''), X))
IFRM(true, 0, add(0, X'')) -> RM(0, X'')
RM(0, add(0, X)) -> IFRM(true, 0, add(0, X))
IFRM(false, N, add(M, X)) -> RM(N, X)
RM(s(X''), add(s(Y'), X)) -> IFRM(eq(X'', Y'), s(X''), add(s(Y'), X))


Rules:


eq(0, 0) -> true
eq(0, s(X)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(X, Y)
rm(N, nil) -> nil
rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) -> rm(N, X)
ifrm(false, N, add(M, X)) -> add(M, rm(N, X))
purge(nil) -> nil
purge(add(N, X)) -> add(N, purge(rm(N, X)))


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFRM(false, N, add(M, X)) -> RM(N, X)
three new Dependency Pairs are created:

IFRM(false, 0, add(s(X''''), X'')) -> RM(0, X'')
IFRM(false, s(X''''), add(0, X'')) -> RM(s(X''''), X'')
IFRM(false, s(X''''), add(s(Y'''), X'')) -> RM(s(X''''), X'')

The transformation is resulting in two new DP problems:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Nar
       →DP Problem 3
Remaining Obligation(s)




The following remains to be proven:


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Nar
           →DP Problem 5
Inst
             ...
               →DP Problem 8
Argument Filtering and Ordering
       →DP Problem 3
Remaining


Dependency Pairs:

IFRM(true, 0, add(0, X'')) -> RM(0, X'')
RM(0, add(0, X)) -> IFRM(true, 0, add(0, X))
IFRM(false, 0, add(s(X''''), X'')) -> RM(0, X'')
RM(0, add(s(X''), X)) -> IFRM(false, 0, add(s(X''), X))


Rules:


eq(0, 0) -> true
eq(0, s(X)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(X, Y)
rm(N, nil) -> nil
rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) -> rm(N, X)
ifrm(false, N, add(M, X)) -> add(M, rm(N, X))
purge(nil) -> nil
purge(add(N, X)) -> add(N, purge(rm(N, X)))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

IFRM(true, 0, add(0, X'')) -> RM(0, X'')
IFRM(false, 0, add(s(X''''), X'')) -> RM(0, X'')


There are no usable rules for innermost that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
RM(x1, x2) -> x2
add(x1, x2) -> add(x1, x2)
IFRM(x1, x2, x3) -> x3
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Nar
           →DP Problem 5
Inst
             ...
               →DP Problem 9
Dependency Graph
       →DP Problem 3
Remaining


Dependency Pairs:

RM(0, add(0, X)) -> IFRM(true, 0, add(0, X))
RM(0, add(s(X''), X)) -> IFRM(false, 0, add(s(X''), X))


Rules:


eq(0, 0) -> true
eq(0, s(X)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(X, Y)
rm(N, nil) -> nil
rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) -> rm(N, X)
ifrm(false, N, add(M, X)) -> add(M, rm(N, X))
purge(nil) -> nil
purge(add(N, X)) -> add(N, purge(rm(N, X)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Nar
       →DP Problem 3
Remaining Obligation(s)




The following remains to be proven:

Innermost Termination of R could not be shown.
Duration:
0:01 minutes