## real analysis

hello. just want to ask some help with these, or a sketch of the proof perhaps:

1. how can i prove the bolzano intermediate value theorem?

2. if K is compact and f is continuous on K, then f(K) is compact. is there another way of proving this without using the heine-borel theorem? but it would be ok to use that theorem to.

3. what could be another criterion for a product of uniformly continuous functions f and g on X to uniformly continuous on X too?

4. i would like to verify if this proof for the continuity of thomae's function is ok, or do i have to add or cancel something:
Proof of Thomae's Function:

Let a be an element of {Q intersection [1,0]}, there exists {xn} subset of {Q' intersection [0,1]} such that xn approaches a (by density theorem). Lim f(xn) = 0 but f(a) = 1/n. Hence, f(x) is not continuous at rational points.

On the other hand, let a' be an element of {Q' intersection [1,0]}, there exists {xn} subset of {Q intersection [0,1]} such that xn approaches a' (by density theorem). Lim f(xn) = 1/n approaching 0 and f(a') = 0. Hence, f(x) is continuous at irrational points.