reserve a,b,c,d,x,y,w,z,x1,x2,x3,x4 , X for set;
reserve A for non empty set;
reserve i,j,k for Element of NAT;
reserve a,b,c,d for Real;
reserve y,r,s,x,t,w for Element of RAT+;

theorem Th16:
  Rea [*a,b,c,d*] = a & Im1 [*a,b,c,d*] = b &
  Im2 [*a,b,c,d*] = c & Im3 [*a,b,c,d*] = d
proof
  reconsider aa = a, bb = b, c9 = c, d9 = d as Element of REAL
      by XREAL_0:def 1;
  thus Rea [*a,b,c,d*] = a
  proof
    per cases;
    suppose c = 0 & d=0;
      then
A1:   [*a,b,c,d*] = [*aa,bb*] by Lm3;
      Re [*aa,bb*] =a by Lm7;
      hence thesis by A1,Def12;
    end;
    suppose c <> 0 or d<>0;
      then
A2:   [*a,b,c,d*] = (0,1,2,3)-->(aa,bb,c9,d9) by Def5;
      then reconsider f = [*a,b,c,d*] as Function of 4, REAL by CARD_1:52;
A3:   not [*a,b,c,d*] in COMPLEX by A2,Th4;
      f.0 = a by A2,FUNCT_4:142;
      hence thesis by A3,Def12;
    end;
  end;
  thus Im1 [*a,b,c,d*] = b
  proof
    per cases;
    suppose c = 0 & d = 0;
      then
A4:   [*a,b,c,d*] = [*aa,bb*] by Lm3;
      Im [*aa,bb*] = b by Lm7;
      hence thesis by A4,Def13;
    end;
    suppose c <> 0 or d <> 0;
      then
A5:   [*a,b,c,d*] = (0,1,2,3) --> (aa,bb,c9,d9) by Def5;
      then reconsider f = [*a,b,c,d*] as Function of 4, REAL by CARD_1:52;
A6:   not [*a,b,c,d*] in COMPLEX by A5,Th4;
      f.1 = b by A5,FUNCT_4:141;
      hence thesis by A6,Def13;
    end;
  end;
  thus Im2 [*a,b,c,d*] = c
  proof
    per cases;
    suppose
A7:   c = 0 & d = 0;
      then [*a,b,c,d*] = [*aa,bb*] by Lm3;
      hence thesis by A7,Def14;
    end;
    suppose c <> 0 or d <> 0;
      then
A8:   [*a,b,c,d*] = (0,1,2,3) --> (aa,bb,c9,d9) by Def5;
      then reconsider f = [*a,b,c,d*] as Function of 4, REAL by CARD_1:52;
A9:   not [*a,b,c,d*] in COMPLEX by A8,Th4;
      f.2 = c by A8,FUNCT_4:140;
      hence thesis by A9,Def14;
    end;
  end;
  per cases;
  suppose
A10: c = 0 & d = 0;
    then [*a,b,c,d*] = [*aa,bb*] by Lm3;
    hence thesis by A10,Def15;
  end;
  suppose c <> 0 or d <> 0;
    then
A11: [*a,b,c,d*] = (0,1,2,3) --> (aa,bb,c9,d9) by Def5;
    then reconsider f = [*a,b,c,d*] as Function of 4, REAL by CARD_1:52;
A12: not [*a,b,c,d*] in COMPLEX by A11,Th4;
    f.3 = d by A11,FUNCT_4:139;
    hence thesis by A12,Def15;
  end;
end;
