YES We show the termination of the TRS R: if(true(),x,y) -> x if(false(),x,y) -> y if(x,y,y) -> y if(if(x,y,z),u(),v()) -> if(x,if(y,u(),v()),if(z,u(),v())) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: if#(if(x,y,z),u(),v()) -> if#(x,if(y,u(),v()),if(z,u(),v())) p2: if#(if(x,y,z),u(),v()) -> if#(y,u(),v()) p3: if#(if(x,y,z),u(),v()) -> if#(z,u(),v()) and R consists of: r1: if(true(),x,y) -> x r2: if(false(),x,y) -> y r3: if(x,y,y) -> y r4: if(if(x,y,z),u(),v()) -> if(x,if(y,u(),v()),if(z,u(),v())) 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: if#(if(x,y,z),u(),v()) -> if#(x,if(y,u(),v()),if(z,u(),v())) p2: if#(if(x,y,z),u(),v()) -> if#(z,u(),v()) p3: if#(if(x,y,z),u(),v()) -> if#(y,u(),v()) and R consists of: r1: if(true(),x,y) -> x r2: if(false(),x,y) -> y r3: if(x,y,y) -> y r4: if(if(x,y,z),u(),v()) -> if(x,if(y,u(),v()),if(z,u(),v())) The set of usable rules consists of r1, r2, r3, r4 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if#_A(x1,x2,x3) = x1 + x3 if_A(x1,x2,x3) = x1 + x2 + x3 u_A() = (0,0) v_A() = (0,0) true_A() = (1,1) false_A() = (1,1) precedence: if# = if = v > u = true = false partial status: pi(if#) = [1, 3] pi(if) = [1, 2, 3] pi(u) = [] pi(v) = [] pi(true) = [] pi(false) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if#_A(x1,x2,x3) = ((0,0),(1,0)) x3 + (3,0) if_A(x1,x2,x3) = x1 + ((1,0),(0,0)) x3 + (4,7) u_A() = (2,6) v_A() = (1,0) true_A() = (1,1) false_A() = (1,1) precedence: if = u = v > if# = true = false partial status: pi(if#) = [] pi(if) = [1] pi(u) = [] pi(v) = [] pi(true) = [] pi(false) = [] 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#(if(x,y,z),u(),v()) -> if#(z,u(),v()) p2: if#(if(x,y,z),u(),v()) -> if#(y,u(),v()) and R consists of: r1: if(true(),x,y) -> x r2: if(false(),x,y) -> y r3: if(x,y,y) -> y r4: if(if(x,y,z),u(),v()) -> if(x,if(y,u(),v()),if(z,u(),v())) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: if#(if(x,y,z),u(),v()) -> if#(z,u(),v()) p2: if#(if(x,y,z),u(),v()) -> if#(y,u(),v()) and R consists of: r1: if(true(),x,y) -> x r2: if(false(),x,y) -> y r3: if(x,y,y) -> y r4: if(if(x,y,z),u(),v()) -> if(x,if(y,u(),v()),if(z,u(),v())) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if#_A(x1,x2,x3) = x1 + (0,1) if_A(x1,x2,x3) = x1 + ((1,0),(1,0)) x2 + x3 + (2,0) u_A() = (3,2) v_A() = (1,3) precedence: if# = if = u = v partial status: pi(if#) = [] pi(if) = [] pi(u) = [] pi(v) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if#_A(x1,x2,x3) = x1 + (1,1) if_A(x1,x2,x3) = x1 + x3 u_A() = (2,2) v_A() = (2,2) precedence: if# = v > u > if partial status: pi(if#) = [1] pi(if) = [1, 3] pi(u) = [] pi(v) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: if#(if(x,y,z),u(),v()) -> if#(z,u(),v()) and R consists of: r1: if(true(),x,y) -> x r2: if(false(),x,y) -> y r3: if(x,y,y) -> y r4: if(if(x,y,z),u(),v()) -> if(x,if(y,u(),v()),if(z,u(),v())) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: if#(if(x,y,z),u(),v()) -> if#(z,u(),v()) and R consists of: r1: if(true(),x,y) -> x r2: if(false(),x,y) -> y r3: if(x,y,y) -> y r4: if(if(x,y,z),u(),v()) -> if(x,if(y,u(),v()),if(z,u(),v())) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if#_A(x1,x2,x3) = ((1,0),(1,0)) x1 + (0,1) if_A(x1,x2,x3) = ((1,0),(1,0)) x3 + (3,4) u_A() = (1,2) v_A() = (2,3) precedence: if = u > if# > v partial status: pi(if#) = [] pi(if) = [] pi(u) = [] pi(v) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if#_A(x1,x2,x3) = (0,0) if_A(x1,x2,x3) = (3,3) u_A() = (1,1) v_A() = (2,2) precedence: if# = u > if = v partial status: pi(if#) = [] pi(if) = [] pi(u) = [] pi(v) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.