The rewrite relation of the following TRS is considered.
app(app(app(if,true),x),y) | → | x | (1) |
app(app(app(if,false),x),y) | → | y | (2) |
app(app(app(until,p),f),x) | → | app(app(app(if,app(p,x)),x),app(app(app(until,p),f),app(f,x))) | (3) |
We uncurry the binary symbol app in combination with the following symbol map which also determines the applicative arities of these symbols.
if | is mapped to | if, | if1(x1), | if2(x1, x2), | if3(x1, x2, x3) |
true | is mapped to | true | |||
false | is mapped to | false | |||
until | is mapped to | until, | until1(x1), | until2(x1, x2), | until3(x1, x2, x3) |
if3(true,x,y) | → | x | (10) |
if3(false,x,y) | → | y | (11) |
until3(p,f,x) | → | if3(app(p,x),x,until3(p,f,app(f,x))) | (12) |
app(if,y1) | → | if1(y1) | (4) |
app(if1(x0),y1) | → | if2(x0,y1) | (5) |
app(if2(x0,x1),y1) | → | if3(x0,x1,y1) | (6) |
app(until,y1) | → | until1(y1) | (7) |
app(until1(x0),y1) | → | until2(x0,y1) | (8) |
app(until2(x0,x1),y1) | → | until3(x0,x1,y1) | (9) |
if3(true,x0,x1) |
if3(false,x0,x1) |
until3(x0,x1,x2) |
app(if,x0) |
app(if1(x0),x1) |
app(if2(x0,x1),x2) |
app(until,x0) |
app(until1(x0),x1) |
app(until2(x0,x1),x2) |
until3#(p,f,x) | → | if3#(app(p,x),x,until3(p,f,app(f,x))) | (13) |
until3#(p,f,x) | → | app#(p,x) | (14) |
until3#(p,f,x) | → | until3#(p,f,app(f,x)) | (15) |
until3#(p,f,x) | → | app#(f,x) | (16) |
app#(if2(x0,x1),y1) | → | if3#(x0,x1,y1) | (17) |
app#(until2(x0,x1),y1) | → | until3#(x0,x1,y1) | (18) |
until3#(p,f,x) | → | if3#(app(p,x),x,until3(p,f,app(f,x))) | (13) |
app#(if2(x0,x1),y1) | → | if3#(x0,x1,y1) | (17) |
until3#(p,f,x) | → | app#(p,x) | (14) |
app#(until2(x0,x1),y1) | → | until3#(x0,x1,y1) | (18) |
until3#(p,f,x) | → | app#(f,x) | (16) |
t0 | = | until3#(p,f,x) |
→P | until3#(p,f,app(f,x)) | |
= | t1 |