reserve x,y,a,b,c,p,q for Real;
reserve m,n for Element of NAT;

theorem Th14:
  x+y=p & x*y=q & p^2-4*q>=0 implies x=(p+sqrt(p^2-4*q))/2 & y=(p-
  sqrt(p^2-4*q))/2 or x=(p-sqrt(p^2-4*q))/2 & y=(p+sqrt(p^2-4*q))/2
proof
  assume that
A1: x+y=p and
A2: x*y=q and
A3: p^2-4*q>=0;
A4: delta(1,-p,q)=(-p)^2-4*1*q by QUIN_1:def 1
    .=p^2-4*q;
  1*y^2+(-p)*y+q=0 by A1,A2;
  then Polynom(1,-p,q,y)=0 by POLYEQ_1:def 2;
  then
A5: y=(-(-p)+sqrt delta(1,-p,q))/(2*1) or y=(-(-p)-sqrt delta(1,-p,q))/(2*1)
  by A3,A4,POLYEQ_1:5;
  now
    per cases by A5;
    suppose
A6:   y=(p+sqrt delta(1,-p,q))/2;
      then x=p*2/2-(p/2+(sqrt delta(1,-p,q))/2) by A1
        .=p*2/2-(p/2+(sqrt (p^2-4*q))/2) by A4;
      hence thesis by A4,A6;
    end;
    suppose
A7:   y=(p-sqrt delta(1,-p,q))/2;
      then x=p-(p-sqrt delta(1,-p,q)+0)/2 by A1
        .=p-(p-sqrt (p^2-4*q)+0)/2 by A4;
      hence thesis by A4,A7;
    end;
  end;
  hence thesis;
end;
