 reserve x,y,X,Y for set;
reserve G for non empty multMagma,
  D for set,
  a,b,c,r,l for Element of G;

theorem Th15:
  G is associative implies
    (G is invertible iff
      G is unital & the multF of G is having_an_inverseOp)
proof
  assume
A1: G is associative;
  thus G is invertible implies G is unital & op(G) is having_an_inverseOp
  proof
    set e = the Element of G;
    assume
A2: G is invertible;
    then consider x,y being Element of G such that
A3: e*x = e and
A4: y*e = e by Th10;
A5: now
      let a;
A6:   ex b,c st e*b = a & c*e = a by A2,Th10;
      hence y*a = a by A1,A4;
      thus a*x = a by A1,A3,A6;
    end;
    then
A7: y*x = x & y*x = y;
    hence G is unital by A5;
    defpred P[Element of G,Element of G] means $1*$2 = x & $2*$1 = x;
A8: for a ex b st P[a,b]
    proof
      let a;
      consider b,c such that
A9:   a*b = x & c*a = x by A2,Th10;
      take b;
      c*(a*b) = c*a*b & x*b = b by A1,A5,A7;
      hence thesis by A5,A9;
    end;
    ex f being Function of the carrier of G,the carrier of G st for x
    being Element of G holds P[x,f.x] from FUNCT_2:sch 3(A8);
    then consider u being UnOp of carr(G) such that
A10: for a being Element of G holds P[a,(u.a)];
    now
      let b;
      x*b = op(G).(x,b) & b*x = op(G).(b,x);
      hence op(G).(x,b) = b & op(G).(b,x) = b by A5,A7;
    end;
    then x is_a_unity_wrt op(G) by BINOP_1:3;
    then
A11: x = the_unity_wrt op(G) by BINOP_1:def 8;
    take u;
    let a;
    op(G).(a,u.a) = a*(u.a) & op(G).(u.a,a) = (u.a)*a;
    hence thesis by A10,A11;
  end;
  assume
A12: op(G) is having_a_unity;
  given u being UnOp of carr(G) such that
A13: u is_an_inverseOp_wrt op(G);
  let a,c;
  take l = (u.a)*c, r = c*(u.a);
  thus op(G).(a,l) = a*l .= a*(u.a)*c by A1
    .= op(G).(the_unity_wrt op(G),c) by A13
    .= c by A12,SETWISEO:15;
  thus op(G).(r,a) = r*a .= c*((u.a)*a) by A1
    .= op(G).(c,the_unity_wrt op(G)) by A13
    .= c by A12,SETWISEO:15;
end;
