The rewrite relation of the following TRS is considered.
|
originates from |
|
|
originates from |
|
le#(s(z0),s(z1)) |
→ |
c2(le#(z0,z1)) |
(17) |
|
originates from |
le(s(z0),s(z1)) |
→ |
le(z0,z1) |
(16) |
|
|
originates from |
|
|
originates from |
|
minus#(z0,s(z1)) |
→ |
c5(pred#(minus(z0,z1)),minus#(z0,z1)) |
(23) |
|
originates from |
minus(z0,s(z1)) |
→ |
pred(minus(z0,z1)) |
(22) |
|
|
originates from |
|
|
originates from |
gcd(s(z0),0) |
→ |
s(z0) |
(26) |
|
gcd#(s(z0),s(z1)) |
→ |
c8(if_gcd#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) |
(29) |
|
originates from |
gcd(s(z0),s(z1)) |
→ |
if_gcd(le(z1,z0),s(z0),s(z1)) |
(28) |
|
if_gcd#(true,s(z0),s(z1)) |
→ |
c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) |
(31) |
|
originates from |
if_gcd(true,s(z0),s(z1)) |
→ |
gcd(minus(z0,z1),s(z1)) |
(30) |
|
if_gcd#(false,s(z0),s(z1)) |
→ |
c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) |
(33) |
|
originates from |
if_gcd(false,s(z0),s(z1)) |
→ |
gcd(minus(z1,z0),s(z0)) |
(32) |
|
Moreover, we add the following terms to the innermost strategy.
gcd#(0,z0) |
→ |
c6 |
(25) |
gcd#(s(z0),0) |
→ |
c7 |
(27) |
if_gcd#(true,s(z0),s(z1)) |
→ |
c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) |
(31) |
if_gcd#(false,s(z0),s(z1)) |
→ |
c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) |
(33) |
are strictly oriented by the following
linear polynomial interpretation over the naturals
le#(0,z0) |
→ |
c |
(13) |
le#(s(z0),0) |
→ |
c1 |
(15) |
le#(s(z0),s(z1)) |
→ |
c2(le#(z0,z1)) |
(17) |
pred#(s(z0)) |
→ |
c3 |
(19) |
minus#(z0,0) |
→ |
c4 |
(21) |
minus#(z0,s(z1)) |
→ |
c5(pred#(minus(z0,z1)),minus#(z0,z1)) |
(23) |
gcd#(0,z0) |
→ |
c6 |
(25) |
gcd#(s(z0),0) |
→ |
c7 |
(27) |
gcd#(s(z0),s(z1)) |
→ |
c8(if_gcd#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) |
(29) |
if_gcd#(true,s(z0),s(z1)) |
→ |
c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) |
(31) |
if_gcd#(false,s(z0),s(z1)) |
→ |
c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) |
(33) |
minus(z0,s(z1)) |
→ |
pred(minus(z0,z1)) |
(22) |
minus(z0,0) |
→ |
z0 |
(20) |
pred(s(z0)) |
→ |
z0 |
(18) |
le#(0,z0) |
→ |
c |
(13) |
le#(s(z0),0) |
→ |
c1 |
(15) |
le#(s(z0),s(z1)) |
→ |
c2(le#(z0,z1)) |
(17) |
pred#(s(z0)) |
→ |
c3 |
(19) |
minus#(z0,0) |
→ |
c4 |
(21) |
minus#(z0,s(z1)) |
→ |
c5(pred#(minus(z0,z1)),minus#(z0,z1)) |
(23) |
gcd#(0,z0) |
→ |
c6 |
(25) |
gcd#(s(z0),0) |
→ |
c7 |
(27) |
gcd#(s(z0),s(z1)) |
→ |
c8(if_gcd#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) |
(29) |
if_gcd#(true,s(z0),s(z1)) |
→ |
c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) |
(31) |
if_gcd#(false,s(z0),s(z1)) |
→ |
c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) |
(33) |
minus(z0,s(z1)) |
→ |
pred(minus(z0,z1)) |
(22) |
le(s(z0),s(z1)) |
→ |
le(z0,z1) |
(16) |
le(s(z0),0) |
→ |
false |
(14) |
le(0,z0) |
→ |
true |
(12) |
minus(z0,0) |
→ |
z0 |
(20) |
pred(s(z0)) |
→ |
z0 |
(18) |
le#(0,z0) |
→ |
c |
(13) |
le#(s(z0),0) |
→ |
c1 |
(15) |
le#(s(z0),s(z1)) |
→ |
c2(le#(z0,z1)) |
(17) |
pred#(s(z0)) |
→ |
c3 |
(19) |
minus#(z0,0) |
→ |
c4 |
(21) |
minus#(z0,s(z1)) |
→ |
c5(pred#(minus(z0,z1)),minus#(z0,z1)) |
(23) |
gcd#(0,z0) |
→ |
c6 |
(25) |
gcd#(s(z0),0) |
→ |
c7 |
(27) |
gcd#(s(z0),s(z1)) |
→ |
c8(if_gcd#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) |
(29) |
if_gcd#(true,s(z0),s(z1)) |
→ |
c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) |
(31) |
if_gcd#(false,s(z0),s(z1)) |
→ |
c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) |
(33) |
minus(z0,s(z1)) |
→ |
pred(minus(z0,z1)) |
(22) |
le(s(z0),s(z1)) |
→ |
le(z0,z1) |
(16) |
le(s(z0),0) |
→ |
false |
(14) |
le(0,z0) |
→ |
true |
(12) |
minus(z0,0) |
→ |
z0 |
(20) |
pred(s(z0)) |
→ |
z0 |
(18) |
le#(0,z0) |
→ |
c |
(13) |
le#(s(z0),0) |
→ |
c1 |
(15) |
le#(s(z0),s(z1)) |
→ |
c2(le#(z0,z1)) |
(17) |
pred#(s(z0)) |
→ |
c3 |
(19) |
minus#(z0,0) |
→ |
c4 |
(21) |
minus#(z0,s(z1)) |
→ |
c5(pred#(minus(z0,z1)),minus#(z0,z1)) |
(23) |
gcd#(0,z0) |
→ |
c6 |
(25) |
gcd#(s(z0),0) |
→ |
c7 |
(27) |
gcd#(s(z0),s(z1)) |
→ |
c8(if_gcd#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) |
(29) |
if_gcd#(true,s(z0),s(z1)) |
→ |
c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) |
(31) |
if_gcd#(false,s(z0),s(z1)) |
→ |
c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) |
(33) |
minus(z0,s(z1)) |
→ |
pred(minus(z0,z1)) |
(22) |
minus(z0,0) |
→ |
z0 |
(20) |
pred(s(z0)) |
→ |
z0 |
(18) |
le#(0,z0) |
→ |
c |
(13) |
le#(s(z0),0) |
→ |
c1 |
(15) |
le#(s(z0),s(z1)) |
→ |
c2(le#(z0,z1)) |
(17) |
pred#(s(z0)) |
→ |
c3 |
(19) |
minus#(z0,0) |
→ |
c4 |
(21) |
minus#(z0,s(z1)) |
→ |
c5(pred#(minus(z0,z1)),minus#(z0,z1)) |
(23) |
gcd#(0,z0) |
→ |
c6 |
(25) |
gcd#(s(z0),0) |
→ |
c7 |
(27) |
gcd#(s(z0),s(z1)) |
→ |
c8(if_gcd#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) |
(29) |
if_gcd#(true,s(z0),s(z1)) |
→ |
c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) |
(31) |
if_gcd#(false,s(z0),s(z1)) |
→ |
c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) |
(33) |
minus(z0,s(z1)) |
→ |
pred(minus(z0,z1)) |
(22) |
minus(z0,0) |
→ |
z0 |
(20) |
pred(s(z0)) |
→ |
z0 |
(18) |
le#(0,z0) |
→ |
c |
(13) |
le#(s(z0),0) |
→ |
c1 |
(15) |
le#(s(z0),s(z1)) |
→ |
c2(le#(z0,z1)) |
(17) |
pred#(s(z0)) |
→ |
c3 |
(19) |
minus#(z0,0) |
→ |
c4 |
(21) |
minus#(z0,s(z1)) |
→ |
c5(pred#(minus(z0,z1)),minus#(z0,z1)) |
(23) |
gcd#(0,z0) |
→ |
c6 |
(25) |
gcd#(s(z0),0) |
→ |
c7 |
(27) |
gcd#(s(z0),s(z1)) |
→ |
c8(if_gcd#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) |
(29) |
if_gcd#(true,s(z0),s(z1)) |
→ |
c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) |
(31) |
if_gcd#(false,s(z0),s(z1)) |
→ |
c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) |
(33) |
minus(z0,s(z1)) |
→ |
pred(minus(z0,z1)) |
(22) |
minus(z0,0) |
→ |
z0 |
(20) |
pred(s(z0)) |
→ |
z0 |
(18) |
le#(0,z0) |
→ |
c |
(13) |
le#(s(z0),0) |
→ |
c1 |
(15) |
le#(s(z0),s(z1)) |
→ |
c2(le#(z0,z1)) |
(17) |
pred#(s(z0)) |
→ |
c3 |
(19) |
minus#(z0,0) |
→ |
c4 |
(21) |
minus#(z0,s(z1)) |
→ |
c5(pred#(minus(z0,z1)),minus#(z0,z1)) |
(23) |
gcd#(0,z0) |
→ |
c6 |
(25) |
gcd#(s(z0),0) |
→ |
c7 |
(27) |
gcd#(s(z0),s(z1)) |
→ |
c8(if_gcd#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) |
(29) |
if_gcd#(true,s(z0),s(z1)) |
→ |
c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) |
(31) |
if_gcd#(false,s(z0),s(z1)) |
→ |
c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) |
(33) |
minus(z0,s(z1)) |
→ |
pred(minus(z0,z1)) |
(22) |
le(s(z0),s(z1)) |
→ |
le(z0,z1) |
(16) |
le(s(z0),0) |
→ |
false |
(14) |
le(0,z0) |
→ |
true |
(12) |
minus(z0,0) |
→ |
z0 |
(20) |
pred(s(z0)) |
→ |
z0 |
(18) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).