The rewrite relation of the following TRS is considered.
add(true,x,xs) | → | add(and(isNat(x),isList(xs)),x,Cons(x,xs)) | (1) |
isList(Cons(x,xs)) | → | isList(xs) | (2) |
isList(nil) | → | true | (3) |
isNat(s(x)) | → | isNat(x) | (4) |
isNat(0) | → | true | (5) |
and(true,true) | → | true | (6) |
and(false,x) | → | false | (7) |
and(x,false) | → | false | (8) |
add(true,x0,x1) |
isList(Cons(x0,x1)) |
isList(nil) |
isNat(s(x0)) |
isNat(0) |
and(true,true) |
and(false,x0) |
and(x0,false) |
add#(true,x,xs) | → | add#(and(isNat(x),isList(xs)),x,Cons(x,xs)) | (9) |
add#(true,x,xs) | → | and#(isNat(x),isList(xs)) | (10) |
add#(true,x,xs) | → | isNat#(x) | (11) |
add#(true,x,xs) | → | isList#(xs) | (12) |
isList#(Cons(x,xs)) | → | isList#(xs) | (13) |
isNat#(s(x)) | → | isNat#(x) | (14) |
add#(true,x,xs) | → | and#(isNat(x),isList(xs)) | (10) |
add#(true,x,xs) | → | isNat#(x) | (11) |
add#(true,x,xs) | → | isList#(xs) | (12) |
isList#(Cons(x,xs)) | → | isList#(xs) | (13) |
isNat#(s(x)) | → | isNat#(x) | (14) |
An infinite (possibly non-looping) derivation has been detected due to the following pattern rule.
add#(true,0,Cons(0,zr1)) {zr1/nil} n {zr1/Cons(0,zr1)} →+add#(true,0,Cons(0,Cons(0,zr1))) {zr1/nil} n {zr1/Cons(0,zr1)}