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
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
AFS


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




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(EQ(x1, x2))=  x1 + x2  
  POL(s(x1))=  1 + x1  

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


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


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)
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




Using the Dependency Graph resulted in no new DP problems.


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


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




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(edge(x1, x2, x3))=  1 + x1 + x2 + x3  
  POL(UNION(x1, x2))=  x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
UNION(x1, x2) -> UNION(x1, x2)
edge(x1, x2, x3) -> edge(x1, x2, x3)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 5
Dependency Graph
       →DP Problem 3
AFS


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)
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




Using the Dependency Graph resulted in no new DP problems.


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


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




The following dependency pairs can be strictly oriented:

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)


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)
union(empty, h) -> h
union(edge(x, y, i), h) -> edge(x, y, union(i, h))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(edge(x1, x2, x3))=  1 + x1 + x2 + x3  
  POL(eq)=  0  
  POL(false)=  0  
  POL(IF_REACH_2(x1, x2, x3, x4, x5))=  x1 + x2 + x3 + x4 + x5  
  POL(union(x1, x2))=  x1 + x2  
  POL(REACH(x1, x2, x3, x4))=  x1 + x2 + x3 + x4  
  POL(true)=  0  
  POL(empty)=  0  
  POL(IF_REACH_1(x1, x2, x3, x4, x5))=  x1 + x2 + x3 + x4 + x5  

resulting in one new DP problem.
Used Argument Filtering System:
IFREACH2(x1, x2, x3, x4, x5) -> IFREACH2(x1, x2, x3, x4, x5)
REACH(x1, x2, x3, x4) -> REACH(x1, x2, x3, x4)
edge(x1, x2, x3) -> edge(x1, x2, x3)
IFREACH1(x1, x2, x3, x4, x5) -> IFREACH1(x1, x2, x3, x4, x5)
eq(x1, x2) -> eq
union(x1, x2) -> union(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 6
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:


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




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


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 6
DGraph
             ...
               →DP Problem 7
Argument Filtering and Ordering


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(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




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(edge(x1, x2, x3))=  1 + x1 + x2 + x3  

resulting in one new DP problem.
Used Argument Filtering System:
REACH(x1, x2, x3, x4) -> x3
edge(x1, x2, x3) -> edge(x1, x2, x3)
IFREACH1(x1, x2, x3, x4, x5) -> x4


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 6
DGraph
             ...
               →DP Problem 8
Dependency Graph


Dependency Pair:

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




Using the Dependency Graph resulted in no new DP problems.

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