  We obtain a general concept of triplet of Hilbert spaces with closed
(unbounded) embeddings instead of continuous (bounded) ones. The construction
starts with a positive selfadjoint operator $H$, that is called the Hamiltonian
of the system, which is supposed to be one-to-one but may not have a bounded
inverse, and for which a model is obtained. From this model we get the abstract
concept and show that its basic properties are the same with those of the
model. Existence and uniqueness results, as well as left-right symmetry, for
these triplets of closely embedded Hilbert spaces are obtained. We motivate
this abstract theory by a diversity of problems coming from homogeneous or
weighted Sobolev spaces, Hilbert spaces of holomorphic functions, and weighted
$L^2$ spaces. An application to weak solutions for a Dirichlet problem
associated to a class of degenerate elliptic partial differential equations is
presented. In this way, we propose a general method of proving the existence of
weak solutions that avoids coercivity conditions and Poincar\'e-Sobolev type
inequalities.
