\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{infteo}[2005/06/15 v0.01 ECI - Formatos inform'atica te'orica]
\RequirePackage{amssymb,amsmath,mathrsfs}

% Definicion del ambiente de prueba y sus comandos
\newenvironment{calc}
	{\begin{flushleft}}
	{\end{flushleft}}
\newcommand{\expr}[1]{\ensuremath{\quad#1}\\}
\newcommand{\expl}[2]{\ensuremath{#1\quad\langle\;}\textnormal{#2}\ensuremath{\;\rangle}\\}

% Definicion de ambientes para axiomas, teoremas, definiciones, ejemplos y demostraciones
\newtheoremstyle{infoteo}% name i
	{3pt}% Space above  
	{3pt}% Space below 
	{\sl}% Body font 
	{}%  in{appendix}
	{\bf}% Theorem head font t
	{}%   d
	{.5em}%  Space after theorem header
	{}% Theorem head spec (can be left empty, meaning ?normal?)  

\theoremstyle{infoteo}
\newtheorem{theorem}{}[chapter]
\newtheorem{thrm}[theorem]{Teorema}
\newtheorem{axiom}[theorem]{}
\newtheorem{definition}{Definici\'on}[chapter]
\newtheorem{lema}{Lema}[chapter]
\newtheorem{corollary}{Corolario}[chapter]
\newtheorem{example}{Ejemplo}[chapter]
\newtheorem{prop}{Proposici\ón}[chapter]

\newenvironment{cproof}[1]
	{\vspace{0.2cm} \normalfont{\sc Demostraci\'on} ({\em#1}) \begin{quote}}
	{
		\hspace*{\fill}\nolinebreak[1]%
		\quad\hspace*{\fill}%
		\finalhyphendemerits=99  %%
		%\ensuremath{\square}\end{quote}
		\normalfont{\sc Fin demostraci\'on}\end{quote}
	}

\newenvironment{kproof}[1]
	{\vspace{0.2cm} \normalfont{\sc Demostraci\'on} [\,{\em#1}\,] \begin{quote}}
	{
		\hspace*{\fill}\nolinebreak[1]%
		\quad\hspace*{\fill}%
		\finalhyphendemerits=99  %%
		%\ensuremath{\square}\end{quote}
		\normalfont{\sc Fin demostraci\'on}\end{quote}
	}
	
\newenvironment{nproof}[1]
	{\smallskip \noindent \normalfont{\sc Demostraci\'on}}
	{\begin{flushright}\normalfont{\sc Fin demostraci\'on}\end{flushright}
	}

\newenvironment{mproof}[1]
	{\smallskip \noindent \normalfont{\sc Demostraci\'on} ({\em#1})} 
	{\begin{flushright}\normalfont{\sc Fin demostraci\'on}\end{flushright}
	}
% Definicion de construcciones para construcciones por comprension
\newcommand{\cuan}[4]{\ensuremath{(#1 #2 \,|\, #3 : #4)}}
\newcommand{\cuant}[3]{\ensuremath{(#1 #2 \,|\!\!: #3)}}
\newcommand{\vara}[2]{\ensuremath{#1 \! : \! #2}}
\newcommand{\setc}[3]{\ensuremath{\{\,#1 \, | \, #2 : \, #3\,\}}}
\newcommand{\setco}[2]{\ensuremath{\{\,#1 \, | \, #2 \,\}}}
\newcommand{\divi}[2]{\ensuremath{#1 \cdot \!|\, #2}}
\newcommand{\mdc}[2]{\ensuremath{#1 \! \Downarrow \! #2}}
\newcommand{\mmc}[2]{\ensuremath{#1 \! \Uparrow \! #2}}
\newcommand{\cop}[2]{\ensuremath{#1 \, \bot \, #2}}
\newcommand{\com}[2]{\ensuremath{#1 \! \circ \! #2}}


% Definicion de ambientes con bordes alrededor
\newenvironment{boxeddef}
{
	\vspace{0.3cm}
	\begin{tabular}{|l|}
		\hline %
		\parbox{4.3in}
}
{
	\\ %
	\hline
	\end{tabular}
	\vspace{0.3cm}
}

% Otras definiciones
\newcommand{\divs}{\ensuremath{\,\mathpzc{div}\,}}
\newcommand{\mods}{\ensuremath{\,\mathpzc{mod}\,}}
\newcommand{\nat}{\ensuremath{\mathbb{N}}}
\newcommand{\num}{\ensuremath{\mathbb{Z}}}
\newcommand{\real}{\ensuremath{\mathbb{R}}}
\newcommand{\comp}{\ensuremath{\mathbb{C}}}
\newcommand{\rat}{\ensuremath{\mathbb{Q}}}
\newcommand{\bool}{\ensuremath{\mathbb{B}}}
\newcommand{\primes}{\ensuremath{\mathbb{P}}}
\newcommand{\univ}{\ensuremath{\mathscr{V}}}
\newcommand{\pots}[1]{\ensuremath{\mathscr{P}(#1)}}
\newcommand{\iter}{\ensuremath{\mathbf{do}\; B \rightarrow S \;\mathbf{od}}}
