1 Introduction

One of the first stability results in the theory of functional equations is the result of Pólya and Szegö from the year 1924 (see [15]). However, Ulam’s question (see [18]) is taken as the beginning of the theory of the stability of functional equations. In 1940 Ulam formulated a question concerning the stability of the Cauchy functional equation

$$\begin{aligned} a (x + y) = a (x) + a (x) \end{aligned}$$

in other words, on the stability of additive functions or the stability of homomorphisms of groups. Less than a year later, Hyers (see [10]) gives the answer to Ulam’s question proving (in essence) the following

Theorem 1.1

(Hyers) If \((S, +)\) is a commuttative semigroup and X is a Banach space, then for each function \(f: S \rightarrow X\) satisfying

$$\begin{aligned} \parallel f (x + y) -f (x) -f (y) \parallel \le \varepsilon , \; \; x, y \in S, \end{aligned}$$

with some \(\varepsilon \ge 0\) there is an additive function \(a: S \rightarrow X\) fulfilling

$$\begin{aligned} \parallel a(x) -f(x) \parallel \le \varepsilon , \; \; x \in S. \end{aligned}$$

Just over 25 years later, we find the first attempts to transfer the Hahn-Banach separation theorem (or the Mazur-Orlicz theorem) to the case of functionals defined on groups (semigroups). One of the most popular results belonging to this trend is Kranz’s theorem (see [12], here the finite version, with functions with values in \({\mathbb {R}}\))

Theorem 1.2

(Kranz) If \((S,+)\) is a commutative semigroup, \(p: S \rightarrow {\mathbb {R}}\) is subadditive, i.e.

$$\begin{aligned} p(x + y) \le p(x) + p(y), \; \; x, y \in S, \end{aligned}$$

\(q: S \rightarrow {\mathbb {R}}\) is superadditive, i.e.

$$\begin{aligned} q(x + y) \ge q(x) + q(y), \; \; x, y \in S \end{aligned}$$

and

$$\begin{aligned} q(x) \le p(x), \; \; x \in S, \end{aligned}$$

then there exists an additive function \(a: S \rightarrow {\mathbb {R}}\) which separates p and q, i.e.

$$\begin{aligned} q(x) \le a(x) \le p(x), \; \; x \in S. \end{aligned}$$

In the mid-eighties of the twentieth century, it was widely known that stability theorems could be derived from separation theorems. A. Smajdor was the first to notice that separability theorems can also be obtained from stability theorems (see [7], Remark 2). The same, a separation theorem as a consequence of a stability result, can be found in Badora’s paper [1]. In the paper of Cabello Sánchez [4] we find an analysis of the relationship between stability in the sense of Yost and separation theorems. Then in many works we find both stability theorems derived from separation theorems (e.g. Páles [14]) and separation theorems as consequences of stability results (e.g. [1]). Many of these results have not been published to this day and this work is to systematize our knowledge of the relationship between theorems about separation by an additive map and the results regarding the stability of the Cauchy functional equation.

2 The Hyers-Ulam stability

First we consider the scalar case.

Let \((S,\cdot )\) be a semigroup. We say that S has property (H) if for every function \(f : S \rightarrow {\mathbb {R}}\) such that

$$\begin{aligned} \mid f(xy) - f(x) - f(y)\mid \le \varepsilon ,\;\; x, y \in S, \end{aligned}$$
(2.1)

for some \(\varepsilon \ge 0\), there exists an additive function \(a : S\rightarrow {\mathbb {R}}\) satisfying

$$\begin{aligned} \mid a(x) - f(x) \mid \le \varepsilon ,\;\; x\in S. \end{aligned}$$
(2.2)

From Hyers’ theorem every commutative semigroup has property (H). In [17] Székelyhidi transferred this property to amenable semigroups. More information about which group (semigroup) has property (H) can be found in Forti’s paper [5] .

We say that a semigroup S has property (G-K) if for every functions \(\varphi , \psi :S\rightarrow {\mathbb {R}}\) such that \(\varphi \) is superadditive

$$\begin{aligned} \varphi (xy) \ge \varphi (x) + \varphi (y), \; \; x, y \in S, \end{aligned}$$
(2.3)

\(\psi \) is subadditive

$$\begin{aligned} \psi (xy)\le & {} \psi (x) + \psi (y), \; \; x, y \in S, \end{aligned}$$
(2.4)
$$\begin{aligned} \varphi (x)\le & {} \psi (x), \; \; x \in S \end{aligned}$$
(2.5)

and

$$\begin{aligned} \sup \{\; \psi (x)-\varphi (x)\;:\; x\in S\;\}\in {\mathbb {R}} \end{aligned}$$
(2.6)

there exists an additive function \(a: S \rightarrow {\mathbb {R}}\) satisfying

$$\begin{aligned} \varphi (x) \le a(x) \le \psi (x), \; \; x \in S. \end{aligned}$$
(2.7)

In the paper by Gajda and Kominek [7] we find that every amenable semigroup and every weakly commutative semigroup has property (G-K). The equivalence of properties (H) and (G-K) shows the following

Theorem 2.1

Let S be a semigroup. The following conditions are equivalent:

  1. (i)

    S has property (H);

  2. (ii)

    S has property (G-K).

Proof

The proof of the implication “(i)\(\Rightarrow \)(ii)” was credited to A. Smajdor ( [7], Remark 2) however, the author of this work does not know the original proof of this fact by A. Smajdor. Here we suggest the following: assume that \(\varphi \) and \(\psi \) satisfy (2.3), (2.4), (2.5) and let

$$\begin{aligned} k=\sup \{\; \psi (x)-\varphi (x)\;:\; x\in S\;\}\in {\mathbb {R}} . \end{aligned}$$

Then, for \(x,y\in S\) we have

$$\begin{aligned} \psi (xy)-\varphi (y)\ge \varphi (xy)-\varphi (y)\ge \varphi (x) . \end{aligned}$$

This allows us to define the function \(h:S\rightarrow {\mathbb {R}}\) by the formula

$$\begin{aligned} h(x)=\inf \{\;\psi (xy)-\varphi (y)\;:\; y\in S\;\} ,\;\;x\in S. \end{aligned}$$

Evidently,

$$\begin{aligned} \varphi (x)\le h(x),\;\;x\in S. \end{aligned}$$

Moreover,

$$\begin{aligned} \psi (xy)-\varphi (y)\le \psi (x)+ \psi (y)- \varphi (y)\le \psi (x)+k,\;\;x\in S \end{aligned}$$

which leads to

$$\begin{aligned} \varphi (x)\le h(x)\le \psi (x)+k,\;\; x\in S. \end{aligned}$$
(2.8)

Further, for \(x,y\in S\) we get

$$\begin{aligned} h(xy)= & {} \inf \{\;\psi (xyz)-\varphi (z)\;:\; z\in S\;\} \\= & {} \inf \{\;\psi (xyz)-\varphi (yz)+ \varphi (yz)-\varphi (z)\;:\; z\in S\;\} \\\ge & {} \inf \{\;\psi (xyz)-\varphi (yz)+ \varphi (y)\;:\; z\in S\;\} \\= & {} \inf \{\;\psi (xyz)-\varphi (yz)\;:\; z\in S\;\} + \varphi (y)\\\ge & {} \inf \{\;\psi (xz)-\varphi (z)\;:\; z\in S\;\} + \varphi (y)\\= & {} h(x) +\varphi (y) , \end{aligned}$$

therefore,

$$\begin{aligned} h(xy)-h(x)\ge \varphi (y),\;\; x,y\in S \end{aligned}$$

and

$$\begin{aligned} h(xy)= & {} \inf \{\;\psi (xyz)-\varphi (z)\;:\; z\in S\;\} \\= & {} \inf \{\;\psi (xyz)-\psi (yz)+ \psi (yz)-\varphi (z)\;:\; z\in S\;\} \\\le & {} \inf \{\;\psi (x)+ \psi (yz)-\varphi (z)\;:\; z\in S\;\} \\= & {} \psi (x)+ \inf \{\;\psi (yz)-\varphi (z)\;:\; z\in S\;\}\\= & {} \psi (x) +h(y), \end{aligned}$$

and so,

$$\begin{aligned} h(xy)-h(y)\le \psi (x),\;\; x,y\in S. \end{aligned}$$

We can use these inequalities to estimate the Cauchy difference of the function h

$$\begin{aligned} h(xy)-h(x)-h(y)\ge & {} \varphi (y)-h(y) \\\ge & {} \varphi (y)-\psi (y)-k \ge -2k,\;\; x,y\in S \end{aligned}$$

and

$$\begin{aligned} h(xy)-h(x)-h(y)\le & {} \psi (x)-h(x) \\\le & {} \psi (x)-\varphi (x) \le 2k,\;\; x,y\in S. \end{aligned}$$

Hence, the function h satisfies inequality (2.1) with \(\varepsilon =2k\). Our assumption guarantees the existence of an additive map \(a:S\rightarrow {\mathbb {R}}\) fulfilling

$$\begin{aligned} -2k\le a(x)-h(x)\le 2k,\;\; x\in S. \end{aligned}$$

So,

$$\begin{aligned} \varphi (x)-2k\le h(x)-2k\le a(x)\le h(x)+2k\le \psi (x)+3k,\;\; x\in S. \end{aligned}$$

For \(x\in S\) and \(n\in {\mathbb {N}}\) we have

$$\begin{aligned} \varphi (x^n)-2k\le a(x^n)\le \psi (x^n)+3k. \end{aligned}$$

But for the additive map a: \(a(x^n)=n\cdot a(x)\), for superadditive \(\varphi \): \(\varphi (x^n)\ge n\cdot \varphi (x)\) and for subadditive \(\psi \): \(\psi (x^n)\le n\cdot \psi (x)\). Therefore,

$$\begin{aligned} n\varphi (x)-2k\le \varphi (x^n)-2k\le na(x)\le \psi (x^n)+3k\le n\psi (x)+3k \end{aligned}$$

and

$$\begin{aligned} \varphi (x)-\frac{2k}{n} \le a(x)\le \psi (x)+\frac{3k}{n} \end{aligned}$$

which gives (2.7) and ends the proof of this implication.

For the proof of the implication “(ii)\(\Rightarrow \)(i)” assume that a map \(f : S \rightarrow {\mathbb {R}}\) satisfies (2.1) for some \(\varepsilon \ge 0\). Then the function \(\varphi =f-\varepsilon \) is superadditive, the function \(\psi =f+\varepsilon \) is subadditive, condition (2.5) is satisfied and

$$\begin{aligned} \sup \{\; \psi (x)-\varphi (x)\;:\; x\in S\;\} =2\varepsilon \in {\mathbb {R}} . \end{aligned}$$

Our assumption guarantees the existence of an additive function \(a:S\rightarrow {\mathbb {R}}\) fulfilling

$$\begin{aligned} f(x)-\varepsilon =\varphi (x) \le a(x) \le \psi (x)=f(x)+\varepsilon , \; \; x \in S. \end{aligned}$$

Therefore,

$$\begin{aligned} \mid a(x) - f(x) \mid \le \varepsilon ,\;\; x\in S. \end{aligned}$$

\(\square \)

In the vector case, the analogue of assumption (H) will be the following condition.

We say that a semigroup S has property (G-G1) if for every normed space Y, every bounded, convex, closed subset A of Y containing zero and every function \(f:S\rightarrow Y\) satisfying

$$\begin{aligned} f(xy) - f(x) - f(y)\in A ,\;\; x, y \in S \end{aligned}$$
(2.9)

there exists an additive function \(a : S\rightarrow Y\) such that

$$\begin{aligned} a(x) - f(x) \in A ,\;\; x\in S. \end{aligned}$$
(2.10)

This type of stability result (for an Abelian semigroup S and a Banach space Y) was shown by Gajda and Ger in [6] (see Corollary 1).

We replace the separation property (G-K) by the following selection assumption.

We say that a semigroup S has property (G-G2) if for every normed space Y and every multifunction \(F:S\rightarrow cc(Y)\), where by cc(Y) we denote the collection of all nonempty closed convex subsets of Y, fulfilling (F is a subadditive multifunction)

$$\begin{aligned} F(xy)\subset F(x)+F(y) ,\;\; x, y \in S \end{aligned}$$
(2.11)

and

$$\begin{aligned} \sup \{\;\text{ diam } F(x)\;:\;x\in S\;\} < \infty , \end{aligned}$$
(2.12)

where

$$\begin{aligned} \text{ diam } B=\sup \{\;\parallel u-v\parallel \;:\;u,v\in B\;\},\;\; \text{ for } \text{ a } \text{ nonempty } \text{ subset } B \text{ of } Y, \end{aligned}$$

there exists an additive function \(a : S\rightarrow Y\) which is a selection of F, which means that

$$\begin{aligned} a(x) \in F(x) ,\;\; x\in S. \end{aligned}$$
(2.13)

Gajda and Ger in [6] proved such a selection theorem for an Abelian semigroup S and a Banach space Y (see Theorem 1).

The next theorem gives the equivalence of conditions (G-G1) and (G-G2).

Theorem 2.2

Let S be a semigroup. The following conditions are equivalent:

  1. (I)

    S has property (G-G1);

  2. (II)

    S has property (G-G2).

Proof

For the proof of the implication “(I)\(\Rightarrow \)(II)” first, for \(x\in S\), we select one element f(x) from a non-empty set F(x). Next, we observe that assumption (2.12) guarantees the existence of a positive \(r>0\) such that

$$\begin{aligned} F(x)\subset f(x)+B(0,r),\;\; x\in S \end{aligned}$$
(2.14)

(by B(0, r) we denote the closed ball with center zero and radius r). Hence, for every \(x,y\in S\) we have

$$\begin{aligned} f(xy)\in F(xy)\subset F(x)+F(y)\subset f(x)+B(0,r)+f(y)+B(0,r) \end{aligned}$$

which means that the map f satisfies (2.9) with \(A=B(0,2r)\). By assumption (I) there exists an additive function \(a : S\rightarrow Y\) fulfilling (2.10). Namely,

$$\begin{aligned} a(x) - f(x) \in B(0,2r) ,\;\; x\in S. \end{aligned}$$

Thence

$$\begin{aligned} a(x^n) - f(x^n) \in B(0,2r) ,\;\; x\in S, \;n\in {\mathbb {N}}. \end{aligned}$$

But a is an additive map. So,

$$\begin{aligned} n\cdot a(x) - f(x^n) \in B(0,2r) ,\;\; x\in S, \;n\in {\mathbb {N}} \end{aligned}$$

and, as a result,

$$\begin{aligned} a(x) - \frac{1}{n}f(x^n) \in \frac{1}{n} B(0,2r) ,\;\; x\in S, \;n\in {\mathbb {N}}, \end{aligned}$$

which shows that

$$\begin{aligned} a(x) =\lim _{n\rightarrow \infty } \frac{1}{n}f(x^n) ,\;\; x\in S. \end{aligned}$$

Let us fix \(x\in S\). Then \(f(x)\in F(x)\) and, by the subadditivity of F and the convexity of F(x),

$$\begin{aligned} F(x^{n})\subset n\cdot F(x),\;\;n\in {\mathbb {N}}, \end{aligned}$$

i.e.,

$$\begin{aligned} \frac{1}{n}F(x^{n})\subset F(x), \;\;n\in {\mathbb {N}} . \end{aligned}$$

Then

$$\begin{aligned} 0\in -\frac{1}{n}f(x^n)+\frac{1}{n}F(x^{n})\subset -\frac{1}{n}f(x^n)+F(x),\;\;n\in {\mathbb {N}}, \end{aligned}$$

which gives (F(x) is closed)

$$\begin{aligned} 0\in -\lim _{n\rightarrow \infty }\frac{1}{n}f(x^n)+F(x). \end{aligned}$$

Hence,

$$\begin{aligned} 0\in -a(x)+F(x), \end{aligned}$$

i.e.,

$$\begin{aligned} a(x)\in F(x), \end{aligned}$$

which ends the proof of “(I)\(\Rightarrow \)(II)”.

The implication “(II)\(\Rightarrow \)(I)”, in fact, was noticed in [6]. Having a function f fulfilling (2.9) with some bounded, convex, containing zero, closed subset A of a normed space Y we define a multifunction \(F:S\rightarrow cc(Y)\) putting

$$\begin{aligned} F(x)=f(x)+A,\;\;x\in S. \end{aligned}$$

Then F is a subadditive multifunction satisfying (2.12) with \(\sup \{\;\text{ diam } F(x)\;:\;x\in S\;\} =\text{ diam }A < \infty \) and the existence (by (II)) of an additive function \(a : S\rightarrow Y\), which is a selection of F, implies the existence of an additive function \(a : S\rightarrow Y\) such that condition (2.10) holds true, which ends the proof. \(\square \)

3 The Ger stability

In [8] Ger suggested replacing the constant function from the Ulam problem by some function of one of the variables and proved that any Abelian semigroup has the following property:

Let \((S,\cdot )\) be a semigroup. We say that S has property (G) iff for every function \(f:S\rightarrow {\mathbb {R}}\) and every \(\rho :S\rightarrow {\mathbb {R}}\) satisfying

$$\begin{aligned} \mid f(xy)-f(x)-f(y)\mid \le \rho (x),\;\; x,y\in S \end{aligned}$$
(3.1)

there exists an additive function \(a:S\rightarrow {\mathbb {R}}\) such that

$$\begin{aligned} \mid a(x)-f(x)\mid \le \rho (x),\;\; x\in S. \end{aligned}$$
(3.2)

Also, in [14] Páles proved that every Abelian semigroup has the following separation property.

We say that a semigroup \((S,\cdot )\) has property (P) iff for any functions \(\varphi ,\psi :S\rightarrow {\mathbb {R}}\) there exists an additive map \(a:S\rightarrow {\mathbb {R}}\) fulfilling

$$\begin{aligned} \varphi (x)\le a(x)\le \psi (x),\;\;x\in S \end{aligned}$$
(3.3)

if and only if there exists a function \(f:S\rightarrow {\mathbb {R}}\) such that

$$\begin{aligned} \varphi (x)\le f(xy)-f(y)\le \psi (x),\;\;x,y\in S. \end{aligned}$$
(3.4)

Here we have only the following implication (the truth of the reverse implication is an open problem):

Theorem 3.1

If a semigroup S has property (P), then a semigroup S has property (G).

Proof

Observe that if a function f satisfies (3.1) then functions \(\varphi =f-\rho \) and \(\psi =f+\rho \) satisfy (3.4) (with f). Therefore, by (P), there is an additive map \(a:S\rightarrow {\mathbb {R}}\) fulfilling (3.3). So, a satisfies inequality (3.2). \(\square \)

The situation is slightly different in the case of groups. In [2] (see also [5]) Badora distinguished a class \({\mathcal {G}}\) of groups. Namely, we say that a group \((G,\cdot )\) belongs to the class \({\mathcal {G}}\) iff for every subadditive map \(\gamma :G\rightarrow {\mathbb {R}}\). i.e. \(\gamma \) satisfies (2.4) there exists an additive function \(a:G\rightarrow {\mathbb {R}}\) such that

$$\begin{aligned} a(x)\le \gamma (x),\;\; x\in G. \end{aligned}$$
(3.5)

In [2] Badora proved that every amenable and every weakly commutative group belongs to the class \({\mathcal {G}}\). Moreover, he proved that the Hyers stability theorem holds true for groups from the class \({\mathcal {G}}\).

For groups we have the following:

Theorem 3.2

Let G be a group. The following statements are equivalent:

  1. (a)

    G has property (P);

  2. (b)

    G has property (G);

  3. (c)

    G belongs to \({\mathcal {G}}\).

Proof

The implication “(a)\(\Rightarrow \)(b)” we have proved previously. Now, we will prove the implication “(b)\(\Rightarrow \)(c)”. In the beginning we note that

$$\begin{aligned} \gamma (y)=\gamma (x^{-1}xy)\le \gamma (x^{-1})+\gamma (xy),\;\;x,y\in G \end{aligned}$$

and if e is a neutral element of G, then

$$\begin{aligned} \gamma (x)=\gamma (xe)\le \gamma (x)+\gamma (e),\;\;x\in G. \end{aligned}$$

Therefore,

$$\begin{aligned} 0\le \gamma (e) \end{aligned}$$

and

$$\begin{aligned} 0\le \gamma (e)=\gamma (x^{-1}x)\le \gamma (x^{-1})+\gamma (x),\;\;x\in G. \end{aligned}$$

From the first inequality and (2.4) we have

$$\begin{aligned} -\gamma (x^{-1})\le \gamma (xy) -\gamma (y)\le \gamma (x),\;\;x,y\in G \end{aligned}$$

which gives

$$\begin{aligned} -\gamma (x)-\gamma (x^{-1})\le \gamma (xy) -\gamma (y)- \gamma (x)\le 0,\;\;x,y\in G \end{aligned}$$

and as a result we get

$$\begin{aligned} \mid \gamma (xy) -\gamma (y)- \gamma (x)\mid \le \gamma (x)+\gamma (x^{-1}),\;\;x,y\in G. \end{aligned}$$

Now we can apply our assumption to the function \(\gamma \) and \(\rho (x)=\gamma (x)+\gamma (x^{-1})\) to obtain the additive function \(a:G\rightarrow {\mathbb {R}}\) fulfilling (3.2). Therefore,

$$\begin{aligned} -\gamma (x)-\gamma (x^{-1}) \le a(x) -\gamma (x) \le \gamma (x)+\gamma (x^{-1}),\;\;x\in G, \end{aligned}$$

and hence we have

$$\begin{aligned} -\gamma (x^{-1}) \le a(x),\;\;x\in G. \end{aligned}$$

By putting \(x^{-1}\) in place of x we get

$$\begin{aligned} -\gamma (x) \le a(x^{-1})=-a(x),\;\;x\in G, \end{aligned}$$

which is the expected inequality for a.

It remains to show “(c)\(\Rightarrow \)(a)”. In the proof of this implication assuming condition (3.3) with some additive function \(a:G\rightarrow {\mathbb {R}}\), just taking \(f = a\) we get condition (3.4). So, we just need to show that assuming (c) from condition (3.4) (with some f) we get condition (3.3) (with some additive a). Assume that \(f,\varphi ,\psi :G\rightarrow {\mathbb {R}}\) and (3.4) holds true. We can define \(\gamma _{1} :G\rightarrow {\mathbb {R}}\) by the formula

$$\begin{aligned} \gamma _{1} (x) =\sup \{\;f(xy)-f(y)\;:\;y\in G\;\} ,\;\;x\in G. \end{aligned}$$

Then, by (3.4),

$$\begin{aligned} \varphi (x)\le \gamma _{1} (x) \le \psi (x) ,\;\;x\in G. \end{aligned}$$

Moreover the function \(\gamma _{1}\) is subadditive. Indeed, for \(x,y\in G\) we have

$$\begin{aligned} \gamma _{1} (xy)= & {} \sup \{\;f(xyz)-f(z)\;:\;z\in G\;\}\\= & {} \sup \{\;f(xyz)-f(yz)+f(yz)-f(z)\;:\;z\in G\;\}\\\le & {} \sup \{\;f(xyz)-f(yz)\;:\;z\in G\;\} + \sup \{\;f(yz)-f(z)\;:\;z\in G\;\}\\= & {} \gamma _{1} (x)+ \gamma _{1} (y). \end{aligned}$$

The group G belongs to the family \({\mathcal {G}}\). Hence, there is an additive map \(a_{1}:G\rightarrow {\mathbb {R}}\) such that \(a_{1}(x)\le \gamma _{1} (x)\), for \(x\in G\). We have \(a_{1}(x)\le \psi (x)\), for \(x\in G\), but there still remains the proof of the inequality \(\varphi (x)\le a_{1}(x)\), \(x\in G\).

So, we can also define a function \(\gamma _{2} :G\rightarrow {\mathbb {R}}\) by

$$\begin{aligned} \gamma _{2} (x) = \inf \{\;f(xy)-f(y)\;:\;y\in G\;\} ,\;\;x\in G. \end{aligned}$$

The map \(\gamma _{2} \) is superadditive

$$\begin{aligned} \gamma _{2} (xy)= & {} \inf \{\;f(xyz)-f(z)\;:\;z\in G\;\}\\= & {} \inf \{\;f(xyz)-f(yz)+f(yz)-f(z)\;:\;z\in G\;\}\\\ge & {} \inf \{\;f(xyz)-f(yz)\;:\;z\in G\;\} + \inf \{\;f(yz)-f(z)\;:\;z\in G\;\}\\= & {} \gamma _{2}(x)+ \gamma _{2} (y),\;\; x,y\in G. \end{aligned}$$

Then

$$\begin{aligned} \varphi (x)\le \gamma _{2} (x)\le \psi (x) ,\;\;x\in G \end{aligned}$$

and \(-\gamma _{2} \) is subadditive. Our assumption implies the existence of an additive function \(a_{2} :G\rightarrow {\mathbb {R}}\) such that

$$\begin{aligned} a_{2} (x)\le -\gamma _{2} (x) \le - \varphi (x),\;\;x\in G. \end{aligned}$$
(3.6)

Moreover,

$$\begin{aligned} -\gamma _{2} (x)= & {} -\inf \{\;f(xy)-f(y)\;:\;y\in G\;\}\\= & {} \sup \{\;-f(xy)+f(y)\;:\;y\in G\;\}\\= & {} \sup \{\;-f(xy)+f(x^{-1}xy)\;:\;y\in G\;\}\\= & {} \sup \{\;f(x^{-1}xy)-f(xy)\;:\;y\in G\;\}\\= & {} \sup \{\;f(x^{-1}y)-f(y)\;:\;y\in G\;\}\\= & {} \gamma _{1} (x^{-1}),\;\; x\in G. \end{aligned}$$

Let \(a=-a_{2}\). Then by (3.6) we have

$$\begin{aligned} a(x)=-a_{2} (x)\ge \varphi (x),\;\;x\in G \end{aligned}$$

and from

$$\begin{aligned} a_{2} (x)\le -\gamma _{2} (x)=\gamma _{1} (x^{-1}) ,\;\;x\in G \end{aligned}$$

we get

$$\begin{aligned} a(x)= -a_{2} (x)=a_{2}(x^{-1})\le \gamma _{1} (x) ,\;\;x\in G. \end{aligned}$$

But \(\gamma _{1} (x)\le \psi (x)\), \(x\in G\). We obtain,

$$\begin{aligned} \varphi (x)\le a(x)= -a_{2} (x)=a_{2}(x^{-1})\le \gamma _{1} (x)\le \psi (x) ,\;\;x\in G \end{aligned}$$

which ends the proof. \(\square \)

In the vector-valued case (see Badora, Ger, Páles [3]) we have:

We say that a semigroup \((S,\cdot )\) has property (Gv) iff for every linear space Y, every function \(f:S\rightarrow Y\) and every \(\mathrm {R} :S\rightarrow 2^{Y}\setminus \{\emptyset \}\) satisfying

$$\begin{aligned} f(xy)-f(x)-f(y)\in \mathrm {R} (x),\;\; x,y\in S \end{aligned}$$
(3.7)

there exists an additive function \(a:S\rightarrow Y\) such that

$$\begin{aligned} a(x)-f(x)\in \mathrm {R} (x),\;\; x\in S. \end{aligned}$$
(3.8)

Also, we say that a semigroup \((S,\cdot )\) has property (Pv) iff for every function \(\Phi :S\rightarrow 2^{Y}\setminus \{\emptyset \}\) there exists an additive map \(a:S\rightarrow Y\) fulfilling

$$\begin{aligned} a(x)\in \Phi (x),\;\;x\in S \end{aligned}$$
(3.9)

if and only if there exists a function \(f:S\rightarrow Y\) such that

$$\begin{aligned} f(xy)-f(y)\in \Phi (x),\;\;x,y\in S. \end{aligned}$$
(3.10)

Here we have equivalence:

Theorem 3.3

Let S be a semigroup. The following conditions are equivalent:

  1. (A)

    S has property (Gv);

  2. (B)

    S has property (Pv).

Proof

(B) is a consequence of (A) because if \( \Phi : S \rightarrow 2^{Y} \setminus \{\emptyset \} \) is a multifunction and there is an additive function \( a: S\rightarrow Y \), such that condition (3.9) is satisfied, then taking \( f = a \) we notice that f and \( \Phi \) satisfy condition (3.10). If instead, \( f: S \rightarrow Y \) is a function satisfying condition (3.10), then condition (3.7) with the function \( \mathrm {R} = \Phi -f \) is satisfied. By assumption, there exists an additive function \( a: S \rightarrow Y \) satisfying (3.8), but that means that a satisfies condition (3.9).

In the proof of the implication “(A) is a consequence of (B)” we just take \( \Phi = \mathrm {R}+f \). \(\square \)

4 The Yost stability

Following Yost’s problem (see Lima and Yost [13], see also Ger [9])

We say that a semigroup \((S,\cdot )\) has property (Y) iff for every functions \(f :S\rightarrow {\mathbb {R}}\), \(\gamma :S\rightarrow [0,+\infty )\) satisfying

$$\begin{aligned} \mid f(xy) - f(x) - f(y)\mid \le \gamma (x)+\gamma (y)-\gamma (xy),\;\; x, y \in S, \end{aligned}$$
(4.1)

there is an additive mapping \(a:S\rightarrow {\mathbb {R}}\) fulfilling

$$\begin{aligned} \mid f(x) - a(x) \mid \le \gamma (x),\;\; x \in S. \end{aligned}$$
(4.2)

Back to Kranz’s theorem

We say that a semigroup \((S,\cdot )\) has property (K) iff for any functions \(p,q :S\rightarrow {\mathbb {R}}\) such that p is subadditive (2.4), q is superadditive (2.3), and condition (2.5) is satisfied there exists an additive function \(a: S \rightarrow {\mathbb {R}}\) satisfying (2.7).

Theorem 4.1

(Cabello Sánchez) For every semigroup S the following statements are equivalent:

(\(\alpha \)):

S has property (Y);

(\(\beta \)):

S has property (K).

Proof

In the proof of the implication “(\(\alpha )\Rightarrow (\beta \))” for subadditive p and superadditive q such that (2.5) holds true we define \(f, \gamma :S\rightarrow {\mathbb {R}}\) putting

$$\begin{aligned} f (x)= & {} \frac{p(x)+q(x)}{2} ,\;\;x\in S,\\ \gamma (x)= & {} \frac{p(x)-q(x)}{2} ,\;\;x\in S. \end{aligned}$$

Then \(\gamma \) is subadditive and non-negative. Moreover, for every \(x,y\in S\), by the subadditivity of p we have

$$\begin{aligned}&p(xy)+q(xy)-p(x)-q(x)-p(y)-q(y) \\&\quad \le p(x)-q(x)+p(y)-q(y)-p(xy)+q(xy) \end{aligned}$$

and by the superadditivity of q

$$\begin{aligned}&-p(x)+q(x)-p(y)+q(y)+p(xy)-q(xy) \\&\quad \le p(xy)+q(xy)-p(x)-q(x)-p(y)-q(y) \end{aligned}$$

which gives (4.1).

By (Y) we obtain the existence of an additive map \(a:S\rightarrow {\mathbb {R}}\) fulfilling (4.2) which gives the desired inequality

$$\begin{aligned} q(x)= f(x)-\gamma (x)\le a(x)\le f(x)+ \gamma (x)=p(x),\;\;x\in S. \end{aligned}$$

For the proof of the opposite implication “(\(\beta )\Rightarrow (\alpha \))” with \(f:S\rightarrow {\mathbb {R}}\) and \(\gamma :S\rightarrow [0,+\infty )\) fulfilling (4.1) we define \(p,q:S\rightarrow {\mathbb {R}}\) as follows

$$\begin{aligned} p (x)=f(x)+\gamma (x) ,\;\;x\in S, \\ q (x)= f(x)-\gamma (x) ,\;\;x\in S. \end{aligned}$$

Then, by inequality (4.1), p is subadditive, q is superadditive and by the non-negativity of \(\gamma \) (2.5) is also fulfilled. Condition (\(\beta \)) implies the existence of an additive function satisfying (2.7) which leads to

$$\begin{aligned} f(x)-\gamma (x)\le a(x)\le f(x)+\gamma (x) ,\;\;x\in S \end{aligned}$$

and ends the proof. \(\square \)

Going to the vector-valued case we replace condition (Y) by the original Yost “near additivity”.

We say that a semigroup \((S,\cdot )\) has property (Yv) iff for every normed space Y and functions \(f :S\rightarrow Y\), \(\gamma :S\rightarrow [0,+\infty )\) satisfying

$$\begin{aligned} \parallel f(xy) - f(x) - f(y)\parallel \le \gamma (x)+\gamma (y)-\gamma (xy),\;\; x, y \in S, \end{aligned}$$
(4.3)

there is an additive map \(a:S\rightarrow Y\) fulfilling

$$\begin{aligned} \parallel f(x) - a(x) \parallel \le \gamma (x),\;\; x \in S. \end{aligned}$$
(4.4)

and the Kranz selection theorem by the following additive selection property first studied by W. Smajdor in [16].

We say that a semigroup \((S,\cdot )\) has property (Kv) iff for every normed space Y every subadditive multifunction \(F :S\rightarrow 2^{Y}\setminus \{\emptyset \}\)

$$\begin{aligned} F(x y)\subset F(x)+F(y) ,\;\; x, y \in S \end{aligned}$$
(4.5)

has an additive selection \(a:S\rightarrow Y\)

$$\begin{aligned} a(x)\in F(x),\;\; x \in S. \end{aligned}$$
(4.6)

In this case we have only the following implication (the truth of the reverse implication is an open problem, also with stronger assumptions on the function F, such as, bounded, closed and convex values of F):

Theorem 4.2

If a semigroup S has property (Kv) then S has property (Yv).

Proof

Let Y be a normed space and let \(f :S\rightarrow Y\), \(\gamma :S\rightarrow [0,+\infty )\) satisfy (4.3). Inequality (4.3) may be written as

$$\begin{aligned} f(xy)-f(x)-f(y)\in B\left( 0,\gamma (x)+\gamma (y)-\gamma (xy)\right) ,\;\;x, y\in S, \end{aligned}$$

which leads to the following inclusion

$$\begin{aligned}&f(xy)-f(x)-f(y) + B(0,\gamma (xy))\\&\quad \subset B \left( 0,\gamma (x)+\gamma (y)-\gamma (xy)\right) +B(0,\gamma (xy)) , \end{aligned}$$

for all \(x, y\in S\). But for closed balls we have \(B(v_{1},r_{1})+B(v_{2},r_{2})=B(v_{1}+v_{2}, r_{1}+r_{2})\), for \(v_{1},v_{2}\in Y\) and \(r_{1},r_{2}\ge 0\). Therefore,

$$\begin{aligned}&f(xy)-f(x)-f(y)+B(0,\gamma (xy)) \subset B(0,\gamma (x)+\gamma (y)) \\&\quad = B(0,\gamma (x))+B(0,\gamma (y)) , \;\;x, y\in S, \end{aligned}$$

which can be equivalently written as follows

$$\begin{aligned} f(xy)+B(0,\gamma (xy)) \subset f(x)+B(0,\gamma (x))+f(y)+B(0,\gamma (y)) ,\;\;x, y\in S \end{aligned}$$

or

$$\begin{aligned} B(f(xy),\gamma (xy)) \subset B(f(x),\gamma (x))+B(f(y),\gamma (y)) ,\;\;x, y\in S. \end{aligned}$$

Hence, the multifunction \(F :S\rightarrow 2^{Y}\setminus \{\emptyset \}\) defined by

$$\begin{aligned} F(x)=B(f(x),\gamma (x)) ,\;\;x\in S \end{aligned}$$

is subadditive. Our assumption guarantees the existence of an additive selection \(a:S\rightarrow Y\) of F and so,

$$\begin{aligned} a(x)\in B(f(x),\gamma (x)) ,\;\;x\in S \end{aligned}$$

which gives (4.4) and ends the proof. \(\square \)

Remark 4.3

If F has values in the family of closed balls in Y, then we have the equivalence of conditions (Kv) and (Yv). Indeed, the proof of the implications from (Kv) to (Yv) is as previously presented. In the proof of the implication from (Yv) to (Kv), putting \(F(x)=B(f(x),\gamma (x))\), for \(x\in S\), we observe that conditions

$$\begin{aligned} B(f(xy),\gamma (xy)) \subset B(f(x)+f(y),\gamma (x)+\gamma (y)),\;\;x,y\in S \end{aligned}$$

and

$$\begin{aligned} \parallel f(xy) - f(x) - f(y)\parallel \le \gamma (x)+\gamma (y)-\gamma (xy),\;\; x, y \in S \end{aligned}$$

are equivalent. The additive function a that exists under the assumption of (4.4) satisfies (4.6).