reserve i for Nat, x,y for set;
reserve S for non empty non void ManySortedSign;
reserve X for non-empty ManySortedSet of S;

theorem Th33:
  for S being non empty non void ManySortedSign
  for A,B being non-empty MSAlgebra over S
  st the MSAlgebra of A = the MSAlgebra of B
  for G being GeneratorSet of A
  for H being GeneratorSet of B st G = H
  holds G is free implies H is free
  proof
    let S be non empty non void ManySortedSign;
    let A,B be non-empty MSAlgebra over S such that
A1: the MSAlgebra of A = the MSAlgebra of B;
    let G be GeneratorSet of A;
    let H be GeneratorSet of B; assume
A2: G = H;
    assume
A3: for U1 be non-empty MSAlgebra over S
    for f be ManySortedFunction of G,the Sorts of U1
    ex h be ManySortedFunction of A,U1 st
    h is_homomorphism A,U1 & h || G = f;
    let U1 be non-empty MSAlgebra over S;
    let f be ManySortedFunction of H,the Sorts of U1;
    consider h being ManySortedFunction of A,U1 such that
A4: h is_homomorphism A,U1 & h || G = f by A2,A3;
    reconsider g = h as ManySortedFunction of B,U1 by A1;
    take g;
    the MSAlgebra of U1 = the MSAlgebra of U1;
    hence g is_homomorphism B,U1 by A1,A4,MSAFREE4:30;
    thus g || H = f by A1,A2,A4;
  end;
