Abstract

Given a topological space , we establish formulas to compute the distance from a function to the spaces of upper semicontinuous functions and lower semicontinuous functions. For this, we introduce an index of upper semioscillation and lower semioscillation. We also establish new formulas about distances to some subspaces of continuous functions that generalize some classical results.

1. Introduction

Several classical and modern results deal with distances, optimization, equalities, and inequalities. For this, several authors have studied how to compute distances to some spaces of functions, for example, spaces of continuous functions ([1]), spaces of Baire-one functions ([2, 3]), and spaces of measurable functions and integrable functions ([4]). This kind of results has been used in a big number of papers (for instance, [515]).

Our aim here is to establish analogous formulas to study distances to spaces of upper semicontinuous functions and lower semicontinuous functions and to study distances to some subspaces of continuous functions that generalize the mentioned result in [1].

Recall that if is a topological space, a function is upper (resp., lower) semicontinuous if for all and there is , a neighborhood of , such that (resp., ) for all . Observe that is upper (resp., lower) semicontinuous if and only if (resp., ) is a closed set for all .

Throughout the paper is a topological space, denotes the subspace of made up of all continuous functions, denotes the subspace of upper semicontinuous functions, and denotes the subspace of lower semicontinuous functions. For and we denote where is the supremum metric (that can take the value ).

In Section 2 we introduce the indexes of upper and lower semioscillation and use them to study the distances of a function to the spaces of upper semicontinuous functions and lower semicontinuous functions; see Theorem 5.

In Section 3 we establish some relations between distances to spaces of semicontinuous functions and spaces of continuous functions.

It is known that if is a normal space and , thensee Theorem 8. In Section 4 we study the distances to some subspaces of continuous functions. Theorem 12 shows that if and is a closed subset of the set of points of continuity of , then we can extend to a continuous function that is also a best approximation of in . Theorem 15 studies the distance from to the continuous functions that have fixed values in some points. Both theorems generalize (3).

2. Upper and Lower Semioscillation

The oscillation of a function at is defined as where denotes the set of neighborhoods of . The oscillation of a function is used in [1] to study distances to spaces of continuous functions (see Theorem 8). Inspired by this idea, we define the indexes of upper semioscillation and lower semioscillation.

Definition 1. Let and . We define the index of upper semioscillation of in as where denotes the set of neighborhoods of , and the index of upper semioscillation of as Analogously we define the index of lower semioscillation of in as and the index of lower semioscillation of as

Observe that (resp., ) if and only if there exist and a neighborhood of such that (resp., ) for all . In particular is upper (resp., lower) semicontinuous if and only if (resp., ).

It is very clear that the index of oscillation and the indexes of upper semioscillation and lower semioscillation are related.

Proposition 2. If is a topological space and is a function, then for all we have that so

We introduce the following known functions.

Definition 3. For we denote

Proposition 4. Let . Then is an upper semicontinuous function, is a lower semicontinuous function, and we have that

Proof. It is known and very easy to check that is upper semicontinuous and is lower semicontinuous. We also have that and analogously .

The following theorem is the main result of this section.

Theorem 5. Let be a topological space and a function. Then In fact there are and such that and .

Proof. We prove the theorem in the case, and the other one can be done analogously or we can deduce it from the case applied to .
Suppose that . Choose such that . Fix and . Since , there is a neighborhood of such that for all and then Therefore, for all and all and then .
We have to prove that if , there is such that . For this we use the upper semicontinuous function By Proposition 4 we have that so the upper semicontinuous function satisfies that and the proof is over.

If a sequence of upper (resp., lower) semicontinuous functions is locally uniformly convergent to a function , then is also upper (resp., lower) semicontinuous. Theorem 5 can be used to get a quantitative version of this result.

Proposition 6. Let be a topological space and a sequence in locally uniformly convergent to a function . Then

Proof. Fix and and choose and , a neighborhood of , such that for all and . Fix and choose , a neighborhood of , such that for all . Then for all , so and then . Since and are arbitrary, we get by Theorem 5 that . Analogously .

Example 7. The inequalities of Proposition 6 are sharp because they become an equality when we consider constant sequences of non-semicontinuous functions (for example, where is the characteristic function of ). However, in general, the equalities do not hold. Consider . The sequence is locally uniformly convergent to the null function and , so

3. Relations between Distances to Spaces of Semicontinuous and Continuous Functions

Since , we have that for all . From Theorem 8 we can obtain that in some cases the distance can be bounded using the distances and . For this we also need the following result.

Theorem 8 (see [1, 16]). Let be a topological space. Then the following statements are equivalent: (1) is normal,(2)for each there is such that ,(3) for each .

The version of Theorem 8 that appears in [1] is less general. They prove that if is a paracompact space, then the formula holds for all bounded functions and also says that this result holds for normal spaces.

Corollary 9. Let be a normal topological space and a function. ThenIf is an upper semicontinuous function, thenIf is a lower semicontinuous function, then

Proof. By Proposition 2 and then by Theorems 8 and 5, we have that Observe now that if is upper (resp., lower) semicontinuous, then (resp., ), so equalities (25) and (26) also follow from Theorems 8 and 5.

Remark 10. Considering equality (26), one can think that if is lower (resp., upper) semicontinuous, then the best approximation of by upper (resp., lower) semicontinuous functions that appear in the proof of Theorem 5 is continuous. However, it is easy to check that it is not true. If we consider and , i.e., is the function defined by then is lower semicontinuous but is not continuous.

4. Distances to Subspaces of Continuous Functions

In this section we study generalizations of Theorem 8. We prove that we can obtain a best approximation of in that preserves the value of in some sets of continuity points and we also can force to have fixed values at some points. First of all, we need the following known lemma that can be found in [17, Theorem 12.16].

Lemma 11. Let be a topological normal space. Then if is an upper semicontinuous function and is a lower semicontinuous function such that , there exists a continuous function such that .

Theorem 12. Let be a normal space, , and be a closed subset of such that is continuous at for all . Then there is a continuous function such that and

Proof. Suppose that and define and . By Proposition 4, is upper semicontinuous and is lower semicontinuous and , so . Define for . Clearly . Observe that if is continuous in , then , so Let us prove that is upper semicontinuous. If , there is a neighborhood of such that and then . If , there is a neighborhood of such that ( is continuous at ) and for all . If , then , and if , then , so . Then we have that is upper semicontinuous. Analogously is lower semicontinuous, and since , by Lemma 11 we have that there exists a continuous function such that Observe that if , since , then , so If , then , so Analogously , so and then To finish, we have to prove that for all . This is true by Theorem 8, but we include the proof here to get a self-contained proof. Suppose that is a continuous function and define . For , choose , a neighborhood of , such that . Then for all so and then for all .

Remark 13. Observe that the final part of the proof of Theorem 12 does not need the normal hypothesis, so if is a topological space and , then

Example 14. The set in Theorem 12 needs to be closed. Indeed consider the function where . If is a continuous function such that , then , so If we change the hypothesis by continuous, the theorem also fails. Consider now and . If is a continuous function such that , then clearly and , so .

Keeping the last example in mind, we can ask how far is from the set of continuous functions that takes a fixed value in a point . The following theorem says that the distance that we obtain depends on . Since , , and , we get that we can write as

Theorem 15. Let be a normal space, , and be a discrete closed subset. For each , fix . Then there is such that for all and where

Proof. Take and define and . By Proposition 4 is upper semicontinuous, is lower semicontinuous, and , so . We have that Indeed, if , then , so and analogously . Define for . Let us see that is upper semicontinuous. If , then there is , a neighborhood of , such that , so . If , fix and pick , a neighborhood of , such that and for all . Then for all , so is upper semicontinuous. Analogously is lower semicontinuous, and since , by Lemma 11 there is a continuous function such that Observe that if , then , so for all . Let us see that . (i)Suppose that . Then (ii)Suppose that and . Then (iii)Suppose that and . Then Thus, and analogously . We have that and then We have to prove that . Since , then . Accordingly, the following claim finish the proof.
Claim. If is a continuous function such that for some fixed , then Suppose without loss of generality that . Fix ; then there is , a neighborhood of , such that for all . Choose such that . Then Since is arbitrary, we get that and the proof of the claim is over.

Corollary 16. Let be a normal space, , and be a discrete closed subset. For each fix and consider the affine subspace Then where

Proof. By Theorem 15 we have that . The other inequality is true by the claim of the proof of Theorem 15.

Corollary 17. Let be a normal space, , and be a discrete closed subset. For each fix Then there is such that for all and

Proof. If and , we have that so by Theorem 15 there is a function such that and

The proofs of Theorems 12 and 15 are very similar. In fact we can combine both theorems.

Theorem 18. Let be a normal space, , be a discrete closed subset, and be a closed subset of such that is continuous at for all . For each fix . Then there is such that for all , for all , and where

We omit the proof because it is very similar to the proofs of Theorems 12 and 15. If we read the proof of Theorem 15, we have to change the definition of by and then we get by Lemma 11   that , and then we have to check that is the desired function.

Data Availability

All our findings are theoretical ones and are included within the article.

Conflicts of Interest

The author declares no conflicts of interest.

Acknowledgments

The author is supported by the Spanish grants MTM2017-83262-C2-2-P of the Spanish Ministry of Economy and 20906/PI/18 of Fundación Séneca.