YES We show the termination of the TRS R: app(app(and(),true()),true()) -> true() app(app(and(),true()),false()) -> false() app(app(and(),false()),true()) -> false() app(app(and(),false()),false()) -> false() app(app(or(),true()),true()) -> true() app(app(or(),true()),false()) -> true() app(app(or(),false()),true()) -> true() app(app(or(),false()),false()) -> false() app(app(forall(),p),nil()) -> true() app(app(forall(),p),app(app(cons(),x),xs)) -> app(app(and(),app(p,x)),app(app(forall(),p),xs)) app(app(forsome(),p),nil()) -> false() app(app(forsome(),p),app(app(cons(),x),xs)) -> app(app(or(),app(p,x)),app(app(forsome(),p),xs)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(forall(),p),app(app(cons(),x),xs)) -> app#(app(and(),app(p,x)),app(app(forall(),p),xs)) p2: app#(app(forall(),p),app(app(cons(),x),xs)) -> app#(and(),app(p,x)) p3: app#(app(forall(),p),app(app(cons(),x),xs)) -> app#(p,x) p4: app#(app(forall(),p),app(app(cons(),x),xs)) -> app#(app(forall(),p),xs) p5: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(app(or(),app(p,x)),app(app(forsome(),p),xs)) p6: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(or(),app(p,x)) p7: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(p,x) p8: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(app(forsome(),p),xs) and R consists of: r1: app(app(and(),true()),true()) -> true() r2: app(app(and(),true()),false()) -> false() r3: app(app(and(),false()),true()) -> false() r4: app(app(and(),false()),false()) -> false() r5: app(app(or(),true()),true()) -> true() r6: app(app(or(),true()),false()) -> true() r7: app(app(or(),false()),true()) -> true() r8: app(app(or(),false()),false()) -> false() r9: app(app(forall(),p),nil()) -> true() r10: app(app(forall(),p),app(app(cons(),x),xs)) -> app(app(and(),app(p,x)),app(app(forall(),p),xs)) r11: app(app(forsome(),p),nil()) -> false() r12: app(app(forsome(),p),app(app(cons(),x),xs)) -> app(app(or(),app(p,x)),app(app(forsome(),p),xs)) The estimated dependency graph contains the following SCCs: {p3, p4, p7, p8} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(forall(),p),app(app(cons(),x),xs)) -> app#(p,x) p2: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(app(forsome(),p),xs) p3: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(p,x) p4: app#(app(forall(),p),app(app(cons(),x),xs)) -> app#(app(forall(),p),xs) and R consists of: r1: app(app(and(),true()),true()) -> true() r2: app(app(and(),true()),false()) -> false() r3: app(app(and(),false()),true()) -> false() r4: app(app(and(),false()),false()) -> false() r5: app(app(or(),true()),true()) -> true() r6: app(app(or(),true()),false()) -> true() r7: app(app(or(),false()),true()) -> true() r8: app(app(or(),false()),false()) -> false() r9: app(app(forall(),p),nil()) -> true() r10: app(app(forall(),p),app(app(cons(),x),xs)) -> app(app(and(),app(p,x)),app(app(forall(),p),xs)) r11: app(app(forsome(),p),nil()) -> false() r12: app(app(forsome(),p),app(app(cons(),x),xs)) -> app(app(or(),app(p,x)),app(app(forsome(),p),xs)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: app#_A(x1,x2) = ((1,1),(0,1)) x2 + (10,4) app_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,1),(1,1)) x2 + (6,2) forall_A() = (0,3) cons_A() = (0,1) forsome_A() = (11,3) precedence: app# = app = forall = cons = forsome partial status: pi(app#) = [2] pi(app) = [2] pi(forall) = [] pi(cons) = [] pi(forsome) = [] 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: app#(app(forall(),p),app(app(cons(),x),xs)) -> app#(p,x) p2: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(app(forsome(),p),xs) p3: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(p,x) and R consists of: r1: app(app(and(),true()),true()) -> true() r2: app(app(and(),true()),false()) -> false() r3: app(app(and(),false()),true()) -> false() r4: app(app(and(),false()),false()) -> false() r5: app(app(or(),true()),true()) -> true() r6: app(app(or(),true()),false()) -> true() r7: app(app(or(),false()),true()) -> true() r8: app(app(or(),false()),false()) -> false() r9: app(app(forall(),p),nil()) -> true() r10: app(app(forall(),p),app(app(cons(),x),xs)) -> app(app(and(),app(p,x)),app(app(forall(),p),xs)) r11: app(app(forsome(),p),nil()) -> false() r12: app(app(forsome(),p),app(app(cons(),x),xs)) -> app(app(or(),app(p,x)),app(app(forsome(),p),xs)) 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: app#(app(forall(),p),app(app(cons(),x),xs)) -> app#(p,x) p2: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(p,x) p3: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(app(forsome(),p),xs) and R consists of: r1: app(app(and(),true()),true()) -> true() r2: app(app(and(),true()),false()) -> false() r3: app(app(and(),false()),true()) -> false() r4: app(app(and(),false()),false()) -> false() r5: app(app(or(),true()),true()) -> true() r6: app(app(or(),true()),false()) -> true() r7: app(app(or(),false()),true()) -> true() r8: app(app(or(),false()),false()) -> false() r9: app(app(forall(),p),nil()) -> true() r10: app(app(forall(),p),app(app(cons(),x),xs)) -> app(app(and(),app(p,x)),app(app(forall(),p),xs)) r11: app(app(forsome(),p),nil()) -> false() r12: app(app(forsome(),p),app(app(cons(),x),xs)) -> app(app(or(),app(p,x)),app(app(forsome(),p),xs)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: app#_A(x1,x2) = x1 + ((0,1),(0,0)) x2 + (3,4) app_A(x1,x2) = ((0,1),(0,1)) x1 + ((1,0),(1,1)) x2 + (0,1) forall_A() = (1,0) cons_A() = (1,1) forsome_A() = (9,2) precedence: app# = app = forall = cons = forsome partial status: pi(app#) = [1] pi(app) = [] pi(forall) = [] pi(cons) = [] pi(forsome) = [] 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: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(p,x) p2: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(app(forsome(),p),xs) and R consists of: r1: app(app(and(),true()),true()) -> true() r2: app(app(and(),true()),false()) -> false() r3: app(app(and(),false()),true()) -> false() r4: app(app(and(),false()),false()) -> false() r5: app(app(or(),true()),true()) -> true() r6: app(app(or(),true()),false()) -> true() r7: app(app(or(),false()),true()) -> true() r8: app(app(or(),false()),false()) -> false() r9: app(app(forall(),p),nil()) -> true() r10: app(app(forall(),p),app(app(cons(),x),xs)) -> app(app(and(),app(p,x)),app(app(forall(),p),xs)) r11: app(app(forsome(),p),nil()) -> false() r12: app(app(forsome(),p),app(app(cons(),x),xs)) -> app(app(or(),app(p,x)),app(app(forsome(),p),xs)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(p,x) p2: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(app(forsome(),p),xs) and R consists of: r1: app(app(and(),true()),true()) -> true() r2: app(app(and(),true()),false()) -> false() r3: app(app(and(),false()),true()) -> false() r4: app(app(and(),false()),false()) -> false() r5: app(app(or(),true()),true()) -> true() r6: app(app(or(),true()),false()) -> true() r7: app(app(or(),false()),true()) -> true() r8: app(app(or(),false()),false()) -> false() r9: app(app(forall(),p),nil()) -> true() r10: app(app(forall(),p),app(app(cons(),x),xs)) -> app(app(and(),app(p,x)),app(app(forall(),p),xs)) r11: app(app(forsome(),p),nil()) -> false() r12: app(app(forsome(),p),app(app(cons(),x),xs)) -> app(app(or(),app(p,x)),app(app(forsome(),p),xs)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: app#_A(x1,x2) = ((1,0),(1,1)) x1 + (3,3) app_A(x1,x2) = x2 + (2,2) forsome_A() = (0,0) cons_A() = (1,1) precedence: app# = app = cons > forsome partial status: pi(app#) = [] pi(app) = [2] pi(forsome) = [] pi(cons) = [] 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: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(app(forsome(),p),xs) and R consists of: r1: app(app(and(),true()),true()) -> true() r2: app(app(and(),true()),false()) -> false() r3: app(app(and(),false()),true()) -> false() r4: app(app(and(),false()),false()) -> false() r5: app(app(or(),true()),true()) -> true() r6: app(app(or(),true()),false()) -> true() r7: app(app(or(),false()),true()) -> true() r8: app(app(or(),false()),false()) -> false() r9: app(app(forall(),p),nil()) -> true() r10: app(app(forall(),p),app(app(cons(),x),xs)) -> app(app(and(),app(p,x)),app(app(forall(),p),xs)) r11: app(app(forsome(),p),nil()) -> false() r12: app(app(forsome(),p),app(app(cons(),x),xs)) -> app(app(or(),app(p,x)),app(app(forsome(),p),xs)) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(forsome(),p),app(app(cons(),x),xs)) -> app#(app(forsome(),p),xs) and R consists of: r1: app(app(and(),true()),true()) -> true() r2: app(app(and(),true()),false()) -> false() r3: app(app(and(),false()),true()) -> false() r4: app(app(and(),false()),false()) -> false() r5: app(app(or(),true()),true()) -> true() r6: app(app(or(),true()),false()) -> true() r7: app(app(or(),false()),true()) -> true() r8: app(app(or(),false()),false()) -> false() r9: app(app(forall(),p),nil()) -> true() r10: app(app(forall(),p),app(app(cons(),x),xs)) -> app(app(and(),app(p,x)),app(app(forall(),p),xs)) r11: app(app(forsome(),p),nil()) -> false() r12: app(app(forsome(),p),app(app(cons(),x),xs)) -> app(app(or(),app(p,x)),app(app(forsome(),p),xs)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: app#_A(x1,x2) = ((1,0),(1,0)) x2 + (4,3) app_A(x1,x2) = ((1,0),(0,0)) x2 + (2,2) forsome_A() = (1,1) cons_A() = (3,2) precedence: app# = app = forsome = cons partial status: pi(app#) = [] pi(app) = [] pi(forsome) = [] pi(cons) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.