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(false) | = | 0 | status(false) | = | [] | list-extension(false) | = | Lex | ||
| prec(if) | = | 0 | status(if) | = | [1, 2, 3] | list-extension(if) | = | Lex | ||
| prec(true) | = | 0 | status(true) | = | [] | list-extension(true) | = | Lex |
| [false] | = | max(0) |
| [if(x1, x2, x3)] | = | max(0, 0 + 1 · x1, 0 + 1 · x2, 0 + 1 · x3) |
| [true] | = | max(4) |
| 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.