YES We show the termination of the TRS R: 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_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())) if_reach_1(false(),x,y,edge(u,v,i),h) -> reach(x,y,i,edge(u,v,h)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: eq#(s(x),s(y)) -> eq#(x,y) p2: union#(edge(x,y,i),h) -> union#(i,h) p3: reach#(x,y,edge(u,v,i),h) -> if_reach_1#(eq(x,u),x,y,edge(u,v,i),h) p4: reach#(x,y,edge(u,v,i),h) -> eq#(x,u) p5: if_reach_1#(true(),x,y,edge(u,v,i),h) -> if_reach_2#(eq(y,v),x,y,edge(u,v,i),h) p6: if_reach_1#(true(),x,y,edge(u,v,i),h) -> eq#(y,v) p7: if_reach_2#(false(),x,y,edge(u,v,i),h) -> or#(reach(x,y,i,h),reach(v,y,union(i,h),empty())) p8: if_reach_2#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,h) p9: if_reach_2#(false(),x,y,edge(u,v,i),h) -> reach#(v,y,union(i,h),empty()) p10: if_reach_2#(false(),x,y,edge(u,v,i),h) -> union#(i,h) p11: if_reach_1#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,edge(u,v,h)) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: or(true(),y) -> true() r6: or(false(),y) -> y r7: union(empty(),h) -> h r8: union(edge(x,y,i),h) -> edge(x,y,union(i,h)) r9: reach(x,y,empty(),h) -> false() r10: reach(x,y,edge(u,v,i),h) -> if_reach_1(eq(x,u),x,y,edge(u,v,i),h) r11: if_reach_1(true(),x,y,edge(u,v,i),h) -> if_reach_2(eq(y,v),x,y,edge(u,v,i),h) r12: if_reach_2(true(),x,y,edge(u,v,i),h) -> true() r13: if_reach_2(false(),x,y,edge(u,v,i),h) -> or(reach(x,y,i,h),reach(v,y,union(i,h),empty())) r14: if_reach_1(false(),x,y,edge(u,v,i),h) -> reach(x,y,i,edge(u,v,h)) The estimated dependency graph contains the following SCCs: {p3, p5, p8, p9, p11} {p1} {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: if_reach_2#(false(),x,y,edge(u,v,i),h) -> reach#(v,y,union(i,h),empty()) p2: reach#(x,y,edge(u,v,i),h) -> if_reach_1#(eq(x,u),x,y,edge(u,v,i),h) p3: if_reach_1#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,edge(u,v,h)) p4: if_reach_1#(true(),x,y,edge(u,v,i),h) -> if_reach_2#(eq(y,v),x,y,edge(u,v,i),h) p5: if_reach_2#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,h) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: or(true(),y) -> true() r6: or(false(),y) -> y r7: union(empty(),h) -> h r8: union(edge(x,y,i),h) -> edge(x,y,union(i,h)) r9: reach(x,y,empty(),h) -> false() r10: reach(x,y,edge(u,v,i),h) -> if_reach_1(eq(x,u),x,y,edge(u,v,i),h) r11: if_reach_1(true(),x,y,edge(u,v,i),h) -> if_reach_2(eq(y,v),x,y,edge(u,v,i),h) r12: if_reach_2(true(),x,y,edge(u,v,i),h) -> true() r13: if_reach_2(false(),x,y,edge(u,v,i),h) -> or(reach(x,y,i,h),reach(v,y,union(i,h),empty())) r14: if_reach_1(false(),x,y,edge(u,v,i),h) -> reach(x,y,i,edge(u,v,h)) The set of usable rules consists of r1, r2, r3, r4, r7, r8 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^1 order: lexicographic order interpretations: if_reach_2#_A(x1,x2,x3,x4,x5) = x2 + x3 + x4 + x5 + 2 false_A() = 6 edge_A(x1,x2,x3) = x1 + x2 + x3 + 4 reach#_A(x1,x2,x3,x4) = x1 + x2 + x3 + x4 + 5 union_A(x1,x2) = x1 + x2 empty_A() = 0 if_reach_1#_A(x1,x2,x3,x4,x5) = x2 + x3 + x4 + x5 + 5 eq_A(x1,x2) = x1 + x2 + 8 true_A() = 1 |0|_A() = 7 s_A(x1) = x1 + 7 precedence: union > false = eq > if_reach_2# = edge = reach# = empty = if_reach_1# = true = |0| = s partial status: pi(if_reach_2#) = [2, 3, 4, 5] pi(false) = [] pi(edge) = [1] pi(reach#) = [1, 2, 3, 4] pi(union) = [] pi(empty) = [] pi(if_reach_1#) = [2, 3, 4, 5] pi(eq) = [] pi(true) = [] pi(|0|) = [] pi(s) = [1] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: reach#(x,y,edge(u,v,i),h) -> if_reach_1#(eq(x,u),x,y,edge(u,v,i),h) p2: if_reach_1#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,edge(u,v,h)) p3: if_reach_1#(true(),x,y,edge(u,v,i),h) -> if_reach_2#(eq(y,v),x,y,edge(u,v,i),h) p4: if_reach_2#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,h) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: or(true(),y) -> true() r6: or(false(),y) -> y r7: union(empty(),h) -> h r8: union(edge(x,y,i),h) -> edge(x,y,union(i,h)) r9: reach(x,y,empty(),h) -> false() r10: reach(x,y,edge(u,v,i),h) -> if_reach_1(eq(x,u),x,y,edge(u,v,i),h) r11: if_reach_1(true(),x,y,edge(u,v,i),h) -> if_reach_2(eq(y,v),x,y,edge(u,v,i),h) r12: if_reach_2(true(),x,y,edge(u,v,i),h) -> true() r13: if_reach_2(false(),x,y,edge(u,v,i),h) -> or(reach(x,y,i,h),reach(v,y,union(i,h),empty())) r14: if_reach_1(false(),x,y,edge(u,v,i),h) -> reach(x,y,i,edge(u,v,h)) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: reach#(x,y,edge(u,v,i),h) -> if_reach_1#(eq(x,u),x,y,edge(u,v,i),h) p2: if_reach_1#(true(),x,y,edge(u,v,i),h) -> if_reach_2#(eq(y,v),x,y,edge(u,v,i),h) p3: if_reach_2#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,h) p4: if_reach_1#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,edge(u,v,h)) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: or(true(),y) -> true() r6: or(false(),y) -> y r7: union(empty(),h) -> h r8: union(edge(x,y,i),h) -> edge(x,y,union(i,h)) r9: reach(x,y,empty(),h) -> false() r10: reach(x,y,edge(u,v,i),h) -> if_reach_1(eq(x,u),x,y,edge(u,v,i),h) r11: if_reach_1(true(),x,y,edge(u,v,i),h) -> if_reach_2(eq(y,v),x,y,edge(u,v,i),h) r12: if_reach_2(true(),x,y,edge(u,v,i),h) -> true() r13: if_reach_2(false(),x,y,edge(u,v,i),h) -> or(reach(x,y,i,h),reach(v,y,union(i,h),empty())) r14: if_reach_1(false(),x,y,edge(u,v,i),h) -> reach(x,y,i,edge(u,v,h)) The set of usable rules consists of r1, r2, r3, r4 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^1 order: lexicographic order interpretations: reach#_A(x1,x2,x3,x4) = x2 + x3 + 5 edge_A(x1,x2,x3) = x1 + x2 + x3 + 6 if_reach_1#_A(x1,x2,x3,x4,x5) = x3 + x4 + 4 eq_A(x1,x2) = x1 + 9 true_A() = 8 if_reach_2#_A(x1,x2,x3,x4,x5) = x3 + x4 + 1 false_A() = 7 |0|_A() = 9 s_A(x1) = x1 + 10 precedence: s > reach# = edge = if_reach_1# = if_reach_2# > true = false = |0| > eq partial status: pi(reach#) = [] pi(edge) = [3] pi(if_reach_1#) = [] pi(eq) = [1] pi(true) = [] pi(if_reach_2#) = [] pi(false) = [] pi(|0|) = [] pi(s) = [1] The next rules are strictly ordered: p4 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: reach#(x,y,edge(u,v,i),h) -> if_reach_1#(eq(x,u),x,y,edge(u,v,i),h) p2: if_reach_1#(true(),x,y,edge(u,v,i),h) -> if_reach_2#(eq(y,v),x,y,edge(u,v,i),h) p3: if_reach_2#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,h) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: or(true(),y) -> true() r6: or(false(),y) -> y r7: union(empty(),h) -> h r8: union(edge(x,y,i),h) -> edge(x,y,union(i,h)) r9: reach(x,y,empty(),h) -> false() r10: reach(x,y,edge(u,v,i),h) -> if_reach_1(eq(x,u),x,y,edge(u,v,i),h) r11: if_reach_1(true(),x,y,edge(u,v,i),h) -> if_reach_2(eq(y,v),x,y,edge(u,v,i),h) r12: if_reach_2(true(),x,y,edge(u,v,i),h) -> true() r13: if_reach_2(false(),x,y,edge(u,v,i),h) -> or(reach(x,y,i,h),reach(v,y,union(i,h),empty())) r14: if_reach_1(false(),x,y,edge(u,v,i),h) -> reach(x,y,i,edge(u,v,h)) The estimated dependency graph contains the following SCCs: {p1, p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: reach#(x,y,edge(u,v,i),h) -> if_reach_1#(eq(x,u),x,y,edge(u,v,i),h) p2: if_reach_1#(true(),x,y,edge(u,v,i),h) -> if_reach_2#(eq(y,v),x,y,edge(u,v,i),h) p3: if_reach_2#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,h) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: or(true(),y) -> true() r6: or(false(),y) -> y r7: union(empty(),h) -> h r8: union(edge(x,y,i),h) -> edge(x,y,union(i,h)) r9: reach(x,y,empty(),h) -> false() r10: reach(x,y,edge(u,v,i),h) -> if_reach_1(eq(x,u),x,y,edge(u,v,i),h) r11: if_reach_1(true(),x,y,edge(u,v,i),h) -> if_reach_2(eq(y,v),x,y,edge(u,v,i),h) r12: if_reach_2(true(),x,y,edge(u,v,i),h) -> true() r13: if_reach_2(false(),x,y,edge(u,v,i),h) -> or(reach(x,y,i,h),reach(v,y,union(i,h),empty())) r14: if_reach_1(false(),x,y,edge(u,v,i),h) -> reach(x,y,i,edge(u,v,h)) The set of usable rules consists of r1, r2, r3, r4 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^1 order: lexicographic order interpretations: reach#_A(x1,x2,x3,x4) = x2 + x3 + 4 edge_A(x1,x2,x3) = x3 + 5 if_reach_1#_A(x1,x2,x3,x4,x5) = x3 + x4 + 3 eq_A(x1,x2) = x1 + x2 + 3 true_A() = 6 if_reach_2#_A(x1,x2,x3,x4,x5) = x3 + x4 + 2 false_A() = 1 |0|_A() = 7 s_A(x1) = x1 + 2 precedence: s > reach# = if_reach_1# = if_reach_2# > true = |0| > eq > edge = false partial status: pi(reach#) = [] pi(edge) = [3] pi(if_reach_1#) = [] pi(eq) = [2] pi(true) = [] pi(if_reach_2#) = [] pi(false) = [] pi(|0|) = [] pi(s) = [1] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: if_reach_1#(true(),x,y,edge(u,v,i),h) -> if_reach_2#(eq(y,v),x,y,edge(u,v,i),h) p2: if_reach_2#(false(),x,y,edge(u,v,i),h) -> reach#(x,y,i,h) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: or(true(),y) -> true() r6: or(false(),y) -> y r7: union(empty(),h) -> h r8: union(edge(x,y,i),h) -> edge(x,y,union(i,h)) r9: reach(x,y,empty(),h) -> false() r10: reach(x,y,edge(u,v,i),h) -> if_reach_1(eq(x,u),x,y,edge(u,v,i),h) r11: if_reach_1(true(),x,y,edge(u,v,i),h) -> if_reach_2(eq(y,v),x,y,edge(u,v,i),h) r12: if_reach_2(true(),x,y,edge(u,v,i),h) -> true() r13: if_reach_2(false(),x,y,edge(u,v,i),h) -> or(reach(x,y,i,h),reach(v,y,union(i,h),empty())) r14: if_reach_1(false(),x,y,edge(u,v,i),h) -> reach(x,y,i,edge(u,v,h)) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: eq#(s(x),s(y)) -> eq#(x,y) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: or(true(),y) -> true() r6: or(false(),y) -> y r7: union(empty(),h) -> h r8: union(edge(x,y,i),h) -> edge(x,y,union(i,h)) r9: reach(x,y,empty(),h) -> false() r10: reach(x,y,edge(u,v,i),h) -> if_reach_1(eq(x,u),x,y,edge(u,v,i),h) r11: if_reach_1(true(),x,y,edge(u,v,i),h) -> if_reach_2(eq(y,v),x,y,edge(u,v,i),h) r12: if_reach_2(true(),x,y,edge(u,v,i),h) -> true() r13: if_reach_2(false(),x,y,edge(u,v,i),h) -> or(reach(x,y,i,h),reach(v,y,union(i,h),empty())) r14: if_reach_1(false(),x,y,edge(u,v,i),h) -> reach(x,y,i,edge(u,v,h)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^1 order: lexicographic order interpretations: eq#_A(x1,x2) = x2 s_A(x1) = x1 + 1 precedence: eq# = s partial status: pi(eq#) = [2] pi(s) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: union#(edge(x,y,i),h) -> union#(i,h) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: or(true(),y) -> true() r6: or(false(),y) -> y r7: union(empty(),h) -> h r8: union(edge(x,y,i),h) -> edge(x,y,union(i,h)) r9: reach(x,y,empty(),h) -> false() r10: reach(x,y,edge(u,v,i),h) -> if_reach_1(eq(x,u),x,y,edge(u,v,i),h) r11: if_reach_1(true(),x,y,edge(u,v,i),h) -> if_reach_2(eq(y,v),x,y,edge(u,v,i),h) r12: if_reach_2(true(),x,y,edge(u,v,i),h) -> true() r13: if_reach_2(false(),x,y,edge(u,v,i),h) -> or(reach(x,y,i,h),reach(v,y,union(i,h),empty())) r14: if_reach_1(false(),x,y,edge(u,v,i),h) -> reach(x,y,i,edge(u,v,h)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^1 order: lexicographic order interpretations: union#_A(x1,x2) = x1 edge_A(x1,x2,x3) = x2 + x3 + 1 precedence: union# = edge partial status: pi(union#) = [] pi(edge) = [3] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.