Term Rewriting System R:
[x, y, n, m]
app'(app'(eq, 0), 0) -> true
app'(app'(eq, 0), app'(s, x)) -> false
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(le, 0), y) -> true
app'(app'(le, app'(s, x)), 0) -> false
app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(app, nil), y) -> y
app'(app'(app, app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(app, x), y))
app'(min, app'(app'(add, n), nil)) -> n
app'(min, app'(app'(add, n), app'(app'(add, m), x))) -> app'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
app'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, n), x))
app'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, m), x))
app'(app'(rm, n), nil) -> nil
app'(app'(rm, n), app'(app'(add, m), x)) -> app'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
app'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> app'(app'(rm, n), x)
app'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> app'(app'(add, m), app'(app'(rm, n), x))
app'(app'(minsort, nil), nil) -> nil
app'(app'(minsort, app'(app'(add, n), x)), y) -> app'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
app'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
app'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> app'(app'(minsort, x), app'(app'(add, n), y))

Termination of R to be shown.



   R
Overlay and local confluence Check



The TRS is overlay and locally confluent (all critical pairs are trivially joinable).Hence, we can switch to innermost.


   R
OC
       →TRS2
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP'(app'(eq, app'(s, x)), app'(s, y)) -> APP'(app'(eq, x), y)
APP'(app'(eq, app'(s, x)), app'(s, y)) -> APP'(eq, x)
APP'(app'(le, app'(s, x)), app'(s, y)) -> APP'(app'(le, x), y)
APP'(app'(le, app'(s, x)), app'(s, y)) -> APP'(le, x)
APP'(app'(app, app'(app'(add, n), x)), y) -> APP'(app'(add, n), app'(app'(app, x), y))
APP'(app'(app, app'(app'(add, n), x)), y) -> APP'(app'(app, x), y)
APP'(app'(app, app'(app'(add, n), x)), y) -> APP'(app, x)
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(ifmin, app'(app'(le, n), m))
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(le, n), m)
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(le, n)
APP'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(min, app'(app'(add, n), x))
APP'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(add, n), x)
APP'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(min, app'(app'(add, m), x))
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(ifrm, app'(app'(eq, n), m)), n)
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(ifrm, app'(app'(eq, n), m))
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(eq, n), m)
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(eq, n)
APP'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> APP'(app'(rm, n), x)
APP'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> APP'(rm, n)
APP'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> APP'(app'(add, m), app'(app'(rm, n), x))
APP'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> APP'(app'(rm, n), x)
APP'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> APP'(rm, n)
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x))
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x))))
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(eq, n), app'(min, app'(app'(add, n), x)))
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(eq, n)
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(min, app'(app'(add, n), x))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil)
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(minsort, app'(app'(app, app'(app'(rm, n), x)), y))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(app, app'(app'(rm, n), x)), y)
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app, app'(app'(rm, n), x))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(rm, n), x)
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(rm, n)
APP'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> APP'(app'(minsort, x), app'(app'(add, n), y))
APP'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> APP'(minsort, x)
APP'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> APP'(app'(add, n), y)

Furthermore, R contains six SCCs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
Usable Rules (Innermost)
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP'(app'(eq, app'(s, x)), app'(s, y)) -> APP'(app'(eq, x), y)


Rules:


app'(app'(eq, 0), 0) -> true
app'(app'(eq, 0), app'(s, x)) -> false
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(le, 0), y) -> true
app'(app'(le, app'(s, x)), 0) -> false
app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(app, nil), y) -> y
app'(app'(app, app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(app, x), y))
app'(min, app'(app'(add, n), nil)) -> n
app'(min, app'(app'(add, n), app'(app'(add, m), x))) -> app'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
app'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, n), x))
app'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, m), x))
app'(app'(rm, n), nil) -> nil
app'(app'(rm, n), app'(app'(add, m), x)) -> app'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
app'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> app'(app'(rm, n), x)
app'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> app'(app'(add, m), app'(app'(rm, n), x))
app'(app'(minsort, nil), nil) -> nil
app'(app'(minsort, app'(app'(add, n), x)), y) -> app'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
app'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
app'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> app'(app'(minsort, x), app'(app'(add, n), y))


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
             ...
               →DP Problem 7
A-Transformation
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP'(app'(eq, app'(s, x)), app'(s, y)) -> APP'(app'(eq, x), y)


Rule:

none


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
             ...
               →DP Problem 8
Size-Change Principle
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

EQ(s(x), s(y)) -> EQ(x, y)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. EQ(s(x), s(y)) -> EQ(x, y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
Usable Rules (Innermost)
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP'(app'(le, app'(s, x)), app'(s, y)) -> APP'(app'(le, x), y)


Rules:


app'(app'(eq, 0), 0) -> true
app'(app'(eq, 0), app'(s, x)) -> false
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(le, 0), y) -> true
app'(app'(le, app'(s, x)), 0) -> false
app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(app, nil), y) -> y
app'(app'(app, app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(app, x), y))
app'(min, app'(app'(add, n), nil)) -> n
app'(min, app'(app'(add, n), app'(app'(add, m), x))) -> app'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
app'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, n), x))
app'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, m), x))
app'(app'(rm, n), nil) -> nil
app'(app'(rm, n), app'(app'(add, m), x)) -> app'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
app'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> app'(app'(rm, n), x)
app'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> app'(app'(add, m), app'(app'(rm, n), x))
app'(app'(minsort, nil), nil) -> nil
app'(app'(minsort, app'(app'(add, n), x)), y) -> app'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
app'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
app'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> app'(app'(minsort, x), app'(app'(add, n), y))


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
             ...
               →DP Problem 9
A-Transformation
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP'(app'(le, app'(s, x)), app'(s, y)) -> APP'(app'(le, x), y)


Rule:

none


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
             ...
               →DP Problem 10
Size-Change Principle
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

LE(s(x), s(y)) -> LE(x, y)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. LE(s(x), s(y)) -> LE(x, y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
Usable Rules (Innermost)
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP'(app'(app, app'(app'(add, n), x)), y) -> APP'(app'(app, x), y)


Rules:


app'(app'(eq, 0), 0) -> true
app'(app'(eq, 0), app'(s, x)) -> false
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(le, 0), y) -> true
app'(app'(le, app'(s, x)), 0) -> false
app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(app, nil), y) -> y
app'(app'(app, app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(app, x), y))
app'(min, app'(app'(add, n), nil)) -> n
app'(min, app'(app'(add, n), app'(app'(add, m), x))) -> app'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
app'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, n), x))
app'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, m), x))
app'(app'(rm, n), nil) -> nil
app'(app'(rm, n), app'(app'(add, m), x)) -> app'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
app'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> app'(app'(rm, n), x)
app'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> app'(app'(add, m), app'(app'(rm, n), x))
app'(app'(minsort, nil), nil) -> nil
app'(app'(minsort, app'(app'(add, n), x)), y) -> app'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
app'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
app'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> app'(app'(minsort, x), app'(app'(add, n), y))


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
             ...
               →DP Problem 11
A-Transformation
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP'(app'(app, app'(app'(add, n), x)), y) -> APP'(app'(app, x), y)


Rule:

none


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
             ...
               →DP Problem 12
Size-Change Principle
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP(add(n, x), y) -> APP(x, y)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. APP(add(n, x), y) -> APP(x, y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2=2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
add(x1, x2) -> add(x1, x2)

We obtain no new DP problems.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
Usable Rules (Innermost)
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pairs:

APP'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> APP'(app'(rm, n), x)
APP'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> APP'(app'(rm, n), x)
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))


Rules:


app'(app'(eq, 0), 0) -> true
app'(app'(eq, 0), app'(s, x)) -> false
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(le, 0), y) -> true
app'(app'(le, app'(s, x)), 0) -> false
app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(app, nil), y) -> y
app'(app'(app, app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(app, x), y))
app'(min, app'(app'(add, n), nil)) -> n
app'(min, app'(app'(add, n), app'(app'(add, m), x))) -> app'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
app'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, n), x))
app'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, m), x))
app'(app'(rm, n), nil) -> nil
app'(app'(rm, n), app'(app'(add, m), x)) -> app'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
app'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> app'(app'(rm, n), x)
app'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> app'(app'(add, m), app'(app'(rm, n), x))
app'(app'(minsort, nil), nil) -> nil
app'(app'(minsort, app'(app'(add, n), x)), y) -> app'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
app'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
app'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> app'(app'(minsort, x), app'(app'(add, n), y))


Strategy:

innermost




As we are in the innermost case, we can delete all 17 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
             ...
               →DP Problem 13
A-Transformation
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pairs:

APP'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> APP'(app'(rm, n), x)
APP'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> APP'(app'(rm, n), x)
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))


Rules:


app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(eq, 0), 0) -> true
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, 0), app'(s, x)) -> false


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
             ...
               →DP Problem 14
Size-Change Principle
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


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(s(x), s(y)) -> eq(x, y)
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(x)) -> false


Strategy:

innermost




We number the DPs as follows:
  1. IFRM(false, n, add(m, x)) -> RM(n, x)
  2. IFRM(true, n, add(m, x)) -> RM(n, x)
  3. RM(n, add(m, x)) -> IFRM(eq(n, m), n, add(m, x))
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
2=1
3>2
{3} , {3}
1=2
2=3

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {3}
2=2
3>3
{3} , {1, 2}
1=1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
add(x1, x2) -> add(x1, x2)

We obtain no new DP problems.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
Usable Rules (Innermost)
           →DP Problem 6
UsableRules


Dependency Pairs:

APP'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(min, app'(app'(add, m), x))
APP'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(min, app'(app'(add, n), x))
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))


Rules:


app'(app'(eq, 0), 0) -> true
app'(app'(eq, 0), app'(s, x)) -> false
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(le, 0), y) -> true
app'(app'(le, app'(s, x)), 0) -> false
app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(app, nil), y) -> y
app'(app'(app, app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(app, x), y))
app'(min, app'(app'(add, n), nil)) -> n
app'(min, app'(app'(add, n), app'(app'(add, m), x))) -> app'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
app'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, n), x))
app'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, m), x))
app'(app'(rm, n), nil) -> nil
app'(app'(rm, n), app'(app'(add, m), x)) -> app'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
app'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> app'(app'(rm, n), x)
app'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> app'(app'(add, m), app'(app'(rm, n), x))
app'(app'(minsort, nil), nil) -> nil
app'(app'(minsort, app'(app'(add, n), x)), y) -> app'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
app'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
app'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> app'(app'(minsort, x), app'(app'(add, n), y))


Strategy:

innermost




As we are in the innermost case, we can delete all 18 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
             ...
               →DP Problem 15
A-Transformation
           →DP Problem 6
UsableRules


Dependency Pairs:

APP'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(min, app'(app'(add, m), x))
APP'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(min, app'(app'(add, n), x))
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))


Rules:


app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(le, app'(s, x)), 0) -> false
app'(app'(le, 0), y) -> true


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
             ...
               →DP Problem 16
Size-Change Principle
           →DP Problem 6
UsableRules


Dependency Pairs:

IFMIN(false, add(n, add(m, x))) -> MIN(add(m, x))
IFMIN(true, add(n, add(m, x))) -> MIN(add(n, x))
MIN(add(n, add(m, x))) -> IFMIN(le(n, m), add(n, add(m, x)))


Rules:


le(s(x), s(y)) -> le(x, y)
le(s(x), 0) -> false
le(0, y) -> true


Strategy:

innermost




We number the DPs as follows:
  1. IFMIN(false, add(n, add(m, x))) -> MIN(add(m, x))
  2. IFMIN(true, add(n, add(m, x))) -> MIN(add(n, x))
  3. MIN(add(n, add(m, x))) -> IFMIN(le(n, m), add(n, add(m, x)))
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
2>1
{3} , {3}
1=2

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {3}
2>2
{3} , {1, 2}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
add(x1, x2) -> add(x1, x2)

We obtain no new DP problems.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
Usable Rules (Innermost)


Dependency Pairs:

APP'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> APP'(app'(minsort, x), app'(app'(add, n), y))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil)
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)


Rules:


app'(app'(eq, 0), 0) -> true
app'(app'(eq, 0), app'(s, x)) -> false
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(le, 0), y) -> true
app'(app'(le, app'(s, x)), 0) -> false
app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(app, nil), y) -> y
app'(app'(app, app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(app, x), y))
app'(min, app'(app'(add, n), nil)) -> n
app'(min, app'(app'(add, n), app'(app'(add, m), x))) -> app'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
app'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, n), x))
app'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, m), x))
app'(app'(rm, n), nil) -> nil
app'(app'(rm, n), app'(app'(add, m), x)) -> app'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
app'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> app'(app'(rm, n), x)
app'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> app'(app'(add, m), app'(app'(rm, n), x))
app'(app'(minsort, nil), nil) -> nil
app'(app'(minsort, app'(app'(add, n), x)), y) -> app'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
app'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
app'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> app'(app'(minsort, x), app'(app'(add, n), y))


Strategy:

innermost




As we are in the innermost case, we can delete all 4 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules
             ...
               →DP Problem 17
A-Transformation


Dependency Pairs:

APP'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> APP'(app'(minsort, x), app'(app'(add, n), y))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil)
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)


Rules:


app'(app'(rm, n), app'(app'(add, m), x)) -> app'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
app'(app'(app, nil), y) -> y
app'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> app'(app'(add, m), app'(app'(rm, n), x))
app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(rm, n), nil) -> nil
app'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> app'(app'(rm, n), x)
app'(app'(eq, 0), 0) -> true
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, 0), app'(s, x)) -> false
app'(app'(app, app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(app, x), y))
app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(le, app'(s, x)), 0) -> false
app'(min, app'(app'(add, n), app'(app'(add, m), x))) -> app'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
app'(app'(le, 0), y) -> true
app'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, m), x))
app'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, n), x))
app'(min, app'(app'(add, n), nil)) -> n


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules
             ...
               →DP Problem 18
Negative Polynomial Order


Dependency Pairs:

IFMINSORT(false, add(n, x), y) -> MINSORT(x, add(n, y))
IFMINSORT(true, add(n, x), y) -> MINSORT(app(rm(n, x), y), nil)
MINSORT(add(n, x), y) -> IFMINSORT(eq(n, min(add(n, x))), add(n, x), y)


Rules:


rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
rm(n, nil) -> nil
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
eq(s(x), s(y)) -> eq(x, y)
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(x)) -> false
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
le(s(x), s(y)) -> le(x, y)
le(s(x), 0) -> false
le(0, y) -> true
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
min(add(n, nil)) -> n
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))


Strategy:

innermost




The following Dependency Pair can be strictly oriented using the given order.

IFMINSORT(true, add(n, x), y) -> MINSORT(app(rm(n, x), y), nil)


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

eq(0, 0) -> true
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
rm(n, nil) -> nil
eq(s(x), s(y)) -> eq(x, y)
eq(s(x), 0) -> false
eq(0, s(x)) -> false
ifrm(true, n, add(m, x)) -> rm(n, x)
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
le(s(x), 0) -> false
ifmin(false, add(n, add(m, x))) -> min(add(m, x))


Used ordering:
Polynomial Order with Interpretation:

POL( IFMINSORT(x1, ..., x3) ) = x2 + x3

POL( add(x1, x2) ) = x1 + x2 + 1

POL( MINSORT(x1, x2) ) = x1 + x2

POL( app(x1, x2) ) = x1 + x2

POL( rm(x1, x2) ) = x2

POL( nil ) = 0

POL( eq(x1, x2) ) = 0

POL( true ) = 0

POL( ifrm(x1, ..., x3) ) = x3

POL( false ) = 0

POL( le(x1, x2) ) = 0

POL( min(x1) ) = x1

POL( ifmin(x1, x2) ) = x1 + x2


This results in one new DP problem.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules
             ...
               →DP Problem 19
Usable Rules (Innermost)


Dependency Pairs:

IFMINSORT(false, add(n, x), y) -> MINSORT(x, add(n, y))
MINSORT(add(n, x), y) -> IFMINSORT(eq(n, min(add(n, x))), add(n, x), y)


Rules:


rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
rm(n, nil) -> nil
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
eq(s(x), s(y)) -> eq(x, y)
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(x)) -> false
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
le(s(x), s(y)) -> le(x, y)
le(s(x), 0) -> false
le(0, y) -> true
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
min(add(n, nil)) -> n
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))


Strategy:

innermost




As we are in the innermost case, we can delete all 6 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules
             ...
               →DP Problem 20
Size-Change Principle


Dependency Pairs:

IFMINSORT(false, add(n, x), y) -> MINSORT(x, add(n, y))
MINSORT(add(n, x), y) -> IFMINSORT(eq(n, min(add(n, x))), add(n, x), y)


Rules:


eq(0, 0) -> true
eq(s(x), s(y)) -> eq(x, y)
eq(s(x), 0) -> false
eq(0, s(x)) -> false
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))


Strategy:

innermost




We number the DPs as follows:
  1. IFMINSORT(false, add(n, x), y) -> MINSORT(x, add(n, y))
  2. MINSORT(add(n, x), y) -> IFMINSORT(eq(n, min(add(n, x))), add(n, x), y)
and get the following Size-Change Graph(s):
{1} , {1}
2>1
{2} , {2}
1=2
2=3

which lead(s) to this/these maximal multigraph(s):
{1} , {2}
2>2
{2} , {1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
add(x1, x2) -> add(x1, x2)

We obtain no new DP problems.

Termination of R successfully shown.
Duration:
0:05 minutes