# Closure of the interior of the closure of the interior

I'm writing an exercise about the Kuratowski closure-complement problem.

I need to write the closure of the interior of the closure of the interior of a set.

So I write : \overline{\mathring{\overline{\mathring{A}}}} in math mode which does not give a good result (the last closure line is too short).

Can you help me?

• You don't like how \bar{\mathring{\bar{\mathring{A}}}} looks? In any case, define symbolic names! Your code should, at least, look like \closure{\interior{\closure{\interior{A}}}}. – Manuel Sep 12 '16 at 9:46
• For this example, it would be ok. But if you replace A by a longer set (like B(x_0, R_1)), the closure with \bar is really small. – user37238 Sep 12 '16 at 9:53
• VERY unexpected behaviour! – Przemysław Scherwentke Sep 12 '16 at 10:10
• @user37238 You could change your name to something more telling. You can program those commands to act differently depending on what's in their argument. – Manuel Sep 12 '16 at 10:13
• Is it the upper \overline that is too short or the lower that is too long? Compare $\overline{\mathring{A}}\ \mathring{\overline{\mathring{A}}}$ – StefanH Sep 12 '16 at 13:05

Add a little bit of space before doing the last overline:

$\overline{\,\mathring{\overline{\mathring{A}}}\,}$

gives

Basically, define \closure and \interior (or shorter names if you want) and use those symbolic definitions, this way, you can program things into the macros.

\documentclass{scrartcl}
\usepackage{mathtools,amssymb}
\usepackage{xparse}

\NewDocumentCommand\closure{sm}
{\IfBooleanTF{#1}{\overline{#2}}{\bar{#2}}}
\NewDocumentCommand\interior{sm}
{\IfBooleanTF{#1}{?}{\mathring{#2}}{}}

\begin{document}
$\closure{\interior{\closure{\interior{A}}}}$ and $\closure*{B(x_0,R_1)}$
\end{document}

I leave an ? in a situation in which I don't know what you want (some people write it like (...)^\circ and other put an overparentheses (\overparen may be, or may be a self defined macro) and then a \mathring over the parenthesis, etc.).

On a side note, may be, depending on your documment, you might want to define something like open-ball \oB and closed-ball \cB and use like \cB(x_0,R_1) in which case it's easy to change the definition of those commands whenever you want, and you are not stuck with the raw code.

By inserting something to the right in the last \overline it is stretch to the end. I tried some different combinations and with

\overline{\mathring{\overline{\mathring{A}}}\phantom{.}}

I get

It is still just a fix and not an answer to why it behaves like it does from the beginning.