reserve r,r1,r2, s,x for Real,
  i for Integer;

theorem
  s <= 0 & r^2 + s^2 = 1 implies cos arcsin r = -s
proof
  set x = arcsin r;
  assume that
A1: s <= 0 and
A2: r^2 + s^2 = 1;
A3: -1 <= r & r <= 1 by A2,Lm5;
  then -PI/2 <= x & x <= PI/2 by Th76;
  then
A4: x in [.-PI/2,PI/2.] by XXREAL_1:1;
  (sin.x)^2 + (cos.x)^2 = 1 by SIN_COS:28;
  then (cos.x)^2 = 1 - (sin.x)^2 .= 1 - (sin x)^2 by SIN_COS:def 17
    .= 1 - r^2 by A3,Th68;
  then
A5: cos.x = s or cos.x = -s by A2,SQUARE_1:40;
  0 > s or s = 0 by A1;
  hence thesis by A5,A4,COMPTRIG:12,SIN_COS:def 19;
end;
