reserve a,b,c,d,a9,b9,c9,d9,y,x1,u,v for Real,
  s,t,h,z,z1,z2,z3,s1,s2,s3 for Complex;

theorem
  z^2 = s & Im s <0 implies z= sqrt (( Re s+sqrt ((Re s)^2+(Im s)^2))/2)
+ (-sqrt ((-Re s+sqrt ((Re s)^2+(Im s)^2))/2))*<i> or z=-sqrt (( Re s+sqrt ((Re
  s)^2+(Im s)^2))/2)+ (sqrt ((-Re s+sqrt ((Re s)^2+(Im s)^2))/2))*<i>
proof
  assume
A1: z^2=s;
  set v=Im z;
  set u=Re z;
  set b=Im s;
  set a=Re s;
  z = u + v*<i> by COMPLEX1:13;
  then
A2: s=a+b*<i> & z^2 = u^2-v^2 + 2*u*v*<i> by COMPLEX1:13;
  assume Im s<0;
  then 2*(u*v)<0 by A1,A2,COMPLEX1:77;
  then u*v<0;
  then
A3: u<0 & v>0 or u>0 & v<0 by XREAL_1:133;
A4: u^2>=0 & v^2>=0 by XREAL_1:63;
A5: u^2-v^2=a by A1,A2,COMPLEX1:77;
  then sqrt (u^2+v^2)^2=sqrt (a^2+b^2) by A1,A2;
  then u^2+v^2=sqrt (a^2+b^2) by A4,SQUARE_1:22;
  then -u=sqrt ((a+sqrt (a^2+b^2))/2) & v=sqrt ((-a+sqrt (a^2+b^2))/2) or u=
  sqrt ((a+sqrt (a^2+b^2))/2) & -v=sqrt ((-a+sqrt (a^2+b^2))/2) by A5,A3,
SQUARE_1:22,23;
  hence thesis by COMPLEX1:13;
end;
