let R be Relation; ( R is confluent iff for a, b, c being object st R reduces a,b & [a,c] in R holds
b,c are_convergent_wrt R )
hereby ( ( for a, b, c being object st R reduces a,b & [a,c] in R holds
b,c are_convergent_wrt R ) implies R is confluent )
assume A1:
R is
confluent
;
for a, b, c being object st R reduces a,b & [a,c] in R holds
b,c are_convergent_wrt Rlet a,
b,
c be
object ;
( R reduces a,b & [a,c] in R implies b,c are_convergent_wrt R )assume that A2:
R reduces a,
b
and A3:
[a,c] in R
;
b,c are_convergent_wrt R
R reduces a,
c
by A3, Th15;
then
b,
c are_divergent_wrt R
by A2;
hence
b,
c are_convergent_wrt R
by A1;
verum
end;
assume A4:
for a, b, c being object st R reduces a,b & [a,c] in R holds
b,c are_convergent_wrt R
; R is confluent
let b, c be object ; REWRITE1:def 22 ( b,c are_divergent_wrt R implies b,c are_convergent_wrt R )
given a being object such that A5:
R reduces a,b
and
A6:
R reduces a,c
; REWRITE1:def 8 b,c are_convergent_wrt R
consider p being RedSequence of R such that
A7:
p . 1 = a
and
A8:
p . (len p) = b
by A5;
consider q being RedSequence of R such that
A9:
q . 1 = a
and
A10:
q . (len q) = c
by A6;
defpred S1[ Nat, Nat] means p . $1,q . $2 are_convergent_wrt R;
defpred S2[ Nat] means ( $1 in dom p implies for j being Nat st j in dom q holds
S1[$1,j] );
A11:
for i being Nat st S2[i] holds
S2[i + 1]
proof
let i be
Nat;
( S2[i] implies S2[i + 1] )
assume that
(
i in dom p implies for
j being
Nat st
j in dom q holds
S1[
i,
j] )
and A12:
i + 1
in dom p
;
for j being Nat st j in dom q holds
S1[i + 1,j]
defpred S3[
Nat]
means ( $1
in dom q implies
S1[
i + 1,$1] );
A13:
for
j being
Nat st
S3[
j] holds
S3[
j + 1]
proof
1
in dom p
by FINSEQ_5:6;
then A14:
R reduces a,
p . (i + 1)
by A7, A12, Th17, NAT_1:11;
let j be
Nat;
( S3[j] implies S3[j + 1] )
assume that A15:
(
j in dom q implies
S1[
i + 1,
j] )
and A16:
j + 1
in dom q
;
S1[i + 1,j + 1]
per cases
( j = 0 or j > 0 )
;
suppose A17:
j > 0
;
S1[i + 1,j + 1]A18:
j < len q
by A16, Lm2;
then consider d being
object such that A19:
R reduces p . (i + 1),
d
and A20:
R reduces q . j,
d
by A15, A17, Def7, Lm3;
j in dom q
by A17, A18, Lm3;
then
[(q . j),(q . (j + 1))] in R
by A16, Def2;
then
d,
q . (j + 1) are_convergent_wrt R
by A4, A20;
hence
S1[
i + 1,
j + 1]
by A19, Th42;
verum end; end;
end;
A21:
S3[
0 ]
by Lm1;
thus
for
j being
Nat holds
S3[
j]
from NAT_1:sch 2(A21, A13); verum
end;
A22:
( len p in dom p & len q in dom q )
by FINSEQ_5:6;
A23:
S2[ 0 ]
by Lm1;
for i being Nat holds S2[i]
from NAT_1:sch 2(A23, A11);
hence
b,c are_convergent_wrt R
by A8, A10, A22; verum