1 Introduction

A celebrated result by Borwein–Borwein [1, Theorem 8.8] states that for every continuous, contractive mean-type mapping \(\mathbf {M}:I^p \rightarrow I^p\) (here and below I is an arbitrary subinterval of the reals) there exists exactly one \(\mathbf {M}\)-invariant mean. Moreover this mean is also continuous.

In some recent studies by Pasteczka [4] and Matkowski–Pasteczka [2, 3] it was proved that if \(\mathbf {M}\) is not continuous then there also exist an \(\mathbf {M}\)-invariant mean, but it is no longer uniquely determined. On the other hand, it was proved that in a narrow case \(p=2\) every contractive mean-type mapping \(\mathbf {M}:I^2\rightarrow I\) has at most one continuous \(\mathbf {M}\)-invariant mean (see [4]). We generalize this result to all \(p \ge 2\) and relax the contractivity assumption.

1.1 Invariance principle

Recall that a function \(M:I^{p}\rightarrow I\) is called a mean on I if it is internal, that is if

$$\begin{aligned} \min \left( v_{1},\ldots ,v_{p}\right) \le M\left( v_{1},\ldots ,v_{p}\right) \le \max \left( v_{1},\ldots ,v_{p}\right) \text { for all }v_{1},\ldots ,v_{p}\in I\, \text{, } \end{aligned}$$

or, briefly, if

$$\begin{aligned} \min v\le M\left( v\right) \le \max v \text { for all }v\in I^{p}\text{. } \, \end{aligned}$$

In the sequel, to avoid the trivial results, we assume that \(p>1\).

A mapping \(\mathbf {M}:I^{p}\rightarrow I^{p}\) is referred to as mean-type if there exist some means \(M_{i}:I^{p}\rightarrow I\) , \(i=1,\dots ,p\), such that \(\mathbf {M}=(M_{1},\dots ,M_{p})\).

We say that a function \(F:I^{p}\rightarrow \mathbb {R}\) is invariant with respect to \(\mathbf {M}\) (briefly \(\mathbf {M}\)-invariant), if \(F\circ \mathbf {M}=F\). Furthermore, a mean-type mapping \(\mathbf {M}:I^{p}\rightarrow I^{p}\) is called contractive provided

$$\begin{aligned} \max (\mathbf {M}(v))-\min (\mathbf {M}(v))<\max (v)-\min (v) \end{aligned}$$

for every nonconstant vector \(v\in I^{p}\) (that is whenever \(\min (v)<\max (v)\)).

1.2 Topological notions

In order to clarify the remaining part of the paper, let us introduce formally some topological notions which will be used. First recall that for a sequence of sets \((X_i)_{i=1}^\infty \) we define its lower and upper (topological) limits by

$$\begin{aligned}\begin{aligned} { \liminf _{n \rightarrow \infty } X_n:= \bigcup _{n=1}^\infty \bigcap _{k=n}^\infty X_k \qquad \text { and }\qquad \limsup _{n \rightarrow \infty } X_n:= \bigcap _{n=1}^\infty \bigcup _{k=n}^\infty X_k. } \end{aligned} \end{aligned}$$

Once we have \(\liminf _{n \rightarrow \infty } X_n=\limsup _{n\rightarrow \infty }X_n\), the sequence \((X_n)_{n=1}^\infty \) is (topologically) convergent. Then this common value is called the (topological) limit of the sequence \((X_n)_{n=1}^\infty \).

For an arbitrary set X we denote its power set (that is the set containing all its subsets) by \(2^X\). Then, for any function \(F :D \rightarrow X\) we define the image of its restriction \(\mathbf {F}:2^D \rightarrow 2^X\) by

$$\begin{aligned}\begin{aligned} { \mathbf {F}(A):=\{F(x) :x \in A\},\qquad \text {where }A \subseteq D. } \end{aligned} \end{aligned}$$

Now let I be an arbitrary subinterval of \(\mathbb {R}\) and X be a set. Adapting Cauchy’s (classical) definition of continuity, a function \(f :I \rightarrow 2^X\) is right-continuous (resp. left-continuous) at \(t \in I\) if for every sequence \((t_n)_{n=1}^\infty \) having all its elements in I and such that \(t_n \searrow t\) (resp. \(t_n \nearrow t\)), the sequence \((f(t_n))_{n=1}^\infty \) is topologically convergent to f(t). Then let us define one-sided continuity on an interval in the natural way.

Moreover, once we can order \(2^X\) with the (partial) inclusion ordering, we say that \(f :I \rightarrow 2^X\) is nondecreasing (resp. nonincreasing) if \(f(u) \subseteq f(v)\) (resp. \(f(u) \supseteq f(v)\)) for all \(u,v \in I\) with \(u \le v\).

2 Results

Let us begin with the purely topological auxiliary result which turns out to be the key tool in the proof of our main theorem. Remarkably, it does not contain means in its wording.

Lemma 1

Let D be a Hausdorff, \(\sigma \)-compact topological space and \(F :D \rightarrow [0,\infty )\) be a continuous function.

If \(T :[0,\infty ) \rightarrow 2^D\) is nondecreasing, right-continuous, and such that

  • each T(x) is closed;

  • \(\mathbf {F} \circ T :[0,\infty ) \rightarrow 2^{[0,\infty )}\) is left-continuous,

then \(\mathbf {F} \circ T\) is constant.

Proof

Denote briefly \(G:=\mathbf {F} \circ T\). Since T has a limit \(T(\infty ):=\bigcup _{x \in [0,\infty )} T(x)\), one can extend the domain of G to the set \([0,\infty ]\). As T is nondecreasing (with respect to the inclusion ordering), so is G. Thus it suffices to show that \(G(\infty ) \subseteq G(0)\). To this end, take \(y \in G(\infty )\) arbitrarily. Define

$$\begin{aligned}\begin{aligned} { S_y:= \{ s \in [0,+\infty ) :T(s) \cap F^{-1}(y) \ne \emptyset \}. } \end{aligned}\end{aligned}$$

First let us rewrite the definition of \(S_y\) in two equivalent forms

$$\begin{aligned} \begin{aligned} { S_y= \{ s \in [0,+\infty ) :y \in \mathbf {F} \circ T(s) \} = \{ s \in [0,+\infty ) :y \in G(s) \}. } \end{aligned}\end{aligned}$$
(1)

Now it is sufficient to show that \(0 \in S_y\). First observe that for all \(s_0 \in S_y\) and \(s>s_0\) we have \(T(s_0) \subseteq T(s)\) and thus \(s\in S_y\).

Second, since \(y \in G(\infty )\), there exist \(u \in D\) and \(a \in [0,+\infty )\) such that \(y=F(u)\) and \(u \in T(a)\). In particular \(u \in T(a) \cap F^{-1}(y)\) and, consequently, \(a \in S_y\). In particular \(S_y\) is a nonempty interval with the right endpoint equal to infinity. We have three cases:

Case 1. \(S_y=(a,+\infty )\) for some \(a \in [0,+\infty )\).

Then one can take a sequence \((x_n)_{n=1}^\infty \) of elements in D such that

$$\begin{aligned}\begin{aligned} { x_n \in T(a+\tfrac{1}{n}) \cap F^{-1}(y) \qquad \text { for all }n \in \mathbb {N}. } \end{aligned}\end{aligned}$$

Then all \(x_n\)-s belong to the closed space \(D_0:=T(a+1) \cap F^{-1}(y)\). However, as D is \(\sigma \)-compact, we obtain that \(D_0\) is compact. Thus the sequence \((x_n)_{n=1}^\infty \) contains a subsequence \((x_{n_k})_{k=1}^\infty \) which is convergent to \(\tilde{x} \in D_0\).

Obviously \(\tilde{x}\) belongs to the topological limit of \(\big (T(a+\tfrac{1}{n}) \cap F^{-1}(y)\big )_{n=1}^\infty \), that is \(\tilde{x} \in T(a) \cap F^{-1}(y)\). This implies that \(a \in S_y\), which is a contradiction.

Case 2. \(S_y=[a,+\infty )\) for some \(a \in (0,+\infty )\). In this case, by the one-sided continuity, we have

$$\begin{aligned}\begin{aligned} { y \in \mathbf {F} \circ T(a) = \bigcup _{x \in [0,a)} \mathbf {F} \circ T(x). } \end{aligned}\end{aligned}$$

Thus there exists \(x_0 \in [0,a)\) such that \(y \in \mathbf {F} \circ T(x_0)\). Whence \(x_0 \in S_y\) contradicting our assumption.

Case 3. \(S_y=[0,+\infty )\). In this final case we have \(0 \in S_y\), which by (1) implies \(y \in G(0)\).

Finally, as y is an arbitrary element of \(G(\infty )\) we get the inclusion \(G(\infty )\subseteq G(0)\). Consequently the equality \(G(0)=G(\infty )\) is valid, which completes the proof. \(\square \)

Now we can proceed to the main result of this paper, which was announced in the abstract.

Theorem 1

Let \(p \in \mathbb {N}\) and \(\mathbf {M}:I^p \rightarrow I^p\) be a contractive mean-type mapping. Then there exists at most one continuous \(\mathbf {M}\)-invariant mean.

Proof

Let \(K_1,K_2 :I^p \rightarrow I\) be continuous \(\mathbf {M}\)-invariant means. We show that \(K_1=K_2\).

Define \(F :I^p \rightarrow [0,+\infty )\) and \(T :[0,+\infty ) \rightarrow 2^{I^p}\) by

$$\begin{aligned}\begin{aligned} F(v)&:=\left| K_1(v)-K_2(v) \right| , \\ T(a)&:=\{v \in I^p :\max (v)-\min (v) \le a \}. \end{aligned}\end{aligned}$$

Then T in nondecreasing and right-continuous, that is

$$\begin{aligned}\begin{aligned} \bigcap _{\alpha>a} T(\alpha )=T(a)\text { for all }a>0. \end{aligned}\end{aligned}$$

Furthermore each T(a) is a closed subset of \(I^p\).

Now we show that \(\mathbf {F} \circ T\) is left-continuous. To this end, take \(a>0\) arbitrarily. Obviously, since T is monotone, one gets

$$\begin{aligned}\begin{aligned} \mathbf {F} \circ T(a^-) := \mathbf {F} \left( \bigcup _{\alpha \in [0,a)} T(\alpha ) \right) \subseteq \mathbf {F} \circ T(a). \end{aligned}\end{aligned}$$

For the converse implication take any element \(y \in \mathbf {F} \circ T(a)\). Then there exists a nonconstant vector \(x \in T(a) \subseteq I^p\) such that \(y=F(x)\). Then, since F is \(\mathbf {M}\)-invariant, we also have \(y=F \circ \mathbf {M}(x)\). However \(\mathbf {M}\) is contractive, thus

$$\begin{aligned}\begin{aligned} \max (\mathbf {M}(x))-\min (\mathbf {M}(x)) < \max (x)-\min (x) \le a. \end{aligned}\end{aligned}$$

Consequently \(\mathbf {M}(x) \in T(a^-)\), and \(y=F \circ \mathbf {M}(x) \in \mathbf {F} \circ T(a^-)\).

This yields \(\mathbf {F} \circ T(a)=\mathbf {F} \circ T(a^-)\) and \(\mathbf {F} \circ T\) is left-continuous.

According to Lemma 1 the function \(\mathbf {F} \circ T\) is constant. In particular

$$\begin{aligned}\begin{aligned} { \mathbf {F} (I^n) = \bigcup _{a>0} \mathbf {F} \circ T(a)=\mathbf {F} \circ T(0)=\mathbf {F} \big (\big \{(x,\dots ,x):x\in I\big \}\big )=\{0\}. } \end{aligned}\end{aligned}$$

Thus \(F \equiv 0\). Therefore \(K_1(v)=K_2(v)\) for all \(v \in I^p\). \(\square \)

3 Applications

3.1 Weakly contractive mean-type mappings

This section extends some considerations contained in [3]. We say that a mean-type mapping \(\mathbf {M}:I^{p}\rightarrow I^{p}\) is weakly contractive if for every nonconstant vector \(v\in I^{p}\) there is a positive integer \(n_0\left( v\right) \) such that

$$\begin{aligned} \max (\mathbf {M}^{n}(v))-\min (\mathbf {M}^{n}(v))<\max (v)-\min (v) \qquad \text { for all }n \ge n_0(v). \end{aligned}$$

Let us emphasize that it is sufficient to verify that the inequality above is valid for \(n=n_0(v)\). Moreover in a special case \(p=2\) it was proved [2] that \( \mathbf {M}\) is weakly contractive if and only if \(\mathbf {M}^{2}\) is contractive. However, due to [3], for every \(p>2\) we can construct a weakly contractive mean-type mapping on \(I^p\) such that the function \(I^p \ni v \mapsto n_0(v)\) is unbounded.

Now recall a sufficient condition to guarantee the uniqueness of the invariant mean.

Proposition 1

([3], Theorem 2) If \(\mathbf {M}:I^p\rightarrow I^p\) is a continuous, weakly contractive mean-type mapping then there exists a unique \(\mathbf {M}\)-invariant mean \(K:I^p\rightarrow I\). Moreover, the sequence of iterates \(\left( \mathbf {M}^n\right) _{n\in \mathbb {N}}\) converges (pointwise on \(I^{p})\) to \(\mathbf {K}:=\left( K,\dots ,K\right) \).

Now we extend Theorem 1 to the family of all weakly contractive mean-type mappings.

Corollary 1

Let \(p \in \mathbb {N}\) and \(\mathbf {M}:I^p \rightarrow I^p\) be a weakly contractive mean-type mapping. Then there exists at most one continuous \(\mathbf {M}\)-invariant mean.

Proof

Since \(\mathbf {M}\) is weakly contractive, the mapping \(\mathbf {M}^* :I^p \rightarrow I^p\) given by \(\mathbf {M}^*(v):=\mathbf {M}^{n_0(v)}(v)\) is contractive. Furthermore for every \(\mathbf {M}\)-invariant mean \(K :I^p \rightarrow I\), \(v \in I^p\) and \(n \in \mathbb {N}\) we have \(K \circ \mathbf {M}^n(v)=K(v)\). For \(n:=n_0(v)\), this equality simplifies to \(K \circ \mathbf {M}^*(v)=K(v)\). Thus every \(\mathbf {M}\)-invariant mean is also \(\mathbf {M}^*\)-invariant.

However, since \(\mathbf {M}^*\) is contractive, Theorem 1 implies that there exists at most one continuous, \(\mathbf {M}^*\)-invariant mean. Consequently there exists at most one continuous \(\mathbf {M}\)-invariant mean. \(\square \)

3.2 An application in solving a functional equation

In this section, similarly to [2], we show a simple application of our results in solving functional equations

Theorem 2

Let \(\mathbf {M}:I^{p}\rightarrow I^{p}\) be a weakly-contractive mean-type mapping such that there exists a continuous \(\mathbf {M}\)-invariant mean \(K:I^{p}\rightarrow I\).

A continuous function \(F:I^{p}\rightarrow \mathbb {R}\) is \(\mathbf {M}\)-invariant if, and only if, there is a continuous function \(\varphi :I \rightarrow \mathbb {R}\) such that \(F=\varphi \circ K\).

Proof

The \((\Leftarrow )\) implication is trivial. To show the converse assume that \(F :I^p \rightarrow \mathbb {R}\) satisfies \(F \circ \mathbf {M}=F\) and K is the continuous \(\mathbf {M}\)-invariant mean. Define \(\varphi :I \rightarrow \mathbb {R}\) by

$$\begin{aligned}\begin{aligned} { \varphi (x):=F(x,\dots ,x) \qquad (x\in I). } \end{aligned}\end{aligned}$$

Assume to the contrary that \(F(v) \ne \varphi \circ K (v)\) for some \(v \in I^p\). Then there exists \(\varepsilon \in (0,+\infty )\) such that the set

$$\begin{aligned}\begin{aligned} { E:=\{v\in I^p :\left| \varphi \circ K(v)-F(v) \right| \ge \varepsilon \} } \end{aligned}\end{aligned}$$

is nonempty. Since both K and F are \(\mathbf {M}\)-invariant, we obtain

$$\begin{aligned}\begin{aligned} { \varepsilon \le \left| \varphi \circ K(v)-F(v) \right| =\left| \varphi \circ K\circ \mathbf {M}(v)-F \circ \mathbf {M}(v) \right| \text { for all }v\in E, } \end{aligned}\end{aligned}$$

thus \(\mathbf {M}(E) \subseteq E\).

Next, since E is closed, there exists \(v_0 \in E\) such that

$$\begin{aligned} \begin{aligned} { \max (v_0)-\min (v_0)=\inf _{v \in E} \max (v)-\min (v). } \end{aligned}\end{aligned}$$
(2)

As E does not contain constant vectors one gets

$$\begin{aligned}\begin{aligned} \max (v_0)-\min (v_0)>0. \end{aligned}\end{aligned}$$

As \(\mathbf {M}\) is weakly-contractive, let \(v_1:=\mathbf {M}^{n(v_0)}(v_0)\). Then

$$\begin{aligned}\begin{aligned}&\quad \max (v_1)-\min (v_1)<\max (v_0)-\min (v_0)\\ \text { and }&\quad v_1=\mathbf {M}^{n(v_0)}(v_0) \in \mathbf {M}^{n(v_0)}(E) \subseteq E, \end{aligned}\end{aligned}$$

contradicting (2).

Therefore \(F(v)=\varphi \circ K (v)\) for all \(v \in I^p\). \(\square \)

4 Discussion and examples

In what follows we are going to study properties of two particular noncontinuous mean-type mappings. Both of them are sort of statements, and therefore are going to present their proof.

The first one already appeared in the paper [4], and it can be consider as a canonical example related to this topic. Indeed, since it deals with a bivariate means, it fits the old (that is 2019’s) framework. Nevertheless it is worth mentioning here, since we consider it as a typical application of Theorems 1 and 2. As a matter of fact, the only new statement is contained in part (iii). Let us put the reader attention to the fact that the invariant means are anticipated in advance, which is the very common technique in this field.

Example 1

Define \(M_1,M_2 :\mathbb {R}_+^2 \rightarrow \mathbb {R}_+\) by

$$\begin{aligned}\begin{aligned} M_1(x,y)&:={\left\{ \begin{array}{ll} \frac{1}{2}(x+y) &{} \text { if } \left| x-y \right| \le 1, \\ \frac{1}{2} \big (x+y-\sqrt{\left| x-y \right| }\,\big ) &{} \text { if }\left| x-y \right|> 1; \end{array}\right. }\\ M_2(x,y)&:={\left\{ \begin{array}{ll} \frac{1}{2}(x+y) &{} \text { if } \left| x-y \right| \le 1,\\ \frac{1}{2} \big (x+y+\sqrt{\left| x-y \right| }\,\big ) &{} \text { if }\left| x-y \right| > 1. \end{array}\right. } \end{aligned}\end{aligned}$$

Then

  1. (i)

    for every \(c \in [-1,1]\), the mean \(K_c :\mathbb {R}_+^2 \rightarrow \mathbb {R}_+\) defined by

    $$\begin{aligned}\begin{aligned} K_c(x,y):={\left\{ \begin{array}{ll} \frac{x+y}{2} &{} \text { if }\left| x-y \right| \le 1, \\ \frac{x+y+c}{2} &{} \text { if }\left| x-y \right| > 1 \end{array}\right. } \end{aligned}\end{aligned}$$

    is \((M_1,M_2)\)-invariant;

  2. (ii)

    the mean \(K_0\) (that is the arithmetic mean) is the unique continuous \((M_1,M_2)\)-invariant mean;

  3. (iii)

    all continuous solutions \(F :\mathbb {R}_+^2 \rightarrow \mathbb {R}\) of the functional equation

    $$\begin{aligned}\begin{aligned} F(M_1(x,y),M_2(x,y))=F(x,y) \qquad x,y \in \mathbb {R}+ \end{aligned}\end{aligned}$$

    are of the form \(F(x,y)=\varphi (\tfrac{x+y}{2})\) for some continuous function \(\varphi :\mathbb {R}_+\rightarrow \mathbb {R}\).

Proof

Part (i) was proved in [4]. Part (ii) is the straightforward application of Theorem 1. Part (iii) is implied by Theorem 2. \(\square \)

The second example is completely different. Let us first remind that, due to [3], each mean-type mapping have at least one invariant mean. We show that there exists a mean-type mapping such that its uniquely determined invariant mean is not continuous. As a direct consequence the term “at most one” in Theorem 1 cannot be replaced by “exactly one”.

Example 2

Set \(\Gamma :=\{(x,y)\in \mathbb {R}_+^2 :xy < 1\}\) and define \(M_1,\ M_2 :\mathbb {R}_+^2\rightarrow \mathbb {R}_+\) by

$$\begin{aligned}\begin{aligned} M_1(x,y)&:={\left\{ \begin{array}{ll} \frac{x+y}{2} &{} \text { for }(x,y)\in \mathbb {R}_+^2 \setminus \Gamma ,\\ \frac{2xy}{x+y} &{} \text { for }(x,y)\in \Gamma ; \end{array}\right. }\\ M_2(x,y)&:=\tfrac{x+y}{2} \text { for }(x,y)\in \mathbb {R}_+^2. \end{aligned}\end{aligned}$$

Then \(K :\mathbb {R}_+^2 \rightarrow \mathbb {R}_+\) given by

$$\begin{aligned}\begin{aligned} K(x,y):= {\left\{ \begin{array}{ll} \frac{x+y}{2} &{} \text { for }(x,y)\in \mathbb {R}_+^2 \setminus \Gamma ,\\ \sqrt{xy} &{} \text { for }(x,y)\in \Gamma ; \end{array}\right. } \end{aligned}\end{aligned}$$

is the unique \((M_1,M_2)\)-invariant mean.

Proof

Define \(\mathbf {M}:\mathbb {R}_+^2\rightarrow \mathbb {R}_+^2\) by \(\mathbf {M}:=(M_1,M_2)\). Observe that for every pair \((x,y)\in \Gamma \) we have

$$\begin{aligned}\begin{aligned} M_1(x,y)M_2(x,y)=\frac{2xy}{x+y}\frac{x+y}{2}=xy<1. \end{aligned}\end{aligned}$$

In particular \(\overrightarrow{\mathbf {M}}(\Gamma ) \subset \Gamma \). Then one can easily verify that K is an \(\mathbf {M}\)-invariant mean. To show that it is unique, let \(K^* :\mathbb {R}_+^2 \rightarrow \mathbb {R}_+\) be an arbitrary \(\mathbf {M}\)-invariant mean. It it sufficient to show that \(K=K^*\). To this end observe that, for all \((x,y) \in \mathbb {R}_+^2\), we have

$$\begin{aligned}\begin{aligned} \left| M_2(x,y)-M_1(x,y) \right| \le \left| \tfrac{x+y}{2}- \tfrac{2xy}{x+y} \right| = \frac{(x-y)^2}{2(x+y)}\le \tfrac{1}{2} \left| x-y \right| . \end{aligned}\end{aligned}$$

Therefore, since both K and \(K^*\) are \(\mathbf {M}\)-invariant, for all \((x,y) \in \mathbb {R}_+^2\) and \(n \in \mathbb {N}\) we have

$$\begin{aligned}\begin{aligned} \left| K(x,y)-K^*(x,y) \right|&=\left| K\circ \mathbf {M}^n(x,y)-K^*\circ \mathbf {M}^n(x,y) \right| \\&\le \max \big ( \mathbf {M}^n(x,y)\big )-\min \big (\mathbf {M}^n(x,y)\big ) \le \frac{\left| x-y \right| }{2^n}. \end{aligned}\end{aligned}$$

Upon taking the limit \(n \rightarrow \infty \) we obtain \(K(x,y)=K^*(x,y)\) for all \(x,y \in \mathbb {R}_+\).

Therefore \(K^*=K\), which proves that K is the unique \(\mathbf {M}\)-invariant mean.

\(\square \)