Term Rewriting System R:
[X, Y, X1, X2, X3]
active(f(X)) -> mark(if(X, c, f(true)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(f(X)) -> f(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
proper(f(X)) -> f(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(c) -> ok(c)
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))

Termination of R to be shown.



   R
Removing Redundant Rules



Removing the following rules from R which fullfill a polynomial ordering:

active(if(false, X, Y)) -> mark(Y)

where the Polynomial interpretation:
  POL(top(x1))=  x1  
  POL(active(x1))=  x1  
  POL(proper(x1))=  x1  
  POL(if(x1, x2, x3))=  x1 + x2 + x3  
  POL(c)=  0  
  POL(false)=  1  
  POL(true)=  0  
  POL(mark(x1))=  x1  
  POL(ok(x1))=  x1  
  POL(f(x1))=  x1  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
Dependency Pair Analysis



R contains the following Dependency Pairs:

ACTIVE(if(X1, X2, X3)) -> IF(active(X1), X2, X3)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(if(X1, X2, X3)) -> IF(X1, active(X2), X3)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X2)
ACTIVE(f(X)) -> IF(X, c, f(true))
ACTIVE(f(X)) -> F(true)
ACTIVE(f(X)) -> F(active(X))
ACTIVE(f(X)) -> ACTIVE(X)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
IF(X1, mark(X2), X3) -> IF(X1, X2, X3)
F(mark(X)) -> F(X)
F(ok(X)) -> F(X)
PROPER(f(X)) -> F(proper(X))
PROPER(f(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> IF(proper(X1), proper(X2), proper(X3))
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
TOP(mark(X)) -> TOP(proper(X))
TOP(mark(X)) -> PROPER(X)
TOP(ok(X)) -> TOP(active(X))
TOP(ok(X)) -> ACTIVE(X)

Furthermore, R contains five SCCs.


   R
RRRPolo
       →TRS2
DPs
           →DP Problem 1
Size-Change Principle
           →DP Problem 2
SCP
           →DP Problem 3
SCP
           →DP Problem 4
SCP
           →DP Problem 5
MRR


Dependency Pairs:

IF(X1, mark(X2), X3) -> IF(X1, X2, X3)
IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)


Rules:


active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
proper(c) -> ok(c)
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(f(X)) -> f(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. IF(X1, mark(X2), X3) -> IF(X1, X2, X3)
  2. IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
  3. IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
and get the following Size-Change Graph(s):
{3, 2, 1} , {3, 2, 1}
1=1
2>2
3=3
{3, 2, 1} , {3, 2, 1}
1>1
2>2
3>3
{3, 2, 1} , {3, 2, 1}
1>1
2=2
3=3

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

DP: empty set
Oriented Rules: none

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

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
RRRPolo
       →TRS2
DPs
           →DP Problem 1
SCP
           →DP Problem 2
Size-Change Principle
           →DP Problem 3
SCP
           →DP Problem 4
SCP
           →DP Problem 5
MRR


Dependency Pairs:

F(ok(X)) -> F(X)
F(mark(X)) -> F(X)


Rules:


active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
proper(c) -> ok(c)
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(f(X)) -> f(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. F(ok(X)) -> F(X)
  2. F(mark(X)) -> F(X)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {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:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
RRRPolo
       →TRS2
DPs
           →DP Problem 1
SCP
           →DP Problem 2
SCP
           →DP Problem 3
Size-Change Principle
           →DP Problem 4
SCP
           →DP Problem 5
MRR


Dependency Pairs:

ACTIVE(f(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X2)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)


Rules:


active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
proper(c) -> ok(c)
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(f(X)) -> f(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. ACTIVE(f(X)) -> ACTIVE(X)
  2. ACTIVE(if(X1, X2, X3)) -> ACTIVE(X2)
  3. ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
and get the following Size-Change Graph(s):
{3, 2, 1} , {3, 2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{3, 2, 1} , {3, 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:
if(x1, x2, x3) -> if(x1, x2, x3)
f(x1) -> f(x1)

We obtain no new DP problems.


   R
RRRPolo
       →TRS2
DPs
           →DP Problem 1
SCP
           →DP Problem 2
SCP
           →DP Problem 3
SCP
           →DP Problem 4
Size-Change Principle
           →DP Problem 5
MRR


Dependency Pairs:

PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(f(X)) -> PROPER(X)


Rules:


active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
proper(c) -> ok(c)
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(f(X)) -> f(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. PROPER(if(X1, X2, X3)) -> PROPER(X3)
  2. PROPER(if(X1, X2, X3)) -> PROPER(X2)
  3. PROPER(if(X1, X2, X3)) -> PROPER(X1)
  4. PROPER(f(X)) -> PROPER(X)
and get the following Size-Change Graph(s):
{4, 3, 2, 1} , {4, 3, 2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{4, 3, 2, 1} , {4, 3, 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:
if(x1, x2, x3) -> if(x1, x2, x3)
f(x1) -> f(x1)

We obtain no new DP problems.


   R
RRRPolo
       →TRS2
DPs
           →DP Problem 1
SCP
           →DP Problem 2
SCP
           →DP Problem 3
SCP
           →DP Problem 4
SCP
           →DP Problem 5
Modular Removal of Rules


Dependency Pairs:

TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))


Rules:


active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
proper(c) -> ok(c)
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(f(X)) -> f(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We have the following set of usable rules:

active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
proper(c) -> ok(c)
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(f(X)) -> f(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(active(x1))=  x1  
  POL(proper(x1))=  x1  
  POL(if(x1, x2, x3))=  x1 + x2 + x3  
  POL(c)=  0  
  POL(false)=  0  
  POL(true)=  0  
  POL(mark(x1))=  x1  
  POL(TOP(x1))=  x1  
  POL(ok(x1))=  x1  
  POL(f(x1))=  x1  

We have the following set D of usable symbols: {proper, active, c, if, false, true, mark, TOP, ok, f}
No Dependency Pairs can be deleted.
2 non usable rules have been deleted.

The result of this processor delivers one new DP problem.



   R
RRRPolo
       →TRS2
DPs
           →DP Problem 1
SCP
           →DP Problem 2
SCP
           →DP Problem 3
SCP
           →DP Problem 4
SCP
           →DP Problem 5
MRR
             ...
               →DP Problem 6
Negative Polynomial Order


Dependency Pairs:

TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))


Rules:


active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
proper(c) -> ok(c)
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(f(X)) -> f(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))





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

TOP(mark(X)) -> TOP(proper(X))


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

active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
proper(c) -> ok(c)
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(f(X)) -> f(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))


Used ordering:
Polynomial Order with Interpretation:

POL( TOP(x1) ) = x1

POL( mark(x1) ) = x1 + 1

POL( proper(x1) ) = x1

POL( ok(x1) ) = x1

POL( active(x1) ) = x1

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

POL( f(x1) ) = x1 + 1

POL( c ) = 0

POL( true ) = 1

POL( false ) = 0


This results in one new DP problem.


   R
RRRPolo
       →TRS2
DPs
           →DP Problem 1
SCP
           →DP Problem 2
SCP
           →DP Problem 3
SCP
           →DP Problem 4
SCP
           →DP Problem 5
MRR
             ...
               →DP Problem 7
Modular Removal of Rules


Dependency Pair:

TOP(ok(X)) -> TOP(active(X))


Rules:


active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
proper(c) -> ok(c)
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(f(X)) -> f(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))





We have the following set of usable rules:

active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(active(x1))=  x1  
  POL(if(x1, x2, x3))=  x1 + x2 + x3  
  POL(c)=  0  
  POL(true)=  0  
  POL(mark(x1))=  x1  
  POL(TOP(x1))=  1 + x1  
  POL(ok(x1))=  x1  
  POL(f(x1))=  x1  

We have the following set D of usable symbols: {active, c, if, true, mark, TOP, ok, f}
No Dependency Pairs can be deleted.
5 non usable rules have been deleted.

The result of this processor delivers one new DP problem.



   R
RRRPolo
       →TRS2
DPs
           →DP Problem 1
SCP
           →DP Problem 2
SCP
           →DP Problem 3
SCP
           →DP Problem 4
SCP
           →DP Problem 5
MRR
             ...
               →DP Problem 8
Modular Removal of Rules


Dependency Pair:

TOP(ok(X)) -> TOP(active(X))


Rules:


active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))





We have the following set of usable rules:

active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(if(X1, X2, X3)) -> if(X1, active(X2), X3)
active(f(X)) -> mark(if(X, c, f(true)))
active(f(X)) -> f(active(X))
active(if(true, X, Y)) -> mark(X)
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
if(X1, mark(X2), X3) -> mark(if(X1, X2, X3))
f(mark(X)) -> mark(f(X))
f(ok(X)) -> ok(f(X))
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(active(x1))=  x1  
  POL(if(x1, x2, x3))=  x1 + x2 + x3  
  POL(c)=  0  
  POL(true)=  0  
  POL(mark(x1))=  x1  
  POL(TOP(x1))=  1 + x1  
  POL(ok(x1))=  1 + x1  
  POL(f(x1))=  x1  

We have the following set D of usable symbols: {active, c, if, true, mark, TOP, ok, f}
The following Dependency Pairs can be deleted as the lhs is strictly greater than the corresponding rhs:

TOP(ok(X)) -> TOP(active(X))

No Rules can be deleted.

After the removal, there are no SCCs in the dependency graph which results in no DP problems which have to be solved.


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