The classical Weierstrass theorem states that every continuous function
f
f
defined on a compact set
\Omega \subset\mathbb{R}^n
Ω
⊂
R
n
can be uniformly approximated by polynomials. We show first that it is again valid if
\Omega
Ω
is a compact Hausdorff metric space, i.e., it holds in the following sense: there exists a surjective isometry
T
T
from a compact set
K_\Omega
K
Ω
of a Banach sequence space
S
S
to
\Omega
Ω
, such that for every
\varepsilon>0
ε
>
0
there is an
n
n
variable polynomial
p
p
satisfying
|f(T(s))-p(s_1,s_2,\cdots,s_n)|<\varepsilon,\;\forall s=(s_j)\in K_{\Omega}.
∣
f
(
T
(
s
)
)
−
p
(
s
1
,
s
2
,
⋯
,
s
n
)
∣
<
ε
,
∀
s
=
(
s
j
)
∈
K
Ω
.
We prove also that for any
weak
w
e
a
k
(
w^*
w
∗
, resp.) continuous positively homogenous function
f
f
defined on a (dual, resp.) Banach space
X
X
(
X^*
X
∗
, resp.) then for all
\varepsilon>0
ε
>
0
and for every weakly compact set
K\subset X
K
⊂
X
(
w^*
w
∗
compact set
K\subset X^*
K
⊂
X
∗
), there exist
\phi_i\in X^*
ϕ
i
∈
X
∗
(
X,
X
,
resp.) for
i=1,2,\cdots, m,
i
=
1
,
2
,
⋯
,
m
,
and
\psi_j\in X^*
ψ
j
∈
X
∗
(
X,
X
,
resp.) for
j=1,2, \cdots,n
j
=
1
,
2
,
⋯
,
n
such that
|f(x)-[(\phi_1\vee\phi_2\vee\cdots\vee\phi_m)(x)- (\psi_1\vee\psi_2\vee\cdots\vee\psi_n)(x)]|<\varepsilon
∣
f
(
x
)
−
[
(
ϕ
1
∨
ϕ
2
∨
⋯
∨
ϕ
m
)
(
x
)
−
(
ψ
1
∨
ψ
2
∨
⋯
∨
ψ
n
)
(
x
)
]
∣
<
ε
uniformly for
x\in K.
x
∈
K
.
Let
cc(X)
c
c
(
X
)
(
wcc(X)
w
c
c
(
X
)
, reps.) be the norm semigroup consisting of all nonempty (weakly, resp.) compact convex sets of the space
X
X
. As its application, we give two representation theorems of the duals of
cc(X)
c
c
(
X
)
and
wcc(X)
w
c
c
(
X
)
.