
theorem Th25:
  for A being Subset of REAL, B being Subset of R^1 st A = B holds
  A is compact iff B is compact
proof
  let A be Subset of REAL, B be Subset of R^1 such that
A1: A = B;
  thus A is compact implies B is compact
  proof
    assume
A2: A is compact;
    per cases;
    suppose
      A = {};
      then reconsider C = B as empty Subset of R^1 by A1;
      C is compact;
      hence thesis;
    end;
    suppose A <> {};
      then reconsider A as non empty real-bounded Subset of REAL
        by A2,RCOMP_1:10;
      reconsider i = inf A, s = sup A as Real;
      reconsider X = [.i,s.] as Subset of R^1 by TOPMETR:17;
A3:   i <= s by XXREAL_2:40;
      then
A4:   Closed-Interval-TSpace(i,s) = R^1|X by TOPMETR:19;
A5:   B is closed by A1,A2,Th23;
A6:   X <> {} by A3,XXREAL_1:30;
A7:   B c= X by A1,XXREAL_2:69;
      Closed-Interval-TSpace(i,s) is compact by A3,HEINE:4;
      then X is compact by A6,A4,COMPTS_1:3;
      hence thesis by A5,A7,COMPTS_1:9;
    end;
  end;
  assume B is compact;
  then [#]B is compact by WEIERSTR:13;
  hence thesis by A1,WEIERSTR:def 1;
end;
