%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%% file:      v5.tex                                                        %%%
%%% author:    Ján Komara                                                    %%%
%%% email:     komara@fmph.uniba.sk                                          %%%
%%% copyright: public domain                                                 %%%
%%% version:   2020/11/01                                                    %%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[12pt,a4paper]{article}

\usepackage[slovak]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{lmodern}
\usepackage{indentfirst}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Vzorový príklad pre 5. domácu úlohu}

\author{Ján Komara}

%\date{}
\date{\today}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section*{1. príklad}

Nájdite obor pravdivosti výrokovej formy
\begin{align}
x^2-x-1 \geq 0
\label{vf}
\end{align}
definovanej nad oborom reálnych čísel. 
Dokážte, že vaše riešenie je správne.

\emph{Návod.}
V dôkaze využite túto vlastnosť súčinu dvoch reálnych čísel:
\begin{gather}
\forall x \forall y 
(xy \geq 0 \leftrightarrow x \geq 0 \land y \geq 0 \lor x \leq 0 \land y \leq 0)
.
\label{mul:ge}
\end{gather}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection*{Riešenie 1. príkladu}

Najprv si všimnime, že platí
\begin{align*}
x^2-x-1 & = 
x^2-2\frac{x}{2}-1 =
x^2-2\frac{x}{2}+\frac{1}{4}-\frac{1}{4}-1 =
\\ & =
\left(x-\frac{1}{2}\right)^2-\frac{5}{4} =
\left(x-\frac{1}{2}\right)^2-\left(\frac{\sqrt{5}}{2}\right)^2
.
\end{align*}
Odtiaľ okamžite dostaneme, že platí
\begin{align}
x^2-x-1 = 
\left(x-\frac{1-\sqrt{5}}{2}\right)\left(x-\frac{1+\sqrt{5}}{2}\right)
.
\label{factors}
\end{align}

Nech $x$ je ľubovolné, ale pevne zvolené reálne číslo. Potom
\begin{align*}
&
x^2-x-1 \geq 0
 \stackrel{\eqref{factors}}{\Leftrightarrow}
%\displaybreak[0]
\\ &
 \left(x-\frac{1-\sqrt{5}}{2}\right)\left(x-\frac{1+\sqrt{5}}{2}\right) \geq 0
 \stackrel{\eqref{mul:ge}}{\Leftrightarrow}
\displaybreak[0]
\\ &
\begin{aligned}
&
\left(x-\frac{1-\sqrt{5}}{2}\right) \geq 0 \land 
 \left(x-\frac{1+\sqrt{5}}{2}\right) \geq 0 \lor {}
\\ & \qquad
\left(x-\frac{1-\sqrt{5}}{2}\right) \leq 0 \land 
 \left(x-\frac{1+\sqrt{5}}{2}\right) \leq 0 \Leftrightarrow
\end{aligned}
.
\displaybreak[0]
\\ &
x \geq \frac{1-\sqrt{5}}{2} \land x \geq \frac{1+\sqrt{5}}{2} \lor
x \leq \frac{1-\sqrt{5}}{2} \land x \leq \frac{1+\sqrt{5}}{2} \Leftrightarrow
%\displaybreak[0]
\\ &
x \geq \frac{1+\sqrt{5}}{2} \lor x \leq \frac{1-\sqrt{5}}{2}
.
\end{align*}
Dokázali sme, že, že platí
\begin{align}
\forall x 
\left(
x^2-x-1 \geq 0 \leftrightarrow 
x \geq \frac{1+\sqrt{5}}{2} \lor x \leq \frac{1-\sqrt{5}}{2}
\right)
.
\label{lema}
\end{align}
Obor pravdivosti výrokovej formy \eqref{vf} je preto rovný množine
\begin{align*}
\left\{ x \in R \biggm| x \geq \frac{1+\sqrt{5}}{2} \lor x \leq \frac{1-\sqrt{5}}{2} \right\}
.
\end{align*}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section*{2. príklad}

Predpokladajme, že nasledujúce tri tvrdenia
\begin{gather}
\forall x(A(x) \rightarrow B(x)) \rightarrow \exists x(A(x) \land B(x) \land \lnot C(x))
\label{a:ax1}
\\
\forall x(A(x) \rightarrow B(x)) \lor \forall x(A(x) \rightarrow C(x))
\label{a:ax2}
\\
\forall x(A(x) \land C(x) \rightarrow B(x))
\label{a:ax3}
\end{gather}
platia nad neprázdnym oborom $U$.
Dokážte, že platí
\begin{gather}
\exists x(A(x) \land B(x) \land \lnot C(x))
\label{a:thm}
.
\end{gather}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection*{Riešenie 2. príkladu}

Rozlišujeme dva prípady, podľa toho či 
tvrdenie $\forall x(A(x) \rightarrow B(x))$ platí alebo nie.

\begin{itemize}
\item
Ak $\forall x(A(x) \rightarrow B(x))$ neplatí, 
tak existuje prvok $p$, 
ktorý má vlastnosť $A$, ale nemá vlastnosť $B$.
Navyše, z predpokladu \eqref{a:ax2} dostaneme, 
že platí $\forall x(A(x) \rightarrow C(x))$.
Prvok $p$ má tak tiež vlastnosť $C$.
Z predpokladu \eqref{a:ax3} dostaneme, 
že prvok $p$ musí mať vlastnosť $B$. 
Ale to je v spore s tým, že neplatí $B(p)$.
Prípad, že $\forall x(A(x) \rightarrow B(x))$ neplatí, tak nemôže nastať.
\item
Musí preto nastať prípad, že $\forall x(A(x) \rightarrow B(x))$ platí.
Potom tvrdenie \eqref{a:thm} plynie priamo z predpokladu \eqref{a:ax1}.
\end{itemize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section*{3. príklad}

Dokážte, že pre každé prirodzené číslo $n$ platí
\begin{align*}
\sum_{i=0}^{n} i = \frac{n(n+1)}{2}
.
\end{align*}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection*{Riešenie 3. príkladu}

Tvrdenie dokážeme matematickou indukciou podľa $n$.

Báza indukcie. Pre $n=0$ tvrdenie platí, pretože
\begin{align*}
\sum_{i=0}^{0} i = 0 = \frac{0}{2} = \frac{0(0+1)}{2}
.
\end{align*}
Indukčný krok. Zvoľme si ľubovolné prirodzené číslo $n$. Predpokladajme, že
tvrdenie platí pre $n$:
\begin{align*}
\sum_{i=0}^{n} i = \frac{n(n+1)}{2}
.
\tag*{IP}
\end{align*}
To je indukčný predpoklad. Dokážeme, že platí aj pre $n+1$:
\begin{align*}
\sum_{i=0}^{n+1} i = \frac{(n+1)(n+1+1)}{2}
.
\end{align*}
Postupnými úpravami dostaneme
\begin{align*}
\sum_{i=0}^{n+1} i & =
\sum_{i=0}^n i + n+1 \stackrel{\text{IP}}{=}
\frac{n(n+1)}{2} + n+1 =
\frac{n(n+1)+2(n+1)}{2} =
\\ & =
\frac{(n+1)(n+2)}{2} =
\frac{(n+1)(n+1+1)}{2}
.
\end{align*}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
