\usepackage{ifthen}

\theoremstyle{plain}
\newtheorem{theo}{Teorema}[section]
\newtheorem{proposition}[theo]{Proposição}
\newtheorem{corolary}[theo]{Corolário}
\newtheorem{lemma}[theo]{Lema}
\newtheorem*{affirmation}{Afirmação}
\newtheorem{case}{Caso}
\newtheorem*{notation}{Notação}
\newtheorem{definition}[theo]{Definição}

% Horrível: o estilo "definition" não é bom para definição e notação!
% Horrível: estilo "remark" é ruim para observações e exemplos!!
\theoremstyle{definition}
\newtheorem{example}[theo]{Exemplo}
\newtheorem{obs}[theo]{Observação}
%\newtheorem{problem}{Problema}

%% Quadradinho no final das demonstrações.
%\renewcommand{\qedsymbol}{$\blacksquare$}


%Divides de proof into cases. (TODO: not good yet.)
\providecommand{\subproof}[1]{{\vspace{5pt} \begin{affirmation}{#1}\end{affirmation}}}
\providecommand{\subcase}[1]{{\vspace{5pt} \begin{case}{#1}\end{case}}}

%Não sei se é o latex ou se sou eu, mas as "referências" não têm a cara certa!
\providecommand{\refeq}[1]{{(\ref{#1})}}
\providecommand{\refitem}[1]{{(\ref{#1})}}

%comment
\providecommand{\comment}[1]{} 


%% TODO: Trocar por \R \N \Z \T, etc. (como em 2/definitions_01.tex)
% Commonly used sets.
\providecommand{\naturals}[0]{\mathbb{N}}
\providecommand{\integers}[0]{\mathbb{Z}}
\providecommand{\rationals}[0]{\mathbb{Q}}
\providecommand{\reals}[0]{\mathbb{R}}
\providecommand{\nonnegativereals}[0]{\mathbb{R^+}}
\providecommand{\nonnegativenaturals}[0]{\mathbb{N^+}}
\providecommand{\complexes}[0]{\mathbb{C}}

\providecommand{\family}[1]{\mathcal{#1}}


% Special symbols.
\providecommand{\suchthat}[1]{\thickspace \lvert \thickspace #1}

% Brackets.
\providecommand{\abs}[1]{\lvert#1\rvert}
\providecommand{\norm}[1]{\lvert#1\rvert}


% Operator names.
\DeclareMathOperator{\Identity}{id}
\DeclareMathOperator{\interiorop}{int}
\DeclareMathOperator{\closureop}{cl}


% Functions
\newcommand{\function}[3]{#1: #2 \to #3}
\newcommand{\functionmaps}[3]{#1: #2 \mapsto #3}
\newcommand{\functionarray}[5]{\begin{array}[t]{llcl}
                                 #1:& #2 &\to     &#3 \\
                                    & #4 &\mapsto &#5
                               \end{array}}

% Operations
\newcommand{\closure}[1]{\closureop \left({#1}\right)}
\newcommand{\interior}[1]{\mathring{#1}}
%\newcommand{\interior}[1]{\interiorop \left({#1}\right)}
\newcommand{\complementset}[1]{{#1}^{c}}
\newcommand{\powerset}[1]{\mathcal{P}({#1})}

\newcommand{\ball}[2]{B_{#1}({#2})}

