\begin{frame}
    \frametitle{Modèle}

    \begin{columns}
        \column{0.4\textwidth}

        \resizebox{\columnwidth}{!}{

            \begin{tikzpicture}[
                    roundnode/.style={circle, draw=black, fill=black, very thick, minimum size=1pt,},
                    arrow/.style={|->, thick,},
                ]

                \node[roundnode] (p0) {};
                \node[left] at (p0.west) {$p_0$};

                \node[roundnode] (p1) [below=of p0] {};
                \node[left] at (p1.west) {$p_1$};

                \node[roundnode] (p2) [right=of p1] {};
                \node[right] at (p2.east) {$p_2$};

                \node[roundnode] (p3) [right=of p0] {};
                \node[right] at (p3.east) {$p_3$};

                \draw (p0) -- (p1);
                \draw (p0) -- (p2);
                \draw (p0) -- (p3);
                \draw (p1) -- (p2);
                \draw (p1) -- (p3);
                \draw (p2) -- (p3);
            \end{tikzpicture}
        }

        \column{0.6\textwidth}

        \begin{block}{Prérequis}
            \begin{itemize}
                \item Tous les nœuds du système sont fortement connectés
                \item Le système n'est pas partitionnable
                \item Les nœuds sont asynchrones
                \item Les nœuds ne peuvent pas être défaillants
                \item Les nœuds ne peuvent pas être malicieux
            \end{itemize}
        \end{block}
    \end{columns}
\end{frame}

\begin{frame}
    \frametitle{Modèle}

    \begin{columns}

        \column{0.4\textwidth}

        \centering
        \resizebox{0.75\columnwidth}{!}{
            \begin{tikzpicture}[
                    roundnode/.style={circle, draw=black, fill=black, very thick, minimum size=1pt,},
                ]

                \node[roundnode] (p0) {};
                \node[left] at (p0.west) {$p_0$};
                \onslide<3> {
                    \node[above] at (p0.north) {$\textcolor{red}{w(1)}$};
                }
                \onslide<7> {
                    \node[above] at (p0.north) {$\textcolor{red}{r/(1,2)^w}$};
                }

                \node[roundnode] (p1) [below=of p0] {};
                \node[left] at (p1.west) {$p_1$};
                \onslide<2> {
                    \node[below] at (p1.south) {$\textcolor{red}{r/(0,0)}$};
                }
                \onslide<5> {
                    \node[below] at (p1.south) {$\textcolor{red}{w(2)}$};
                }
                \onslide<6> {
                    \node[below] at (p1.south) {$\textcolor{red}{r/(1,2)}$};
                }
                \onslide<7> {
                    \node[below] at (p1.south) {$\textcolor{red}{r/(1,2)^w}$};
                }

                \node[roundnode] (p2) [right=of p1] {};
                \node[right] at (p2.east) {$p_2$};
                \onslide<4> {
                    \node[below] at (p2.south) {$\textcolor{red}{r/(0,1)}$};
                }
                \onslide<6> {
                    \node[below] at (p2.south) {$\textcolor{red}{r/(1,2)}$};
                }
                \onslide<7> {
                    \node[below] at (p2.south) {$\textcolor{red}{r/(1,2)^w}$};
                }

                \node[roundnode] (p3) [right=of p0] {};
                \node[right] at (p3.east) {$p_3$};
                \onslide<4> {
                    \node[above] at (p3.north) {$\textcolor{red}{r/(0,1)}$};
                }
                \onslide<5> {
                    \node[above] at (p3.north) {$\textcolor{red}{w(1)}$};
                }
                \onslide<6> {
                    \node[above] at (p3.north) {$\textcolor{red}{r/(1,1)}$};
                }
                \onslide<7> {
                    \node[above] at (p3.north) {$\textcolor{red}{r/(1,2)^w}$};
                }

                \draw (p0) -- (p1);
                \draw (p0) -- (p2);
                \draw (p0) -- (p3);
                \draw (p1) -- (p2);
                \draw (p1) -- (p3);
                \draw (p2) -- (p3);
            \end{tikzpicture}
        }

        \column{\textheight}

        \begin{tabular}{l}
            $p_0 = \onslide<3->{w(1)} \onslide<7->{\bullet r/(1,2)^w}$                                                             \\
            $p_1 = \onslide<2->{r/(0,0)} \onslide<5->{\bullet w(2)} \onslide<6->{\bullet r/(1,2)} \onslide<7->{\bullet r/(1,2)^w}$ \\
            $p_2 = \onslide<4->{r/(0,1)} \onslide<6->{\bullet r/(1,2)} \onslide<7->{\bullet r/(1,2)^w}$                            \\
            $p_3 = \onslide<4->{r/(0,1)} \onslide<5->{\bullet w(1)} \onslide<6->{\bullet r/(1,1)} \onslide<7->{\bullet r/(1,2)^w}$ \\
        \end{tabular}

    \end{columns}

    \centering
    \resizebox{!}{\height}{

        \begin{tikzpicture}[
            roundnode/.style={circle, draw=black, fill=black, very thick, minimum size=1pt,},
            ignorednode/.style={circle, draw=black!20, fill=black!20, very thick, minimum size=1pt,},
            invisiblenode/.style={circle, draw=white, fill=white, very thick, minimum size=1pt,},
            arrow/.style={|->, thick,},
            message/.style={->, blue!50, dashed, -{Circle[length=4pt,]}},
            ]

            \node[roundnode] (p00) {};
            \node[left] at (p00.west) {$p_0$};
            \node[above] at (p00.north) {$\{0\}$};

            \node[roundnode] (p10) [below=20pt of p00] {};
            \node[left] at (p10.west) {$p_1$};
            \node[above] at (p10.north) {$\{0\}$};

            \node[roundnode] (p20) [below=20pt of p10] {};
            \node[left] at (p20.west) {$p_2$};
            \node[above] at (p20.north) {$\{0\}$};

            \node[roundnode] (p30) [below=20pt of p20] {};
            \node[left] at (p30.west) {$p_3$};
            \node[above] at (p30.north) {$\{0\}$};
            
            \pause

            \node[roundnode] (p01) [right=of p00] {};
            \node[above] at (p01.north) {$\{1\}$};

            \draw[arrow] (p00) -- node[above] {tata} (p01);



            % \onslide<3->{
            %     \node[roundnode] (11) {};
            %     \node[left] at (11.west) {$p_0$};
            %     \node[above] at (11.north) {$w(1)$};
            % }
            % \onslide<7-> {
            %     \node[roundnode] (12) [right=of 11] {};
            %     \node[above] at (12.north) {$r/(1,2)^w$};

            %     \draw[arrow] (11) -- (12);
            % }

            % \onslide<2-> {
            %     \node[roundnode] (21) [below=20pt of 11] {};
            %     \node[left] at (21.west) {$p_1$};
            %     \node[above] at (21.north) {$r/(0,0)$};
            % }
            % \onslide<5-> {
            %     \node[roundnode] (22) [right=of 21] {};
            %     \node[above] at (22.north) {$w(2)$};

            %     \draw[arrow] (21) -- (22);
            % }
            % \onslide<6-> {
            %     \node[roundnode] (23) [right=of 22] {};
            %     \node[above] at (23.north) {$r/(1,2)$};

            %     \draw[arrow] (21) -- (23);
            % }
            % \onslide<7-> {
            %     \node[roundnode] (24) [right=of 23] {};
            %     \node[above] at (24.north) {$r/(1,2)^w$};

            %     \draw[arrow] (21) -- (24);
            % }

            % \onslide<4-> {
            %     \node[roundnode] (31) [below=20pt of 21] {};
            %     \node[left] at (31.west) {$p_2$};
            %     \node[above] at (31.north) {$r/(0,1)$};
            % }
            % \onslide<6-> {
            %     \node[roundnode] (32) [right=of 31] {};
            %     \node[above] at (32.north) {$r/(1,2)$};

            %     \draw[arrow] (31) -- (32);
            % }
            % \onslide<7-> {
            %     \node[roundnode] (33) [right=of 32] {};
            %     \node[above] at (33.north) {$r/(1,2)^w$};

            %     \draw[arrow] (31) -- (33);
            % }

            % \onslide<4-> {
            %     \node[roundnode] (41) [below=20pt of 31] {};
            %     \node[left] at (41.west) {$p_3$};
            %     \node[above] at (41.north) {$r/(0,1)$};
            % }
            % \onslide<5-> {
            %     \node[roundnode] (42) [right=of 41] {};
            %     \node[above] at (42.north) {$w(1)$};

            %     \draw[arrow] (41) -- (42);
            % }
            % \onslide<6-> {
            %     \node[roundnode] (43) [right=of 42] {};
            %     \node[above] at (43.north) {$r/(1,1)$};

            %     \draw[arrow] (41) -- (43);
            % }
            % \onslide<7-> {
            %     \node[roundnode] (44) [right=of 43] {};
            %     \node[above] at (44.north) {$r/(1,2)^w$};

            %     \draw[arrow] (41) -- (44);
            % }

        \end{tikzpicture}
    }
\end{frame}

\begin{frame}
    \frametitle{Modèle}

    \resizebox{\columnwidth}{!}{
        \begin{tikzpicture}[
            roundnode/.style={circle, draw=black, fill=black, very thick, minimum size=1pt,},
            ignorednode/.style={circle, draw=black!20, fill=black!20, very thick, minimum size=1pt,},
            arrow/.style={|->, thick,},
            message/.style={->, blue!50, dashed, -{Circle[length=4pt,]}},
            ]

            \node[roundnode] (11) {};
            \node[left] at (11.west) {$p_0$};
            \node[above] at (11.north) {$w(1)$};
            \node[roundnode] (12) [right=of 11] {};
            \node[above] at (12.north) {$I(a)$};
            \node[roundnode] (13) [right=of 12] {};
            \node[above] at (13.north) {$r/(0,1)$};
            \node[roundnode] (14) [right=of 13] {};
            \node[above] at (14.north) {$r/(1,2)^w$};

            \draw[arrow] (11) -- (12);
            \draw[arrow] (12) -- (13);
            \draw[arrow] (13) -- (14);

            \node[roundnode] (21) [below=of 11] {};
            \node[left] at (21.west) {$p_1$};
            \node[below] at (21.south) {$w(2)$};
            \node[roundnode] (22) [right=of 21] {};
            \node[below] at (22.south) {$R/\emptyset$};
            \node[roundnode] (23) [right=of 22] {};
            \node[below] at (23.south) {$r/(0,2)$};
            \node[roundnode] (24) [right=of 23] {};
            \node[below] at (24.south) {$r/(1,2)^w$};

            \draw[arrow] (21) -- (22);
            \draw[arrow] (22) -- (23);
            \draw[arrow] (23) -- (24);
        \end{tikzpicture}
    }
\end{frame}