reserve S for non empty non void ManySortedSign,
  A for MSAlgebra over S;
reserve A for non-empty MSAlgebra over S;
reserve S for non empty non void ManySortedSign,
  A for non-empty MSAlgebra over S,
  R for ManySortedRelation of the Sorts of A;

theorem Th50:
  for R,E being ManySortedRelation of A st for s being SortSymbol
of S, a,b being Element of A,s holds [a,b] in E.s iff a,b are_convertible_wrt (
  TRS R).s holds E is EquationalTheory of A
proof
  let R,E be ManySortedRelation of A;
  assume
A1: for s being SortSymbol of S, a,b being Element of A,s holds [a,b] in
  E.s iff a,b are_convertible_wrt (TRS R).s;
A2: E is stable
  proof
    let h be Endomorphism of A;
    let s be SortSymbol of S;
    let a,b be set;
    assume
A3: [a,b] in E.s;
    then reconsider x = a, y = b as Element of A,s by ZFMISC_1:87;
    reconsider a9 = h.s.x, b9 = h.s.y as Element of A,s;
    x,y are_convertible_wrt (TRS R).s by A1,A3;
    then a9, b9 are_convertible_wrt (TRS R).s by Th45;
    hence thesis by A1;
  end;
A4: E is invariant
  proof
    let s1,s2 be SortSymbol of S;
    let t be Function;
    assume
A5: t is_e.translation_of A,s1,s2;
    then reconsider
    f = t as Function of (the Sorts of A).s1, (the Sorts of A ).s2
    by Th11;
    let a,b be set;
    assume
A6: [a,b] in E.s1;
    then reconsider x = a, y = b as Element of A,s1 by ZFMISC_1:87;
    x,y are_convertible_wrt (TRS R).s1 by A1,A6;
    then
A7: t.x,t.y are_convertible_wrt (TRS R).s2 by A5,Th47;
A8: t.y = f.y;
    t.x = f.x;
    hence thesis by A1,A8,A7;
  end;
  E is MSEquivalence_Relation-like by A1,Th49;
  hence thesis by A2,A4,MSUALG_4:def 3;
end;
