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
Forward Instantiation Transformation
       →DP Problem 2
Nar
       →DP Problem 3
Nar


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




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

EQ(s(X), s(Y)) -> EQ(X, Y)
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 4
Forward Instantiation Transformation
       →DP Problem 2
Nar
       →DP Problem 3
Nar


Dependency Pair:

EQ(s(s(X'')), s(s(Y''))) -> EQ(s(X''), s(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




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

EQ(s(s(X'')), s(s(Y''))) -> EQ(s(X''), s(Y''))
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 4
FwdInst
             ...
               →DP Problem 5
Argument Filtering and Ordering
       →DP Problem 2
Nar
       →DP Problem 3
Nar


Dependency Pair:

EQ(s(s(s(X''''))), s(s(s(Y'''')))) -> EQ(s(s(X'''')), s(s(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(s(s(X''''))), s(s(s(Y'''')))) -> EQ(s(s(X'''')), s(s(Y'''')))


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

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
FwdInst
           →DP Problem 4
FwdInst
             ...
               →DP Problem 6
Dependency Graph
       →DP Problem 2
Nar
       →DP Problem 3
Nar


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
FwdInst
       →DP Problem 2
Narrowing Transformation
       →DP Problem 3
Nar


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
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Narrowing Transformation
       →DP Problem 3
Nar


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, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

RM(s(X''), add(s(Y'), X)) -> IFRM(eq(X'', Y'), s(X''), add(s(Y'), X))
four new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 8
Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

RM(s(s(X''')), add(s(s(Y'')), X)) -> IFRM(eq(X''', Y''), s(s(X''')), add(s(s(Y'')), X))
RM(s(s(X''')), add(s(0), X)) -> IFRM(false, s(s(X''')), add(s(0), X))
RM(s(0), add(s(s(X''')), X)) -> IFRM(false, s(0), add(s(s(X''')), X))
RM(s(0), add(s(0), X)) -> IFRM(true, s(0), add(s(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)
RM(s(X''), add(0, X)) -> IFRM(false, s(X''), add(0, 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)
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 9
Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(true, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(0), X)) -> IFRM(false, s(s(X''')), add(s(0), X))
RM(s(0), add(s(s(X''')), X)) -> IFRM(false, s(0), add(s(s(X''')), X))
IFRM(true, s(0), add(s(0), X'')) -> RM(s(0), X'')
RM(s(0), add(s(0), X)) -> IFRM(true, s(0), add(s(0), 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(s(X''')), add(s(s(Y'')), X)) -> IFRM(eq(X''', Y''), s(s(X''')), add(s(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)
five 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(0), add(s(s(X''''')), X'')) -> RM(s(0), X'')
IFRM(false, s(s(X''''')), add(s(0), X'')) -> RM(s(s(X''''')), X'')
IFRM(false, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')

The transformation is resulting in two new DP problems:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 10
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(false, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(s(Y'')), X)) -> IFRM(eq(X''', Y''), s(s(X''')), add(s(s(Y'')), X))
IFRM(false, s(s(X''''')), add(s(0), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(0), X)) -> IFRM(false, s(s(X''')), add(s(0), X))
IFRM(false, s(0), add(s(s(X''''')), X'')) -> RM(s(0), X'')
RM(s(0), add(s(s(X''')), X)) -> IFRM(false, s(0), add(s(s(X''')), X))
IFRM(true, s(0), add(s(0), X'')) -> RM(s(0), X'')
RM(s(0), add(s(0), X)) -> IFRM(true, s(0), add(s(0), X))
IFRM(false, s(X''''), add(0, X'')) -> RM(s(X''''), X'')
RM(s(X''), add(0, X)) -> IFRM(false, s(X''), add(0, X))
IFRM(true, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(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




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

IFRM(true, s(0), add(s(0), X'')) -> RM(s(0), X'')
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 12
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(true, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(s(Y'')), X)) -> IFRM(eq(X''', Y''), s(s(X''')), add(s(s(Y'')), X))
IFRM(false, s(s(X''''')), add(s(0), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(0), X)) -> IFRM(false, s(s(X''')), add(s(0), X))
IFRM(false, s(0), add(s(s(X''''')), X'')) -> RM(s(0), X'')
RM(s(0), add(s(s(X''')), X)) -> IFRM(false, s(0), add(s(s(X''')), X))
IFRM(true, s(0), add(s(0), add(s(s(X''''')), X'''))) -> RM(s(0), add(s(s(X''''')), X'''))
IFRM(true, s(0), add(s(0), add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
IFRM(true, s(0), add(s(0), add(0, X'0))) -> RM(s(0), add(0, X'0))
RM(s(0), add(s(0), X)) -> IFRM(true, s(0), add(s(0), X))
IFRM(false, s(X''''), add(0, X'')) -> RM(s(X''''), X'')
RM(s(X''), add(0, X)) -> IFRM(false, s(X''), add(0, X))
IFRM(false, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(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




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

IFRM(true, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 14
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(0, X'0))) -> RM(s(s(X'''''')), add(0, X'0))
IFRM(false, s(s(X''''')), add(s(0), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(0), X)) -> IFRM(false, s(s(X''')), add(s(0), X))
IFRM(false, s(0), add(s(s(X''''')), X'')) -> RM(s(0), X'')
RM(s(0), add(s(s(X''')), X)) -> IFRM(false, s(0), add(s(s(X''')), X))
IFRM(true, s(0), add(s(0), add(s(s(X''''')), X'''))) -> RM(s(0), add(s(s(X''''')), X'''))
IFRM(true, s(0), add(s(0), add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
IFRM(true, s(0), add(s(0), add(0, X'0))) -> RM(s(0), add(0, X'0))
RM(s(0), add(s(0), X)) -> IFRM(true, s(0), add(s(0), X))
IFRM(false, s(X''''), add(0, X'')) -> RM(s(X''''), X'')
RM(s(X''), add(0, X)) -> IFRM(false, s(X''), add(0, X))
IFRM(false, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(s(Y'')), X)) -> IFRM(eq(X''', Y''), s(s(X''')), add(s(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, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFRM(false, s(X''''), add(0, X'')) -> RM(s(X''''), X'')
five new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 16
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(0, X'0))) -> RM(s(s(X'''''')), add(0, X'0))
IFRM(false, s(s(X'''''')), add(0, add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
IFRM(false, s(s(X''''')), add(s(0), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(0), X)) -> IFRM(false, s(s(X''')), add(s(0), X))
IFRM(false, s(s(X'''''')), add(0, add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
IFRM(false, s(0), add(0, add(s(s(X'''''')), X'''))) -> RM(s(0), add(s(s(X'''''')), X'''))
IFRM(false, s(0), add(s(s(X''''')), X'')) -> RM(s(0), X'')
RM(s(0), add(s(s(X''')), X)) -> IFRM(false, s(0), add(s(s(X''')), X))
IFRM(true, s(0), add(s(0), add(s(s(X''''')), X'''))) -> RM(s(0), add(s(s(X''''')), X'''))
IFRM(true, s(0), add(s(0), add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
IFRM(true, s(0), add(s(0), add(0, X'0))) -> RM(s(0), add(0, X'0))
RM(s(0), add(s(0), X)) -> IFRM(true, s(0), add(s(0), X))
IFRM(false, s(0), add(0, add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
IFRM(false, s(X'''''), add(0, add(0, X'0))) -> RM(s(X'''''), add(0, X'0))
RM(s(X''), add(0, X)) -> IFRM(false, s(X''), add(0, X))
IFRM(false, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(s(Y'')), X)) -> IFRM(eq(X''', Y''), s(s(X''')), add(s(s(Y'')), X))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(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, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

RM(s(X''), add(0, X)) -> IFRM(false, s(X''), add(0, X))
five new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 18
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(0, X'0))) -> RM(s(s(X'''''')), add(0, X'0))
IFRM(false, s(s(X'''''')), add(0, add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
RM(s(s(X'''''''')), add(0, add(s(s(Y'''''')), X'''''))) -> IFRM(false, s(s(X'''''''')), add(0, add(s(s(Y'''''')), X''''')))
IFRM(false, s(s(X'''''')), add(0, add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
RM(s(s(X'''''''')), add(0, add(s(0), X'''''))) -> IFRM(false, s(s(X'''''''')), add(0, add(s(0), X''''')))
IFRM(true, s(0), add(s(0), add(s(s(X''''')), X'''))) -> RM(s(0), add(s(s(X''''')), X'''))
IFRM(true, s(0), add(s(0), add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
IFRM(false, s(0), add(s(s(X''''')), X'')) -> RM(s(0), X'')
RM(s(0), add(s(s(X''')), X)) -> IFRM(false, s(0), add(s(s(X''')), X))
IFRM(false, s(0), add(0, add(s(s(X'''''')), X'''))) -> RM(s(0), add(s(s(X'''''')), X'''))
RM(s(0), add(0, add(s(s(X'''''''')), X'''''))) -> IFRM(false, s(0), add(0, add(s(s(X'''''''')), X''''')))
IFRM(true, s(0), add(s(0), add(0, X'0))) -> RM(s(0), add(0, X'0))
RM(s(0), add(s(0), X)) -> IFRM(true, s(0), add(s(0), X))
IFRM(false, s(0), add(0, add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
RM(s(0), add(0, add(s(0), X'''''))) -> IFRM(false, s(0), add(0, add(s(0), X''''')))
IFRM(false, s(X'''''), add(0, add(0, X'0))) -> RM(s(X'''''), add(0, X'0))
RM(s(X'''), add(0, add(0, X'0''))) -> IFRM(false, s(X'''), add(0, add(0, X'0'')))
IFRM(false, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(s(Y'')), X)) -> IFRM(eq(X''', Y''), s(s(X''')), add(s(s(Y'')), X))
IFRM(false, s(s(X''''')), add(s(0), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(0), X)) -> IFRM(false, s(s(X''')), add(s(0), X))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFRM(false, s(0), add(s(s(X''''')), X'')) -> RM(s(0), X'')
five new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 20
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(0, X'0))) -> RM(s(s(X'''''')), add(0, X'0))
IFRM(false, s(s(X'''''')), add(0, add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
RM(s(s(X'''''''')), add(0, add(s(s(Y'''''')), X'''''))) -> IFRM(false, s(s(X'''''''')), add(0, add(s(s(Y'''''')), X''''')))
IFRM(false, s(s(X'''''')), add(0, add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
RM(s(s(X'''''''')), add(0, add(s(0), X'''''))) -> IFRM(false, s(s(X'''''''')), add(0, add(s(0), X''''')))
IFRM(true, s(0), add(s(0), add(s(s(X''''')), X'''))) -> RM(s(0), add(s(s(X''''')), X'''))
IFRM(true, s(0), add(s(0), add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
IFRM(false, s(0), add(s(s(X''''')), add(0, add(s(s(X'''''''''')), X''''''')))) -> RM(s(0), add(0, add(s(s(X'''''''''')), X''''''')))
IFRM(false, s(0), add(s(s(X''''')), add(0, add(s(0), X''''''')))) -> RM(s(0), add(0, add(s(0), X''''''')))
IFRM(false, s(0), add(s(s(X''''')), add(0, add(0, X'0'''')))) -> RM(s(0), add(0, add(0, X'0'''')))
IFRM(false, s(0), add(s(s(X''''')), add(s(s(X''''')), X'''))) -> RM(s(0), add(s(s(X''''')), X'''))
IFRM(false, s(0), add(s(s(X''''')), add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
RM(s(0), add(s(s(X''')), X)) -> IFRM(false, s(0), add(s(s(X''')), X))
IFRM(false, s(0), add(0, add(s(s(X'''''')), X'''))) -> RM(s(0), add(s(s(X'''''')), X'''))
RM(s(0), add(0, add(s(s(X'''''''')), X'''''))) -> IFRM(false, s(0), add(0, add(s(s(X'''''''')), X''''')))
IFRM(true, s(0), add(s(0), add(0, X'0))) -> RM(s(0), add(0, X'0))
RM(s(0), add(s(0), X)) -> IFRM(true, s(0), add(s(0), X))
IFRM(false, s(0), add(0, add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
RM(s(0), add(0, add(s(0), X'''''))) -> IFRM(false, s(0), add(0, add(s(0), X''''')))
IFRM(false, s(X'''''), add(0, add(0, X'0))) -> RM(s(X'''''), add(0, X'0))
RM(s(X'''), add(0, add(0, X'0''))) -> IFRM(false, s(X'''), add(0, add(0, X'0'')))
IFRM(false, s(s(X''''')), add(s(0), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(0), X)) -> IFRM(false, s(s(X''')), add(s(0), X))
IFRM(false, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(s(Y'')), X)) -> IFRM(eq(X''', Y''), s(s(X''')), add(s(s(Y'')), X))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(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, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFRM(false, s(s(X''''')), add(s(0), X'')) -> RM(s(s(X''''')), X'')
five new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 21
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(false, s(s(X''''''')), add(s(0), add(0, add(s(s(Y'''''''')), X'''''''')))) -> RM(s(s(X''''''')), add(0, add(s(s(Y'''''''')), X'''''''')))
IFRM(false, s(s(X''''''')), add(s(0), add(0, add(s(0), X'''''''')))) -> RM(s(s(X''''''')), add(0, add(s(0), X'''''''')))
IFRM(false, s(s(X'''''')), add(s(0), add(0, add(0, X'0'''')))) -> RM(s(s(X'''''')), add(0, add(0, X'0'''')))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(0, X'0))) -> RM(s(s(X'''''')), add(0, X'0))
IFRM(false, s(s(X'''''')), add(0, add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
RM(s(s(X'''''''')), add(0, add(s(s(Y'''''')), X'''''))) -> IFRM(false, s(s(X'''''''')), add(0, add(s(s(Y'''''')), X''''')))
IFRM(false, s(s(X'''''')), add(0, add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
RM(s(s(X'''''''')), add(0, add(s(0), X'''''))) -> IFRM(false, s(s(X'''''''')), add(0, add(s(0), X''''')))
IFRM(true, s(0), add(s(0), add(s(s(X''''')), X'''))) -> RM(s(0), add(s(s(X''''')), X'''))
IFRM(true, s(0), add(s(0), add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
IFRM(false, s(0), add(s(s(X''''')), add(0, add(s(s(X'''''''''')), X''''''')))) -> RM(s(0), add(0, add(s(s(X'''''''''')), X''''''')))
IFRM(false, s(0), add(s(s(X''''')), add(0, add(s(0), X''''''')))) -> RM(s(0), add(0, add(s(0), X''''''')))
IFRM(false, s(0), add(s(s(X''''')), add(0, add(0, X'0'''')))) -> RM(s(0), add(0, add(0, X'0'''')))
IFRM(false, s(0), add(s(s(X''''')), add(s(s(X''''')), X'''))) -> RM(s(0), add(s(s(X''''')), X'''))
IFRM(false, s(0), add(s(s(X''''')), add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
RM(s(0), add(s(s(X''')), X)) -> IFRM(false, s(0), add(s(s(X''')), X))
IFRM(false, s(0), add(0, add(s(s(X'''''')), X'''))) -> RM(s(0), add(s(s(X'''''')), X'''))
RM(s(0), add(0, add(s(s(X'''''''')), X'''''))) -> IFRM(false, s(0), add(0, add(s(s(X'''''''')), X''''')))
IFRM(true, s(0), add(s(0), add(0, X'0))) -> RM(s(0), add(0, X'0))
RM(s(0), add(s(0), X)) -> IFRM(true, s(0), add(s(0), X))
IFRM(false, s(0), add(0, add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
RM(s(0), add(0, add(s(0), X'''''))) -> IFRM(false, s(0), add(0, add(s(0), X''''')))
IFRM(false, s(X'''''), add(0, add(0, X'0))) -> RM(s(X'''''), add(0, X'0))
RM(s(X'''), add(0, add(0, X'0''))) -> IFRM(false, s(X'''), add(0, add(0, X'0'')))
IFRM(false, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')
RM(s(s(X''')), add(s(s(Y'')), X)) -> IFRM(eq(X''', Y''), s(s(X''')), add(s(s(Y'')), X))
IFRM(false, s(s(X'''''')), add(s(0), add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
IFRM(false, s(s(X'''''')), add(s(0), add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
RM(s(s(X''')), add(s(0), X)) -> IFRM(false, s(s(X''')), add(s(0), X))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFRM(false, s(s(X''''')), add(s(s(Y'''')), X'')) -> RM(s(s(X''''')), X'')
five new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 22
Argument Filtering and Ordering
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(false, s(s(X''''''')), add(s(s(Y'''')), add(0, add(s(s(Y'''''''')), X'''''''')))) -> RM(s(s(X''''''')), add(0, add(s(s(Y'''''''')), X'''''''')))
IFRM(false, s(s(X''''''')), add(s(s(Y'''')), add(0, add(s(0), X'''''''')))) -> RM(s(s(X''''''')), add(0, add(s(0), X'''''''')))
IFRM(false, s(s(X'''''')), add(s(s(Y'''')), add(0, add(0, X'0'''')))) -> RM(s(s(X'''''')), add(0, add(0, X'0'''')))
IFRM(false, s(s(X'''''')), add(s(s(Y'''')), add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
IFRM(false, s(s(X'''''')), add(s(s(Y'''')), add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
IFRM(false, s(s(X''''''')), add(s(0), add(0, add(s(0), X'''''''')))) -> RM(s(s(X''''''')), add(0, add(s(0), X'''''''')))
IFRM(false, s(s(X'''''')), add(s(0), add(0, add(0, X'0'''')))) -> RM(s(s(X'''''')), add(0, add(0, X'0'''')))
IFRM(false, s(s(X'''''')), add(s(0), add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
IFRM(false, s(s(X'''''')), add(s(0), add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
RM(s(s(X''')), add(s(0), X)) -> IFRM(false, s(s(X''')), add(s(0), X))
IFRM(false, s(s(X'''''')), add(0, add(s(0), X'''))) -> RM(s(s(X'''''')), add(s(0), X'''))
RM(s(s(X'''''''')), add(0, add(s(0), X'''''))) -> IFRM(false, s(s(X'''''''')), add(0, add(s(0), X''''')))
IFRM(true, s(0), add(s(0), add(s(s(X''''')), X'''))) -> RM(s(0), add(s(s(X''''')), X'''))
IFRM(true, s(0), add(s(0), add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
IFRM(false, s(0), add(s(s(X''''')), add(0, add(s(s(X'''''''''')), X''''''')))) -> RM(s(0), add(0, add(s(s(X'''''''''')), X''''''')))
IFRM(false, s(0), add(s(s(X''''')), add(0, add(s(0), X''''''')))) -> RM(s(0), add(0, add(s(0), X''''''')))
IFRM(false, s(0), add(s(s(X''''')), add(0, add(0, X'0'''')))) -> RM(s(0), add(0, add(0, X'0'''')))
IFRM(false, s(0), add(s(s(X''''')), add(s(s(X''''')), X'''))) -> RM(s(0), add(s(s(X''''')), X'''))
IFRM(false, s(0), add(s(s(X''''')), add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
RM(s(0), add(s(s(X''')), X)) -> IFRM(false, s(0), add(s(s(X''')), X))
IFRM(false, s(0), add(0, add(s(s(X'''''')), X'''))) -> RM(s(0), add(s(s(X'''''')), X'''))
RM(s(0), add(0, add(s(s(X'''''''')), X'''''))) -> IFRM(false, s(0), add(0, add(s(s(X'''''''')), X''''')))
IFRM(true, s(0), add(s(0), add(0, X'0))) -> RM(s(0), add(0, X'0))
RM(s(0), add(s(0), X)) -> IFRM(true, s(0), add(s(0), X))
IFRM(false, s(0), add(0, add(s(0), X'''))) -> RM(s(0), add(s(0), X'''))
RM(s(0), add(0, add(s(0), X'''''))) -> IFRM(false, s(0), add(0, add(s(0), X''''')))
IFRM(false, s(X'''''), add(0, add(0, X'0))) -> RM(s(X'''''), add(0, X'0))
RM(s(X'''), add(0, add(0, X'0''))) -> IFRM(false, s(X'''), add(0, add(0, X'0'')))
IFRM(true, s(s(X'''''')), add(s(s(Y'''')), add(0, X'0))) -> RM(s(s(X'''''')), add(0, X'0))
RM(s(s(X''')), add(s(s(Y'')), X)) -> IFRM(eq(X''', Y''), s(s(X''')), add(s(s(Y'')), X))
IFRM(false, s(s(X'''''')), add(0, add(s(s(Y'''')), X'''))) -> RM(s(s(X'''''')), add(s(s(Y'''')), X'''))
RM(s(s(X'''''''')), add(0, add(s(s(Y'''''')), X'''''))) -> IFRM(false, s(s(X'''''''')), add(0, add(s(s(Y'''''')), X''''')))
IFRM(false, s(s(X''''''')), add(s(0), add(0, add(s(s(Y'''''''')), X'''''''')))) -> RM(s(s(X''''''')), add(0, add(s(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




The following dependency pairs can be strictly oriented:

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


The following usable rules for innermost w.r.t. to the AFS can be oriented:

eq(0, 0) -> true
eq(0, s(X)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(X, Y)


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
add > {eq, false, s} > true
add > {RM, IFRM}

resulting in one new DP problem.
Used Argument Filtering System:
RM(x1, x2) -> RM(x1, x2)
IFRM(x1, x2, x3) -> IFRM(x1, x2, x3)
s(x1) -> s
add(x1, x2) -> add(x1, x2)
eq(x1, x2) -> eq


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 11
Forward Instantiation Transformation
       →DP Problem 3
Nar


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




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

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

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 13
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(false, 0, add(s(X''''), X'')) -> RM(0, X'')
RM(0, add(s(X''), X)) -> IFRM(false, 0, add(s(X''), X))
IFRM(true, 0, add(0, add(s(X''''), X'0))) -> RM(0, add(s(X''''), X'0))
IFRM(true, 0, add(0, add(0, X'''))) -> RM(0, add(0, X'''))
RM(0, add(0, X)) -> IFRM(true, 0, add(0, 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

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

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 15
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

IFRM(true, 0, add(0, add(s(X''''), X'0))) -> RM(0, add(s(X''''), X'0))
RM(0, add(0, add(s(X''''''), X'0''))) -> IFRM(true, 0, add(0, add(s(X''''''), X'0'')))
IFRM(true, 0, add(0, add(0, X'''))) -> RM(0, add(0, X'''))
RM(0, add(0, add(0, X'''''))) -> IFRM(true, 0, add(0, add(0, X''''')))
RM(0, add(s(X''), X)) -> IFRM(false, 0, add(s(X''), X))
IFRM(false, 0, add(s(X''''), X'')) -> RM(0, 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFRM(false, 0, add(s(X''''), X'')) -> RM(0, X'')
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 17
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pairs:

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


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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

RM(0, add(s(X''), X)) -> IFRM(false, 0, add(s(X''), X))
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 19
Argument Filtering and Ordering
       →DP Problem 3
Nar


Dependency Pairs:

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


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:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
{add, false} > RM > IFRM
s > 0 > true

resulting in one new DP problem.
Used Argument Filtering System:
IFRM(x1, x2, x3) -> IFRM(x1, x2, x3)
RM(x1, x2) -> RM(x1, x2)
add(x1, x2) -> add(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 7
Nar
             ...
               →DP Problem 23
Dependency Graph
       →DP Problem 3
Nar


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
FwdInst
       →DP Problem 2
Nar
       →DP Problem 3
Narrowing Transformation


Dependency Pair:

PURGE(add(N, X)) -> PURGE(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, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

PURGE(add(N, X)) -> PURGE(rm(N, X))
two new Dependency Pairs are created:

PURGE(add(N'', nil)) -> PURGE(nil)
PURGE(add(N'', add(M', X''))) -> PURGE(ifrm(eq(N'', M'), N'', add(M', X'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
       →DP Problem 3
Nar
           →DP Problem 25
Narrowing Transformation


Dependency Pair:

PURGE(add(N'', add(M', X''))) -> PURGE(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

PURGE(add(N'', add(M', X''))) -> PURGE(ifrm(eq(N'', M'), N'', add(M', X'')))
four new Dependency Pairs are created:

PURGE(add(0, add(0, X''))) -> PURGE(ifrm(true, 0, add(0, X'')))
PURGE(add(0, add(s(X'), X''))) -> PURGE(ifrm(false, 0, add(s(X'), X'')))
PURGE(add(s(X'), add(0, X''))) -> PURGE(ifrm(false, s(X'), add(0, X'')))
PURGE(add(s(X'), add(s(Y'), X''))) -> PURGE(ifrm(eq(X', Y'), s(X'), add(s(Y'), X'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
       →DP Problem 3
Nar
           →DP Problem 25
Nar
             ...
               →DP Problem 26
Rewriting Transformation


Dependency Pairs:

PURGE(add(s(X'), add(s(Y'), X''))) -> PURGE(ifrm(eq(X', Y'), s(X'), add(s(Y'), X'')))
PURGE(add(s(X'), add(0, X''))) -> PURGE(ifrm(false, s(X'), add(0, X'')))
PURGE(add(0, add(s(X'), X''))) -> PURGE(ifrm(false, 0, add(s(X'), X'')))
PURGE(add(0, add(0, X''))) -> PURGE(ifrm(true, 0, add(0, 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 Rewriting SCC transformation can be performed.
As a result of transforming the rule

PURGE(add(0, add(0, X''))) -> PURGE(ifrm(true, 0, add(0, X'')))
one new Dependency Pair is created:

PURGE(add(0, add(0, X''))) -> PURGE(rm(0, X''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
       →DP Problem 3
Nar
           →DP Problem 25
Nar
             ...
               →DP Problem 27
Rewriting Transformation


Dependency Pairs:

PURGE(add(0, add(0, X''))) -> PURGE(rm(0, X''))
PURGE(add(s(X'), add(0, X''))) -> PURGE(ifrm(false, s(X'), add(0, X'')))
PURGE(add(0, add(s(X'), X''))) -> PURGE(ifrm(false, 0, add(s(X'), X'')))
PURGE(add(s(X'), add(s(Y'), X''))) -> PURGE(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, a Rewriting SCC transformation can be performed.
As a result of transforming the rule

PURGE(add(0, add(s(X'), X''))) -> PURGE(ifrm(false, 0, add(s(X'), X'')))
one new Dependency Pair is created:

PURGE(add(0, add(s(X'), X''))) -> PURGE(add(s(X'), rm(0, X'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
       →DP Problem 3
Nar
           →DP Problem 25
Nar
             ...
               →DP Problem 28
Rewriting Transformation


Dependency Pairs:

PURGE(add(0, add(s(X'), X''))) -> PURGE(add(s(X'), rm(0, X'')))
PURGE(add(s(X'), add(s(Y'), X''))) -> PURGE(ifrm(eq(X', Y'), s(X'), add(s(Y'), X'')))
PURGE(add(s(X'), add(0, X''))) -> PURGE(ifrm(false, s(X'), add(0, X'')))
PURGE(add(0, add(0, X''))) -> PURGE(rm(0, 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 Rewriting SCC transformation can be performed.
As a result of transforming the rule

PURGE(add(s(X'), add(0, X''))) -> PURGE(ifrm(false, s(X'), add(0, X'')))
one new Dependency Pair is created:

PURGE(add(s(X'), add(0, X''))) -> PURGE(add(0, rm(s(X'), X'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
       →DP Problem 3
Nar
           →DP Problem 25
Nar
             ...
               →DP Problem 29
Argument Filtering and Ordering


Dependency Pairs:

PURGE(add(s(X'), add(0, X''))) -> PURGE(add(0, rm(s(X'), X'')))
PURGE(add(0, add(0, X''))) -> PURGE(rm(0, X''))
PURGE(add(s(X'), add(s(Y'), X''))) -> PURGE(ifrm(eq(X', Y'), s(X'), add(s(Y'), X'')))
PURGE(add(0, add(s(X'), X''))) -> PURGE(add(s(X'), rm(0, 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:

PURGE(add(s(X'), add(0, X''))) -> PURGE(add(0, rm(s(X'), X'')))
PURGE(add(0, add(0, X''))) -> PURGE(rm(0, X''))
PURGE(add(s(X'), add(s(Y'), X''))) -> PURGE(ifrm(eq(X', Y'), s(X'), add(s(Y'), X'')))
PURGE(add(0, add(s(X'), X''))) -> PURGE(add(s(X'), rm(0, X'')))


The following usable rules for innermost w.r.t. to the AFS can be oriented:

ifrm(true, N, add(M, X)) -> rm(N, X)
ifrm(false, N, add(M, X)) -> add(M, rm(N, X))
rm(N, nil) -> nil
rm(N, add(M, X)) -> ifrm(eq(N, M), N, add(M, X))


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
PURGE(x1) -> PURGE(x1)
add(x1, x2) -> add(x1, x2)
s(x1) -> s(x1)
rm(x1, x2) -> x2
ifrm(x1, x2, x3) -> x3


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
       →DP Problem 3
Nar
           →DP Problem 25
Nar
             ...
               →DP Problem 30
Dependency Graph


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.

Innermost Termination of R successfully shown.
Duration:
0:13 minutes