The rewrite relation of the following TRS is considered.
if(true,x,y) | → | x | (1) |
if(false,x,y) | → | y | (2) |
if(x,y,y) | → | y | (3) |
if(if(x,y,z),u,v) | → | if(x,if(y,u,v),if(z,u,v)) | (4) |
if(x,if(x,y,z),z) | → | if(x,y,z) | (5) |
if(x,y,if(x,y,z)) | → | if(x,y,z) | (6) |
prec(if) | = | 0 | stat(if) | = | lex | |
prec(true) | = | 1 | stat(true) | = | lex | |
prec(false) | = | 2 | stat(false) | = | lex |
π(if) | = | [1,3,2] |
π(true) | = | [] |
π(false) | = | [] |
if(true,x,y) | → | x | (1) |
if(false,x,y) | → | y | (2) |
if(x,y,y) | → | y | (3) |
if(if(x,y,z),u,v) | → | if(x,if(y,u,v),if(z,u,v)) | (4) |
if(x,if(x,y,z),z) | → | if(x,y,z) | (5) |
if(x,y,if(x,y,z)) | → | if(x,y,z) | (6) |
There are no rules in the TRS. Hence, it is terminating.