YES
Confluence Proof
Confluence Proof
by csi
Input
The rewrite relation of the following TRS is considered.
if(true,x,y) |
→ |
x |
if(false,x,y) |
→ |
y |
-(s(x),s(y)) |
→ |
-(x,y) |
-(x,0) |
→ |
x |
-(0,x) |
→ |
0 |
<(s(x),s(y)) |
→ |
<(x,y) |
<(0,s(x)) |
→ |
true |
<(x,0) |
→ |
false |
mod(0,y) |
→ |
0 |
mod(x,s(y)) |
→ |
if(<(x,s(y)),x,mod(-(x,s(y)),s(y))) |
mod(x,0) |
→ |
x |
gcd(x,y) |
→ |
gcd(y,mod(x,y)) |
gcd(x,0) |
→ |
x |
gcd(0,x) |
→ |
x |
Proof
1 Critical Pair Closing System
Confluence is proven using the following terminating critical-pair-closing-system R:
<(0,s(x)) |
→ |
true |
if(true,x,y) |
→ |
x |
gcd(0,x) |
→ |
x |
mod(x,0) |
→ |
x |
mod(0,y) |
→ |
0 |
gcd(x,0) |
→ |
x |
1.1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[gcd(x1, x2)] |
= |
1 · x1 + 2 · x2 + 3 |
[if(x1, x2, x3)] |
= |
1 · x1 + 2 · x2 + 2 · x3 + 0 |
[s(x1)] |
= |
1 · x1 + 0 |
[0] |
= |
0 |
[true] |
= |
0 |
[mod(x1, x2)] |
= |
2 · x1 + 2 · x2 + 4 |
[<(x1, x2)] |
= |
1 · x1 + 1 · x2 + 1 |
the
rule
remains.
1.1.1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[if(x1, x2, x3)] |
= |
1 · x1 + 1 · x2 + 4 · x3 + 1 |
[true] |
= |
0 |
all rules could be removed.
1.1.1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.
Tool configuration
csi
- version: csi 1.2.5 [hg: unknown]
- strategy:
(cr -cpcs2 -cpcscert; ((( matrix -dim 1 -ib 3 -ob 5 | matrix -dim 2 -ib 2 -ob 3 | matrix -dim 3 -ib 1 -ob 1 | matrix -dim 3 -ib 1 -ob 3 | fail)[2]*);((dp;edg[0.5]?;(sccs | (sc || sct || {ur?;( (matrix -dp -ur -dim 1 -ib 3 -ob 5 | matrix -dp -ur -dim 2 -ib 2 -ob 3 | matrix -dp -ur -dim 3 -ib 1 -ob 1 | matrix -dp -ur -dim 3 -ib 1 -ob 3) || (kbo -ur -af | lpo -ur -af) || ( arctic -dp -ur -dim 2 -ib 2 -ob 2[2] | fail) || ( arctic -bz -dp -ur -dim 2 -ib 2 -ob 2[2] | fail) || fail) }restore || fail;(bounds -dp -rfc -qc || bounds -dp -all -rfc -qc || bounds -rfc -qc)[1] || fail ))*[6])! || (( kbo || (lpo | fail;(ref;lpo)) || fail;(bounds -rfc -qc) || fail)*[7])! || (rev;((dp;edg[0.5]?;(sccs | (sc || sct || {ur?;( (matrix -dp -ur -dim 1 -ib 3 -ob 5 | matrix -dp -ur -dim 2 -ib 2 -ob 3 | matrix -dp -ur -dim 3 -ib 1 -ob 1 | matrix -dp -ur -dim 3 -ib 1 -ob 3) || (kbo -ur -af | lpo -ur -af) || ( arctic -dp -ur -dim 2 -ib 2 -ob 2[2] | fail) || ( arctic -bz -dp -ur -dim 2 -ib 2 -ob 2[2] | fail) || fail) }restore || fail;(bounds -dp -rfc -qc || bounds -dp -all -rfc -qc || bounds -rfc -qc)[1] || fail ))*[6])! || (( kbo || (lpo | fail;(ref;lpo)) || fail;(bounds -rfc -qc) || fail)*[7])!)))))!