Relatively compact subspace
Since closed subsets of a compact space are compact, every subset of a compact space is relatively compact. In the case of a metric topology, or more generally when sequences may be used to test for compactness, the criterion for relative compactness becomes that any sequence in Y has a subsequence convergent in X. Such a subset may also be called relatively bounded, or pre-compact, although the latter term is also used for a totally bounded subset. (These are equivalent in a complete space.)
Some major theorems characterise relatively compact subsets, in particular in function spaces. An example is the Arzelà–Ascoli theorem. Other cases of interest relate to uniform integrability, and the concept of normal family in complex analysis. Mahler's compactness theorem in the geometry of numbers characterises relatively compact subsets in certain non-compact homogeneous spaces (specifically spaces of lattices).
The definition of an almost periodic function F at a conceptual level has to do with the translates of F being a relatively compact set. This needs to be made precise in terms of the topology used, in a particular theory.
As a counterexample take any neighbourhood of the particular point of an infinite particular point space. The neighbourhood itself may be compact but is not relatively compact because its closure is the whole non-compact space.
- page 12 of V. Khatskevich, D.Shoikhet, Differentiable Operators and Nonlinear Equations, Birkhäuser Verlag AG, Basel, 1993, 270 pp. at google books