reserve x,x1,x2,x3 for Real;

theorem
  cos(x/2)=sqrt((1+cos(x))/2) or cos(x/2)=-sqrt((1+cos(x))/2)
proof
A1: sqrt((1+cos(x))/2)=sqrt((1+cos(2*(x/2)))/2)
    .=sqrt((1+(2*(cos(x/2))^2-1))/2) by Th7
    .=|.cos(x/2).| by COMPLEX1:72;
  per cases;
  suppose
    cos(x/2)>=0;
    hence thesis by A1,ABSVALUE:def 1;
  end;
  suppose
    cos(x/2)<0;
    then sqrt((1+cos(x))/2)*(-1)=(-cos(x/2))*(-1) by A1,ABSVALUE:def 1;
    hence thesis;
  end;
end;
