 reserve x,y,X,Y for set;

theorem Th1:
  for D be non empty set, f being BinOp of D holds f is invertible
  iff f is left-invertible right-invertible
proof
  let D be non empty set, f be BinOp of D;
  thus f is invertible implies f is left-invertible right-invertible
  proof
    assume
A1: for a,b being Element of D ex r,l being Element of D st f.(a,r) =
    b & f.(l,a) = b;
    now
      let a,b be Element of D;
      consider r,l being Element of D such that
      f.(a,r) = b and
A2:   f.(l,a) = b by A1;
      take l;
      thus f.(l,a) = b by A2;
    end;
    hence for a,b being Element of D ex l being Element of D st f.(l,a) = b;
    let a,b be Element of D;
    consider r,l being Element of D such that
A3: f.(a,r) = b and
    f.(l,a) = b by A1;
    take r;
    thus thesis by A3;
  end;
  assume that
A4: for a,b being Element of D ex l being Element of D st f.(l,a) = b and
A5: for a,b being Element of D ex r being Element of D st f.(a,r) = b;
  let a,b be Element of D;
  consider l being Element of D such that
A6: f.(l,a) = b by A4;
  consider r being Element of D such that
A7: f.(a,r) = b by A5;
  take r, l;
  thus thesis by A6,A7;
end;
