reserve I for non empty set;
reserve M for ManySortedSet of I;
reserve Y,x,y,y1,i,j for set;
reserve k for Element of NAT;
reserve p for FinSequence;
reserve S for non void non empty ManySortedSign;
reserve A for non-empty MSAlgebra over S;

theorem Th9:
  for Y be set for X be Subset of EqRelLatt Y for R be Relation st
  R = union X holds R = R~
proof
  let Y be set;
  let X be Subset of EqRelLatt Y;
  let R be Relation;
  assume
A1: R = union X;
  now
    let x,y be object;
    thus [x,y] in R implies [x,y] in R~
    proof
      assume [x,y] in R;
      then consider Z be set such that
A2:   [x,y] in Z and
A3:   Z in X by A1,TARSKI:def 4;
      reconsider Z as Equivalence_Relation of Y by A3,MSUALG_5:21;
      [y,x] in Z by A2,EQREL_1:6;
      then [y,x] in R by A1,A3,TARSKI:def 4;
      hence thesis by RELAT_1:def 7;
    end;
    thus [x,y] in R~ implies [x,y] in R
    proof
      assume [x,y] in R~;
      then [y,x] in R by RELAT_1:def 7;
      then consider Z be set such that
A4:   [y,x] in Z and
A5:   Z in X by A1,TARSKI:def 4;
      reconsider Z as Equivalence_Relation of Y by A5,MSUALG_5:21;
      [x,y] in Z by A4,EQREL_1:6;
      hence thesis by A1,A5,TARSKI:def 4;
    end;
  end;
  hence thesis by RELAT_1:def 2;
end;
