reserve S for non empty non void ManySortedSign;
reserve X for non-empty ManySortedSet of S;
reserve x,y,z for set, i,j for Nat;
reserve
  A0 for (X,S)-terms non-empty MSAlgebra over S,
  A1 for all_vars_including (X,S)-terms MSAlgebra over S,
  A2 for all_vars_including inheriting_operations (X,S)-terms MSAlgebra over S,
  A for all_vars_including inheriting_operations free_in_itself
  (X,S)-terms MSAlgebra over S;
reserve X0 for non-empty countable ManySortedSet of S;
reserve A0 for all_vars_including inheriting_operations free_in_itself
  (X0,S)-terms MSAlgebra over S;

theorem Th75:
  for G being GeneratorSet of A0 st G = FreeGen X0
  holds G is Equations(S,A0)-free
  proof set A = A0;
A1: FreeMSA X0 = Free(S,X0) by MSAFREE3:31;
    let G be GeneratorSet of A; assume
A2: G = FreeGen X0;
    set T = Equations(S,A);
    let B be T-satisfying non-empty MSAlgebra over S;
    let f be ManySortedFunction of G, the Sorts of B;
    reconsider f0 = f as ManySortedFunction of FreeGen X0, the Sorts of B
    by A2;
    reconsider H = FreeGen X0 as free GeneratorSet of Free(S,X0)
    by A1;
    consider g being ManySortedFunction of Free(S,X0), B such that
A3: g is_homomorphism Free(S,X0),B & g || H = f0 by MSAFREE:def 5;
    the Sorts of A is MSSubset of Free(S,X0) by Def6; then
    reconsider i = id the Sorts of A as ManySortedFunction of A, Free(S,X0)
    by Th22;
    take h = g**i;
    thus h is_homomorphism A,B
    proof
      let o be OperSymbol of S such that Args(o,A) <> {};
      let x be Element of Args(o,A);
      set s = the_result_sort_of o;
      Den(o,A).x in Result(o,A); then
A4:   Den(o,A).x in (the Sorts of A).s by FUNCT_2:15;
A5:   i.s = id ((the Sorts of A).s) by MSUALG_3:def 1;
      x in Args(o,A) & Args(o,A) c= Args(o, Free(S,X0)) by Th41; then
      reconsider x0 = x as Element of Args(o,Free(S,X0));
      set w = the "1-1" ManySortedFunction of X0, (the carrier of S)-->NAT;
      Den(o,A).x is Element of Result(o,A) &
      Den(o,Free(S,X0)).x0 is Element of Result(o,Free(S,X0)); then
      reconsider f1 = Den(o,A).x, f2 = Den(o,Free(S,X0)).x0 as Term of S,X0
      by Th42;
      reconsider f = Den(o,Free(S,X0)).x0 as Element of Free(S,X0),s
      by MSUALG_9:18;
      reconsider fa = (canonical_homomorphism A).s.f as
      Element of Free(S,X0),s by Th39;
      f1 in (the Sorts of A).s by MSUALG_9:18; then
      f1 is Element of Free(S,X0),s by Th39; then
      f1 in (the Sorts of Free(S,X0)).s & f2 in (the Sorts of Free(S,X0)).s
      by MSUALG_9:18; then
      f1 in FreeSort(X0,s) & f2 in FreeSort(X0,s) by A1,MSAFREE:def 11; then
      the_sort_of f1 = s & the_sort_of f2 = s by MSATERM:def 5; then
      reconsider t2 = #(f1,w), t1 = #(f2,w) as Element of TermAlg S, s by Th60;
A6:   f1 = (canonical_homomorphism A).s.f by Th67;
      A |= t1 '=' t2 by A6,Th71; then
      t1 '=' t2 in {e where e is Element of (Equations S).s: A |= e}; then
      t1 '=' t2 in T.s & B |= T by Def14,Def11; then
A7:   g.s.f = g.s.fa by A6,A3,Th74;
A8:   now
        let n be Nat;
        set an = (the_arity_of o)/.n;
        assume
A9:     n in dom x;
A10:     dom ((the Sorts of A)*the_arity_of o) = dom the_arity_of o &
        dom x = dom the_arity_of o by MSUALG_3:6,PRALG_2:3; then
        x .n in ((the Sorts of A)*the_arity_of o).n by A9,MSUALG_3:6; then
        x .n in (the Sorts of A).((the_arity_of o).n) by A9,A10
,FUNCT_1:13; then
A11:     x .n in (the Sorts of A).an by A9,A10,PARTFUN1:def 6;
        thus (h#x).n = (h.(an)).(x .n) by A9,MSUALG_3:def 6
        .= ((g.an)*(i.an)).(x .n) by MSUALG_3:2
        .= (g.an).((i.an).(x .n)) by A11,FUNCT_2:15
        .= (g.an).((id ((the Sorts of A).an)).(x .n)) by MSUALG_3:def 1
        .= (g.((the_arity_of o)/.n)).(x .n) by A11,FUNCT_1:17;
      end;
      thus (h.(s)).(Den(o,A).x)
      = ((g.s)*(i.s)).(Den(o,A).x) by MSUALG_3:2
      .= (g.s).((i.s).(Den(o,A).x)) by A4,FUNCT_2:15
      .= (g.s).(Den(o,A).x) by A5,A4,FUNCT_1:18
      .= (g.s).(Den(o,Free(S,X0)).x0) by A7,Th67
      .= Den(o,B).(g#x0) by A3
      .= Den(o,B).(h#x) by A8,MSUALG_3:def 6;
    end;
    now let x be object; assume x in the carrier of S;
      then reconsider s = x as SortSymbol of S;
A12:   G.s c= (the Sorts of A).s by PBOOLE:def 2,def 18;
      dom (g.s) = (the Sorts of Free(S,X0)).s &
      rng (i.s) c=  (the Sorts of Free(S,X0)).s
      by FUNCT_2:def 1; then
      dom((g.s)*(i.s qua Function)) = dom (i.s) by RELAT_1:27
      .= (the Sorts of A).s by FUNCT_2:def 1; then
A13:   dom (((g.s)*(i.s))|(G.s)) = G.s by A12,RELAT_1:62;
      the Sorts of A is MSSubset of Free(S,X0) by Def6; then
      (the Sorts of A).s c= (the Sorts of Free(S,X0)).s
      by PBOOLE:def 2,def 18; then
      G.s c= (the Sorts of Free(S,X0)).s &
      dom (g.s) = (the Sorts of Free(S,X0)).s by A12,FUNCT_2:def 1;
      then
A14:   dom ((g.s)|(H.s)) = G.s by A2,RELAT_1:62;
A15:   now
        let x be object; assume
A16:     x in G.s;
        hence (((g.s)*(i.s))|(G.s)).x = ((g.s)*(i.s)).x by FUNCT_1:49
        .= (g.s).((i.s).x) by A12,A16,FUNCT_2:15
        .= (g.s).((id ((the Sorts of A).s)).x) by MSUALG_3:def 1
        .= g.s.x by A12,A16,FUNCT_1:17
        .= ((g.s)|(H.s)).x by A2,A16,FUNCT_1:49;
      end;
      thus (h||G).x = (h.s)|(G.s) by MSAFREE:def 1
      .= ((g.s)*(i.s))|(G.s) by MSUALG_3:2
      .= (g.s)|(H.s) by A13,A14,A15
      .= f.x by A3,MSAFREE:def 1;
    end;
    hence h || G = f;
  end;
