\section{Introduction}\label{intro}

A weakly monotone function in an open set $\Omega \subset \mathbb R^n$, $n \geq 2$, is, loosely speaking, a Sobolev function that satisfies the minimum and maximum principles in a weak sense. Precisely, a function $u \in  W_{\rm loc}^{1,1}(\Omega)$ is called weakly monotone if, 
 for every open set $\Omega ' \subset \subset\Omega$,   and   every  $m,\, M \in \mathbb R$, such that $m\le M$ and
$$(u-M)_+\,-\,(m-u)_+\in W_0^{1,1}(\Omega')\,,$$
one has  that
$$ m\le u\le M\qquad  \hbox{a.e.  in $\Omega'$.}$$
Here, the subscript $+$ stands for positive part. 
\par The notion of weak monotonicity was introduced by Manfredi in \cite{M}, where he provided  a new direct approach to the regularity theory of maps with finite distortion, and of maps in classes defined in terms of integrability properties of the adjugates of their gradients, which play a role in nonlinear elasticity (see \cite{B}). Earlier proofs of continuity properties of these maps, contained in  \cite{GV} and   \cite{S},  made use of the notion of topological degree. 
\par A key idea in \cite{M} is to exploit the fact that the components of these maps are weakly monotone functions, and that any such function is continuous, or at least continuous outside a set of a certain capacity zero, provided that a sufficiently large power of the modulus of its gradient is integrable.  Specifically, assume that $u$ is a weakly  monotone function from $W^{1,p}_{\rm loc}(\Omega)$ for some $p \geq 1$. If $p>n$, then $u$ is continuous (irrespective of whether it is weakly monotone or not), by the Sobolev embedding theorem. Hence, it is monotone in the classical sense introduced by Lebesgue in his study of the Dirichlet problem in the plane \cite{L}. The advance of \cite[Theorem 1]{M} amounts to showing that, even
\begin{equation} \label{p=n}   \hbox{if $p=n$, then $u$ is continuous,}
\end{equation}
and that
\begin{equation} \label{p>n-1} \hbox{if $p>n-1$, then  $u$  is continuous outside  a set of $C_{p,1}$-capacity zero.}
\end{equation}
\par Weakly monotone functions  come into play in the regularity theory of elliptic partial differential equations as well. For instance, as pointed out in \cite{HKM} and \cite{KMV}, weak solutions to  $p$-Laplacian type  elliptic equations, with possibly degenerating ellipticity, turn out to be weakly monotone.
\par
The result of \cite{M} has paved the way to investigations on pointwise  properties of weakly monotone functions in more general classes of Sobolev type spaces. In particular, weakly monotone functions from Orlicz-Sobolev spaces $W^{1,A}_{\rm loc}(\Omega)$ are focused in the monograph \cite{IM}, and in the papers \cite{IKO, KKMOZ}. A motivation for these studies was  the analysis of maps of bounded distortion whose gradient locally belongs to the  local Orlicz space $L^A_{\rm loc}(\Omega)$ for some  Young function $A$ that is not necessarily of power type. These contributions pointed out that continuity of a weakly monotone function is guaranteed even if it belongs to an Orlicz-Sobolev space slightly larger than $W^{1,n}_{\rm loc}(\Omega)$, namely if $A(t)$ grows slightly more slowly than $t^n$ near infinity. Precisely,  \cite[Proposition 2.7]{KKMOZ} states that, if
\begin{equation}
\label{Iwcond}
\int ^\infty \frac{A(t)}{t^{n+1}}\, dt =
\infty \,,
\end{equation}
and there exists $\varepsilon >0$ such that the function
\begin{equation}
\label{incr}
 t \mapsto \frac{A(t)}{t^{n-1+\varepsilon}} \qquad \hbox{is increasing,}
\end{equation}
then any weakly monotone function from $W^{1,A}_{\rm loc}(\Omega)$ is continuous.  The same conclusion, with \eqref{incr} replaced by a  slightly stronger condition of a similar nature,  is proved in \cite[Theorem 7.5.1]{IM}. Furthermore, information on its (local) modulus of continuity is provided. Assumptions of a different kind for the continuity of weakly monotone functions in Orlicz-Sobolev spaces can also be found in \cite{FM}.
\par
A condition of the form \eqref{Iwcond} amounts to imposing an appropriate degree of integrability of  the gradient of the weakly monotone functions in question, and is an indispensable   requirement. On the other hand, assumption \eqref{incr} has an essentially technical nature. In fact, a close inspection of the proof of \cite{KKMOZ} reveals that \eqref{incr} is basically needed to deduce certain properties of Orlicz-Sobolev functions from their analogoues in the  theory of standard Sobolev spaces.
\par
In the present paper, we suggest some variants in the approach of \cite{M}, \cite{IM} and \cite{KKMOZ}, that call into play peculiar Orlicz space techniques and results. This enables us to drop condition \eqref{incr}, and to establish the everywhere continuity of weakly monotone functions from the space  $W^{1,A}_{\rm loc}(\Omega)$ under a single assumption, in the spirit of \eqref{Iwcond}, but with $A$ replaced by a closely related Young function depending also on $n$, that will be denoted by $A_{n-1}$. Namely, our condition reads
\begin{equation}
\label{ours}
\int ^\infty \frac{A_{n-1}(t)}{t^{n+1}}\, dt =
\infty \,,
\end{equation}
and it also implies the local uniform continuity of any weakly monotone function in $W^{1,A}_{\rm loc}(\Omega)$, with an explicit modulus of continuity depending only on $A$ and $n$.
The function $A_{n-1}$ comes into play in a sharp Poincar\'e type inequality for the oscillation of Sobolev functions on the $(n-1)$-dimensional unit sphere in $\mathbb R^n$. A definition of $A_{n-1}$ can be found in Section \ref{main}, where the main results of this paper are stated. Here, let us just mention  that, if $n=2$, assumption \eqref{ours} 
coincides with \eqref{Iwcond}, since $A_1=A$. This shows that condition \eqref{incr} is actually irrelevant in the results of \cite{IM, KKMOZ} in this case. When $n \geq 3$, the function $A_{n-1}$  is  equivalent to $A$, and hence conditions \eqref{Iwcond} and \eqref{ours} again agree, in any customary, non-borderline situation. Here, loosely speaking, borderline means that $A(t)$  is not larger than  $t^{n-1}$ near infinity, in which case the function $A_{n-1}$ can grow slightly faster that  $A$ near infinity.
\par
This is the content of Theorem \ref{febbraio0}, which enhances the results of \cite{IM, KKMOZ}, since  conditions \eqref{Iwcond}--\eqref{incr} imply \eqref{ours}, 
 whereas Young functions can be exhibited that fulfill \eqref{ours}, but not \eqref{incr} -- see Proposition \ref{improve}. This shows that Theorem \ref{febbraio0} is applicable in circumstances where the  available results in the literature may fail. Moreover,  the results of \cite{IM, KKMOZ} can be recovered  as a consequence of Theorem \ref{febbraio0}, and, in fact, condition \eqref{Iwcond} can be shown to be sufficient for the continuity of weakly monotone functions from $W^{1,A}_{\rm loc}(\Omega)$ with an additional condition slightly less demanding  than \eqref{incr} -- see Corollary \ref{recover}.
\par Under a weaker assumption than \eqref{ours} -- a counterpart of the assumption $p>n-1$ appearing in \eqref{p>n-1} for classical Sobolev spaces -- 
in Theorem \ref{orliczbound} we  prove that every weakly monotone function from $W^{1,A}_{\rm loc}(\Omega)$ is locally bounded and differentiable a.e. in $\Omega$. The assumption in question is only needed when $n\geq 3$, and takes the form
\begin{equation}\label{equiv2bis} \int ^\infty \bigg(\frac{t}{A(t)}\bigg)^{\frac 1{n-2}} \, dt <
\infty\,.
 \end{equation}
If $n=2$, the same conclusion holds whatever $A$ is.
\par
Under the same  hypothesis on $n$ and $A$, every weakly monotone function from $W^{1,A}_{\rm loc}(\Omega)$  is shown to be continuous outside an exceptional set of vanishing Orlicz capacity, that depends on the function $A$. This is the subject of Theorem \ref{orliczcapacity}, that not only extends, but also somewhat augments property \eqref{p>n-1} even in the case when  $W^{1,A}_{\rm loc}(\Omega)=  W^{1,p}_{\rm loc}(\Omega)$. This is observed in Remark \ref{improveManfredi}. Having Theorem \ref{orliczcapacity} at disposal, an estimate for the size of the singular set in terms of a Hausdorff measure,  defined in terms of $A$, is established   in  Theorem \ref{hausdorff}.



\iffalse
A very powerful method, when dealing with continuity properties of
functions, is furnished by the notion of monotonicity, which goes back to
H. Lebesgue \cite{L} in 1907. Monotonicity for a continuous function u in
a bounded domain $\Omega \subset \mathbb R^n$ simply means that
$${\rm osc }(u,B)\le {\rm osc}(u,\partial B)$$
for every ball $B\subset\Omega$. Roughly speaking, u satisfies both the maximum
and minimum principles in $\Omega$, being so clear the relevance of this property for elliptic PDEs.
Remember the definition due to H. Lebesgue \cite{L}
\begin{definition}
Let $u: \Omega\to \mathop{\rm I\kern -,057cm R}$ be a continuous function, $u$ is monotone iff for every relatively compact subdomain $G$ of $\Omega$,
we have  that
$$ {\rm sup}_Gu\,=\,{\rm sup}_{\partial G}u$$
and
$$ {\rm inf}_Gu\,=\,{\rm inf}_{\partial G}u\,.$$

\end{definition}

In literature, properties of continuity have been largely investigated, in particular for mappings with finite distorsion (see \cite{IM}), also since their relation  with  the Laplace - Beltrami equations.
 Remember that the origin of mappings with finite distortion can be traced
back to the work of Yu.G. Reshetnyak \cite{R} and  in the
paper of V. Goldestein and S.K. Vodopyanov \cite{GV}, the authors proved
that mappings of finite distortion in the Sobolev class $W^{1,n}_{\rm loc}
(\Omega, \mathbb R^n)$ are actually continuous and have monotone components.

Thereafter, V. Sverak \cite{S} proved a similar continuity result for  finite distorsion mappings of a class introduced by J. Ball [B] of particular interest  within nonlinear elasticity.
In \cite{M} J. Manfredi proposed an approach to these results that does not rely on the notion of
topological degree used by the authors cited above, but in terms of the new notion of weakly monotone functions,
 by extending, in this way, the notion of monotonicity to possibly
noncontinuous functions in $W_{\rm loc}^{1,p}(\Omega)$.

Let us give the definition

\begin{definition}
Let $u\in W_{\rm loc}^{1,p}(\Omega)$, $p\ge 1$, $\Omega$ an open subset of $\mathbb R^n$, $n\ge 2$. $u$ is a weakly monotone function iff for every relatively compact subdomain $G$ in $\Omega$,   and for every pair of constants $m,\, M$, $m\le M$ s.t.
$$(u-M)^+\,-\,(m-u)^+\in W_0^{1,p}(G)\,,$$
we have  that
$$ m\le u\le M\qquad  a.e. \quad{\rm in} \quad G$$
where
$(v)^+(x)=\max \{v(x),\, 0\}$.
\end{definition}

 \noindent In the vectorial case,  $u\in W_{\rm loc}^{1,p}(\Omega; \mathbb R^n)$ 
 is a weakly monotone mapping if its coordinate functions are weakly monotone.
 It is known that the condition of weak monotonicity holds except a set of
p-capacity zero,  see for example \cite{HKM}.
  It is known that if a weakly monotone $W^{1,p}-$ function is continuous, then it is monotone in the sense of Lebesgue \cite{L}, in particular in the case $p > n$. However, if $p < n$  it is not always true that weakly monotone functions are continuous, see the Example 2.1 in \cite{M} and
J. Manfredi established the following

\begin {theorem} Let $f\in W^{1,p}$ be weakly monotone in $\Omega$ and $p > n - 1$. Then $f $ is
continuous in $\Omega \setminus S$, where the singular set $S$ has p-capacity zero. Moreover, if $p = n$, the singular set is empty.
\end {theorem}

Many other results in this context followed  and, in particular, continuity results for suitable Orlicz-Sobolev mappings with finite
distortion have been obtained (see \cite{IM}, \cite{IKO} etc.).
One of the results in \cite{IKO} shows that coordinate functions of mappings with finite distortion in
the larger grand Sobolev space $W^{1,n)}(\Omega,\mathbb R^n)$, are weakly monotone.
Moreover, J. Kauhanen, P. Koskela, J. Mal�y,
J. Onninen and X. Zhong  in \cite {KKMOZ} established the continuity, openness and discreteness for mappings of finite distortion under minimal integrability assumptions on the distortion.

On the other hand, if we consider $1 < p < \infty$ and $ A : \mathbb R^n\times\mathbb R^n�\to \mathbb R^n $ be a mapping satisfying
the following assumptions for some measurable function $\alpha(x)$ and a constant $\beta$ such that
$0 < \alpha(x)\le \beta<\infty$ for a.e. $x\in \mathbb R^n:$

(i) $A(\cdot, \xi)$ is measurable for all $\xi\in \mathbb R^n$,

(ii) $A(x, \cdot)$ is continuous for a.e. $x\in\mathbb R^n$,

(iii) $A(x, \xi)\cdot\xi\ge \alpha(x)\xi^p$

(iv) $|A(x, \xi)|\le \beta \xi ^{p-1}.$


\noindent Then a weak solution of the equation
$$ -\, div A(x,�Du(x)) = 0 $$
in  $\Omega$ is weakly monotone (see \cite{KMV}, Lemma 2.7) and in
the special case $\alpha(x)>\alpha> 0$ (see the  book by
Heinonen-Kilpelainen-Martio \cite{HKM}), a weak solution of the
equation above, is monotone in the sense of Lebesgue.


\fi






\iffalse
A first result we obtain here, is the following
\begin{theorem}\label{orlicz}
\textcolor[rgb]{1.00,0.50,0.00}{Let $A$ be a Young function, and let
$u$ be a weakly monotone function in $W_{loc}^{1,A}(\Omega )$.}
\par\noindent \textcolor[rgb]{1.00,0.50,0.00}{(i) Assume that the (Young) function
\begin{equation}\label{orlicz1}
F(t) = t^{ \frac {n- 1}{n- 2}} \int _t ^\infty \frac{\widetilde A
(r)}{r^{1 + \frac {n-1}{n-2}}} \, dr
\end{equation}
is finite-valued for $t>0$.
Then $u$ is locally essentially bounded in $\Omega$, and there
exists a constant $C=C(n)$ such that
\begin{equation}\label{bound1}
{\rm ess\,  osc}_{B(x_0, r)}u \leq C r \widetilde F^{-1} \bigg(C
\int\!\!\!\!\!\!{\text\bf -} _{B(x_0, 2r)} A(|\nabla u|)dx \bigg)
\end{equation}
whenever $B(x_0, 2r) \subset \Omega$. In particular, $u$ is
continuous at every Lebesgue point of $A(|\nabla u|)$, and hence
a.e. in $\Omega$. This also follows from the a.e. differentiability
result by Onninen. Pb.: capacity of the exceptional set? YES! see
below.}
\par\noindent\textcolor[rgb]{1.00,0.50,0.00}{(ii) Assume, in addition, that
\begin{equation}\label{orlicz2}
\int ^\infty \bigg(\frac t{F(t)} \bigg)^{n-1} \, dt =\infty.
\end{equation}
Then $u$ is continuous in $\Omega $. Moreover,  define
\begin{equation}\label{G} G(t)= t^n \int _0^t \frac {\widetilde F(s)}{s^{1+n}}\, ds
\quad \hbox{for $t >0$.} \end{equation}
Then the modulus of
continuity $\omega _u (r)$ of $u$ fulfills
\begin{equation}\label{modulus}
\omega _u(r) \leq C r G^{-1}(r^{-n}) \quad \hbox{for $r
>0$,}
\end{equation}
for some constant $C$.}
\end{theorem}
\fi

\section{Orlicz and Orlicz-Sobolev spaces}\label{youngorlicz}

\color{black}

The notion of Orlicz space relies upon that of Young function. 
 A  function  $A: [0,
\infty ) \to [0, \infty ]$ is called a Young function if it is
convex, non constant in $(0, \infty)$, and  vanishes at $0$. Any function fulfilling these properties
has the form
\begin{equation}\label{A}
A(t) = \int _0^t a(r )\, dr \qquad \quad \hbox{for $t \geq 0$},
\end{equation}
for some non-decreasing, left-continuous function $a: [0, \infty )
\to [0, \infty ]$ which is neither identically $0$, nor infinity. Observe that the function
\begin{equation}\label{monotone}
\hbox{$\displaystyle t \mapsto \frac{A(t)}{t}$ \quad is
non-decreasing,}
\end{equation}
and 
\begin{equation}\label{gen9}
A(t) \leq a(t)\,t \leq A(2t) \quad \hbox{for $t\geq 0$.}
\end{equation}
Furthermore,  if $k \geq 1$, then
\begin{equation}\label{kt}
kA(t) \leq A(kt) \quad \hbox{for $t \geq0$,}
\end{equation}
and hence
\begin{equation}\label{kt-1}
kA^{-1}(t) \geq A^{-1}(kt) \quad \hbox{for $t \geq0$.}
\end{equation}
Here, $A^{-1}$ denotes the (generalized) right-continuous inverse of $A$.  The Young conjugate $\widetilde{A}$ of $A$  is
defined by
$$\widetilde{A}(t) = \sup \{s t-A(s):\,s \geq 0\} \qquad {\rm for}\qquad  t\geq 0\,.$$
The alternative notation $A^{\widetilde {}}$ 
will also be adopted instead of for $\widetilde {A}$ whenever convenient. Note
the representation  formula
\begin{equation}\label{youngconj}
\widetilde A(t) = \int _0^t a^{-1}(r ) \,dr \qquad \quad
\hbox{for $t \geq 0$,}
\end{equation}
where $a^{-1}$ denotes the (generalized) left-continuous inverse of
the function $a$. Let us notice that $\widetilde {\widetilde A}=A$.
\\ If, for instance, $A(t) = \tfrac {t^p}p$ for some $p \in (1, \infty)$, then $\widetilde A (t) =\tfrac {t^{p'}}{p'}$, where $p'= \tfrac{p}{p-1}$, the H\"older conjugate of $p$. 
\\ A property to be used in what follows is that, if $A$ is a Young function and $q \in (1, \infty)$, then 
\begin{equation}\label{equivconj}
\hbox{the function $t \mapsto \displaystyle \frac {A(t)}{t^q}$\,\, is increasing if and only if the function \, $t\mapsto\displaystyle \frac {\widetilde A(t)}{t^{q'}}$\,\, is decreasing\,.}
\end{equation}
An application of equation
\eqref{gen9} with $A$ replaced by $\widetilde A$ yields
\begin{equation}\label{gen10}
\widetilde A(t) \leq a^{-1}(t)\,t \leq \widetilde A(2t) \quad
\hbox{for $t\geq 0$.}
\end{equation}
Moreover, one has that
\begin{equation}\label{AAtilde}
t \leq A^{-1}(t) \widetilde A^{-1}(t) \leq 2t \qquad \hbox{for $ t
\geq 0.$}
\end{equation}
A Young function $A$  is said to satisfy the $\Delta _2$-condition
near infinity -- briefly, $A \in \Delta _2$ near infinity -- if it is
finite-valued and there exist constants $C>2$ and $t_0\geq 0$ such
that
\begin{equation}\label{delta2}
A(2t) \leq C A(t) \quad \hbox{for $t \geq t_0$.}
\end{equation}
Owing to equation \eqref{gen9},    condition \eqref{delta2} turns out to be equivalent to the existence of constants $C'>0$ and $t_1>0$ such that
\begin{equation}\label{delta2'}
a(2t) \leq C' a(t) \quad \hbox{for $t \geq t_1$.}
\end{equation}
 The function $A$ is said to satisfy the $\nabla _2$-condition
near infinity -- briefly, $A \in \nabla _2$ near infinity -- if there
exist constants $C>2$ and $t_0\geq 0$ such that
\begin{equation}\label{nabla2}
A(2t) > C A(t) \quad \hbox{for $t \geq t_0$.}
\end{equation}
One can show that
\begin{equation}\label{nabla2incr}
 \hbox{$A \in \nabla _2$ near infinity if and only if the function \,\, $t \mapsto \frac{A(t)}{t^{1+\varepsilon}}$ \,\,
is increasing for  $t\geq t_0$,}
\end{equation}
 for some  constants
$\varepsilon>0$ and $t_0\geq 0$.
Let us also note that
\begin{equation}\label{deltanabla}
\hbox{$A\in \Delta _2$ \, near infinity if and only if \, $\widetilde A \in \nabla _2$ \, near infinity.}
\end{equation}
A  Young function $A$ is said to
dominate another Young function $B$ near infinity   if there exist
constants $C>0$ and $t_0\geq 0$  such that
\begin{equation}\label{B.5bis}
B(t)\leq A(C t) \qquad \textrm{for \,\,\,} t\geq t_0\,.
\end{equation}
The functions  $A$  and  $B$ are called equivalent near infinity if
they dominate each other near infinity.
 \\ If any of the above definitions is satisfied with $t_0=0$, then it is
said to hold globally, instead of just near infinity.

\smallskip
\par
\par
Now, let $E$ be a measurable subset of $\mathbb R^n$. 
We denote by $\mathcal{M}(E)$  the space of real-valued measurable functions on  $E$. The notation  $\mathcal{M}_+(E)$ is adopted for the subset of nonnegative functions in $\mathcal{M}(E)$. Similarly, the subscript $+$ attached to the notation of other spaces of real-valued functions will be used to denote the subset of nonnegative functions from those spaces.
\\ The Orlicz space $L^A (E)$ built upon a
Young function $A$  is the Banach function space of those functions 
$u\in \mathcal{M}(E)$ for which the
 Luxemburg norm
\begin{equation}\label{lux}
 \|u\|_{L^A(E)}= \inf \left\{ \lambda >0 :  \int_{\mathcal R }A
\left( \frac{|u |}{\lambda} \right) dx  \leq 1 \right\}\,
\end{equation}
is finite. In particular, $L^A (E)= L^p
(E)$ if $A(t)= t^p$ for some $p \in [1,
\infty )$, and $L^A (E)= L^\infty
(E)$ if $A(t)= 0$ for $t \in [0,1)$ and $A(t)= \infty$ for $t \in [1,\infty)$. 
\\ Moreover, we  denote by $L^A_{\rm loc}(E)$ the set of those functions from $\mathcal{M}(E)$ that belong to $L^A(F)$ for every bounded set $F\subset E$. 
  \\
 The H\"older type inequality
\begin{equation}\label{holder}
\|v\|_{L^{\widetilde A}(E)} \leq \sup_{u \in
L^A(E)}\frac{\displaystyle \int _E |u \,v
|\,dx}{\|u\|_{L^A(E)}}   \leq 2
\|v\|_{L^{\widetilde A}(E)}
\end{equation}
holds for every $u \in L^A(E)$ and $v\in
L^{\widetilde A}(E)$. 
\\ Denote by $|E|$ the Lebesgue measure of $E$, and assume that $|E|<\infty$.  Then
\begin{equation}\label{normineq}
L^{A}(E) \to L^{B}(E),
\end{equation}
if and only if the Young function $A$ dominates the Young function $B$ near
infinity. Here, and in what follows, 
where the arrow $\lq\lq \to"$ stands for continuous embedding. In
particular, 
\begin{equation}\label{normeq}
\hbox{$L^{A}(E) = L^{B}(E)$ (up to equivalent norms), if and only if $A$ and $B$
are equivalent near infinity.}
\end{equation}
\par
Given an open set $\Omega \subset \mathbb R^n$ and a Young function $A$, 
the Orlicz-Sobolev space $W^{1,A}(\Omega)$ is defined as
$$W^{1,A}(\Omega) = \{u\in L^A(\Omega): \hbox{$u$ is weakly differentiable, and $|\nabla u|\in L^A(\Omega)$} \}.$$
The space $W^{1,A}(\Omega)$, equipped with the norm
\begin{equation}\label{OS}
 \|u\|_{W^{1,A}(\Omega)}= \|u\|_{L^A(\Omega)}\,+\,\|\nabla u\|_{L^A(\Omega)}
\end{equation}
is a Banach space. The space of those functions $u \in \mathcal M(\Omega)$ such that $u \in W^{1,A}(\Omega')$ for every bounded open set $\Omega ' \subset \subset \Omega$ will be denoted by $W^{1,A}_{\rm loc}(\Omega)$.
\par
We refer the reader to the monographs \cite{KR, RR1, RR2} for a comprehensive treatment of the topics of this section.
\iffalse



If  $A\in \Delta _2$ near infinity, then
\begin{equation}\label{delta2orlicz}
L^A(\mathcal R) = \bigg\{f: \mathcal R \to \mathbb R
\, : \,f \, \hbox{is measurable and} \,\, \int _{\mathcal R} A(k|f
|)\, d\nu < \infty \,\, \hbox{for every} \,\, k>0\bigg\}.
\end{equation}
It is known that given $\{f_j\}$ be a sequence of functions in $ L^A(\mathcal R)$, and let   $f \in L^A(\mathcal R)$, if
$A \in \Delta _2$ near infinity, then
\begin{equation}\label{normmodular}
\lim _{j \to \infty} \|f_j - f\|_{L^A(\mathcal R)} =0
\quad \hbox{if and only if} \quad \lim _{j \to \infty} \int
_{\mathcal R} A(|f_j - f|) d\nu = 0.
\end{equation}
If  \lq\lq if " implication in
\eqref{normmodular} fails if the $\Delta _2$ condition is dropped, and 
if $A \in \Delta _2$ near infinity and $\lim _{j \to \infty} \|f_j - f\|_{L^A(\mathcal R)}
=0$, then
\begin{equation}\label{intconv}
\lim _{j \to \infty} \int _{\mathcal R} A(|f_j|) d\nu = \int
_{\mathcal R} A(|f|) d\nu.
\end{equation}

\fi



\section{Main results}\label{main}

We begin our analysis with a condition on  Young functions $A$ ensuring the local boundedness, as well as the continuity and  differentiability almost everywhere, of weakly monotone functions from the Orlicz-Sobolev space $W^{1,A}_{\rm loc}(\Omega)$, where $\Omega$ is an open subset of $\mathbb R^n$, with $n \geq 2$. Its formulation involves the Young function $A_{n-1}$ associated with $A$ and $n$ as 
\begin{equation}\label{Apoincarebis}
A_{n-1}(t) = \begin{cases} A(t) & \quad \hbox{if $n=2$\,,} \\
\\
\displaystyle \left(t^{\frac {n-1}{n-2}} \int _t^\infty
\frac{\widetilde A(r)}{r^{1+\frac {n-1}{n-2}}}\,
dr\right)^{\widetilde {\quad}} & \quad \hbox{if $n\geq 3$\,,}
\end{cases}
\end{equation}
for $t\ge 0$. The integral on the right-hand side of \eqref{Apoincarebis} is convergent if and only 
the function $A$ fulfills condition \eqref{equiv2bis} -- see e.g. \cite[Lemma 4.1]{Cianchiibero}. This condition 

 will always come into play when dealing with the function $A_{n-1}$ for $n \geq 3$.
 \\ As mentioned in Section \ref{intro}, the function $A_{n-1}$ arises in a Poincar\'e type inequality for the oscillation of functions from  Orlicz-Sobolev spaces on the sphere, and  has a crucial role in the results to be presented.  Let us notice that the function $A_{n-1}(t)$ always dominates $A(t)$, and, if $n \geq 3$, it is equivalent to $A(t)$ whenever the latter grows faster than the  function $t^{n-1}$ in a suitable sense -- see equation \eqref{indexcond} below.
\\ In what follows, the notation $\int\!\!\!\!\!\!{\text\bf -} _{B_r(x)} \cdots\, dz$ stands for $\frac 1{|B_r(x)|}\int _E \cdots\, dz$, where $B_r(x)$ is the ball, centered at $x\in \mathbb R^n$, with radius $r>0$.


\begin{theorem}\label{orliczbound}
Let $A$ be a Young function.  Assume that either $n=2$, or $n \geq 3$ and $A$ fulfills  condition \eqref{equiv2bis}. Let $A_{n-1}$ be the Young function defined by \eqref{Apoincarebis}.
Let $u \in W_{\rm loc}^{1,A}(\Omega )$ be  a weakly monotone function.
Then $u \in L^\infty _{\rm loc}(\Omega)$, and there exists a constant $c=c(n)$ such that
\begin{equation}\label{bound1}
{\rm ess\,  osc}_{B_r(x)}u \leq c\, r\, A_{n-1}^{-1} \bigg( \int\!\!\!\!\!\!{\text\bf -} _{B_{2r}(x)} A(|\nabla u|)\,dz \bigg)
\end{equation}
whenever $B_{2r}(x) \subset \subset \Omega$. Moreover, there exists a representative of $u$ that is   differentiable  a.e. in $\Omega$. 
\end{theorem}

\begin{remark}\label{onninen} {\rm The a.e. differentiability of weakly differentiable functions $u \in W_{\rm loc}^{1,A}(\Omega )$ under assumption \eqref{equiv2bis} can also be derived from  \cite[Theorem 1.2]{O}, \color{black}
 via an inclusion relation between Orlicz and Lorentz spaces established in \cite{KKM}.  Here, we present a self-contained proof, that just relies upon Orlicz spaces techniques, and contains some preliminary steps of  use for our subsequent results.}
\end{remark}

\smallskip

More precise information about the set of points of continuity of any weakly differentiable function $u \in W_{\rm loc}^{1,A}(\Omega )$ can in fact be provided under assumption \eqref{equiv2bis}. It turns out that any such function has a representative whose restriction to the complement in $\Omega$ of an exceptional set of (suitably defined) vanishing capacity is continuous. This is the content of Theorem \ref{orliczcapacity} below. 
\\ The relevant capacity generalizes the standard $C_{p, 1}$ capacity associated with the Sobolev space $W^{1,p}_{\rm loc}(\Omega)$, and depends on the Young function $A$ and on the dimension $n$ of the ambient space $\mathbb R^n$ of $\Omega$. It can be defined as follows. 
\\
Let $\Psi : [0, \infty) \to [0, \infty)$ be a continuous function.

 Consider the Riesz type operator defined as
\begin{equation}\label{IPsi}
I_\Psi f (x) = \int _{\mathbb R^n}\frac{f(y)}{|x-y|^{n} \Psi(1/|x-y|)}\, dy
\quad \hbox{for $x \in \mathbb R^n$}
\end{equation}
for $f \mathcal \in \mathcal M_+(\mathbb R^n)$.
 The associated  capacity
$C_{\Psi , 1}$ of a set $E \subset \mathbb R^n$ is given by
\begin{equation}\label{cap}
C_{\Psi , 1} (E) = \inf\bigg\{\int _{\mathbb R^n} f(x)\, dx: \, f\in \mathcal
M_+(\mathbb R^n), \, I_\Psi f (x)\geq 1 \,\,\hbox{for $x \in E$}\bigg\}.
\end{equation}
Note that, with the choice $\Psi(t) = t^\alpha$, where $\alpha \in
(0, n)$, the operator $I_\Psi$ reproduces the classical Riesz potential $I_\alpha$ given by
\begin{equation}\label{riesz}
I_{\alpha} f (x) = \int _{\mathbb R^n}\frac{f(y)}{|x-y|^{n-\alpha}}\, dy
\quad \hbox{for $x \in \mathbb R^n$.}
\end{equation}
 Hence, 
the capacity $C_{\Psi , 1}$ agrees with the standard $C_{\alpha ,
1}$ capacity associated with the operator $I_{\alpha}$
\cite{AH}.


\begin{theorem}\label{orliczcapacity}
Let $A$ be a Young function.  Assume that either $n=2$, or $n \geq 3$ and $A$ fulfills  condition \eqref{equiv2bis}. Let $A_{n-1}$ be the Young function defined by \eqref{Apoincarebis}. Assume that $\sigma : [0, \infty) \to
[0, \infty)$ is a continuous function such that
\begin{equation}\label{ott21}
\int ^\infty \frac{A_{n-1}(\lambda t)}{t\sigma (t) A_{n-1}(t)}\, dt = \infty \qquad \hbox{for every $\lambda >0$.}
\end{equation}
Let $\Psi : [0, \infty ) \to [0, \infty )$ be the function given by
\begin{equation}\label{Psi}
\Psi (t) = \sigma (t) A_{n-1}(t) \quad \hbox{for $t \geq0$.}
\end{equation}
Then   every weakly monotone function $u \in W_{\rm loc}^{1,A}(\Omega )$
admits a representative  whose restriction to the complement in $\Omega$ of an exceptional set  of $C_{\Psi,1}$-capacity zero is continuous.
\end{theorem}

Assumption \eqref{ott21} takes a simpler form in the special case when the function $A \in \Delta _2$ near infinity. Indeed,  $A_{n-1}\in \Delta _2$ near infinity as well in this case -- see Proposition \ref{delta2lem}, Section \ref{secproofs}. Hence, $A_{n-1}(\lambda t)$ and  $A_{n-1}(t)$ are bounded by each other, up to positive multiplicative constants depending on $A$, $n$ and $\lambda$, for large $t$. This is stated in the following corollary.



\begin{corollary}\label{orliczcapacitycor}
Let $A$ be a Young function such that  $A \in \Delta_2$ near infinity. Assume that either $n=2$, or $n \geq 3$ and $A$ fulfills  condition \eqref{equiv2bis}. Let $A_{n-1}$ be the Young function defined by \eqref{Apoincarebis}. Assume that $\sigma : [0, \infty) \to
[0, \infty)$ is a continuous function such that
\begin{equation}\label{dini}
\int ^\infty \frac{dt}{t \sigma (t)} = \infty.
\end{equation}
Let $\Psi$ be the function defined as in \eqref{Psi}.
Then   every weakly monotone function $u \in W_{\rm loc}^{1,A}(\Omega )$
admits a representative  whose restriction to the complement in $\Omega$ of an exceptional set  of $C_{\Psi,1}$-capacity zero is continuous.
\\ In particular, condition \eqref{dini} holds with $\sigma (t)=1$, and hence $u$ enjoys this property outside a set of $C_{A_{n-1},1}$-capacity zero.
\end{corollary}



\iffalse



\begin{remark}\label{Adelta2}  {\rm Assume that $A \in \Delta _2$ near infinity.  Then $A_{n-1}\in \Delta _2$ near infinity as well -- see Lemma \ref{delta2lem} -- and hence condition \eqref{ott21} is equivalent to 
\begin{equation}\label{dini}
\int ^\infty \frac{dt}{t \sigma (t)} = \infty.
\end{equation}
Since, in particular, condition \eqref{dini} holds if $\sigma (t) =1$, Theorem \ref{orliczcapacity} implies that, under assumption \eqref{equiv2bis}, every weakly monotone function $u \in W_{loc}^{1,A}(\Omega )$
admits a representative  that is
 continuous   outside a set of $C_{A_{n-1},1}$-capacity zero.}
\end{remark}


\fi
\begin{remark}\label{improveManfredi}  {\rm Corollary \ref{orliczcapacitycor} not only recovers, but  somewhat allows for improvements of  the result \eqref{p>n-1} of \cite{M} in the case when $A(t)=t^p$ for some $p\in (n-1,n)$. Indeed,  it tells us that any weakly monotone function in $W^{1,p}_{\rm loc}(\Omega)$, with $p\in (n-1, n)$, admits a representative that is continuous  outside a subset of $\Omega$ having zero  $C_{\sigma (t)t^p, 1}$-capacity, for any function $\sigma$ fulfilling \eqref{dini}. Possible choices are thus, for instance, $\sigma (t) = \log (1+ t)$, $\sigma (t)= \log (1+t) \log (1+ \log (1+t))$, etc.. 
\\ Let us also notice that, since no restriction is imposed on $A$ if $n=2$,  in this case Theorems \ref{orliczbound}  and \ref{orliczcapacity}   also hold  if $A(t)=t$, namely when $W^{1,A}_{\rm loc}(\Omega)= W^{1,1}_{\rm loc}(\Omega)$. In particular, this shows that the    result \eqref{p>n-1} of \cite{M} is still valid for the endpoint value $p=n-1=1$ when $n=2$.
}
\end{remark}


Capacities can be dismissed in the description of the size of the exceptional set   of possible discontinuity points of a weakly monotone function in $W_{\rm loc}^{1,A}(\Omega )$, with $A$ satisfying \eqref{equiv2bis}. Indeed,
its size   can  be estimated in terms of  Hausdorff measures. Given a continuous, increasing  function $h : [0, \infty) \to [0,
\infty)$ such that $h(0)=0$, the classical $h$-Hausdorff measure
$\mathcal H ^{h(\cdot)} (E)$ of a set $E \subset \mathbb R^n$ is defined as
\begin{equation}\label{hausdorff}
\mathcal H ^{h(\cdot)} (E) = \lim _{\varepsilon \to 0^+} \inf \bigg\{\sum
_{j=1}^\infty h ({\rm diam}(K_j)): E \subset \cup _{j=1}^\infty
K_j\,,{\rm diam}(K_j) \leq \varepsilon\bigg\}.
\end{equation}
If $h(t) = t^\beta$ for some some $\beta >0$, then $\mathcal H ^{h(\cdot)}$
agrees (up to a multiplicative constant) with the standard
$\beta$-dimensional Hausdorff measure $\mathcal H ^\beta$.
\\ 
Note that we may assume, without loss of generality, that 
\begin{equation}\label{immaterial}r \mapsto \frac{h(r)}{r^n}
 \quad \hbox{is a non-increasing function.}
\end{equation}
Indeed, \cite[Proposition 5.1.8]{AH} tells us what follows. If $\liminf _{r\to 0^+}\tfrac{h(r)}{r^n} =0$, then $\mathcal H^{h(\cdot)}(E)=0$ for every set $E\subset \mathbb R^n$. If $\liminf _{r\to 0^+}\tfrac{h(r)}{r^n}>0$, then there exists another continuous increasing function $\overline h$ such that \eqref{immaterial} is satisfied with $h$ replaced by $\overline h$, and moreover $\mathcal H^{h(\cdot)} (E)$ and $\mathcal H^{\overline {h}(\cdot)} (E)$ are bounded by each other for every set $E\subset \mathbb  R^n$, up to multiplicative constants independent of $E$.


\smallskip
\par
Our estimate of the exceptional set of weakly monotone Orlicz-Sobolev functions via Hausdorff measures   involves a function $\Psi$ satisfying the assumptions of Theorem \ref{orliczcapacity}, and such that, in addition, 
\begin{equation}\label{febbraio1}
t \mapsto t^n\Psi (1/t) \quad \hbox{is a
non-decreasing function decaying to $0$ as $t\to 0^+$.}
\end{equation}
Obviously, this assumption ensures that the derivative $d\big(\frac {-1}{s^n\Psi (1/s)}\big)$ defines  a positive measure on $(0, \infty)$.

\begin{theorem}\label{continuityhausdorff}
Let $A$ be a Young function.  Assume that either $n=2$, or $n \geq 3$ and $A$ fulfills  condition \eqref{equiv2bis}.  Assume that the function  $h$ is as above. Let   $\Psi$ be as
in Theorem \ref{orliczcapacity}.  Assume, in addition,  that $\Psi$ satisfies condition \eqref{febbraio1}. If
\begin{equation}\label{hB}
\int _0 h(s)\, d\Big(\frac {-1}{s^n\Psi (1/s)}\Big) \, < \infty,
\end{equation}
then   every weakly monotone function $u \in W_{\rm loc}^{1,A}(\Omega )$
admits a representative  whose restriction to the complement in $\Omega$ of an exceptional set  of $\mathcal H ^{h(\cdot)}$-measure zero is continuous.
\end{theorem}

\iffalse
\begin{remark}{\rm Note that, owing to assumption \eqref{febbraio1}, $d\big(\frac {-1}{s^n\Psi (1/s)}\big)$ defines a positive measure on $(0, \infty)$.
}
\end{remark}
\fi


We are now ready to state the main result of this paper, concerning  the everywhere continuity of Orlicz-Sobolev weakly monotone functions. It asserts that, 
if assumption \eqref{equiv2bis}  is properly strengthened, then any weakly monotone function from $W^{1,A}_{\rm loc}(\Omega)$ has a representative which is  continuous in the whole of $\Omega$. The assumption to be imposed is \eqref{ours}, 
with $A_{n-1}$  defined by \eqref{Apoincarebis}. In fact, under  assumption \eqref{ours} any weakly monotone function  from $W^{1,A}_{\rm loc}(\Omega)$ is
locally uniformly continuous with a modulus of continuity depending only on $A$ and $n$. This  modulus of continuity 
 $\omega : [0, \infty) \to [0, \infty)$ is defined as
\begin{equation}\label{modulus}
\omega (r) = r B^{-1}(r^{-n}) \quad \hbox{for $r
>0$,}
\end{equation}
where
 $B: [0, \infty) \to [0, \infty)$ is the function given by
\begin{equation}\label{G} B(t)= t^n \int _0^t \frac {A_{n-1}(s)}{s^{1+n}}\, ds
\quad \hbox{for $t >0$.}
\end{equation}
The space of functions in $\Omega$ that are locally uniformly continuous with modulus of continuity not exceeding $\omega$ will be denoted by $C^{\omega (\cdot )}_{\rm loc}(\Omega)$.
\\
Observe that, since we are dealing with  properties of functions from the local
Orlicz-Sobolev spaces $W^{1,A}_{\rm loc}(\Omega)$, the function $A$ can be modified, if
necessary,  near $0$ in such a way that
\begin{equation}\label{febbraio4}
\int _0\frac {A_{n-1}(t)}{t^{1+n}}\, dt < \infty.
\end{equation}
Owing to property \eqref{normeq}, a modification of this kind leaves the space $W^{1,A}_{\rm loc}(\Omega)$ unchanged. With condition \eqref{febbraio4} in force, the function $B$ is well defined. Also, it can be verified that it is  a Young function, whence its inverse $B^{-1}$ is well defined as well.


\begin{theorem}\label{febbraio0}
Let $n \geq 2$, and let $A$ be a Young function fulfilling condition \eqref{ours}, 
with $A_{n-1}$  defined by \eqref{Apoincarebis}.
Then   every weakly monotone function $u \in W_{\rm loc}^{1,A}(\Omega )$
admits a continuous representative. Moreover,
$u \in C^{\omega (\cdot )}_{\rm loc}(\Omega)$, where $\omega$ is given by \eqref{modulus}. 
\end{theorem}


\begin{remark}\label{remmodulus}
{\rm If $n=2$, 
assumption \eqref{ours} agrees with
\begin{equation}\label{mainhp2}
\int ^\infty \frac{A(t)}{t^3}\, dt =
\infty \,,
\end{equation}
namely with \eqref{Iwcond}, since $A_1=A$. On the other hand, if $n \geq 3$, assumption \eqref{ours} 
is equivalent to 
\begin{equation}\label{mainhp}
 \int ^\infty t^{\frac{1-n}{n-2}}
\bigg(\int _t^\infty \frac{\widetilde A (s)}{s^{1+\frac
{n-1}{n-2}}}ds\bigg)^{1-n}\, dt  = \infty \quad \hbox{if $n\geq 3$\,.}
\end{equation}
Indeed, by \cite[Lemma 4.1]{Cianchiibero}, condition \eqref{ours}
is equivalent to
$$\int ^\infty \bigg(\frac s{\widetilde {A_{n-1}}(s)}\bigg)^{n-1}ds
= \infty,$$ and, in view of  definition \eqref{equiv2bis}, the latter coincides with \eqref{mainhp}.}
\end{remark}

Under the additional assumption that $A \in \Delta_2$ near infinity, condition \eqref{ours} can be reformulated, for $n \geq 3$, in a form which only involves $A$, and avoids explicit reference to $A_{n-1}$. This fact is a consequence of \cite[Lemma 3.3]{CarozzaCianchi}, and is enucleated in the next result.


\begin{corollary}\label{maindelta2}
Let $n \geq 3$, and let $A$ be a Young function such that $A \in \Delta_2$ near infinity, and
\begin{equation}\label{condelta2}
\int ^\infty \Big(\frac t{A(t)}\Big)^{\frac 2{n-2}} \bigg(\int _t^\infty \Big(\frac s{A(s)}\Big)^{\frac 1{n-2}}\,ds \bigg)^{-n}\, dt = \infty\,.
\end{equation}
Then   every weakly monotone function $u \in W_{\rm loc}^{1,A}(\Omega )$
admits a continuous representative. Moreover,
$u \in C^{\omega (\cdot )}_{\rm loc}(\Omega)$, where $\omega$ is given by \eqref{modulus}.
\end{corollary}


Let us next mention a standard situation when assumption \eqref{ours} reduces to \eqref{Iwcond}, even for $n\geq 3$. Suppose, for simplicity, that $A$ is finite-valued. This is of course the only nontrivial case, since $W^{1,A}_{\rm loc}(\Omega)= W^{1,\infty}_{\rm loc}(\Omega)$ if $A$ jumps to infinity, and every function in the latter space is locally Lipschitz continuous. When $n\geq 3$, 
the function $A_{n-1}$  is equivalent to $A$ if and only if its lower Boyd index at infinity, defined as 
\begin{equation}\label{index}
i(A)= \lim _{\lambda \to \infty} \frac{\log \Big(\liminf _{t\to
\infty }\tfrac{A(\lambda t)}{A(t)}\Big)}{\log \lambda },
\end{equation} 
satisfies 
\begin{equation} \label{indexcond}
i(A) >n-1\,,
\end{equation}
see \cite[Lemma 2.3]{Strom} and, for more details, \cite[Proposition 4.1]{CianchiMusil}. Thus, under assumption \eqref{indexcond}, condition \eqref{ours} agrees with \eqref{Iwcond}. As a consequence, the following corollary of Theorem \ref{febbraio0} holds. Note that, since assumption \eqref{incr} implies \eqref{indexcond}, this corollary recovers, in particular, the results of \cite{IM} and \cite{KKMOZ} mentioned in Section \ref{intro}.

\begin{corollary}\label{recover}
Let $A$ be a Young function fulfilling condition \eqref{Iwcond}. Assume that either $n=2$, or $n \geq 3$ and \eqref{indexcond} holds. Then every weakly monotone function in 
$W_{\rm loc}^{1,A}(\Omega )$ is continuous in $\Omega $.
\end{corollary}

\iffalse
We conclude this section with an application of our results to a model instance of Orlicz-Sobolev spaces built upon  Young functions of power-logarithmic type. A less conventional example is exhibited in the proof of Proposition \ref{improve}, Section \ref{examp}.

 \fi

\color{black}
\iffalse



\\ In general (even without $\Delta _2$), the condition 
\begin{equation}\label{senzadelta2}
\int ^\infty \Big(\frac t{A(t)}\Big)^{\frac 2{n-2}} \bigg(\int _{t/2}^\infty \Big(\frac s{A(s)}\Big)^{\frac 1{n-2}}\,ds \bigg)^{-n}\, dt = \infty,
\end{equation}
is sufficient for \eqref{ours}. However, it is probably not implied by \eqref{Iwcond}--\eqref{incr}).









\color{red}
\begin{remark}\label{Iwaniecresult}
{\rm 
In \cite{???}, the existence of a continuous representative  of weakly differentiable functions in $W^{1,A}_{loc}(\Omega)$ is established under the assumptions that 
\begin{equation*}
\int ^\infty \frac{A(t)}{t^{n+1}}\, dt =
\infty \,,
\end{equation*}
and that there exists $p>n-1$ such that
\begin{equation*}
\hbox{the function \,$\frac{A(t)}{t^p}$\, is increasing for $t \in (0, \infty)$.}
\end{equation*}
The couple of assumptions \eqref{Iwcond}---\eqref{incr} implies \eqref{ours} -- see ???. On the other hand, the latter is essentially weaker than the couple of hypotheses \eqref{Iwcond}-- \eqref{incr}. Indeed, as shown in Section \ref{examp}, there exist Young functions $A$ satisfying \eqref{ours}, but not \eqref{incr}, so that Theorem \ref{febbraio0} applies, but the result of \cite{IKO} does not. 
}
\end{remark}

\fi
\color{black}

\section{Proofs of the main results}\label{secproofs}

The proof of Theorem \ref{orliczbound} requires  a preliminary result on smooth approximation of functions from an Orlicz-Sobolev  space $W^{1,A}(\Omega)$. Such an approximation is not possible in  norm, unless $A$ satisfies a $\Delta _2$-condition. However, standard convolution with a sequence of smooth kernels always provides us with an approximating sequence whose Dirichlet integrals associated with $A$ converge to the corresponding  Dirichlet integral of the limit function.







\begin{lemma}\label{approx}
Let $A$ be a Young function, and let $u  \in W^{1,1}(\Omega)$ be
such that $\int _\Omega A(|\nabla u|)\,dx < \infty$. Let $\{u_k\}$ be
a sequence of convolutions of $u$ with mollifiers $\varrho _k$, namely
\begin{equation}\label{moll} u_k = u * \varrho  _k \,,\end{equation}
where $\varrho _k \in C^\infty_0(\mathbb R^n)$, ${\rm supp} \varrho _k \subset B_{1/k}(0)$, $\varrho  _k \geq 0$ and $\int _{\mathbb R^n}\varrho _k\, dx=1$ for $k \in \mathbb N$.
Then
(up to subsequences)
\begin{equation}\label{approx1}
\lim _{k \to \infty} u_k  = u   \quad \hbox{at every Lebesgue point  of $u$,}
\end{equation}
\begin{equation}\label{approx1grad}
\lim _{k \to \infty}  \nabla u_k =  \nabla u  \quad \hbox{at every Lebesgue point  of $\nabla u$,}
\end{equation}
and
\begin{equation}\label{approx2}
\lim _{k \to \infty}  \int _E A(|\nabla u_k|)\,dx  = \int _E A(|\nabla u|)\, dx   \quad
 \hbox{for every measurable set $E \subset \Omega$.}
\end{equation}
\end{lemma}
\par\noindent
{\bf Proof}. Properties  \eqref{approx1} an \eqref{approx1grad} are classical. As far as
\eqref{approx2} is concerned, given any measurable set $F \subset E$, the Hardy-Littlewood inequality ensures that 
\begin{align}\label{approx4}
    \int _F A(|\nabla u_k|)\,dx  \leq \int _0^{|F|}A(|\nabla u_k|^*(r))\,
    dr \,,
\end{align}
where the asterisque $\lq\lq *"$ stands for decreasing rearrangement. Moreover, 
a rearrangement inequality for convolutions \cite{oneil},
      \begin{align}\label{approx3}
     \int _0^\tau |\nabla u_k|^{*} (s)\, ds & \leq \int_0^\tau|\nabla u|^{*}(s)\, ds \int _0^\tau \varrho _k^*(s)\, ds
      + \tau\, \int _\tau ^\infty |\nabla u|^*(s) \varrho _k^*(s)\, ds
    \\ \nonumber & \leq \int_0^\tau|\nabla u|^{*}(s)\, ds \int _0^\tau \varrho _k^*(s)\, ds + \tau \,|\nabla u|^*(\tau ) \int _\tau ^\infty  \varrho _k^*(s)\, ds
   \\ \nonumber & \leq \int_0^\tau|\nabla u|^{*}(s)\, ds \int _0^\infty \varrho _k^*(s)\, ds
    = \int_0^\tau|\nabla u|^{*}(s)\, ds \int _{\mathbb R^n} \varrho _k (x)\, dx  \\ \nonumber &  =
    \int_0^\tau|\nabla u|^{*}(s)\, ds \quad \quad \hbox{for $\tau \geq 0.$}
      \end{align}
    Note that, in the last but one inequality, we have made use of the fact that  $\int _0^\infty \varrho _k^*(s) \, ds = \int _{\mathbb R^n } \varrho _k (x)\, dx =1$ for every $k \in \mathop{\rm I\kern -,057cm N}$. Inequality \eqref{approx3}, via \cite[Proposition 2.1]{ALT}, tell us that
    \begin{align}\label{nov7}
    \int _0^{|F|} A(|\nabla u_k|^*(s))\,
    ds \leq \int _0^{|F|} A(|\nabla u|^*(s))\,ds\,.
    \end{align}
    Coupling inequalities \eqref{approx4} and \eqref{nov7} yields
      \begin{align}\label{nov8}
    \int _F A(|\nabla u_k|)dx  \leq  \int _0^{|F|} A(|\nabla u|^*(s))\,ds\,.
    \end{align}
    Inequality \eqref{nov8} entails that the sequence $\{A(|\nabla u_k|)\}$ is equi-integrable over $E$, since
    $$\int _0^{|F|} A(|\nabla u|^*(s))\,ds \leq \int _0^{|\Omega|} A(|\nabla u|^*(s))\,ds \leq \int _\Omega A(|\nabla u|)\, dx\,.$$
    Hence, \eqref{approx2} follows via \eqref{approx1grad} and Vitali's
    convergence theorem. \qed
    
    \medskip
\par\noindent
We are now ready to prove Theorem \ref{orliczbound}.

\medskip
\par\noindent
{\bf Proof of Theorem \ref{orliczbound}}.
On replacing, if necessary, $\Omega$ with a bounded open subset, we may  suppose, without loss of generality, that $u \in W^{1,A}(\Omega)$. Moreover, we assume, for the time being, that 
\begin{equation}\label{finiteint}
\int _{\Omega}A(|\nabla u|)\,dz < \infty.
\end{equation}
Let $u_k$ be the sequence appearing in Lemma \ref{approx}. Given any 
$x_0 \in \Omega$,  let  $R>0$ be such that $B_R(x_0) \subset \subset
\Omega$, and let $r \in (0, R)$. By  \cite[Lemma 7.4.1]{IM}, for every $\delta
>0$ and any Lebesgue points  $x,y \in B_r(x_0)$ of $u$, there exists $\overline k = \overline k (x, y, \delta , r, R)$ such that
\begin{equation}\label{osc}
|u_k(x)\,-\,u_k(y)|\leq 2 \delta + {\rm osc} _{S_\tau (x_0)} u_k
\end{equation}
if $k \geq \overline k $ and $\tau \in [r, R]$. Here, $S_\tau (x_0)$ denotes the $(n-1)$-dimensional sphere in $\mathbb R^n$ centered at $x_0$,  with radius $\tau$, and $$ {\rm osc} _{S_\tau (x_0)} u_k = {\rm sup} _ {S_\tau (x_0)} u_k - {\rm inf}_ {S_\tau (x_0)} u_k.$$
An Orlicz-Sobolev
Poincar\'e type inequality on the $(n-1)$-dimensional sphere $S_\tau (x_0)$
\cite[Theorem 4.1]{CarozzaCianchi} (see also \cite{AlCi, Cianchi_ASNS, Mazya, Talenti} for related results) tells us that, if either $n=2$, or $n \geq 3$ and \eqref{equiv2bis} holds, then
\begin{equation}\label{orlicz3}
{\rm osc}_{S_\tau (x_0)}u_k \leq C \tau A_{n-1}^{-1} \bigg( \tau ^{1-n} \int
_{S_\tau (x_0)} A(|\nabla u_k|) d\mathcal H ^{n-1} \bigg),
\end{equation}
for some constant $C=C(n)$, and for $\tau >0$.
Thanks to \eqref{osc} and \eqref{orlicz3}, 
\begin{equation}\label{orlicz17}
\frac{1}{C\tau}|u_k(x)\,-\,u_k(y)|\leq \frac{2 \delta}{C\tau} +
A_{n-1}^{-1} \bigg( \tau^{1-n} \int _{S_\tau (x_0)} A(|\nabla u_k|)
d\mathcal H ^{n-1} \bigg)\,,
\end{equation}
if $k \geq \overline k$ and $\tau\in [r, R]$.
 Given $\alpha \in (0,1)$, inequality \eqref{orlicz17}
can be rewritten as
\begin{equation}\label{orlicz5'}
\frac{\alpha}{C\tau}|u_k(x)\,-\,u_k(y)|\leq \frac{2\alpha
\delta}{C\tau (1-\alpha)}(1-\alpha) +\alpha A_{n-1}^{-1}
\bigg(\tau^{1-n} \int _{S_\tau (x_0)} A(|\nabla u_k|) d\mathcal H
^{n-1} \bigg)\,.
\end{equation}
Hence, by the convexity of the 
 function $A_{n-1}$,  
\begin{equation}\label{orlicz5''}
A_{n-1}\bigg(\frac{\alpha}{C\tau}|u_k(x)\,-\,u_k(y)|\bigg)\leq
(1-\alpha)A_{n-1}\bigg(\frac{2\alpha \delta}{C\tau (1-\alpha)}\bigg)
+\alpha  \tau^{1-n} \int _{S_\tau (x_0)} A(|\nabla u_k|) \,d\mathcal H
^{n-1} \,.
\end{equation}
Now, fix any Lebesgue point $t\in (r,\,R)$ for the function $t\mapsto \int
_{S_t(x_0)} A(|\nabla u|) \,d\mathcal H ^{n-1}$. Note that this
function belongs to $L^1(0,R)$, since  $\int _{B_R(x_0)} A(|\nabla
u|) \,dx <\infty$. Given any  number $\varepsilon
>0$ such that $(t-\varepsilon , t+\varepsilon) \subset (r,R)$, multiply through by $\tau ^{n-1}$ inequality \eqref{orlicz5''},  and integrate over $(t-\varepsilon,
t+\varepsilon)$ to obtain
\begin{multline}\label{orlicz6'}
\int_{t-\varepsilon}^{t+\varepsilon}
\tau^{n-1}A_{n-1}\bigg(\frac{\alpha}{C\tau}|u_k(x)\,-\,u_k(y)|\bigg)d\tau
\\ \leq 2\varepsilon (1-\alpha)R^{n-1}A_{n-1}\bigg(\frac{2\alpha
\delta}{Cr (1-\alpha)}\bigg)+ \alpha
\int_{t-\varepsilon}^{t+\varepsilon} \int _{S_\tau(x_0)} A(|\nabla
u|)\,d\mathcal H ^{n-1}\, d\tau\,.
\end{multline}
Passing to the limit  as $k\to \infty$ in inequality \eqref{orlicz6'}, making use of equations
\eqref{approx1} and \eqref{approx2}, and then passing to the limit as
$\delta \to 0$ yield
\begin{equation}\label{orlicz7}
\int_{t-\varepsilon}^{t+\varepsilon}\frac{\tau^{n-1}}{\alpha
}A_{n-1}\bigg(\frac {{\alpha |u(x)\,-\,u(y)|}}{C\tau}\bigg)d\tau
\leq \int_{t-\varepsilon}^{t+\varepsilon}  \int _{S_\tau(x_0)}
A(|\nabla u|)\,d\mathcal H ^{n-1}\,d\tau \;.
\end{equation}
Since $A_{n-1}$ is a Young function, the function
$A_{n-1}(\alpha )/\alpha$ is increasing in $\alpha$. One can then pass to the limit as $\alpha \to 1^-$, and make use  of the
monotone convergence theorem in the integral on the left-hand side
of \eqref{orlicz7} to deduce that inequality \eqref{orlicz7} continues to hold for $\alpha =1$. On dividing through by $2\varepsilon $  the
resulting inequality, and letting $\varepsilon\to 0$ we conclude
that
\begin{equation}\label{orlicz4}
t^{n-1}A_{n-1}\bigg(\frac {|u(x) - u(y)|}{Ct}\bigg) \leq \int
_{S_t(x_0)} A(|\nabla u|)\, d\mathcal H ^{n-1}
\end{equation} 
 for all Lebesgue points $x,y
\in B_r(x_0)$ of $u$,  and for a.e. $t \in [r, R]$.
Next, observe that
the function
\begin{equation}\label{noninc} 
t \mapsto  t^{n-1}
A_{n-1}(1/t) \quad \hbox{is decreasing.}
\end{equation}
  Indeed, property \eqref{noninc} is equivalent to the fact that the function 
  \begin{equation}\label{noninc2} 
 
  t\mapsto \frac{A_{n-1}(t)}{t^{n-1}} \quad \hbox{is increasing.}
\end{equation}
  If $n=2$, then  property \eqref{noninc2} just holds because $A_{n-1}$ is a Young function. If $n \geq 3$, then by \eqref{equivconj} property \eqref{noninc2} is in turn equivalent to the fact that the function 
  \begin{equation}\label{noninc3} 
 
  t\mapsto \frac{\widetilde {A_{n-1}}(t)}{t^{(n-1)'}} \quad \hbox{is decreasing.}
\end{equation}
  Property \eqref{noninc3} trivially holds, since 
  $$\frac{\widetilde {A_{n-1}}(t)}{t^{(n-1)'}} = 
  \int _t ^\infty
\frac{\widetilde A (r)}{r^{1 + \frac {n-1}{n-2}}} \, dr \quad \hbox{for $t>0$.}
$$

\iffalse
\begin{multline}\label{noninc1}
 t^{n-1} A_{n-1}(\frac 1t) \searrow \quad
\Longleftrightarrow \quad \frac{A_{n-1}(s)}{s^{n-1}} \nearrow
\quad \Longleftrightarrow \quad \frac{r}{\Phi (r)^{n-1}} \nearrow \\
\nonumber  \Longleftrightarrow \frac{F^{-1}(r)^{n-1}}{r^{n-2}}
\quad \nearrow \quad \Longleftrightarrow  \quad
\frac{s^{n-1}}{F(s)^{n-2}} \quad \nearrow \quad
\Longleftrightarrow \quad  \frac{s^{\frac{n-1}{n-2}}}{F(s)}\quad
\nearrow \quad \Longleftrightarrow \quad \frac 1{\int _s ^\infty
\frac{\widetilde A (r)}{r^{1 + \frac {n-1}{n-2}}} \, dr}\quad
\nearrow \,.
\end{multline}
\fi
 Now, assume that $2r < R$. On integrating \eqref{orlicz4} over $(r,
2r)$ and making use of  \eqref{noninc}
we deduce that
\begin{align*
r (2r)^{n-1} A_{n-1}\bigg(\frac {|u(x)-u(y)|}{2Cr}\bigg) & \leq
\int _r ^{2r} t^{n-1}A_{n-1}\bigg(\frac {|u(x) -
u(y)|}{Ct}\bigg)\, dt
 \leq \int _r ^{2r} \int _{S_t(x_0)} A(|\nabla
u|) \,d\mathcal H ^{n-1}\, dt
 \\
\nonumber & \leq \int
_0 ^{2r} \int _{S_t(x_0)} A(|\nabla u|)\, d\mathcal H ^{n-1}\, dt
 = \int _{B_{2r}(x_0)} A(|\nabla u|) \,dz < \infty\,,
\end{align*}
whence \eqref{bound1} follows. Note that here we have also made use of  property \eqref{kt-1} with $A$ replaced by  $A_{n-1}$.
\\ Next,  let $\widehat u : \Omega \to (-\infty , \infty]$ be the function defined by
\begin{equation}\label{utilde}
\widehat u (x) = \limsup_{r \to 0^+} \int\!\!\!\!\!\!{\text\bf -} _{B_r(x)} u(z) \, dz \quad \hbox{for $x\in \Omega$. }
\end{equation}
By Lebesgue differentiation theorem,
\begin{equation}
u(x) = \widehat u(x) \quad \hbox{for a.e. $x\in \Omega$.}
\end{equation}
 Given any $x,y \in B_r(x_0)$, let $\rho, \sigma >0$ be such that $B_\rho(x) \subset B_r(x_0)$ and $B_\sigma (y) \subset B_r(x_0)$. Owing to inequality \eqref{bound1}, 
\begin{equation}\label{medie}
\bigg| \int\!\!\!\!\!\!{\text\bf -} _{B_\rho(x)} u \, dz - \int\!\!\!\!\!\!{\text\bf -} _{B_\sigma(y)} u \, dz\bigg| \leq C r A_{n-1}^{-1} \bigg( \int\!\!\!\!\!\!{\text\bf -} _{B_{2r}(x_0)} A(|\nabla u|)\,dz \bigg)\,.
\end{equation}
Passing to the limit in \eqref{medie} first as $\rho \to 0^+$, and then as $\sigma \to 0^+$ tells us that 
\begin{equation}\label{osctilde}
| \widehat u(x) -  \widehat u(y)| \leq C r A_{n-1}^{-1} \bigg( \int\!\!\!\!\!\!{\text\bf -} _{B_{2r}(x_0)} A(|\nabla u|)\,dz \bigg)\,.
\end{equation}
Inequality \eqref{osctilde} ensures that $ \widehat u$ is continuous at every Lebesgue point of the function  $A(|\nabla u|)$, and hence a.e. in $\Omega$. Moreover, an application of \eqref{osctilde} with $y=x_0$ and $r=|x-x_0|$ yields 
$$\frac{|  \widehat u(x) -  \widehat u(x_0)|}{|x -x_0|} \leq C  A_{n-1}^{-1} \bigg( \int\!\!\!\!\!\!{\text\bf -} _{B_{2|x -x_0|}(x_0)} A(|\nabla u|)\,dz \bigg)\,.$$
 Thus,
$$\limsup _{x \to x_0}\frac{|  \widehat u(x) -  \widehat u(x_0)|}{|x -x_0|} < \infty$$
if $x_0$ is any Lebesgue point  of the function  $A(|\nabla u|)$. Hence, the a.e. differentiability of $\widehat u$ a.e. in $\Omega$ follows, via a classical result  by Stepanoff \cite{Step}.  
\\Finally, if the temporary condition \eqref{finiteint} does not hold, then, however, it does hold with $u$ replaced with  $\lambda u$ for a suitable $\lambda >0$. The above argument then applies to $\lambda u$, and hence the continuity and the a.e. differentiability of $u$ still follows. As for inequality \eqref{bound1}, it trivially continues to hold even if \eqref{finiteint} fails, since its right-hand side is infinite in this case. \color{black}
\iffalse


\textcolor[rgb]{0.00,0.00,1.00}{If we choose $x_0 =y$ and $r=|x-x_0|$, we can rewrite the last inequality as following 
\begin{equation}
 \frac {|u(x)-u(x_0)|}{|x-x_0|}\leq  C A_{n-1}^{-1} \bigg(C'\int\!\!\!\!\!\!{\text\bf -} _{B(x_0, 2|x-x_0|)} A(|\nabla u|) dw\bigg)
 \end{equation}
 and the limit is finite when $x$ goes to $x_0$. The differentiability and continuity properties follow by virtue of Stepanoff result (see....).}
 \textcolor[rgb]{0.00,0.00,1.00}{In other words, we could consider
 $f(x)\, =\,u(x) - \nabla u(x_0)\,x $; it belongs to $W^{1, A}(B(x_0,r))$, with suitable small positive $r$ and, by  previous estimate, written for $f(x)$, we have
 \begin{equation}
|f(x)-f(x_0)|\,=\, |u(x)-u(x_0)- \nabla u(x_0)(x-x_0) |\leq  C |x-x_0| A_{n-1}^{-1} \bigg(C'\int\!\!\!\!\!\!{\text\bf -} _{B(x_0, 2|x-x_0|)} A(|\nabla u- \nabla u(x_0)|)dw\bigg) 
 \end{equation}
 and the differentiability condition holds, by the hypothesis on $x_0$, as Lebesgue point of $ A(|\nabla u|)$ and thanks to a result due to [AC].}
 
 
 \fi
\qed

\medskip\par\noindent
The content of the next lemma is a basic property of the capacity defined as in \eqref{cap}, to be used in the proof of Theorem \ref{orliczcapacity}.



\begin{lemma}\label{caplemma}
Let $\Psi : [0, \infty) \to [0, \infty)$ be a continuous function, and let $C_{\Psi,1}$ be the capacity defined by \eqref{cap}.
If $f \in
L^1_+(\mathbb R^n)$, then
\begin{equation}\label{cap0} C_{\Psi,1} \big(\{I_\Psi  f  = \infty\}\big)
=0.
\end{equation}
\end{lemma}
\par\noindent
{\bf Proof}. Given  $f \in L^1_+(\mathbb R^n)$, we have that
\begin{align}\label{febbraio5}
C_{\Psi,1} \big(\{I_\Psi  f  = \infty\}\big)\leq  C_{\Psi,1}\big(\{I_\Psi
f>\lambda \}\big) = C_{\Psi,1}\big(\{I_\Psi (f/\lambda)>1\}\big) \leq
\frac 1\lambda \int _{\mathbb R^n} f(x)\, dx,
\end{align}
for every $\lambda >0$. Hence, equation \eqref{cap0} follows on
letting $\lambda$ go to infinity. \qed


\medskip
\par\noindent
{\bf Proof of Theorem \ref{orliczcapacity}}. On replacing, if necessary, $u$ by $\lambda u$ for a suitable $\lambda >0$, we may assume, without loss of generality, that condition \eqref{finiteint} is in force.
Given $x_0\in \Omega$, let $R>0$ be such that $B_R(x_0) \subset \subset \Omega$. Set
$$ {\rm ess \,osc _{B_r(x_0)}} u = {\rm ess \,sup}_{B_r(x_0)} u - {\rm ess \,inf}_{B_r(x_0)} u$$
for $r \in (0, R)$.
 Inequality
\eqref{orlicz4} implies that 
\begin{equation}\label{gen1}
t^{n-1}A_{n-1}\bigg(\frac {{\rm ess\,osc}_{B_r(x_0)}u}{Ct}\bigg) \leq \int
_{S_t(x_0)} A(|\nabla u|) \,d\mathcal H ^{n-1}
\end{equation}
for a.e. $t \in [r, R]$.
Multiplying through equation \eqref{gen1}
by $\frac 1{t^n \sigma (1/t) A_{n-1}(1/t)}$, and  
integrating the resulting equation over $(r, R)$ yields
\begin{align}\label{feb1}
\int _r^R \frac{1}{t\sigma (1/t)}\frac{A_{n-1}({\rm ess\,osc}_{B_r(x_0)}u/(tC))}{A_{n-1}(1/t)}\, dt
& \leq \int _r^R \frac{1}{t^n \sigma (1/t)A_{n-1}(1/t)} \int
_{S_t(x_0)} A(|\nabla u|) \, d\mathcal H ^{n-1}\, dt
\\ \nonumber & \leq
 \int _0^R \frac{1}{t^n \sigma (1/t)A_{n-1}(1/t)} \int
_{S_t(x_0)} A(|\nabla u|)\, d\mathcal H ^{n-1}\, dt.
\end{align}



A change of variables to polar coordinates tells us that
\begin{align}\label{feb2}
\int _0^R &\frac{1}{t^n \sigma (1/t)A_{n-1}(1/t)} \int _{S_t(x_0)}
A(|\nabla u|) \,d\mathcal H ^{n-1}\, dt \\ \nonumber & = \int _{B_R(x_0)}\frac{
A(|\nabla u|)}{|x-x_0|^n \sigma (1/|x-x_0|)A_{n-1}(1/|x-x_0|)}\,dx
 = I_{\Psi}\big(A(|\nabla u|) \chi_{B_R(x_0)}\big)\,.
\end{align}
By Lemma \ref{caplemma}, there exists a set $E\subset \Omega$ such that $C_{\Psi,1}(E)=0$, and $I_{\Psi}\big(A(|\nabla u|)
\chi_{B_R(x_0)}\big)$ is finite for every $x_0\in \Omega\setminus E$.
 We claim that
 \begin{equation}\label{feb11}
 \lim _{r\to 0^+} {\rm ess \,osc}_{B_r(x_0)}u =0
 \end{equation}
 for any such $x_0$. Assume, by contradiction, that \eqref{feb11}
 fails, and hence ${\rm ess\,osc}_{B_r(x_0)}u\geq \lambda $  for some $\lambda >0$. 
Equations  \eqref{feb1} and \eqref{feb2}  imply that
\begin{align*
C' \geq  \int _r^R  \frac{1}{t\sigma (1/t)}\frac{A_{n-1}({\rm
ess\,osc}_{B_r(x_0)}u/(tC))}{A_{n-1}(1/t)}\, dt & \geq \int _r^R
\frac{1}{t\sigma (1/t)}\frac{A_{n-1}(\lambda/(tC))}{A_{n-1}(1/t)}\,
dt
\end{align*}
for some constant $C'$. Passing to the limit as $r \to 0^+$ leads to
a contradiction, owing to assumption \eqref{ott21}. Equation \eqref{feb11} is thus established.
\\
Since the functions
$$
r \mapsto {\rm ess\, inf}_{B_r(x_0)} u\quad \hbox{and} \quad 
r \mapsto {\rm ess\, sup}_{B_r(x_0)}
u$$ are monotone in $r$,  they admit (finite) limits as $r \to 0^+$,
which, owing to
\eqref{feb11}, 
agree in $\Omega \setminus E$
In particular, the representative  $\widehat u$, defined by \eqref{utilde}, satisfies the equality
\begin{equation}\label{feb33}
\widehat u (x) = \lim _{r \to 0^+} {\rm ess\, inf}_{B_r(x)} u
= \lim _{r \to 0^+} {\rm ess\, sup}_{B_r(x)} u \quad \hbox{for every $x \in \Omega \setminus E$.}
\end{equation}
It is easily verified that the function 
$$
x \mapsto \lim _{r \to 0^+}  {\rm ess\, inf}_{B_r(x)} u$$
is lower-semicontinuous in $\Omega$. Hence, by \eqref{feb33}, $\widehat u$ is lower-semicontinuous  in $\Omega \setminus E$. Similarly, the function  $$
x \mapsto \lim _{r \to 0^+} {\rm ess\, sup}_{B_r(x)} u$$
is upper-semicontinuous in $\Omega$, and, by \eqref{feb33} again, $\widehat u$ is also upper-semicontinuos  in $\Omega \setminus E$. Altogether, we have shown that $\widehat u$ is continuous  in $\Omega \setminus E$. The proof is complete.
\iffalse

recall that the function defined at every $x_0 \in \Omega$ by
\textcolor[rgb]{0.98,0.00,0.00}{${\rm ess}-\liminf _{x\to x_0} u(x)$
LA DEFINISCE PROPRIO COME $\lim {\rm ess\, inf} u$?} is
lower-semicontinuous, and is not affected by perturbations of $u$ on
sets of Lebesgue measure zero. Thus,
 \begin{equation}\label{feb32}
{\rm ess}-\liminf _{x\to x_0} \widetilde u(x)= {\rm ess}-\liminf
_{x\to x_0} u(x)\textcolor[rgb]{0.98,0.00,0.00}{=} \lim _{r \to 0^+}
{\rm ess\, inf}_{B(x_0, r)} u = \widetilde u (x_0) \quad \hbox{for
$x_0 \in \Omega \setminus E$,}
\end{equation}
where the first equality holds by \eqref{feb31}, and the last one by
\eqref{feb33}. Equation \eqref{feb32} tells us that $\widetilde u$
is lower semi-continuous in $\Omega \setminus E$. An analogous
argument implies that $\widetilde u$ is also upper semi-continuous
in $\Omega \setminus E$. Thus, $\widetilde u$ is continuous in
$\Omega \setminus E$. We have thus shown that $u$ agree a.e. with a
function which is continuous outside a set of $C_\Psi$-capacity
zero. The proof is complete. 
\fi
\qed
 
 \smallskip
 \par
 As mentioned in Section \ref{main}, Corollary \ref{orliczcapacitycor} follows from Theorem \ref{orliczcapacity} via the next result.
 
  \smallskip
 
 
\begin{proposition}\label{delta2lem}
Let $n \geq 2$, let $A$ be a Young function, and let $A_{n-1}$ be the Young function defined by \eqref{Apoincarebis}. If  $A \in \Delta _2$ near
infinity, then $A_{n-1}\in \Delta _2$ near infinity as well.
\end{proposition}
\par\noindent
{\bf Proof}. Owing to \eqref{deltanabla}, one has that
$\widetilde A \in \nabla _2$ near infinity. Thus, by \eqref{nabla2incr},   there exists
$\varepsilon_0>0$ such that, if $0<\varepsilon <\varepsilon_0$, 
the function $\widetilde A (t)t^{-1-\varepsilon}$ increasing for large $t$.
Hence, if $0< \varepsilon < \min\{\varepsilon_0, \tfrac 1{n-2}\}$,
then
\begin{align}\label{feb17}
\int _t^\infty \frac {\widetilde A(r)}{r^{1 + \frac {n-1}{n-2}}}\,
dr & \geq \frac {\widetilde A(t)}{t^{1 + \varepsilon}} \int _t
^\infty \frac {dr}{r^{\frac {n-1}{n-2}-\varepsilon}}  = \frac
{\widetilde A(t)}{(\frac {n-1}{n-2}-1-\varepsilon ) t^{ \frac
{n-1}{n-2}}} \quad \hbox{for large $t$.}
\end{align}
As a consequence,
\begin{align}\label{feb19}
\liminf _{t \to \infty} \frac{t
\frac{d \widetilde{A_{n-1}}}{dt}(t)}{\widetilde{A_{n-1}}(t)}& = \liminf _{t \to
\infty} \frac{t \Big( \frac{n-1}{n-2} t^{\frac {n-1}{n-2}-1}\int
_t^\infty \frac {\widetilde A(r)}{r^{1 + \frac {n-1}{n-2}}}\, dr -
\frac{\widetilde A (t)}t\Big)}{ t^{\frac {n-1}{n-2}} \int _t^\infty
\frac {\widetilde A(r)}{r^{1 + \frac {n-1}{n-2}}}\, dr}
\\ \nonumber & = \frac{n-1}{n-2} - \limsup _{t \to \infty}
\frac{\widetilde A (t)}{t^{\frac {n-1}{n-2}} \int _t^\infty \frac
{\widetilde A(r)}{r^{1 + \frac {n-1}{n-2}}}\, dr} \geq 1 +
\varepsilon \,.
\end{align}
By \eqref{feb19}, for every $\varepsilon _1 \in (0, \varepsilon)$ the function $\widetilde{A_{n-1}}(t) t^{-1-\varepsilon_1}$ is increasing for large $t$. Hence, by \eqref{nabla2incr},
$\widetilde{A_{n-1}} \in \nabla _2$ near infinity, whence, thanks to \eqref{deltanabla},
namely $A_{n-1} \in \Delta _2$ near infinity. \qed


 
 
 
 \smallskip
\par\noindent

The link between the generalized capacities $C_{\Psi,1}$ and the classical Hausdorff measures $\mathcal H^{h(\cdot)}$ is discussed in the old paper \cite{taylor}. It provides us with a key tool in deriving Corollary  \ref{continuityhausdorff} from Theorem \ref{orliczcapacity}.


\smallskip
\par\noindent
{\bf Proof of Corollary \ref{continuityhausdorff}.}  Let $E$ be the set where the representative $\widehat u$ of $u$, exhibited in the proof of Theorem \ref{orliczcapacity}, is not continuous. Being the complement in $\Omega$ of the set where the limit of the averages of $u$ exists, the set $E$ is Borel measurable. Thus,  for every $k \in \mathbb N$, the set $E_k = E \cap B_k(0)$ is a bounded Borel set.
Given $k \in \mathbb N$,  let $f \in L^1_+(\mathbb R^n
)$ be such that $I_\Psi f (x) \geq 1$ for $x \in E_k$, and let $\mu$
be any Borel measure, supported in $E_k$, such that $\mu (E_k)=1$. Then
\begin{align}\label{feb20}
1= \mu (E_k) \leq \int _{\mathbb R^n}I_\Psi f (x)\, d \mu (x) = \int _{\mathbb R^n}
I_\Psi \mu (y) f (y) \,dy \leq \|I_\Psi \mu \|_{L^\infty (\mathbb R^n)}
\|f\|_{L^1(\mathbb R^n )}.
\end{align}
Hence, from the very definition of $C_{\Psi,1}$-capacity,
\begin{align}\label{feb21}
C_{\Psi,1} (E_k) \geq \frac{1}{\|I_\Psi \mu \|_{L^\infty (\mathbb R^n)}}.
\end{align}
Since, by Theorem \ref{orliczcapacity}, $C_{\Psi,1} (E_k) =0$ for every $k \in \mathbb N$, one has that $\|I_\Psi \mu \|_{L^\infty (\mathbb R^n)}= \infty$  for every $\mu$ as above. This piece of information, combined with assumption \eqref{hB},   implies, via   \cite[Theorem
2]{taylor}, that $$\mathcal H ^{h(\cdot)} (E_k)
=0$$  for every  {$k\in \mathcal \mathop{\rm I\kern -,057cm N}$}. Next, recall that, although   $\mathcal H^{h(\cdot)}$ is just  an outer measure, it is a measure when restricted to the class of Borel sets. Thus, since $E_k$ is an increasing sequence of Borel sets such that $E= \cup _{k=1}^\infty E_k$,
$$\mathcal H^{h(\cdot)} (E) = \lim _{k\to \infty}\mathcal H^{h(\cdot)} (E_k) = 0\,.$$ \qed
 
\smallskip
\par
Our last proof concerns Theorem \ref{febbraio0}.



\smallskip
\par\noindent
{\bf Proof of Theorem \ref{febbraio0}.}
Assume, the time being, that $u$ fulfills condition \eqref{finiteint}. It is clear from the proof of inequality \eqref{orlicz4} that it also holds with $u$ replaced by every approximating function $u_k$, defined as in the proof of Theorem \ref{orliczbound}.
Integrating over $(r, R)$ the inequality obtained from this replacement
 yields
\begin{equation}\label{orlicz5}
\int _r ^{R} t^{n-1} {A_{n-1}}\bigg(\frac {|u_k(x) -
u_k(y)|}{Ct}\bigg)\, dt \leq \int _{B_r(x_0)} A(|\nabla u_k|) \, dz
< \infty\,
\end{equation}
provided that $B_R(x_0) \subset \subset   \Omega$, $0<r<t<R$ and $x,y \in B_r(x_0)$.
  Assumption \eqref{ours} is equivalent to 
\begin{equation}\label{orlicz6}
\int _0 t^{n-1} A_{n-1}\Big(\frac 1t\Big)\, dt = \infty.
\end{equation}
As a consequence  of  \eqref{orlicz5} and \eqref{orlicz6}, the  sequence $u_k$ is  equi-continuous in $\Omega$.
\iffalse
Owing to
\eqref{orlicz5}, the uniform equi-continuity of the sequence $u_k$
will follow if we show that
\begin{equation}\label{orlicz6}
\int _0 t^{n-1} A_{n-1}(\tfrac 1t)\, dt = \infty.
\end{equation}
We claim that \eqref{orlicz6} is equivalent to either
\eqref{mainhp2} or \eqref{mainhp}, according to whether $n=2$ or $n
\geq 3$. Indeed, \eqref{orlicz6} is equivalent to
\begin{equation}\label{febbraio6} \int ^\infty
\frac{A_{n-1}(s)}{s^{n+1}}\, ds = \infty\,,
\end{equation}
and, by \cite[Lemma???]{cianchiibero}, condition \eqref{ours}
holds if and only if
$$\int ^\infty \bigg(\frac s{\widetilde {A_{n-1}}(s)}\bigg)^{n-1}\,ds
= \infty,$$ namely \eqref{mainhp2} or \eqref{mainhp}. 


\begin{align*}
\int _0 t^{n-1} \Phi ^{-1}(\tfrac 1t)\, dt & = \int ^\infty
s^{-n-1}\Phi ^{-1}(s)\, ds = \int ^\infty  s^{-n-1}\int _0^{\Phi
^{-1}(s)}dr \, ds = \int ^\infty \int _{\Phi (r)}^\infty
s^{-n-1}\, ds \, dr \\ \nonumber & = \frac 1n \int ^\infty \Phi
(r)^{-n}\, dr = \frac 1n  \int ^\infty \bigg(\frac
{F^{-1}(r)}{r}\bigg)^n \, dr = \frac 1n  \int ^\infty r^{-n} \int
_0^{F^{-1}(r)} ny^{n-1} \,dy \, dr
\\ \nonumber & = \int ^\infty y^{n-1} \int _{F (y)}^\infty
r^{-n}\, dr \, dy = \frac 1{n-1} \int ^\infty \bigg(\frac y{F(y)}
\bigg)^{n-1} \, dt.
\end{align*}
\fi
 Thus, by Ascoli-Arzel\'a's theorem, the sequence $\{u_k\}$ converges
 to a continuous function $\overline u$, which agrees with $u$ a.e. in $\Omega$.
 Denote by $\omega (r)$ the modulus of continuity of $\overline u$ in $B_r(x_0)$.
 Inequality \eqref{orlicz5}
implies, via Fatou's lemma and equation \eqref{approx2}, that
\begin{equation}\label{modulus2}
\int _r ^{R}t^{n-1} A_{n-1}\bigg(\frac {\omega  (r)}{Ct}\bigg)\,
dt \leq \int _{B_R(x_0)} A(|\nabla u|)\, dz \,.
\end{equation}
From an application of inequality \eqref{modulus2} with $r= \tfrac R2$, and property \eqref{kt} applied with $A$ replaced by $A_{n-1}$, we deduce that, if $\omega (\tfrac R2) \geq 1$, then 
\begin{equation}\label{gen3}
\omega  (\tfrac R2) \int _{R/2} ^{R}t^{n-1} A_{n-1}\bigg(\frac {1}{Ct}\bigg)\,
dt  \leq \int _{R/2} ^{R}t^{n-1} A_{n-1}\bigg(\frac {\omega  (\tfrac R2)}{Ct}\bigg)\,
dt \leq \int _{B_R(x_0)} A(|\nabla u|)\, dz\,.
\end{equation}
Hence, 
\begin{equation}\label{gen4}
\omega  (\tfrac R2) \leq \max \Bigg\{1, \frac{\int _{B_R(x_0)} A(|\nabla u|) \,dz}{\int _{R/2} ^{R}t^{n-1} A_{n-1}(\frac {1}{Ct})\,
dt }\Bigg\}\,.
\end{equation}
Thus, if $0<r<\tfrac R2$, 
\begin{align}\label{gen5}
\int  _R^{\infty} t^{n-1}A_{n-1}\bigg(\frac {\omega 
(r)}{Ct}\bigg)\, dt
& = \bigg(\frac{\omega  (r)}{C}\bigg)^n\int _0 ^{\frac {\omega 
(r)}{RC}} \frac{A_{n-1}(s)}{s^{n+1}}\, ds \\ \nonumber & \leq \bigg(\frac{\omega  (\tfrac R2)}{C}\bigg)^n\int _0 ^{\frac {\omega
(\frac R2)}{RC}} \frac{A_{n-1}(s)}{s^{n+1}}\, ds < \infty\,,
\end{align}
where the equality holds by a change of variable in the integral, and the last inequality  by equation \eqref{febbraio4}.
Combining inequalities \eqref{modulus2} and \eqref{gen5} tells us that
\begin{align}\label{gen6}
\int _r ^{\infty} t^{n-1} {A_{n-1}}\bigg(\frac {\omega 
(r)}{Ct}\bigg)\, dt & = \int _r ^{R} t^{n-1} {A_{n-1}}\bigg(\frac {\omega 
(r)}{Ct}\bigg)\, dt + \int _R ^{\infty} t^{n-1} {A_{n-1}}\bigg(\frac {\omega 
(r)}{Ct}\bigg)\, dt \\ \nonumber & \leq  \int _{B_R(x_0)} A(|\nabla u|) \,dz + \bigg(\frac{\omega  (\tfrac R2)}{C}\bigg)^n\int _0 ^{\frac {\omega
(\frac R2)}{RC}} \frac{A_{n-1}(s)}{s^{n+1}}\, ds 
\end{align}
if $0<r\leq\tfrac R2$.
Denote by $C'=C'(x_0, R, u)$ the quantity on the rightmost side of  \eqref{gen6}, and set $C'' = \max \{C, C'\}$, where $C$ is the constant appearing in \eqref{gen6}. Thus,
\iffalse



Owing to \eqref{febbraio4},
\begin{equation}\label{modulus3}
\int  ^{\infty} t^{n-1}A_{n-1}\bigg(\frac {\omega _u
(r)}{Ct}\bigg)\, dt < \infty.
\end{equation}
From \eqref{modulus2} and \eqref{modulus3} one deduces that
\begin{equation}\label{modulus4}
\int _r ^{\infty} t^{n-1} \textcolor[rgb]{0.00,0.00,1.00}{A_{n-1}}\bigg(\frac {\omega _u
(r)}{Ct}\bigg)\, dt \leq C \,,
\end{equation}
if $r<R$, provided that $C$ is a sufficiently large constant. The
change of variable $s= \tfrac {\omega _u (r)}{Ct}$ turns
\eqref{modulus4} into



\fi
\begin{equation}\label{modulus5}
\bigg(\frac{\omega  (r)}{C''}\bigg)^n\int _0 ^{\frac {\omega 
(r)}{rC''}} \frac{A_{n-1}(s)}{s^{n+1}}\, ds   = \int  _r^{\infty} t^{n-1}A_{n-1}\bigg(\frac {\omega 
(r)}{C''t}\bigg)\, dt \leq C'' \quad 
\hbox{if $0<r\leq\tfrac R2$.}
\end{equation}
or, equivalently,
\begin{equation}\label{modulus6}
B\bigg(\frac {\omega  (r)}{rC''} \bigg) \leq \frac {C''}{r^n} \quad \hbox{if $0<r\leq\tfrac R2$,}
\end{equation}
where $B$ is given by \eqref{G}. Hence,
$$\omega (r) \leq C'' r B^{-1}(C'' r^{-n}) \leq C'' {\rm max}\{C'', 1\}\,
r\, B^{-1}(r^{-n}) \quad \hbox{if $0<r\leq\tfrac R2$,}$$ where the last inequality holds by property \eqref{kt-1} applied to the Young function  $B$. As a consequence, $u \in C^{\omega (\cdot)}_{\rm loc}(\Omega)$.
\\
If assumption \eqref{finiteint} is dropped, the same argument yields this conclusion, when applied with
 $u$ replaced by $\lambda u$ for a suitable constant $\lambda >0$.
 \qed



\color{black}


\section
Examples
}\label{examp}


\subsection{A customary example}\label{cust}
Results in the spirit of Theorem \ref{orliczbound} on $L^\infty$-estimates for  weakly monotone Orlicz-Sobolev functions, as well as information on the capacity of the exceptional set and on its Hausdorff measure, such as that provided in Theorems \ref{orliczcapacity} and \ref{hausdorff}, respectively, seem to be missing in literature. 
 In Example \ref{powerlog} below, we illustrate these results in 
a model instance of the Orlicz-Sobolev spaces $W^1_{\rm loc}L^p\log ^\alpha (\Omega)$  built upon  Young functions of power-logarithmic type. Let us emphasize that, as already pointed out  in Remark \ref{improveManfredi}, even the classical result 	\eqref{p>n-1} on the capacity of the singular set of weakly monotone functions is improved by Theorem \ref{orliczcapacity}, when the latter is specialized to standard Sobolev spaces $W^{1,p}_{\rm loc}(\Omega)$ corresponding to plain power type Young functions. 
 \par For those exponents $p$ and $\alpha$ that guarantee the continuity  everywhere  of weakly monotone functions from $W^1_{\rm loc}L^p\log ^\alpha (\Omega)$, we recover in Example \ref{powerlog} the results of \cite[Chapter 6]{IM}. We also compare the modulus of continuity of a weakly monotone function in $W^1_{\rm loc}L^p\log ^\alpha (\Omega)$ given by Theorem \ref{main} with that of an arbitrary function from the same Orlicz-Sobolev space, and  derive some interesting conclusions.
 
 
 
   
\iffalse






Let us add that no other result about the capacity of the exceptional set of weakly monotone Orlicz-Sobolev functions, in the spirit of Theorem \ref{orliczcapacity}, seems to be available in the literature. Information about the Hausdorff measure of this exceptional set, which is the content of Theorem \ref{hausdorff},  is also apparently missing.
\par
In the remaining part of this section, we focus on 
Theorem \ref{febbraio0} and its Corollary \ref{recover}. Since condition \eqref{incr} implies \eqref{indexcond},  Corollary \ref{recover} recovers the results of \cite{IM} and \cite{KKMOZ}. On the other hand, Proposition \ref{improve} below shows that  assumption \eqref{ours} of Theorem \ref{febbraio0} is essentially weaker than the couple \eqref{Iwcond}--\eqref{incr}.
   Thus,  Theorem \ref{febbraio0} can be applied to deduce the continuity of weakly monotone Orlicz-Sobolev  functions in certain situations where the criterion of \cite{IM} and \cite{KKMOZ} fails. 


\fi
\begin{example}\label{powerlog} {\rm Assume that $A(t)=t^p \log^\alpha (c+t)$, where $p>1$, $\alpha \in \mathbb R$, for some positive constant $c$ so large that $A$ is a Young function.  Let us denote by $W^1_{\rm loc}L^p\log ^\alpha (\Omega)$ the local Orlicz-Sobolev space associate with $A$. 
By Theorem \ref{orliczbound}, any weakly monotone function in $u \in W^1_{\rm loc}L^p\log ^\alpha (\Omega)$ is locally bounded, and differentiable a.e. in $\Omega$, in any of the following cases:
\begin{equation}\label{ex1}
\begin{cases}
\hbox{$p=n$ and $\alpha < -1$, }
\\ \hbox{$n-1 <p <n$ and $\alpha \in \mathbb R$,}
\\ \hbox{either $n \geq 3$, $p=n-1$ and $\alpha > n-2$, or $n =2$, $p=1$ and $\alpha \geq 0$\,.}
\end{cases}
\end{equation}
Moreover, denote by $E$ the exceptional set of discontinuity points of $u$. Then an application of Corollary \ref{orliczcapacity} and Theorem \ref{hausdorff} tells us what follows:
\\
(i) If $p=n$ and $\alpha < -1$, then 
$$C_{t^n \log^{\alpha +1}t, 1}(E)=0\, \quad \hbox{and} \quad \mathcal H^{\log^{-\gamma} (1/s)}(E)=0\quad \hbox{for every $\gamma >-\alpha$}.$$
\\
(ii)
If either  $n-1<p<n$ and $\alpha \in \mathbb R$, or $n=2$, $p=1$ and $\alpha \geq 0$, then 
$$C_{t^p \log^{\alpha +1}t, 1}(E)=0\, \quad \hbox{and} \quad \mathcal H^{s^{n-p}\log^{-\gamma} (1/s)}(E)=0 \quad \hbox{for every $\gamma >1-\alpha$}.$$
\\
(iii)
If $n \geq 3$, $p=n-1$ and $\alpha >n-2$, then 
$$C_{t^{n-1} \log^{\alpha +3-n}t, 1}(E)=0\, \quad \hbox{and} \quad  \mathcal H^{s^{n-p}\log^{-\gamma} (1/s)}(E)=0 \quad \hbox{for every $\gamma >n-2-\alpha$}.$$
On the other hand, from Corollaries \ref{maindelta2} and \ref{recover} one deduces that $u$ is everywhere continuous in $\Omega$ in any of the following cases:
\begin{equation}\label{ex3}
\begin{cases}
\hbox{$p>n$ and $\alpha \in \mathbb R$, }
\\ \hbox{$p=n$ and $\alpha \geq -1$.}
\end{cases}
\end{equation}
Furthermore, from Theorem \ref{main} one infers that:
\\ (i) If $p>n$ and $\alpha \in \mathbb R$, then 
\begin{equation}\label{ex6}
u \in C^{r^{1-\frac np}\log^{-\frac \alpha p} (1/r)}_{\rm loc}(\Omega).
\end{equation}
\\ (ii) If $p=n$ and $\alpha >-1$, then 
\begin{equation}\label{ex7}
u \in C^{\log^{-\frac {\alpha +1} n} (1/r)}_{\rm loc}(\Omega).
\end{equation}
\\ (iii) If $p=n$ and $\alpha =-1$, then 
\begin{equation}\label{ex8}
u \in C^{(\log \log) ^{-\frac {1} n} (1/r)}_{\rm loc}(\Omega).
\end{equation}
The content of equations \eqref{ex3}--\eqref{ex8} recovers results from \cite[Chapter 6]{IM}.
\\ Let us notice that, if $p>n$ and $\alpha \in \mathbb R$, then the modulus  of continuity of a weakly monotone function $u$ given by \eqref{ex6} coincides with that of any Orlicz-Sobolev function in $u \in W^1_{\rm loc}L^p\log ^\alpha (\Omega)$ -- see \cite{CianchiRand}[Equation (6.13)] -- and, in particular, with that provided by the classical embedding theorem by Morrey, if $\alpha =0$. Thus, being a weakly monotone  does not provide a function with a better modulus of continuity in these cases. 
\\ By contrast, if $p=n$ and $\alpha >n-1$, then any  Orlicz-Sobolev function in $u \in W^1_{\rm loc}L^n\log ^\alpha (\Omega)$ is still continuous, but one  has just that
\begin{equation}\label{ex9}
u \in C^{\log ^{-\frac{\alpha - n+1}n}(1/r)}_{\rm loc}(\Omega)\,.
\end{equation}
This is of course a weaker property than \eqref{ex7}.  Weak monotonicity thus turns out to improve the quality of the modulus of continuity of Orlicz-Sobolev functions in borderline situations, a phenomenon that cannot be appreciated in the less fine scale of standard Sobolev spaces.













}
\end{example}

\subsection{Augmenting the existing literature: a non-standard example.}\label{nonstandard}



 Since condition \eqref{incr} implies \eqref{indexcond},  Corollary \ref{recover} recovers the results of \cite{IM} and \cite{KKMOZ}. The objective of Proposition \ref{improve} below is to demonstrate that  assumption \eqref{ours} of Theorem \ref{febbraio0} is actually weaker than the pair of assumptions \eqref{Iwcond}--\eqref{incr}.
 This shows that  Theorem \ref{febbraio0} can be applied to deduce the continuity of weakly monotone Orlicz-Sobolev  functions in certain situations where the criterion of \cite{IM} and \cite{KKMOZ} fails. 




\begin{proposition}\label{improve}
Let $n \geq 2$. Then there exist  Young functions $A$ for which condition \eqref{ours} holds, whereas  \eqref{incr} fails.
\end{proposition}

Let us point out that the Young functions that will be exhibited in the proof of Proposition \ref{improve} satisfy, in addition, the $\Delta_2$-condition. Thus, they fulfill condition \eqref{ours} in the equivalent form \eqref{condelta2} appearing in Corollary \ref{maindelta2}.

\medskip
\par\noindent
{\bf Proof of Proposition \ref{improve}}. Let $A$ be a piecewise affine Young function  of the form \eqref{A}. Thus, there exists an increasing sequence $\{t_k\}$ of nonnegative numbers $t_k$, with $t_0=0$ and 
\begin{equation}\label{tkinf}
\lim_{k\to \infty} t_k\,=\,\infty\,,
\end{equation} 
and an increasing sequence 
$\{m_k\}$ of nonnegative numbers $m_k$, such that
\begin{equation}\label{defmk}
a(t)\,=\,m_k\qquad \qquad {\rm for}\; t\in (t_k,\, t_{k+1})\,,
\end{equation}
for $k \in \mathbb N$.
Hence, 
\begin{equation}\label{Function}
A(t)\,=\,\sum_{h=0}^{k-1}\,m_{h}(t_{h+1}-t_{h})\,+\, m_k(t-t_k),\qquad \hbox{if $t \in  [t_k, t_{k+1})$,}
\end{equation}
for $k \in \mathbb N$.
The conclusion will follow if we  show that, given any $q>1$, the sequences $\{t_k\}$ and $\{m_k\}$ can be chosen in such a way that the function $A$ satisfies condition \eqref{ours}, and the function
\begin{equation}\label{notincr}
t \mapsto \frac{A(t)}{t^{q}}\qquad \hbox{is not increasing.}
\end{equation}
Condition \eqref{notincr} is fulfilled if there exists $\alpha \in (1, q)$ such that 
\begin{equation*}
\lim_{t\to t_k^-}a(t)\,t\,-\,\alpha\, A(t)\,=\,0\,
\end{equation*}
for $k \in\mathbb N$, 
namely
\begin{equation}\label{nocondition}
a(t_{k}^-)\,t_k\,-\,\alpha\, A(t_k)\,=\,0\,
\end{equation}
for $k \in\mathbb N$.
 The following formulas can be derived 
from equations 
  \eqref{Function} and \eqref{nocondition}, via an induction argument:
\begin{align}\label{2}
t_{k+1}\,&=\, \frac{\alpha t_1(m_1-m_0)(\alpha m_2-m_1)\cdots (\alpha m_{k-1}-m_{k-2}) (\alpha m_k-m_{k-1})}{(\alpha -1)^k\, m_1m_2\cdots m_k} \\ \nonumber  &=\,\frac{\alpha t_1}{(\alpha -1)^k}\,\Big(1-\frac{m_0}{m_1}\Big)\Big(\alpha-\frac{m_1}{m_2}\Big)\cdots \Big(\alpha-\frac{m_{k-2}}{m_{k-1}}\Big) \Big(\alpha-\frac{m_{k-1}}{m_k}\Big)\,,\end{align}
and
\begin{align}\label{2'}
t_{k+1}\,-\, t_k\, & =\, \frac{\alpha t_1(m_1-m_0)(\alpha m_2-m_1)\cdots (\alpha m_{k-1}-m_{k-2})(m_{k}-m_{k-1})}{(\alpha -1)^k\, m_1m_2\cdots m_k}
\\ \nonumber  &=\,\frac{\alpha t_1}{(\alpha -1)^k}\,\Big(1-\frac{m_0}{m_1}\Big)\Big(\alpha-\frac{m_1}{m_2}\Big)\cdots \Big(\alpha-\frac{m_{k-2}}{m_{k-1}}\Big) \Big(1-\frac{m_{k-1}}{m_{k}}\Big)\,
\end{align}
for $k \in\mathbb N$.
Let us define 
 the sequence $\{m_k\}$ in such a way that
\begin{equation}\label{mkdef}
\beta\, m_k\,=\, \alpha\,m_k\,-\,m_{k-1}\, 
\end{equation}
for $k \in \mathbb N$, with $\beta \in (\alpha -1, \alpha)$ to be fixed later. Hence,
\begin{equation}\label{mk}
m_k\,= \,\frac{m_{0}}{(\alpha-\beta)^k}
\end{equation}
and 
\begin{equation}\label{mkbis}
m_k\,-\,m_{k-1}\,=\, (\beta-\alpha +1) \frac{m_0}{(\alpha-\beta)^k}\,
\end{equation}
for $k \in\mathbb N$.
By \eqref{2},
\begin{align}\label{1}
t_{k+1} 
= \frac{\alpha t_1 (m_1-m_0)\beta^{k-1}}{m_1(\alpha -1)^k}\,
\end{align}
for $k \in \mathbb N$, whence \eqref{tkinf} holds.  Furthermore, by \eqref{2'},
\begin{align}\label{1'}
t_{k+1} -t_k =  \frac{\alpha t_1 (m_1-m_0)(\beta -\alpha +1)\beta^{k-2}}{m_1(\alpha -1)^k}\,
\end{align}
for $k \in \mathbb N$.
\\
Assume first that $n=2$. We claim that choosing $\alpha \in (1, \min\{q, 2\})$ and $\beta =1$ in \eqref{mkdef} yields a function $A$ fulfilling condition \eqref{ours}, which reads
\begin{equation}\label{nov1}
\int^{\infty}_{t_1}\frac{A(t)}{t^3}\,dt = \infty\,
\end{equation}
for $n=2$.
Indeed, owing to property \eqref{gen9}, equation \eqref{nov1} is equivalent to 
\begin{equation}\label{nov1bis}
\int_{t_1}^{\infty}\frac{a(t)}{t^2}\,dt = \infty\,.
\end{equation}
On the other hand, by \eqref{mk}, \eqref{1} and \eqref{1'}, with $\beta =1$,
\begin{align}\label{3}
\int^{\infty}_{t_1}\frac{a(t)}{t^2}\,dt =
 \sum^{\infty}_{k=1}\int_{t_k}^{t_{k+1}}\frac{m_k}{t^2}\,dt =
\frac{m_0m_1}{t_1(m_1-m_0)}\frac{2-\alpha}{\alpha-1}\sum^{\infty}_{k=1}1 = \infty\,.
\end{align}
whence \eqref{nov1bis} follows.
\\ Assume next that $n \geq 3$. Let us preliminarily observe that any function $A$ defined by \eqref{Function}, with $m_k$ obeying \eqref{mk}, satisfies the $\Delta_2$-condition. Owing to the equivalence of equations \eqref{delta2} and \eqref{delta2'}, in order to verity this assertion it suffices to show that  there exists a constant $c$ such that
\begin{equation}\label{exdelta1}
a(2t)\le c\, a(t) \qquad \hbox{for $t \geq0$.}
\end{equation}
Given  $t>0$, let $k\in \mathop{\rm I\kern -,057cm N}$  be the index satisfying 
$t\,\in\,[t_k,\, t_{k+1})$,
whence $2t\,\in\,[2t_k,\, 2t_{k+1})$. If we prove that there exists a constant $c$ such that
\begin{equation}\label{exdelta5}
a(2t_{k+1})\le c\, a(t_k)\,
\end{equation}
for  $k\in\mathop{\rm I\kern -,057cm N}$, 
then inequality \eqref{exdelta1} will follow, inasmuch as
\begin{equation*}
a(2t)\le a(2t_{k+1})\le c\, a(t_k)\le c\, a(t)\, \qquad \hbox{for $t>0$.}
\end{equation*}
Given $k \in \mathbb N$, denote by  $j=j(k)\in \mathop{\rm I\kern -,057cm N}$  the index fulfilling
\begin{equation}\label{exdelta2}
2t_{k+1}\,\in\,[t_{j},\, t_{j+1})\,.
\end{equation}
Thanks to equation \eqref{1}, condition \eqref{exdelta2} is equivalent  to the inequalities
\begin{equation}\label{nov3}
\frac{\alpha t_1 (m_1-m_0)}{m_1(\alpha-1)}\left(\frac{\beta}{\alpha-1}\right)^{j-2}\le 
\frac{2\alpha t_1 (m_1-m_0)}{m_1(\alpha-1)}\left(\frac{\beta}{\alpha-1}\right)^{k-1}< \frac{\alpha t_1 (m_1-m_0)}{m_1(\alpha-1)}\left(\frac{\beta}{\alpha-1}\right)^{j-1}\,.
\end{equation}
On setting $b\,=\,\frac{\beta}{\alpha-1}$, equation \eqref{nov3} is in turn equivalent to
$$ j-2\,\le\,\log_b2+k-1\,\le\,j-1\,,$$
whence
$$ j\,\le\,1+\log_b2+k\,\le\,j+1\,\le\, [\gamma]+k+2$$
where $\gamma =1+\log_b2$. Therefore
\begin{align}
a(2t_{k+1})\le \,a(t_{j+1})& \le \, a(t_{[\gamma]+k+2})\,=\,m_{[\gamma]+k+2}  \\ \nonumber  &=\,
\frac{m_0}{(\alpha -\beta)^{[\gamma]+k+2}}  =\,\frac{m_k}{(\alpha -\beta)^{[\gamma]+2}}\,=\, \frac{1}{(\alpha -\beta)^{[\gamma]+2}}a(t_k)
\end{align}
We conclude that inequality \eqref{exdelta5}, and hence \eqref{exdelta1}, holds with $c\,=\,\frac{1}{(\alpha -\beta)^{[\gamma]+2}}$.
\\ Since $A$ satisfies the $\Delta _2$-condition, by \cite[Lemma 3.3]{CarozzaCianchi} condition \eqref{ours} is equivalent to \eqref{condelta2}. By property \eqref{gen9},  the latter is in turn equivalent to 
\begin{equation}\label{ex2}
 \int ^{\infty}\frac{1}{a(t)^\frac{2}{n-2}}\bigg(\int_t^{\infty}\frac{1}{a(s)^{\frac{1}{n-2}}}\,ds\bigg)^{-n}\,dt =\, \infty\,.
\end{equation}
We shall show that \eqref{ex2} holds provided that $\beta$ is chosen in such a way that $\alpha - \beta$ is sufficiently small. Indeed, if $k \in \mathbb N$ and $t \in [t_k, t_{k+1}]$, then, by \eqref{mk} and \eqref{1'}, 
\begin{align}\label{nov4}
\int_t^{\infty}\frac{1}{a(s)^{\frac{1}{n-2}}}\,ds\,& \le\, \int_{t_k}^{\infty}\frac{1}{a(s)^{
\frac{1}{n-2}}}\,ds\,= \sum _{h=k}^\infty \int_{t_h}^{t_{h+1}}\frac{1}{a(s)^{
\frac{1}{n-2}}}\,ds
\\ \nonumber & =
\,\sum_{h=k}^{\infty}\frac{t_{h+1}-t_h}{m_h^{\frac{1}{n-2}}}\,=\,C\sum_{h=k}^{\infty}\bigg[\frac{\beta(\alpha-\beta)^{\frac{1}{n-2}}}{\alpha-1}\bigg]^{h}
\,=\,C'\bigg[\frac{\beta(\alpha-\beta)^{\frac{1}{n-2}}}{\alpha-1}\bigg]^{k}
\end{align}
for suitable constants $C$ and $C'$, provided that $\alpha - \beta$ is sufficiently small.
From inequality \eqref{nov4} and equations \eqref{mk} and \eqref{1'} one then infers that
\begin{align}\label{nov5}
\int_{t_1} ^{\infty} &\frac{1}{a(t)^\frac{2}{n-2}}\bigg(\int_t^{\infty}\frac{1}{a(s)^{\frac{1}{n-2}}}\,ds\bigg)^{-n}\,dt \,= \sum_{k=1}^{\infty}
\int_{t_k} ^{t_{k+1}}\frac{1}{a(t)^\frac{2}{n-2}}\,dt\bigg(\int_t^{\infty}\frac{1}{a(s)^{\frac{1}{n-2}}}\,ds\bigg)^{-n} dt \\ \nonumber
& \ge  C\sum_{k=1}^{\infty}\frac{t_{k+1}-t_k}{m_k^{\frac{2}{n-2}}} 
\bigg[\frac{\beta(\alpha-\beta)^{\frac{1}{n-2}}}{\alpha-1}\bigg]^{-nk}
 = C'\sum_{k=1}^\infty \bigg[\bigg(\frac{ \alpha -1}{\beta}\bigg)^{n-1}\frac 1{\alpha-\beta}\bigg]^{k}
\end{align}
for suitable positive constants $C$ and $C'$. Since the last series diverges if $\alpha - \beta$ is small enough, equation \eqref{ex2} follows. \qed
\iffalse




and 
\begin{equation}\label{luglio1}
\frac{ \beta^{n-1}}{(\alpha-1)^{n-1}}(\alpha-\beta)\leq 1
\end{equation}  
holds when $\beta$ is close enough to $\alpha$.














\color{red}  DIMOSTRAZIONE MODIFICATA FINO A QUI

\color{black}




\newpage



\color{black}
We will give explicit examples for $n=2$ and $n=3$.




\vskip1cm
Case $n\ge 3$.

\medskip
We  give now an example of  Young function $A(t)$   satisfying the condition  
\begin{equation}\label{ex2} \int^{\infty}\Big(\frac{t}{A(t)}\Big)^{\frac{2}{n-2}}\,dt\bigg(\int_t^{\infty}\Big(\frac{s}{A(s)}\Big)^{\frac{1}{n-2}}\,ds\bigg)^{-n}\,=\, +\infty\;,\end{equation}
equivalent to \eqref{ours} when $A(t)$ has $\Delta_2$-property,
but not fulfilling 

$$A(t^{\frac{2n+1}{2n^2}}) \qquad\qquad \rm{ convex},$$
as  requested in previous results by other authors (see [IM]).
Reasoning as in  the case $n=2$, we have that $\alpha <\frac{2n^2}{2n+1}$  
and  let $A(t)$ be a  piecewise affine function where $m_k$ indicates the slope coefficient on $[t_k,\, t_{k+1}]$. Since $A(t)$ is convex, $\{m_k\}$ is an increasing sequence and we choose $m_k$ such that 

$$\beta\, m_k\,=\, \alpha\,m_k\,-\,m_{k-1}$$
and so
$$m_k\,=\, \frac{m_{k-1}}{\alpha-\beta}\,=\,\frac{m_{0}}{(\alpha-\beta)^k}$$
$$m_k\,-\,m_{k-1}\,=\, m_0\frac{1-\alpha+\beta}{(\alpha-\beta)^k}$$
with $\alpha -1<\beta<\alpha$.


\medskip
We get
\begin{eqnarray}\label{1}
t_{k+1}\,&=&\, \frac{\alpha t_1(m_1-m_0)(\alpha m_2-m_1)\cdots (\alpha m_k-m_{k-1})}{(\alpha -1)^k\, m_1m_2\cdots m_k}\cr\cr &=&\,\frac{\alpha t_1 (m_1-m_0)\beta^{k-1}}{(\alpha -1)^k}\,
\end{eqnarray}
that diverges when $k$ goes to $\infty$.

On the other hand, in order to prove that \eqref{ex2} holds, by the equivalence between $A(t)$ and $t\, a(t)$, we will first prove that 
$$\sum _k \frac{t_{k}\,-\, t_{k-1}}{m_{k-1}^{\frac{1}{n-2}}}$$ is finite.
\noindent To this aim, we consider 

\begin{eqnarray}
& \sum_k & \frac{ \alpha t_1(m_1-m_0)(m_{k}-m_{k-1})(\alpha m_2-m_1)\cdots (\alpha m_{k-1}-m_{k-2})}{m_{k-1}^{\frac{1}{n-2}}(\alpha -1)^k\, m_1m_2\cdots m_k}\,=
\cr\cr&\sum_k& \frac{ \alpha t_1(m_1-m_0)(1-\alpha+\beta)\,\beta^k\,(\alpha-\beta)^\frac{k}{n-2}}{m_1\,m_0^{\frac{1}{n-2}}\,\beta^2(\alpha-\beta)^{\frac{1}{n-2}}\, (\alpha-1)^k}\,.
\end{eqnarray}
It converges if $\beta $ is such that $\frac{\beta\,(\alpha-\beta)^{\frac{1}{n-2}}}{\alpha\,-\,1}<1$ and then if $\beta$ is large enough.

Furthermore
$$
\int_t^{\infty}\frac{1}{a(s)^{\frac{1}{n-2}}}\,ds\,\le\, \int_{t_k}^{\infty}\frac{1}{a(s)^{
\frac{1}{n-2}}}\,ds\,=\,\sum_{h=k}^{\infty}\frac{t_{h+1}-t_h}{m_h^{\frac{1}{n-2}}}\,=\,C\sum_{h=k}^{\infty}\bigg[\frac{\beta(\alpha-\beta)^{\frac{1}{n-2}}}{\alpha-1}\bigg]^{h}
\,=\,\tilde C\bigg[\frac{\beta(\alpha-\beta)^{\frac{1}{n-2}}}{\alpha-1}\bigg]^{k}
$$

and

\begin{eqnarray}
\int_1 ^{\infty}\frac{1}{a(t)^\frac{2}{n-2}}\,dt\bigg(\int_t^{\infty}\frac{1}{a(s)^{\frac{1}{n-2}}}\,ds\bigg)^{-n}\,&\geq & \sum_{k=1}^{\infty}
\int_{t_k} ^{t_{k+1}}\frac{1}{a(t)^\frac{2}{n-2}}\,dt\bigg(\int_t^{\infty}\frac{1}{a(s)^{\frac{1}{n-2}}}\,ds\bigg)^{-n} dt\cr\cr
&\ge & C\sum_{k=1}^{\infty}\frac{t_{k+1}-t_k}{m_k^{\frac{2}{n-2}}} 
\bigg[\frac{\beta(\alpha-\beta)^{\frac{1}{n-2}}}{\alpha-1}\bigg]^{-nk}
\cr\cr &=& C\sum_k \bigg[\frac{ \beta^{n-1}}{(\alpha-1)^{n-1}}(\alpha-\beta)\bigg]^{-k}
\end{eqnarray}
and 
\begin{equation}\label{luglio1}
\frac{ \beta^{n-1}}{(\alpha-1)^{n-1}}(\alpha-\beta)\leq 1
\end{equation}  
holds when $\beta$ is close enough to $\alpha$.


\fi


\iffalse
\bigskip
\textcolor[rgb]{0.98,0.00,0.00}{DA QUI IN POI E' ROBA VECCHIA, DA
RIVEDERE}

\bigskip

 One has that
$$F(t) = t^{ \frac {n-1}{n-2}} \int _t ^\infty \frac{\widetilde A
(r)}{r^{1 + \frac {n-1}{n-2}}} \, dr \geq t^{ \frac
{n-1}{n-2}}\widetilde A (t) \int _t ^\infty \frac{1}{r^{1 + \frac
{n-1}{n-2}}} \, dr = \frac {n-2}{n-1}\widetilde A (t).$$ Thus,
\eqref{orlicz2} is stronger, in general, than
    \begin{equation}\label{orlicz11}
    \int ^\infty \bigg(\frac t{\widetilde A (t)} \bigg)^{n-1} \, dt =\infty
    \end{equation}
    and the latter can be shown to be equivalent to
 \begin{equation}\label{orlicz12}
  \int ^\infty \frac{A(t)}{t^{1+n}}\, dt = \infty
  \end{equation}
 (see e.g. \cite{???}), namely Iwaniecz condition. However, unlike Iwaniecz result, Theorem \ref{orlicz} does not require the additional assumption that
  \begin{equation}\label{iwaniecz1} \hbox{$\frac{A(t)}{t^q}$ is increasing for some $q
  >n-1$.}\end{equation}
    It turns out that, in fact, condition \eqref{orlicz12} is
  sufficient for the continuity of weakly monotone function under  a slightly weaker
  assumption than \eqref{iwaniecz1} -- see Corollary
  \ref{iwaniecz} below.





\bigskip
\par\noindent
Given a finite-valued Young function $A$, define the lower index
$i(A)$ of $A$ at infinity as
\begin{equation}\label{index}
i(A)= \lim _{\lambda \to \infty} \frac{\log \Big(\liminf _{t\to
\infty }\tfrac{A(\lambda t)}{A(t)}\Big)}{\log \lambda }.
\end{equation}
A function $f : [0, \infty ) \to [0, \infty)$ is said to be
quasi-increasing near infinity if there exist  positive constants
$c$ and $T$ such that
$$f(t) \leq c f(s) \qquad \hbox{if $T \leq t \leq s$.}$$

\bigskip

\begin{proposition}\label{equiv} Let $A: [0, \infty ) \to [0,
\infty)$ be a Young function, let $ p \in (1, \infty)$, and let
$F_p$ be the Young function defined as
$$F_p (t ) = t^{p'} \int _t^\infty \frac {\widetilde A(s)}{s^{1+
p'}}\, ds \quad \hbox{for $t \geq 0$.}$$ Assume that
\begin{equation}\label{equiv10}
i(A) >p.
\end{equation}
Then
\begin{equation}\label{equiv11}
F(t) \approx \widetilde A(t) \end{equation} in the sense of Young
functions.
\end{proposition}


\smallskip
\par\noindent
{\bf Proof}.  We claim that \eqref{equiv10}  implies that there
exist $a
> 1$ and  $t_0>0$ such that
\begin{equation}\label{equiv1}
 A(a t )  \geq 2 a ^{p}
A(t) \quad \hbox{if $t \geq t_0$.}
\end{equation}
Indeed, \eqref{equiv10} exists that there exist $\varepsilon
>0$ and $\lambda_\varepsilon >1$ such that
$$\liminf _{t\to
\infty }\frac{A(\lambda t)}{A(t)} > \lambda ^{p+\varepsilon} \quad
\hbox{if $\lambda \geq \lambda _\varepsilon$.}$$ Hence, for every
$\lambda \geq \lambda _\varepsilon$, there exists $t_\lambda
>0$ such that
$$ \frac{A(\lambda t)}{A(t)} > \lambda ^{p+\varepsilon}
\quad \hbox{if $t \geq t_\lambda $.}$$ Let $a  = \max\{ \lambda
_\varepsilon, 2^{\frac 1\varepsilon}\}.$ If $t \geq t_a$, then
$$ A(at ) > a ^{p+\varepsilon} A(t) \geq 2 a ^{p}
A(t),$$ whence \eqref{equiv1} follows.
\par\noindent
Condition \eqref{equiv1} is equivalent to the fact that there
exist $b
> 1$ and  $t_1>0$ such that
\begin{equation}\label{equiv2}
 \widetilde A(b t )  \leq  \tfrac {b ^{p'}}{2}
 \widetilde A(t) \quad \hbox{if $t \geq t_1$.}
\end{equation}
Such an equivalence  is observed in \cite{Strom}. By \cite[Lemma
2.3 (ii)]{Strom}, condition \eqref{equiv2} is in turn equivalent
to \eqref{equiv11}. \qed




\bigskip

\begin{corollary}\label{indexcond}
Let $A$ e a Young function, and let $u$ be a weakly monotone
function in $W_{loc}^{1,A}(\Omega )$. Assume that
$$i(A)> n-1$$
and that
 \begin{equation}\label{orlicz12}
  \int ^\infty \frac{A(t)}{t^{1+n}}\, dt = \infty .
  \end{equation}
Then $u$ is continuous in $\Omega $.
\end{corollary}
\par\noindent
{\bf Proof}. The conclusion follows from Theorem \ref{orlicz},
Proposition \ref{equiv} with $p=n-1$, and the equivalence of
\eqref{orlicz1} and \eqref{orlicz2}. \qed


\bigskip

\begin{corollary}\label{iwaniecz}
Let $A$ e a Young function, and let $u$ be a weakly monotone
function in $W_{loc}^{1,A}(\Omega )$. Assume that
\begin{equation}\label{orlicz13}
\hbox{$\frac{A(t)}{t^q}$ is increasing near infinity for some
$q
>n-1$,}
\end{equation} and
 \begin{equation}\label{orlicz12}
  \int ^\infty \frac{A(t)}{t^{1+n}}\, dt = \infty .
  \end{equation}
Then $u$ is continuous in $\Omega $.
\end{corollary}
\par\noindent
{\bf Proof}. By \eqref{orlicz13},
$$\frac{A(\lambda t)}{A(t)} \geq \frac{(\lambda t)^q}{t^q}  =
\lambda ^q$$ if $\lambda \geq 1$ and  $t$ is sufficiently large.
Hence, $i(A) \geq q
>n-1$. The conclusion thus
follows via Corollary \ref{indexcond}. \qed
\fi

\medskip
 \noindent {\bf Acknowledgments.} This research was
partly supported by the Research Project of Italian Ministry of
University and Research (MIUR)  2012TC7588 ``Elliptic and parabolic
partial differential equations: geometric aspects, related
inequalities, and applications" 2012,  and by  GNAMPA of Italian INdAM
(National Institute of High Mathematics).


