reserve p,q,r for FinSequence,
  x,y for object;

theorem Th51:
  for R being Relation holds 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
proof
  let R be Relation;
  hereby
    assume
A1: R is confluent;
    let a,b,c be object;
    assume that
A2: R reduces a,b and
A3: [a,c] in 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;
  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;
  let b,c be object;
  given a being object such that
A5: R reduces a,b and
A6: R reduces a,c;
  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 P[Nat,Nat] means p.$1, q.$2 are_convergent_wrt
  R;
  defpred Q[Nat] means $1 in dom p implies
  for j being Nat st j in dom q holds P[$1,j];
A11: for i being Nat st Q[i] holds Q[i+1]
  proof
    let i be Nat such that
    i in dom p implies for j being Nat st j in dom q holds P[i,
    j] and
A12: i+1 in dom p;
    defpred R[Nat] means $1 in dom q implies P[i+1,$1];
A13: for j being Nat st R[j] holds R[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 such that
A15:  j in dom q implies P[i+1,j] and
A16:  j+1 in dom q;
      per cases;
      suppose
        j = 0;
        hence thesis by A9,A14,Th36;
      end;
      suppose
A17:    j > 0;
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 thesis by A19,Th42;
      end;
    end;
A21: R[ 0 ] by Lm1;
    thus for j being Nat holds R[j] from NAT_1:sch 2(A21,A13 );
  end;
A22: len p in dom p & len q in dom q by FINSEQ_5:6;
A23: Q[ 0 ] by Lm1;
  for i being Nat holds Q[i] from NAT_1:sch 2(A23,A11);
  hence thesis by A8,A10,A22;
end;
