Input TRS: 1: empty(nil()) -> true() 2: empty(cons(x,l)) -> false() 3: head(cons(x,l)) -> x 4: tail(nil()) -> nil() 5: tail(cons(x,l)) -> l 6: rev(nil()) -> nil() 7: rev(cons(x,l)) -> cons(rev1(x,l),rev2(x,l)) 8: last(x,l) -> if(empty(l),x,l) 9: if(true(),x,l) -> x 10: if(false(),x,l) -> last(head(l),tail(l)) 11: rev2(x,nil()) -> nil() 12: rev2(x,cons(y,l)) -> rev(cons(x,rev2(y,l))) Number of strict rules: 12 Direct Order(PosReal,>,Poly) ... failed. Freezing rev 1: empty(nil()) -> true() 2: empty(cons(x,l)) -> false() 3: head(cons(x,l)) -> x 4: tail(nil()) -> nil() 5: tail(cons(x,l)) -> l 6: rev❆1_nil() -> nil() 7: rev❆1_cons(x,l) -> cons(rev1(x,l),rev2(x,l)) 8: last(x,l) -> if(empty(l),x,l) 9: if(true(),x,l) -> x 10: if(false(),x,l) -> last(head(l),tail(l)) 11: rev2(x,nil()) -> nil() 12: rev2(x,cons(y,l)) -> rev❆1_cons(x,rev2(y,l)) 13: rev(cons(_1,_2)) ->= rev❆1_cons(_1,_2) 14: rev(nil()) ->= rev❆1_nil() Number of strict rules: 12 Direct Order(PosReal,>,Poly) ... failed. Dependency Pairs: #1: #rev(cons(_1,_2)) ->? #rev❆1_cons(_1,_2) #2: #rev2(x,cons(y,l)) -> #rev❆1_cons(x,rev2(y,l)) #3: #rev2(x,cons(y,l)) -> #rev2(y,l) #4: #rev(nil()) ->? #rev❆1_nil() #5: #rev❆1_cons(x,l) -> #rev2(x,l) #6: #if(false(),x,l) -> #last(head(l),tail(l)) #7: #if(false(),x,l) -> #head(l) #8: #if(false(),x,l) -> #tail(l) #9: #last(x,l) -> #if(empty(l),x,l) #10: #last(x,l) -> #empty(l) Number of SCCs: 2, DPs: 5, edges: 7 SCC { #6 #9 } Removing DPs: Order(PosReal,>,Sum)... Order(PosReal,>,Max)... QLPOpS... Order(PosReal,>,MaxSum)... succeeded. #rev(x1) weight: 0 #empty(x1) weight: 0 rev1(x1,x2) weight: 0 rev❆1_nil() weight: 0 false() weight: (/ 3 8) #head(x1) weight: 0 #rev2(x1,x2) weight: 0 true() weight: 0 #last(x1,x2) weight: max{0, (/ 1 8) + x1, (- (/ 1 4)) + x2} tail(x1) weight: max{0, (- (/ 1 4)) + x1} if(x1,x2,x3) weight: 0 rev❆1_cons(x1,x2) weight: 0 last(x1,x2) weight: 0 nil() weight: 0 #tail(x1) weight: 0 rev(x1) weight: 0 head(x1) weight: max{0, (- (/ 5 8)) + x1} cons(x1,x2) weight: max{0, (/ 5 8) + x1, (/ 1 4) + x2} #if(x1,x2,x3) weight: max{0, (- (/ 1 8)) + x1, (- (/ 3 8)) + x2, (- (/ 1 2)) + x3} empty(x1) weight: max{0, (- (/ 1 4)) + x1} #rev❆1_cons(x1,x2) weight: 0 rev2(x1,x2) weight: 0 #rev❆1_nil() weight: 0 Usable rules: { 1..5 } Removed DPs: #9 Number of SCCs: 1, DPs: 3, edges: 5 SCC { #2 #3 #5 } Removing DPs: Order(PosReal,>,Sum)... succeeded. #rev(x1) weight: 0 #empty(x1) weight: 0 rev1(x1,x2) weight: (/ 1 4) rev❆1_nil() weight: 0 false() weight: 0 #head(x1) weight: 0 #rev2(x1,x2) weight: x2 true() weight: 0 #last(x1,x2) weight: 0 tail(x1) weight: 0 if(x1,x2,x3) weight: 0 rev❆1_cons(x1,x2) weight: (/ 1 2) + x2 last(x1,x2) weight: 0 nil() weight: 0 #tail(x1) weight: 0 rev(x1) weight: 0 head(x1) weight: 0 cons(x1,x2) weight: (/ 1 2) + x2 #if(x1,x2,x3) weight: 0 empty(x1) weight: 0 #rev❆1_cons(x1,x2) weight: (/ 1 4) + x2 rev2(x1,x2) weight: x2 #rev❆1_nil() weight: 0 Usable rules: { 7 11 12 } Removed DPs: #2 #3 #5 Number of SCCs: 0, DPs: 0, edges: 0 YES