\documentclass[10pt,envcountsect]{beamer}

\mode<presentation> {
  \usetheme{Warsaw}
}

\usepackage{ambeamer}




\begin{document}

\title{Sets, Membership \& Inclusion}
%\subtitle{Chapter 01 -- Logic}
\author{European section, Season 01}
\date{}

\begin{frame}
  \titlepage
\end{frame}


\begin{frame}{Set}
A \textbf{set} is a collection of distinct objects.\\
The \textbf{elements} or \textbf{members} of a set can be anything: numbers, people, letters of the alphabet, and so on.\\
Sets are conventionally denoted with capital letters.\\
\end{frame}



\begin{frame}{Describing sets}
There are two ways of describing a set.\pause
\begin{itemize}
\item One way is by definition, using a description :
      \begin{itemize}
      \item $A$ is the set whose elements are the first four positive integers.
      \item $B$ is the set of colors of the French flag.
      \end{itemize}\pause
\item The second way is by listing each member of the set. An extensional definition is denoted by enclosing the list of members in brackets:
    \begin{itemize}
    \item $A$ = \{4, 2, 1, 3\}
    \item $B$ = \{blue, white, red\}
    \end{itemize}
\end{itemize}
\end{frame}


\begin{frame}{Membership}
If $a$ is a member of $B$, this is denoted $a \in B$, while if $c$ is not a member of $B$ then $c \notin B$.\\[10pt] \pause
For example, if $A$ = \{4, 2, 1, 3\}, then $2\in A$ but $5\notin A$.\pause

\begin{center}
\psset{xunit=0.7cm,yunit=0.7cm,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-0.51,-0.58)(9.85,5.51)
%\psaxes[labelFontSize=\scriptstyle,xAxis=true,yAxis=true,Dx=1,Dy=1,ticksize=-2pt 0,subticks=2](0,0)(-0.51,-0.58)(9.85,5.51)
%\psgrid(-0.51,-0.58)(9.85,5.51)
\rput{-6.61}(4.47,2.34){\psellipse(0,0)(4.39,2.22)}
%\rput{-5.42}(3.45,2.42){\psellipse[fillstyle=hlines](0,0)(1.64,1.06)}
\psdots[dotstyle=x,dotsize=7pt](4,2)(5,3)(6,1)(8,4)(3,3)(2,2)(7,3)
\rput[bl](4,2){$a$}\rput[bl](5,3){$b$}\rput[bl](6,1){$c$}\rput[bl](8,4){$d$}\rput[bl](3,3){$e$}\rput[bl](2,2){$f$}\rput[bl](7,3){$g$}
\rput[b](1,4){$A$}
\end{pspicture*}
\end{center}
According to the Venn diagram, $d\notin A$ whereas $a\in A$
\end{frame}




\begin{frame}{Inclusion or Containment}
If every member of set $A$ is also a member of set $B$, then $A$ is said to be a \textbf{subset} of $B$, written $A\subset B$ (also pronounced $A$ is contained in  $B$). \pause
\begin{center}
\psset{xunit=0.7cm,yunit=0.7cm,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-0.51,-0.58)(9.85,5.51)
\rput{-6.61}(4.47,2.34){\psellipse(0,0)(4.39,2.22)}
\rput{-5.42}(3.45,2.42){\psellipse[fillstyle=hlines](0,0)(1.64,1.06)}
\rput[b](1,4){$B$}
\rput(3,3){$A$}
\end{pspicture*}
\end{center}
\pause
$A$ is a \textbf{subset} of $B$ ; $B$ is a \textbf{superset} of $A$.\\
$A$ is \textbf{contained in}  $B$ ; $B$ \textbf{includes} $A$ or $B$ \textbf{contains} $A$.\\
Sets $A$ and $B$ are equal if and only if they have precisely the same elements.\\
\end{frame}


\begin{frame}{Special sets}
\begin{itemize}\pause
 \item $\N$, \pause denoting the set of all natural numbers : \pause $\N = \{1, 2, 3, \dots \}$.\pause
 \item $\Z$, \pause denoting the set of all integers (whether positive, negative or zero): \pause $\Z = \{\dots , -2, -1, 0, 1, 2, \dots\}$.\pause
 \item $\Q$, \pause denoting the set of all rational numbers (that is, the set of all fractions): \pause $\Q = \{\frac{a}{b} : a, b \in  \Z, b \neq 0\}$.\pause
 \item $\R$, denoting the set of all real numbers. This set includes all rational numbers, together with all irrational numbers (that is, numbers which cannot be rewritten as fractions, such as $\pi$, $\sqrt{2}$, and so on).
\end{itemize}
\end{frame}




\begin{frame}{Basic operations : Union}
Two sets can be "added" together. The union of $A$ and $B$, denoted by $A\cup B$, is the set of all things which are members of either $A$ or $B$.\\
Examples:
\begin{itemize}
\item \{1, 2\} $\cup$ \{red, white\} =\pause\{1, 2, red, white\}.\pause
\item \{1, 2, green\} $\cup$ \{red, white, green\} =\pause\{1, 2, red, white, green\}.\pause
\item \{1, 2\} $\cup$ \{1, 2\} = \pause\{1, 2\}.\pause
\end{itemize}
Venn's representation :
\begin{center}
\psset{xunit=0.5cm,yunit=0.5cm,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-0.51,-0.71)(9.74,5.32)
\rput{-6.61}(4.47,2.34){\psellipse(0,0)(4.39,2.22)}
\rput{-5.42}(3.45,2.42){\psellipse(0,0)(1.64,1.06)}
\rput{-2.62}(5.64,2.04){\psellipse(0,0)(1.68,1.03)}\pause
\rput{-5.42}(3.45,2.42){\psellipse[fillstyle=hlines](0,0)(1.64,1.06)}
\rput{-2.62}(5.64,2.04){\psellipse[fillstyle=vlines](0,0)(1.68,1.03)}
\end{pspicture*}
\end{center}
\end{frame}




\begin{frame}{Basic operations : Intersection}
The intersection of $A$ and $B$, denoted by $A\cap B$, is the set of all things which are members of both $A$ and $B$.\\\pause
Examples:
\begin{itemize}
\item \{1, 2\} $\cap$ \{red, white\} =\pause$\emptyset$.\pause
\item \{1, 2, green\} $\cap$ \{red, white, green\} =\pause\{green\}.\pause
\item \{1, 2\} $\cap$ \{1, 2\} =\pause \{1, 2\}.\pause
\end{itemize}
Venn's representation :
\begin{center}
\psset{xunit=0.5cm,yunit=0.5cm,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-0.51,-0.71)(9.74,5.32)
\rput{-6.61}(4.47,2.34){\psellipse(0,0)(4.39,2.22)}
\rput{-5.42}(3.45,2.42){\psellipse(0,0)(1.64,1.06)}
\rput{-2.62}(5.64,2.04){\psellipse(0,0)(1.68,1.03)}\pause
\pspolygon[fillstyle=hlines](4.8,2.95)(4.68,2.9)(4.51,2.83)(4.33,2.71)(4.22,2.62)(4.12,2.51)(4.05,2.39)(3.99,2.26)(3.97,2.09)(4,1.86)(4.04,1.77)(4.11,1.66)(4.18,1.58)(4.23,1.52)(4.29,1.47)(4.39,1.5)(4.54,1.57)(4.63,1.62)(4.74,1.7)(4.82,1.77)(4.91,1.86)(5,2)(5.05,2.1)(5.07,2.21)(5.09,2.34)(5.07,2.46)(5.02,2.63)(4.97,2.73)(4.92,2.8)(4.85,2.89)
\end{pspicture*}
\end{center}
\end{frame}




\begin{frame}{Basic operations : complement}
The complement of $A$ is the set of all elements in the universe but not in $A$. We denote it $\bar{A}$.\pause
    \begin{center}
    \psset{unit=1cm}
    \pspicture(0,0)(6,4)
    \pspolygon[linewidth=1.5pt,fillstyle=solid,fillcolor=white](0,0)(6,0)(6,4)(0,4)
    \uput[dr](6,4){$\Omega$}
    \pscircle[linewidth=1.5pt,fillstyle=solid,fillcolor=white](4,2){1.5}
    \uput[u](4,2.5){$A$}\pause \uput[u](1.5,2.5){$\bar{A}$}
    %\pscircle[linewidth=1.5pt,linecolor=gray](2,2){1.5}
    %\pspolygon[linewidth=1.5pt,linecolor=gray](0,0)(6,0)(6,4)(0,4)
    %\uput[ul](1,3){\Large\bf $A$}
    \endpspicture
    \end{center}\end{frame}


\end{document}
