Term Rewriting System R:
[x, y, h, i, u, v]
eq(0, 0) -> true
eq(0, s(x)) -> false
eq(s(x), 0) -> false
eq(s(x), s(y)) -> eq(x, y)
or(true, y) -> true
or(false, y) -> y
union(empty, h) -> h
union(edge(x, y, i), h) -> edge(x, y, union(i, h))
reach(x, y, empty, h) -> false
reach(x, y, edge(u, v, i), h) -> ifreach1(eq(x, u), x, y, edge(u, v, i), h)
ifreach1(true, x, y, edge(u, v, i), h) -> ifreach2(eq(y, v), x, y, edge(u, v, i), h)
ifreach1(false, x, y, edge(u, v, i), h) -> reach(x, y, i, edge(u, v, h))
ifreach2(true, x, y, edge(u, v, i), h) -> true
ifreach2(false, x, y, edge(u, v, i), h) -> or(reach(x, y, i, h), reach(v, y, union(i, h), empty))

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)
UNION(edge(x, y, i), h) -> UNION(i, h)
REACH(x, y, edge(u, v, i), h) -> IFREACH1(eq(x, u), x, y, edge(u, v, i), h)
REACH(x, y, edge(u, v, i), h) -> EQ(x, u)
IFREACH1(true, x, y, edge(u, v, i), h) -> IFREACH2(eq(y, v), x, y, edge(u, v, i), h)
IFREACH1(true, x, y, edge(u, v, i), h) -> EQ(y, v)
IFREACH1(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, edge(u, v, h))
IFREACH2(false, x, y, edge(u, v, i), h) -> OR(reach(x, y, i, h), reach(v, y, union(i, h), empty))
IFREACH2(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, h)
IFREACH2(false, x, y, edge(u, v, i), h) -> REACH(v, y, union(i, h), empty)
IFREACH2(false, x, y, edge(u, v, i), h) -> UNION(i, h)

Furthermore, R contains three SCCs.


   R
DPs
       →DP Problem 1
Usable Rules (Innermost)
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules


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)
or(true, y) -> true
or(false, y) -> y
union(empty, h) -> h
union(edge(x, y, i), h) -> edge(x, y, union(i, h))
reach(x, y, empty, h) -> false
reach(x, y, edge(u, v, i), h) -> ifreach1(eq(x, u), x, y, edge(u, v, i), h)
ifreach1(true, x, y, edge(u, v, i), h) -> ifreach2(eq(y, v), x, y, edge(u, v, i), h)
ifreach1(false, x, y, edge(u, v, i), h) -> reach(x, y, i, edge(u, v, h))
ifreach2(true, x, y, edge(u, v, i), h) -> true
ifreach2(false, x, y, edge(u, v, i), h) -> or(reach(x, y, i, h), reach(v, y, union(i, h), empty))


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 4
Size-Change Principle
       →DP Problem 2
UsableRules
       →DP Problem 3
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
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
Usable Rules (Innermost)
       →DP Problem 3
UsableRules


Dependency Pair:

UNION(edge(x, y, i), h) -> UNION(i, h)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> false
eq(s(x), 0) -> false
eq(s(x), s(y)) -> eq(x, y)
or(true, y) -> true
or(false, y) -> y
union(empty, h) -> h
union(edge(x, y, i), h) -> edge(x, y, union(i, h))
reach(x, y, empty, h) -> false
reach(x, y, edge(u, v, i), h) -> ifreach1(eq(x, u), x, y, edge(u, v, i), h)
ifreach1(true, x, y, edge(u, v, i), h) -> ifreach2(eq(y, v), x, y, edge(u, v, i), h)
ifreach1(false, x, y, edge(u, v, i), h) -> reach(x, y, i, edge(u, v, h))
ifreach2(true, x, y, edge(u, v, i), h) -> true
ifreach2(false, x, y, edge(u, v, i), h) -> or(reach(x, y, i, h), reach(v, y, union(i, h), empty))


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 5
Size-Change Principle
       →DP Problem 3
UsableRules


Dependency Pair:

UNION(edge(x, y, i), h) -> UNION(i, h)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. UNION(edge(x, y, i), h) -> UNION(i, h)
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:
edge(x1, x2, x3) -> edge(x1, x2, x3)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
Usable Rules (Innermost)


Dependency Pairs:

IFREACH1(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, edge(u, v, h))
IFREACH2(false, x, y, edge(u, v, i), h) -> REACH(v, y, union(i, h), empty)
IFREACH2(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, h)
IFREACH1(true, x, y, edge(u, v, i), h) -> IFREACH2(eq(y, v), x, y, edge(u, v, i), h)
REACH(x, y, edge(u, v, i), h) -> IFREACH1(eq(x, u), x, y, edge(u, v, i), h)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> false
eq(s(x), 0) -> false
eq(s(x), s(y)) -> eq(x, y)
or(true, y) -> true
or(false, y) -> y
union(empty, h) -> h
union(edge(x, y, i), h) -> edge(x, y, union(i, h))
reach(x, y, empty, h) -> false
reach(x, y, edge(u, v, i), h) -> ifreach1(eq(x, u), x, y, edge(u, v, i), h)
ifreach1(true, x, y, edge(u, v, i), h) -> ifreach2(eq(y, v), x, y, edge(u, v, i), h)
ifreach1(false, x, y, edge(u, v, i), h) -> reach(x, y, i, edge(u, v, h))
ifreach2(true, x, y, edge(u, v, i), h) -> true
ifreach2(false, x, y, edge(u, v, i), h) -> or(reach(x, y, i, h), reach(v, y, union(i, h), empty))


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
           →DP Problem 6
Negative Polynomial Order


Dependency Pairs:

IFREACH1(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, edge(u, v, h))
IFREACH2(false, x, y, edge(u, v, i), h) -> REACH(v, y, union(i, h), empty)
IFREACH2(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, h)
IFREACH1(true, x, y, edge(u, v, i), h) -> IFREACH2(eq(y, v), x, y, edge(u, v, i), h)
REACH(x, y, edge(u, v, i), h) -> IFREACH1(eq(x, u), x, y, edge(u, v, i), h)


Rules:


union(empty, h) -> h
union(edge(x, y, i), h) -> edge(x, y, union(i, h))
eq(0, 0) -> true
eq(s(x), s(y)) -> eq(x, y)
eq(s(x), 0) -> false
eq(0, s(x)) -> false


Strategy:

innermost




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

IFREACH2(false, x, y, edge(u, v, i), h) -> REACH(v, y, union(i, h), empty)
IFREACH2(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, h)


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

union(empty, h) -> h
union(edge(x, y, i), h) -> edge(x, y, union(i, h))
eq(0, 0) -> true
eq(s(x), s(y)) -> eq(x, y)
eq(s(x), 0) -> false
eq(0, s(x)) -> false


Used ordering:
Polynomial Order with Interpretation:

POL( IFREACH2(x1, ..., x5) ) = x4 + x5

POL( edge(x1, ..., x3) ) = x3 + 1

POL( REACH(x1, ..., x4) ) = x3 + x4

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

POL( empty ) = 0

POL( IFREACH1(x1, ..., x5) ) = x4 + x5

POL( eq(x1, x2) ) = 0

POL( true ) = 0

POL( false ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
           →DP Problem 6
Neg POLO
             ...
               →DP Problem 7
Dependency Graph


Dependency Pairs:

IFREACH1(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, edge(u, v, h))
IFREACH1(true, x, y, edge(u, v, i), h) -> IFREACH2(eq(y, v), x, y, edge(u, v, i), h)
REACH(x, y, edge(u, v, i), h) -> IFREACH1(eq(x, u), x, y, edge(u, v, i), h)


Rules:


union(empty, h) -> h
union(edge(x, y, i), h) -> edge(x, y, union(i, h))
eq(0, 0) -> true
eq(s(x), s(y)) -> eq(x, y)
eq(s(x), 0) -> false
eq(0, s(x)) -> false


Strategy:

innermost




Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
           →DP Problem 6
Neg POLO
             ...
               →DP Problem 8
Usable Rules (Innermost)


Dependency Pairs:

REACH(x, y, edge(u, v, i), h) -> IFREACH1(eq(x, u), x, y, edge(u, v, i), h)
IFREACH1(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, edge(u, v, h))


Rules:


union(empty, h) -> h
union(edge(x, y, i), h) -> edge(x, y, union(i, h))
eq(0, 0) -> true
eq(s(x), s(y)) -> eq(x, y)
eq(s(x), 0) -> false
eq(0, s(x)) -> false


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
           →DP Problem 6
Neg POLO
             ...
               →DP Problem 9
Size-Change Principle


Dependency Pairs:

REACH(x, y, edge(u, v, i), h) -> IFREACH1(eq(x, u), x, y, edge(u, v, i), h)
IFREACH1(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, edge(u, v, h))


Rules:


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


Strategy:

innermost




We number the DPs as follows:
  1. REACH(x, y, edge(u, v, i), h) -> IFREACH1(eq(x, u), x, y, edge(u, v, i), h)
  2. IFREACH1(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, edge(u, v, h))
and get the following Size-Change Graph(s):
{1} , {1}
1=2
2=3
3=4
4=5
{2} , {2}
2=1
3=2
4>3

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

We obtain no new DP problems.

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