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) -> if_reach_1(eq(x, u), x, y, edge(u, v, i), h) if_reach_1(true, x, y, edge(u, v, i), h) -> if_reach_2(eq(y, v), x, y, edge(u, v, i), h) if_reach_1(false, x, y, edge(u, v, i), h) -> reach(x, y, i, edge(u, v, h)) if_reach_2(true, x, y, edge(u, v, i), h) -> true if_reach_2(false, x, y, edge(u, v, i), h) -> or(reach(x, y, i, h), reach(v, y, union(i, h), empty)) Termination of R to be shown. This program has no overlaps, so it is sufficient to show innermost termination. R contains the following Dependency Pairs: IF_REACH_2(false, x, y, edge(u, v, i), h) -> OR(reach(x, y, i, h), reach(v, y, union(i, h), empty)) IF_REACH_2(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, h) IF_REACH_2(false, x, y, edge(u, v, i), h) -> REACH(v, y, union(i, h), empty) IF_REACH_2(false, x, y, edge(u, v, i), h) -> UNION(i, h) REACH(x, y, edge(u, v, i), h) -> IF_REACH_1(eq(x, u), x, y, edge(u, v, i), h) REACH(x, y, edge(u, v, i), h) -> EQ(x, u) UNION(edge(x, y, i), h) -> UNION(i, h) IF_REACH_1(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, edge(u, v, h)) IF_REACH_1(true, x, y, edge(u, v, i), h) -> IF_REACH_2(eq(y, v), x, y, edge(u, v, i), h) IF_REACH_1(true, x, y, edge(u, v, i), h) -> EQ(y, v) EQ(s(x), s(y)) -> EQ(x, y) Furthermore, R contains three SCCs. SCC1: EQ(s(x), s(y)) -> EQ(x, y) Removing rules from R by ordering and analyzing Dependency Pairs, Usable Rules, and Usable Equations. This is possible by using the following (C_E-compatible) Polynomial ordering. Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(EQ(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: EQ(s(x), s(y)) -> EQ(x, y) This transformation is resulting in no new subcycles. SCC2: UNION(edge(x, y, i), h) -> UNION(i, h) Removing rules from R by ordering and analyzing Dependency Pairs, Usable Rules, and Usable Equations. This is possible by using the following (C_E-compatible) Polynomial ordering. Polynomial interpretation: POL(edge(x_1, x_2, x_3)) = 1 + x_1 + x_2 + x_3 POL(UNION(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: UNION(edge(x, y, i), h) -> UNION(i, h) This transformation is resulting in no new subcycles. SCC3: IF_REACH_2(false, x, y, edge(u, v, i), h) -> REACH(v, y, union(i, h), empty) IF_REACH_1(true, x, y, edge(u, v, i), h) -> IF_REACH_2(eq(y, v), x, y, edge(u, v, i), h) IF_REACH_1(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, edge(u, v, h)) REACH(x, y, edge(u, v, i), h) -> IF_REACH_1(eq(x, u), x, y, edge(u, v, i), h) IF_REACH_2(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, h) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. Additionally, the following rules can be oriented: union(edge(x, y, i), h) -> edge(x, y, union(i, h)) union(empty, h) -> h Used ordering: Polynomial ordering with Polynomial interpretation: POL(IF_REACH_2(x_1, x_2, x_3, x_4, x_5)) = x_4 + x_5 POL(s(x_1)) = 0 POL(eq(x_1, x_2)) = 0 POL(true) = 0 POL(edge(x_1, x_2, x_3)) = 1 + x_3 POL(union(x_1, x_2)) = x_1 + x_2 POL(IF_REACH_1(x_1, x_2, x_3, x_4, x_5)) = x_4 + x_5 POL(empty) = 0 POL(0) = 0 POL(REACH(x_1, x_2, x_3, x_4)) = x_3 + x_4 POL(false) = 0 resulting in one subcycle. SCC3.Polo1: REACH(x, y, edge(u, v, i), h) -> IF_REACH_1(eq(x, u), x, y, edge(u, v, i), h) IF_REACH_1(false, x, y, edge(u, v, i), h) -> REACH(x, y, i, edge(u, v, h)) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. No rules need to be oriented. Used ordering: Polynomial ordering with Polynomial interpretation: POL(s(x_1)) = 0 POL(eq(x_1, x_2)) = 0 POL(true) = 0 POL(edge(x_1, x_2, x_3)) = 1 + x_3 POL(IF_REACH_1(x_1, x_2, x_3, x_4, x_5)) = x_4 POL(0) = 0 POL(REACH(x_1, x_2, x_3, x_4)) = 1 + x_3 POL(false) = 0 resulting in no subcycles. Termination of R successfully shown. Duration: 1.544 seconds.