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