\documentclass[11pt]{article}
\usepackage{a4wide,czech}

\usepackage[czech]{babel}
\usepackage[latin2]{inputenc}

\usepackage{array}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}

\newcommand{\ukolik}[4]{\noindent Domácí úkol #1 \hfill #2\\
	Série:#3	\hfill Cvičení: #4}
\newcommand{\ukol}[1]{\ukolik{#1}{\jmeno}{\serie}{\cviceni}}


\newtheorem{veta}{Věta}
\newtheorem{pozorovani}[veta]{Pozorování}
\newtheorem{lemma}[veta]{Lemma}
\theoremstyle{definition}
\newtheorem{definice}[veta]{Definice}
\newtheorem{priklad}{Příklad}

\renewcommand{\labelenumi}{(\roman{enumi})}

\newcommand{\NN}{{\mathbb{N}}}
\newcommand{\ZZ}{{\mathbb{Z}}}
\newcommand{\RR}{{\mathbb{R}}}
\newcommand{\bfb}{{\bf{b}}}
\newcommand{\bfc}{{\bf{c}}}
\newcommand{\bfx}{{\bf{x}}}
\newcommand{\bfy}{{\bf{y}}}
\newcommand{\bfz}{{\bf{z}}}

%\DeclareMathOperator{\af}{Aff}
%\DeclareMathOperator{\conv}{conv}
%\DeclareMathOperator{\lh}{span}
%\DeclareMathOperator{\rank}{rank}

\newcommand{\set}[1]{\ensuremath{\left\{#1 \right\}}}
\newcommand{\setcond}[2]{\set{#1 \: \left| \: #2 \right.}}

\newenvironment{matice}[1]{
\left(\begin{array}{*{#1}{c}}
}{
\end{array}\right)
}

\newenvironment{bmatice}[2][1]{
\left(\begin{array}{*{#2}{c}|*{#1}{c}}
}{
\end{array}\right)
}

\newenvironment{LP}[3][1]{
\begin{array}{r@{\quad}l} 
\textrm{#2} & \: \displaystyle #3
\\[5pt]
\textrm{za podmínek}&
\begin{array}[t]{*{#1}{>{\displaystyle}rc}r@{\quad}l} 
}{
\end{array}
\end{array}
}

\newenvironment{LPpro}[4][1]{
\begin{array}{r@{\quad}l} 
\textrm{#2} & \: \displaystyle #3
\\[5pt]
\textrm{pro} & \: \displaystyle #4
\\[5pt]
\textrm{za podmínek}&
\begin{array}[t]{*{#1}{>{\displaystyle}rc}r@{\qquad}l}
}{
\end{array}
\end{array}
}

\newenvironment{LPmax}[2][1]{\begin{LP}[#1]{maximalizuj}{#2}}{\end{LP}}
\newenvironment{LPmin}[2][1]{\begin{LP}[#1]{minimalizuj}{#2}}{\end{LP}}

\newenvironment{LPmaxpro}[3][1]{\begin{LPpro}[#1]{maximalizuj}{#2}{#3}}{\end{LPpro}}
\newenvironment{LPminpro}[3][1]{\begin{LPpro}[#1]{minimalizuj}{#2}{#3}}{\end{LPpro}}

% pouziti:
% \begin{LPmax}{ucelovafce}
% podminky psane jako
% leva str. & operator & prava str. [& podminka]
% \end{LPmax}
%
% \begin{LPmaxpro}{ucelovafce}{podminka na promenne}
% podminky psane jako
% leva str. & operator & prava str. [& podminka]
% \end{LPmaxpro}
%
% varianta se sloupci: 
% \begin{LPmax}[i]{ucelovafce}
% podminky psane jako
% i-krat (leva str. & operator) & prava str. [& podminka]
% napr. pro i=3
% x_1 &+& x_2&+& x_3 &=& b
% \end{LPmax}
%
