\documentclass[12pt]{article}

\usepackage[spanish]{babel}
\usepackage[latin1]{inputenc}
\usepackage{stmaryrd}
\usepackage[usenames,dvipsnames]{color}

\usepackage{amssymb}
\usepackage{amsxtra}
\usepackage{amsmath}
\usepackage{amstext}
\usepackage{amsthm}
\usepackage{amsbsy}
\usepackage{latexsym}
\usepackage{mathrsfs}
\usepackage{eucal}
\usepackage{synttree}

\newcommand{\tf}{\ensuremath{\mathcal{\stackrel{\bigtriangledown}{\circ}}}}
\newcommand{\sig}[1]{\ensuremath{{\color{blue}{\llbracket{\color{black}#1} \rrbracket}}}}
\newcommand{\roj}[1]{\ensuremath{{\color{red}#1}}}

\theoremstyle{definition}
\newtheorem{definition}{Definici\'on}[section]
\newtheorem{proposition}[definition]{Proposici\'on}
\newtheorem{lemma}[definition]{Lema}
\newtheorem{theorem}[definition]{Teorema}
\newtheorem{corollary}[definition]{Corolario}
\newtheorem{example}[definition]{Ejemplo}
\newtheorem{observation}[definition]{Observaci\'on}
\newtheorem{problem}[definition]{Problema}
\newtheorem{question}[definition]{Pregunta}

\def\proof{\noindent{\textbf{Demostraci\'on}}\\}
\def\endproof{\hfill{\ensuremath\square}}
\def\refname{Referencias}
\def\abstractname{Resumen}


\title{Árbol sintáctico-semántico coloreado \\
para expresiones aritméticas \\
Fundamentos de Lenguajes de Programación \\
Primavera de 2013\\
Sección 102}
\author{José de Jesús Lavalle Martínez}

\begin{document}
\maketitle

\begin{abstract}
Documento para aprender a analizar y evaluar expresiones artméticas por medio de árboles sintáctico-semánticos coloreados.
\end{abstract}

Para poder dibujar árboles tendrá que usar el paquete \verb+synttree+ mediante el comando \verb+\usepackage{synttree}+.

\begin{description}
\item [Alfabeto:] $$\Sigma = \{0,1,2,3,4,5,6,7,8,9,+,-,*\}$$
{\color{green} \item [Sintaxis:]
\begin{align*}
d &::= {\color{black} 0} | {\color{black} 1} | \cdots | {\color{black} 9} \\
n &::= d | nd \\
e &::= n | e_i {\color{black} +} e_d | e_i {\color{black} -} e_d | e_i {\color{black} *} e_d
\end{align*}}
{\color{blue} \item [Semántica:] $$\llbracket \rrbracket : {\color{black} \mathcal{LEA}} \rightarrow {\color{red} \mathbb{Z}}$$
\begin{align*}
\llbracket {\color{black} 0} \rrbracket &= {\color{red} 0} \\
&\vdots \\
\llbracket {\color{black} 9} \rrbracket &= {\color{red} 9} \\
\llbracket {\color{green} nd}  \rrbracket &= \roj{(} {\color{red}(}\llbracket {\color{green} n} \rrbracket {\color{red}* 10) +} \llbracket {\color{green} d} \rrbracket \roj{)} \\
\llbracket {\color{green} e_i {\color{black} +} e_d} \rrbracket &= \roj{(} \llbracket {\color{green} e_i} \rrbracket {\color{red}+} \llbracket {\color{green} e_d} \rrbracket \roj{)} \\
\llbracket {\color{green} e_i {\color{black} -} e_d} \rrbracket &= \roj{(} \llbracket {\color{green} e_i} \rrbracket {\color{red}-} \llbracket {\color{green} e_d} \rrbracket \roj{)} \\
\llbracket {\color{green} e_i {\color{black} *} e_d} \rrbracket &= \roj{(} \llbracket {\color{green} e_i} \rrbracket {\color{red}*} \llbracket {\color{green} e_d} \rrbracket \roj{)}
\end{align*}}
\end{description}

\begin{description}
\item [Alfabeto:] $$\Sigma = \{0,1,2,3,4,5,6,7,8,9,+,-,*\}$$
{\color{green} \item [Sintaxis:]
\begin{align*}
d &::= {\color{black} 0} | {\color{black} 1} | \cdots | {\color{black} 9} \\
n &::= d | nd \\
e &::= n | e_i {\color{black} +} e_d | e_i {\color{black} -} e_d | e_i {\color{black} *} e_d
\end{align*}}
{\color{blue} \item [Semántica:] $$\llbracket \rrbracket : {\color{black} \mathcal{LEA}} \rightarrow {\color{red} \mathbb{Z}}$$
\begin{align*}
\llbracket {\color{black} 0} \rrbracket &= {\color{red} 0}, \ldots, \llbracket {\color{black} 9} \rrbracket = {\color{red} 9} \\
\llbracket {\color{green} nd}  \rrbracket &= \roj{(} {\color{red}(}\llbracket {\color{green} n} \rrbracket {\color{red}* 10) +} \llbracket {\color{green} d} \rrbracket \roj{)} \\
\llbracket {\color{green} e_i {\color{black} +} e_d} \rrbracket &= \roj{(} \llbracket {\color{green} e_i} \rrbracket {\color{red}+} \llbracket {\color{green} e_d} \rrbracket \roj{)} \\
\llbracket {\color{green} e_i {\color{black} -} e_d} \rrbracket &= \roj{(} \llbracket {\color{green} e_i} \rrbracket {\color{red}-} \llbracket {\color{green} e_d} \rrbracket \roj{)} \\
\llbracket {\color{green} e_i {\color{black} *} e_d} \rrbracket &= \roj{(} \llbracket {\color{green} e_i} \rrbracket {\color{red}*} \llbracket {\color{green} e_d} \rrbracket \roj{)}
\end{align*}}
\end{description}


\begin{figure}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} \overbrace{315 -15}^{{\color{green}e_i} - {\color{green}e_d}}} \rrbracket$
  [${\color{red} - = 300}$
  [$\llbracket {\color{black} \overbrace{315}^{{\color{green} nd}}}\rrbracket$
    [${\color{red} + = 315}$
      [${\color{red} * = 310}$
        [$\llbracket {\color{black} \overbrace{31}^{{\color{green} nd}}}\rrbracket$
          [${\color{red} + = 31}$
            [${\color{red} * = 30}$
              [$\llbracket {\color{black} \overbrace{3}^{{\color{green} n}}}\rrbracket$
                [$\llbracket {\color{black} \overbrace{3}^{{\color{green} d}}}\rrbracket$
                  [${\color{red} 3}$]
                ]
              ]
              [${\color{red} 10}$]
            ]
            [$\llbracket {\color{black} \overbrace{1}^{{\color{green} d}}}\rrbracket$
              [${\color{red} 1}$]
            ]
          ]
        ]
        [${\color{red} 10}$]
      ]
      [$\llbracket {\color{black} \overbrace{5}^{{\color{green} d}}}\rrbracket$
        [${\color{red} 5}$]
      ]
    ]
  ]
  [$\llbracket {\color{black} \overbrace{15}^{{\color{green} nd}}}\rrbracket$
    [${\color{red} + = 15}$
      [${\color{red} * = 10}$
        [$\llbracket {\color{black} \overbrace{1}^{{\color{green} n}}}\rrbracket$
          [$\llbracket {\color{black} \overbrace{1}^{{\color{green} d}}}\rrbracket$
            [${\color{red} 1}$]
          ]
        ]
        [${\color{red} 10}$]
      ]
      [$\llbracket {\color{black} \overbrace{5}^{{\color{green} d}}}\rrbracket$
        [${\color{red} 5}$]
      ]
    ]
  ]
  ]
]}
\end{center}
\caption{Árbol sintáctico-semántico para la expresión aritmética $315-15$, con la leyenda en la parte inferior de la figura.}\end{figure}

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $315-15$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{315}} -{\stackrel{{\color{green} e_d}}{15}}} \rrbracket$
  [${\color{red} - = 300}$
  [$\llbracket {\color{black} {\stackrel{{\color{green} n}}{31}}{\stackrel{{\color{green} d}}{5}}}\rrbracket$
    [${\color{red} + = 315}$
      [${\color{red} * = 310}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} n}}{3}}{\stackrel{{\color{green} d}}{1}}}\rrbracket$
          [${\color{red} + = 31}$
            [${\color{red} * = 30}$
              [$\llbracket {\color{black} {\stackrel{{\color{green} n}}{3}}}\rrbracket$
                [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{3}}}\rrbracket$
                  [${\color{red} 3}$]
                ]
              ]
              [${\color{red} 10}$]
            ]
            [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{1}}}\rrbracket$
              [${\color{red} 1}$]
            ]
          ]
        ]
        [${\color{red} 10}$]
      ]
      [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}}\rrbracket$
        [${\color{red} 5}$]
      ]
    ]
  ]
  [$\llbracket {\color{black} {\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}}\rrbracket$
    [${\color{red} + = 15}$
      [${\color{red} * = 10}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} n}}{1}}}\rrbracket$
          [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{1}}}\rrbracket$
            [${\color{red} 1}$]
          ]
        ]
        [${\color{red} 10}$]
      ]
      [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}}\rrbracket$
        [${\color{red} 5}$]
      ]
    ]
  ]
  ]
]}
\end{center}
\end{figure}

adfdsfdsaf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
]}
\end{center}
\end{figure}

adfdsfdsf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} -}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
    ]
  ]
]}
\end{center}
\end{figure}

adfdsfasd

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} -}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket$
      [${\color{red} 9}$]
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
    ]
  ]
]}
\end{center}
\end{figure}

adfdsfdsa

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} -}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket$
      [${\color{red} 9}$]
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
      [${\color{red} *}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket$]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket$]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

adfdsf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} -}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket$
      [${\color{red} 9}$
      ]
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
      [${\color{red} *}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket$
          [${\color{red} 5}$
          ]
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket$]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

adfdsfdsf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} -}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket$
      [${\color{red} 9}$
      ]
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
      [${\color{red} *}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket$
          [${\color{red} 5}$
          ]
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket$
          [${\color{red} 2}$
          ]
        ]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

adfdsfasdf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} -}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket$
      [${\color{red} 9}$
      ]
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
      [${\color{red} *=10}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket$
          [${\color{red} 5}$
          ]
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket$
          [${\color{red} 2}$
          ]
        ]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

adfdsfsdf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} -= -1}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket$
      [${\color{red} 9}$
      ]
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
      [${\color{red} *=10}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket$
          [${\color{red} 5}$
          ]
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket$
          [${\color{red} 2}$
          ]
        ]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

adfsadfasdf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $315-15$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{315}} -{\stackrel{{\color{green} e_d}}{15}}} \rrbracket = {\color{red} 300}$
  [${\color{red} 315-15 = 300}$
  [$\llbracket {\color{black} {\stackrel{{\color{green} n}}{31}}{\stackrel{{\color{green} d}}{5}}}\rrbracket = {\color{red} 315}$
    [${\color{red} 310+5 = 315}$
      [${\color{red} 31*10 = 310}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} n}}{3}}{\stackrel{{\color{green} d}}{1}}}\rrbracket = {\color{red} 31}$
          [${\color{red} 30 + 1= 31}$
            [${\color{red} 3 * 10= 30}$
              [$\llbracket {\color{black} {\stackrel{{\color{green} n}}{3}}}\rrbracket ={\color{red} 3}$
                [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{3}}}\rrbracket = {\color{red} 3}$
                ]
              ]
              [${\color{red} 10}$]
            ]
            [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{1}}}\rrbracket = {\color{red} 1}$
            ]
          ]
        ]
        [${\color{red} 10}$]
      ]
      [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}}\rrbracket = {\color{red} 5}$
      ]
    ]
  ]
  [$\llbracket {\color{black} {\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}}\rrbracket = {\color{red} 15}$
    [${\color{red} 10+5 = 15}$
      [${\color{red} 1*10 = 10}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} n}}{1}}}\rrbracket = {\color{red} 1}$
          [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{1}}}\rrbracket = {\color{red} 1}$
          ]
        ]
        [${\color{red} 10}$]
      ]
      [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}}\rrbracket = {\color{red} 5}$
      ]
    ]
  ]
  ]
]}
\end{center}
\end{figure}

{\color{blue}
\begin{equation*}
\begin{split}
\sig{{\stackrel{{\color{green} e_i}}{315}} -{\stackrel{{\color{green} e_d}}{15}}} &= \\
                      &= \roj{(}\sig{{\stackrel{{\color{green} n}}{31}}{\stackrel{{\color{green} d}}{5}}} \roj{-} \sig{ {\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}} \roj{)}\\
		    &= \roj{(((\sig{ {\stackrel{{\color{green} n}}{3}}{\stackrel{{\color{green} d}}{1}}} * 10) + \sig{{\stackrel{{\color{green} d}}{5}}}) - \sig{{\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}})} \\
		    &= \roj{(((((\sig{{\stackrel{{\color{green} d}}{3}}} * 10) + \sig{{\stackrel{{\color{green} d}}{1}}}) * 10) + \sig{{\stackrel{{\color{green} d}}{5}}}) - \sig{{\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}})} \\
		    &= \roj{(((((3 * 10) + \sig{{\stackrel{{\color{green} d}}{1}}}) * 10) + \sig{{\stackrel{{\color{green} d}}{5}}}) - \sig{{\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}})} \\
		    &= \roj{((((30 + \sig{{\stackrel{{\color{green} d}}{1}}}) * 10) + \sig{{\stackrel{{\color{green} d}}{5}}}) - \sig{{\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}})} \\
		    &= \roj{((((30 + 1) * 10) + \sig{{\stackrel{{\color{green} d}}{5}}}) - \sig{{\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}})} \\
		    &= \roj{(((31 * 10) + \sig{{\stackrel{{\color{green} d}}{5}}}) - \sig{{\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}})} \\
		    &= \roj{((310 + \sig{{\stackrel{{\color{green} d}}{5}}}) - \sig{{\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}})} \\
		    &= \roj{((310 + 5) - \sig{{\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}})} \\
		    &= \roj{(315 - \sig{{\stackrel{{\color{green} n}}{1}}{\stackrel{{\color{green} d}}{5}}})} \\
		    &= \roj{(315 - ((\sig{{\stackrel{{\color{green} d}}{1}}} *10) + \sig{{\stackrel{{\color{green} d}}{5}}}))} \\
		    &= \roj{(315 - ((1*10) + \sig{{\stackrel{{\color{green} d}}{5}}}))} \\
		    &= \roj{(315 - (10 + \sig{{\stackrel{{\color{green} d}}{5}}}))} \\
		    &= \roj{(315 - (10 + 5))} \\
		    &= \roj{(315 - 15)} \\
		    &= \roj{300}
\end{split}
\end{equation*}
}
\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
]}
\end{center}
\end{figure}

adfsadfsadf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} -}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
    ]
  ]
]}
\end{center}
\end{figure}

adfsdfasd

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} -}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket = {\color{red} 9}$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
    ]
  ]
]}
\end{center}
\end{figure}

adfdaf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} 9-}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket = {\color{red} 9}$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
    ]
  ]
]}
\end{center}
\end{figure}

adfsadfa

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} 9-}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket = {\color{red} 9}$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
      [${\color{red} *}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket$]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket$]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

adfsda

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} 9-}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket = {\color{red} 9}$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
      [${\color{red} *}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket = {\color{red} 5}$
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket$]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

fksadjlkfjlka

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} 9-}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket = {\color{red} 9}$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
      [${\color{red} 5*}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket = {\color{red} 5}$
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket$]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} 9-}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket = {\color{red} 9}$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
      [${\color{red} 5*}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket = {\color{red} 5}$
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket = {\color{red} 2}$]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

sadfsdfsdaf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} 9-}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket = {\color{red} 9}$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket$
      [${\color{red} 5*2 = 10}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket = {\color{red} 5}$
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket = {\color{red} 2}$]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

asdfsdfasdfasdf

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} 9-}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket = {\color{red} 9}$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket = {\color{red} 10}$
      [${\color{red} 5*2 = 10}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket = {\color{red} 5}$
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket = {\color{red} 2}$]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

asdfsdafasdfdas

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket$
  [${\color{red} 9-10 = -1}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket = {\color{red} 9}$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket = {\color{red} 10}$
      [${\color{red} 5*2 = 10}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket = {\color{red} 5}$
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket = {\color{red} 2}$]
      ]
    ]
  ]
]}
\end{center}
\end{figure}

asdfsdafasdfdas

\begin{figure}
\caption{Árbol sintáctico-semántico para la expresión aritmética $9-5*2$, con la leyenda en la parte superior de la figura.}
\begin{center}
{\color{blue}
\synttree
[$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{9}}-{\stackrel{{\color{green} e_d}}{5*2}}} \rrbracket = {\color{red} -1}$
  [${\color{red} 9-10 = -1}$
    [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{9}}} \rrbracket = {\color{red} 9}$
    ]
    [$\llbracket {\color{black} {\stackrel{{\color{green} e_i}}{5}}*{\stackrel{{\color{green} e_d}}{2}}} \rrbracket = {\color{red} 10}$
      [${\color{red} 5*2 = 10}$
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{5}}} \rrbracket = {\color{red} 5}$
        ]
        [$\llbracket {\color{black} {\stackrel{{\color{green} d}}{2}}} \rrbracket = {\color{red} 2}$]
      ]
    ]
  ]
]}
\end{center}
\end{figure}


\end{document}
















