reserve M,N for non empty multMagma,
  f for Function of M, N;
reserve M for multMagma;
reserve N,K for multSubmagma of M;
reserve M,N for non empty multMagma,
  A for Subset of M,
  f,g for Function of M,N,
  X for stable Subset of M,
  Y for stable Subset of N;
reserve X for set;
reserve x,y,Y for set;
reserve n,m,p for Nat;

theorem
  for X being set, S being Subset of X
  holds free_magma S is multSubmagma of free_magma X
proof
  let X be set;
  let S be Subset of X;
  A1: the carrier of free_magma S c= the carrier of free_magma X by Th27;
  reconsider A = the carrier of free_magma S as set;
  A2: (the multF of free_magma X) | [: A, A :]
  = (the multF of free_magma X)||the carrier of free_magma S by REALSET1:def 2;
  per cases;
  suppose A3: S is empty;
    then A4: the carrier of free_magma S = {};
    the multF of free_magma S = (the multF of free_magma X) | {} by A3
    .= (the multF of free_magma X) | [: A, A :] by A4;
    hence thesis by A2,A1,Def9;
  end;
  suppose A5: S is not empty;
    then A6: dom the multF of free_magma S = [:A,A:] by FUNCT_2:def 1;
    A7: X is non empty by A5;
    [:A,A:] c= [: free_magma_carrier X, free_magma_carrier X:]
    by A1,ZFMISC_1:96; then
     [:A,A:] c= dom the multF of free_magma X by A7,FUNCT_2:def 1;
    then A8: dom the multF of free_magma S
    = dom((the multF of free_magma X)||the carrier of free_magma S)
    by A6,A2,RELAT_1:62;
     for z being object st z in dom the multF of free_magma S holds
    (the multF of free_magma S).z
    =((the multF of free_magma X)||the carrier of free_magma S).z
    proof
      let z be object;
      assume A9: z in dom the multF of free_magma S;
      then consider x,y being object such that
      A10: x in A & y in A & z=[x,y] by ZFMISC_1:def 2;
      reconsider x,y as Element of free_magma_carrier S by A10;
      reconsider n=x`2,m=y`2 as Nat by A5;
      reconsider x9=x,y9=y as Element of free_magma_carrier X by A10,A1;
      (the multF of free_magma S).z
      = (the multF of free_magma S).(x,y) by A10,BINOP_1:def 1
      .= [[[x`1,y`1],x`2],n+m] by A5,Def16
      .= (free_magma_mult X).(x9,y9) by A7,Def16
      .= (the multF of free_magma X).z by A10,BINOP_1:def 1
      .= ((the multF of free_magma X)|[:A,A:]).z by A9,FUNCT_1:49;
      hence thesis by REALSET1:def 2;
    end;
    then the multF of free_magma S
    = (the multF of free_magma X)||the carrier of free_magma S
    by A8,FUNCT_1:2;
    hence free_magma S is multSubmagma of free_magma X by A1,Def9;
  end;
end;
