(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.0' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 34342, 918]*) (*NotebookOutlinePosition[ 35086, 943]*) (* CellTagsIndexPosition[ 35042, 939]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["\<\ 6. L\[OAcute]gica proposicional: Tautolog\[IAcute]as, contradicciones, formas \ normales, equivalencias e implicaciones l\[OAcute]gicas y argumentaciones\ \>", "Title", FontSize->36], Cell["Ejercicios resueltos", "Subtitle"], Cell[CellGroupData[{ Cell["Ejercicio 1. ", "Subsection", FontSize->16], Cell[TextData[{ "Dada las siguientes formas enunciativas:\n\tA: p \[UpArrow] (q \ \[LeftRightArrow] r)\n\tB: (p \[RightArrow] q) ", Cell[BoxData[ \(TraditionalForm\`\[Wedge]\)]], " (r \[DownArrow] (~q))\nCalcular sus formas normales." }], "Text", FontSize->14], Cell[CellGroupData[{ Cell["Soluci\[OAcute]n: ", "Subsubsection", CellDingbat->None, FontFamily->"Times New Roman", FontSize->16, FontWeight->"Bold", FontSlant->"Italic"], Cell["\<\ Para calcular las formas normales de A primero introducimos la conectivas \ \[UpArrow] y \[LeftRightArrow] que hemos definido en el cap\[IAcute]culo \ anterior\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(NAND[p_, q_] := \(! \((p && q)\)\)\), "\n", \(Sii[a_, b_] := Implies[a, b]\ && \ Implies[b, a]\), "\[IndentingNewLine]", \(\(n = 3;\)\), "\n", \(\(cadena = "\<\>";\)\), "\n", \(\(cadena2 = "\<\>";\)\), "\n", \(\(cad = "\<\>";\)\), "\n", \(\(cad2 = "\<\>";\)\), "\n", \(\(contradiccion = True;\)\), "\n", \(\(tautologia = True;\)\), "\n", \(\(p = Table[False, {t, n}];\)\), "\n", \(\(expresion := NAND[p[\([1]\)], Sii[p[\([2]\)], p[\([3]\)]]];\)\), "\n", \(\(For[i = 0, i < 2^n, \(i++\), j = i; \[IndentingNewLine]cad = "\<\>"; \[IndentingNewLine]cad2 = "\<\ \>"; \[IndentingNewLine]For[f = n, f > 0, \(f--\), resto = Mod[j, 2]; \[IndentingNewLine]j = Floor[j/2]; \[IndentingNewLine]If[resto \[Equal] 0, p[\([f]\)] = True; \[IndentingNewLine]If[f \[Equal] n, cad = StringJoin["\", ToString[f], cad], cad = StringJoin["\", ToString[f], "\< \[And] \>", cad]]; If[f \[Equal] n, cad2 = StringJoin["\<(~p\>", ToString[f], "\<)\>", cad2], cad2 = StringJoin["\<(~p\>", ToString[f], "\<)\>", "\< \[Or] \>", cad2]];, p[\([f]\)] = False; \[IndentingNewLine]If[f \[Equal] n, cad = StringJoin["\<(~p\>", ToString[f], "\<)\>", cad], cad = StringJoin["\<(~p\>", ToString[f], "\<)\>", "\< \[And] \>", cad]]; \[IndentingNewLine]If[f \[Equal] n, cad2 = StringJoin["\", ToString[f], cad2], cad2 = StringJoin["\", ToString[f], "\< \[Or] \>", cad2]];];]; \[IndentingNewLine]If[TrueQ[expresion], If[cadena \[Equal] "\<\>", cadena = StringJoin[cadena, "\<(\>", cad, "\<)\>"], cadena = StringJoin[cadena, "\< \[Or] (\>", cad, "\<)\>"]]; \[IndentingNewLine]contradiccion = False;, If[cadena2 \[Equal] "\<\>", cadena2 = StringJoin[cadena2, "\<(\>", cad2, "\<)\>"], cadena2 = StringJoin[cadena2, "\< \[And] (\>", cad2, "\<)\>"]]; \[IndentingNewLine]tautologia = False;];];\)\), "\n", \(\(If[contradiccion, Print["\"], Print["\", cadena]];\)\), "\n", \(\(If[tautologia, Print["\"], Print["\", cadena2]];\)\)}], "Input"], Cell[BoxData[ InterpretationBox[\("No es contradicci\[OAcute]n y la forma normal \ disyuntiva es: "\[InvisibleSpace]"(p1 \[And] p2 \[And] (~p3)) \[Or] (p1 \ \[And] (~p2) \[And] p3) \[Or] ((~p1) \[And] p2 \[And] p3) \[Or] ((~p1) \[And] \ p2 \[And] (~p3)) \[Or] ((~p1) \[And] (~p2) \[And] p3) \[Or] ((~p1) \[And] \ (~p2) \[And] (~p3))"\), SequenceForm[ "No es contradicci\[OAcute]n y la forma normal disyuntiva es: ", "(p1 \[And] p2 \[And] (~p3)) \[Or] (p1 \[And] (~p2) \[And] p3) \[Or] \ ((~p1) \[And] p2 \[And] p3) \[Or] ((~p1) \[And] p2 \[And] (~p3)) \[Or] ((~p1) \ \[And] (~p2) \[And] p3) \[Or] ((~p1) \[And] (~p2) \[And] (~p3))"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[\("No es tautolog\[IAcute]a y la forma normal \ conmutativa es: "\[InvisibleSpace]"((~p1) \[Or] (~p2) \[Or] (~p3)) \[And] \ ((~p1) \[Or] p2 \[Or] p3)"\), SequenceForm[ "No es tautolog\[IAcute]a y la forma normal conmutativa es: ", "((~p1) \[Or] (~p2) \[Or] (~p3)) \[And] ((~p1) \[Or] p2 \[Or] p3)"], Editable->False]], "Print"] }, Closed]], Cell[TextData[StyleBox["Para las formas normales de B s\[OAcute]lo hemos de \ definir la conectiva NOR[]:\t", FontFamily->"Times New Roman", FontSize->14]], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(NOR[p_, q_] := \(! \((p || q)\)\)\), "\[IndentingNewLine]", \(\(n = 3;\)\), "\n", \(\(cadena = "\<\>";\)\), "\n", \(\(cadena2 = "\<\>";\)\), "\n", \(\(cad = "\<\>";\)\), "\n", \(\(cad2 = "\<\>";\)\), "\n", \(\(contradiccion = True;\)\), "\n", \(\(tautologia = True;\)\), "\n", \(\(p = Table[False, {t, n}];\)\), "\n", \(\(expresion := Implies[p[\([1]\)], p[\([2]\)]] && NOR[p[\([3]\)], \(! p[\([2]\)]\)];\)\), "\n", \(\(For[i = 0, i < 2^n, \(i++\), j = i; \[IndentingNewLine]cad = "\<\>"; \[IndentingNewLine]cad2 = "\<\ \>"; \[IndentingNewLine]For[f = n, f > 0, \(f--\), resto = Mod[j, 2]; \[IndentingNewLine]j = Floor[j/2]; \[IndentingNewLine]If[resto \[Equal] 0, p[\([f]\)] = True; \[IndentingNewLine]If[f \[Equal] n, cad = StringJoin["\", ToString[f], cad], cad = StringJoin["\", ToString[f], "\< \[And] \>", cad]]; If[f \[Equal] n, cad2 = StringJoin["\<(~p\>", ToString[f], "\<)\>", cad2], cad2 = StringJoin["\<(~p\>", ToString[f], "\<)\>", "\< \[Or] \>", cad2]];, p[\([f]\)] = False; \[IndentingNewLine]If[f \[Equal] n, cad = StringJoin["\<(~p\>", ToString[f], "\<)\>", cad], cad = StringJoin["\<(~p\>", ToString[f], "\<)\>", "\< \[And] \>", cad]]; \[IndentingNewLine]If[f \[Equal] n, cad2 = StringJoin["\", ToString[f], cad2], cad2 = StringJoin["\", ToString[f], "\< \[Or] \>", cad2]];];]; \[IndentingNewLine]If[TrueQ[expresion], If[cadena \[Equal] "\<\>", cadena = StringJoin[cadena, "\<(\>", cad, "\<)\>"], cadena = StringJoin[cadena, "\< \[Or] (\>", cad, "\<)\>"]]; \[IndentingNewLine]contradiccion = False;, If[cadena2 \[Equal] "\<\>", cadena2 = StringJoin[cadena2, "\<(\>", cad2, "\<)\>"], cadena2 = StringJoin[cadena2, "\< \[And] (\>", cad2, "\<)\>"]]; \[IndentingNewLine]tautologia = False;];];\)\), "\n", \(\(If[contradiccion, Print["\"], Print["\", cadena]];\)\), "\n", \(\(If[tautologia, Print["\"], Print["\", cadena2]];\)\)}], "Input"], Cell[BoxData[ InterpretationBox[\("No es contradicci\[OAcute]n y la forma normal \ disyuntiva es: "\[InvisibleSpace]"(p1 \[And] p2 \[And] (~p3)) \[Or] ((~p1) \ \[And] p2 \[And] (~p3))"\), SequenceForm[ "No es contradicci\[OAcute]n y la forma normal disyuntiva es: ", "(p1 \[And] p2 \[And] (~p3)) \[Or] ((~p1) \[And] p2 \[And] (~p3))"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[\("No es tautolog\[IAcute]a y la forma normal \ conmutativa es: "\[InvisibleSpace]"((~p1) \[Or] (~p2) \[Or] (~p3)) \[And] \ ((~p1) \[Or] p2 \[Or] (~p3)) \[And] ((~p1) \[Or] p2 \[Or] p3) \[And] (p1 \ \[Or] (~p2) \[Or] (~p3)) \[And] (p1 \[Or] p2 \[Or] (~p3)) \[And] (p1 \[Or] p2 \ \[Or] p3)"\), SequenceForm[ "No es tautolog\[IAcute]a y la forma normal conmutativa es: ", "((~p1) \[Or] (~p2) \[Or] (~p3)) \[And] ((~p1) \[Or] p2 \[Or] (~p3)) \ \[And] ((~p1) \[Or] p2 \[Or] p3) \[And] (p1 \[Or] (~p2) \[Or] (~p3)) \[And] \ (p1 \[Or] p2 \[Or] (~p3)) \[And] (p1 \[Or] p2 \[Or] p3)"], Editable->False]], "Print"] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Ejercicio 2. ", "Subsection", FontSize->16], Cell[TextData[{ "Demostrar usando ", StyleBox["Mathematica", FontSlant->"Italic"], " que el conjunto {\[UpArrow]} y {\[DownArrow]} son conjuntos adecuados de \ conectivas." }], "Text", FontSize->14], Cell[CellGroupData[{ Cell["Soluci\[OAcute]n: ", "Subsubsection", CellDingbat->None, FontFamily->"Times New Roman", FontSize->16, FontWeight->"Bold", FontSlant->"Italic"], Cell[TextData[{ "Para ver que el conjunto {\[UpArrow]} es un conjunto adecuado de \ conectivas hemos de probar que se tienen las siguientes equivalencias l\ \[OAcute]gicas:\n\ta) (\[Tilde]p) \[DoubleLeftRightArrow] (p \[UpArrow] p)\n\t\ b) (p ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Vee]\)\(\ \)\)\)]], "q) \[DoubleLeftRightArrow] (p \[UpArrow] p) \[UpArrow] (q \[UpArrow] q)\n\t\ c) (p ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "q) \[DoubleLeftRightArrow] (p \[UpArrow] q) \[UpArrow] (p \[UpArrow] q)\n\ Veamos si lo son: " }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Sii[a_, b_] := Implies[a, b] && Implies[b, a];\)\), "\n", \(\(NAND[p_, q_] := \(! \((p && q)\)\);\)\), "\[IndentingNewLine]", \(\(n = 1;\)\), "\n", \(\(tautologia = True;\)\), "\n", \(\(p = Table[False, {t, n}];\)\), "\n", \(\(expresion = Sii[\(! p[\([1]\)]\), NAND[p[\([1]\)], p[\([1]\)]]];\)\), "\n", \(\(For[i = 0, i < 2^n, \(i++\), j = i; \[IndentingNewLine]For[f = n, f > 0, \(f--\), resto = Mod[j, 2]; \[IndentingNewLine]j = Floor[j/2]; \[IndentingNewLine]If[resto \[Equal] 0, p[\([f]\)] = True, p[\([f]\)] = False];]; \[IndentingNewLine]If[ TrueQ[expresion], Null, tautologia = False];];\)\), "\n", \(If[tautologia, Print["\"], Print["\"]]\)}], \ "Input"], Cell[BoxData[ \("La forma enunciativa es una tautolog\[IAcute]a"\)], "Print"] }, Closed]], Cell["Por tanto, a) es una equivalencia l\[OAcute]gica.", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Sii[a_, b_] := Implies[a, b] && Implies[b, a];\)\), "\n", \(\(NAND[p_, q_] := \(! \((p && q)\)\);\)\), "\[IndentingNewLine]", \(\(n = 2;\)\), "\n", \(\(tautologia = True;\)\), "\n", \(\(p = Table[False, {t, n}];\)\), "\n", \(\(expresion = Sii[p[\([1]\)] || p[\([2]\)], NAND[NAND[p[\([1]\)], p[\([1]\)]], NAND[p[\([2]\)], p[\([2]\)]]]];\)\), "\n", \(\(For[i = 0, i < 2^n, \(i++\), j = i; \[IndentingNewLine]For[f = n, f > 0, \(f--\), resto = Mod[j, 2]; \[IndentingNewLine]j = Floor[j/2]; \[IndentingNewLine]If[resto \[Equal] 0, p[\([f]\)] = True, p[\([f]\)] = False];]; \[IndentingNewLine]If[ TrueQ[expresion], Null, tautologia = False];];\)\), "\n", \(If[tautologia, Print["\"], Print["\"]]\)}], \ "Input"], Cell[BoxData[ \("La forma enunciativa es una tautolog\[IAcute]a"\)], "Print"] }, Closed]], Cell["\<\ De esta forma deducimos que b) tambi\[EAcute]n es una equivalencia \ l\[OAcute]gica.\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Sii[a_, b_] := Implies[a, b] && Implies[b, a];\)\), "\n", \(\(NAND[p_, q_] := \(! \((p && q)\)\);\)\), "\[IndentingNewLine]", \(\(n = 2;\)\), "\n", \(\(tautologia = True;\)\), "\n", \(\(p = Table[False, {t, n}];\)\), "\n", \(\(expresion = Sii[p[\([1]\)] && p[\([2]\)], NAND[NAND[p[\([1]\)], p[\([2]\)]], NAND[p[\([1]\)], p[\([2]\)]]]];\)\), "\n", \(\(For[i = 0, i < 2^n, \(i++\), j = i; \[IndentingNewLine]For[f = n, f > 0, \(f--\), resto = Mod[j, 2]; \[IndentingNewLine]j = Floor[j/2]; \[IndentingNewLine]If[resto \[Equal] 0, p[\([f]\)] = True, p[\([f]\)] = False];]; \[IndentingNewLine]If[ TrueQ[expresion], Null, tautologia = False];];\)\), "\n", \(If[tautologia, Print["\"], Print["\"]]\)}], \ "Input"], Cell[BoxData[ \("La forma enunciativa es una tautolog\[IAcute]a"\)], "Print"] }, Closed]], Cell["\<\ As\[IAcute] c) tambi\[EAcute]n lo es y por tanto {\[UpArrow]} es un conjunto \ adecuado de conectivas.\ \>", "Text", FontSize->14], Cell[TextData[{ "De la misma forma podemos demostrar que el conjunto {\[DownArrow]} es un \ conjunto adecuado de conectivas. Para ello hemos de probar que:\n\ta) (\ \[Tilde]p) \[DoubleLeftRightArrow] (p \[DownArrow] p)\n\tb) (p ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "q) \[DoubleLeftRightArrow] (p \[DownArrow] p) \[DownArrow] (q \[DownArrow] \ q)\n\tc) (p ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Vee]\)\(\ \)\)\)]], "q) \[DoubleLeftRightArrow] (p \[DownArrow] q) \[DownArrow] (p \[DownArrow] \ q)\nson equivalencias l\[OAcute]gicas. Veamoslo: " }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Sii[a_, b_] := Implies[a, b] && Implies[b, a];\)\), "\n", \(\(NOR[p_, q_] := \(! \((p || q)\)\);\)\), "\[IndentingNewLine]", \(\(n = 1;\)\), "\n", \(\(tautologia = True;\)\), "\n", \(\(p = Table[False, {t, n}];\)\), "\n", \(\(expresion = Sii[\(! p[\([1]\)]\), NOR[p[\([1]\)], p[\([1]\)]]];\)\), "\n", \(\(For[i = 0, i < 2^n, \(i++\), j = i; \[IndentingNewLine]For[f = n, f > 0, \(f--\), resto = Mod[j, 2]; \[IndentingNewLine]j = Floor[j/2]; \[IndentingNewLine]If[resto \[Equal] 0, p[\([f]\)] = True, p[\([f]\)] = False];]; \[IndentingNewLine]If[ TrueQ[expresion], Null, tautologia = False];];\)\), "\n", \(If[tautologia, Print["\"], Print["\"]]\)}], \ "Input"], Cell[BoxData[ \("La forma enunciativa es una tautolog\[IAcute]a"\)], "Print"] }, Closed]], Cell["Por tanto, a) es una equivalencia l\[OAcute]gica.", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Sii[a_, b_] := Implies[a, b] && Implies[b, a];\)\), "\n", \(\(NAND[p_, q_] := \(! \((p || q)\)\);\)\), "\[IndentingNewLine]", \(\(n = 2;\)\), "\n", \(\(tautologia = True;\)\), "\n", \(\(p = Table[False, {t, n}];\)\), "\n", \(\(expresion = Sii[p[\([1]\)] || p[\([2]\)], NOR[NOR[p[\([1]\)], p[\([2]\)]], NOR[p[\([1]\)], p[\([2]\)]]]];\)\), "\n", \(\(For[i = 0, i < 2^n, \(i++\), j = i; \[IndentingNewLine]For[f = n, f > 0, \(f--\), resto = Mod[j, 2]; \[IndentingNewLine]j = Floor[j/2]; \[IndentingNewLine]If[resto \[Equal] 0, p[\([f]\)] = True, p[\([f]\)] = False];]; \[IndentingNewLine]If[ TrueQ[expresion], Null, tautologia = False];];\)\), "\n", \(If[tautologia, Print["\"], Print["\"]]\)}], \ "Input"], Cell[BoxData[ \("La forma enunciativa es una tautolog\[IAcute]a"\)], "Print"] }, Closed]], Cell["\<\ De esta forma deducimos que b) tambi\[EAcute]n es una equivalencia \ l\[OAcute]gica.\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Sii[a_, b_] := Implies[a, b] && Implies[b, a];\)\), "\n", \(\(NAND[p_, q_] := \(! \((p || q)\)\);\)\), "\[IndentingNewLine]", \(\(n = 2;\)\), "\n", \(\(tautologia = True;\)\), "\n", \(\(p = Table[False, {t, n}];\)\), "\n", \(\(expresion = Sii[p[\([1]\)] && p[\([2]\)], NOR[NOR[p[\([1]\)], p[\([1]\)]], NOR[p[\([2]\)], p[\([2]\)]]]];\)\), "\n", \(\(For[i = 0, i < 2^n, \(i++\), j = i; \[IndentingNewLine]For[f = n, f > 0, \(f--\), resto = Mod[j, 2]; \[IndentingNewLine]j = Floor[j/2]; \[IndentingNewLine]If[resto \[Equal] 0, p[\([f]\)] = True, p[\([f]\)] = False];]; \[IndentingNewLine]If[ TrueQ[expresion], Null, tautologia = False];];\)\), "\n", \(If[tautologia, Print["\"], Print["\"]]\)}], \ "Input"], Cell[BoxData[ \("La forma enunciativa es una tautolog\[IAcute]a"\)], "Print"] }, Closed]], Cell["\<\ As\[IAcute] c) tambi\[EAcute]n lo es y por tanto {\[DownArrow]} es un \ conjunto adecuado de conectivas.\ \>", "Text", FontSize->14] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Ejercicio 3. ", "Subsection", FontSize->16], Cell["\<\ Un famoso adivino fue preguntado por el n\[UAcute]mero de alumnos que aprobar\ \[IAcute]a la asignatura de \[CapitalAAcute]lgebra y di\[OAcute] las \ siguientes pistas: \t\[Bullet] Si el alumno es hombre y naci\[OAcute] en un mes par entonces \ aprobar\[AAcute] el examen de teor\[IAcute]a. \t\[Bullet] Si el alumno es mujer y su DNI termina en 0, 3, 7, 8 o 9 \ entonces superar\[AAcute] las pr\[AAcute]cticas. \t\[Bullet] Si la edad del alumno es igual o superior a 20 a\[NTilde]os \ entonces superar\[AAcute] las pr\[AAcute]cticas y no aprobar\[AAcute] la teor\ \[IAcute]a. \t\[Bullet] El resto de alumnos aprobar\[AAcute] s\[OAcute]lo un de los dos \ ex\[AAcute]menes, el de pr\[AAcute]cticas o el de teor\[IAcute]a. Sabiendo que para aprobar la asignatura de \[CapitalAAcute]lgebra hay que \ superar las pr\[AAcute]cticas y la teor\[IAcute]a, \[DownQuestion]aprobar\ \[AAcute] \[CapitalAAcute]lgebra un alumno que naci\[OAcute] en junio de \ 1975 y cuyo DNI termina en 9? \[DownQuestion]Y una alumna nacida en febrero \ de 1987 y con DNI 88256632?\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell["Soluci\[OAcute]n: ", "Subsubsection", CellDingbat->None, FontFamily->"Times New Roman", FontSize->16, FontWeight->"Bold", FontSlant->"Italic"], Cell[TextData[{ "Primero hemos de simbolizar el enunciado anterior. Llamaremos:\n\tA = \"El \ alumno es hombre\"\n\tB = \"El alumno naci\[OAcute] en un mes par\"\n\tC = \ \"El alumno tiene DNI terminado en 0, 3, 7, 8 o 9\"\n\tD = \"La edad del \ alumno es igual o superior a 20 a\[NTilde]os\"\n\tE = \"El alumno aprobar\ \[AAcute] el examen de teor\[IAcute]a\"\n\tF = \"El alumno aprobar\[AAcute] \ el examen de pr\[AAcute]cticas\"\n\tG = \"El alumno supera la asignatura de \ \[CapitalAAcute]lgebra\"\nCon estos nombres, lo que nos dijo el adivino se \ puede simbolizar mediante:\n\t(A ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "B) \[Rule] E\n\t((\[Tilde]A) ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "C) \[Rule] F\n\tD \[Rule] (F ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "(\[Tilde]E))\n\t((\[Tilde](A ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "B)) ", Cell[BoxData[ FormBox[ RowBox[{"\[Wedge]", " ", RowBox[{"(", RowBox[{"\[Tilde]", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"\[Tilde]", StyleBox["A", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False, "StrikeThrough"->False, "Masked"->False, "CompatibilityType"->0, "RotationAngle"->0}]}], ")"}], FormBox[\(\(\[Wedge]\)\(\ \)\), "TraditionalForm"], StyleBox["C", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False, "StrikeThrough"->False, "Masked"->False, "CompatibilityType"->0, "RotationAngle"->0}]}], ")"}]}], ")"}]}], TraditionalForm]]], Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "(\[Tilde]D)) \[Rule] ((E ", Cell[BoxData[ \(TraditionalForm\`\[Vee]\)]], " F) ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "(\[Tilde](E ", Cell[BoxData[ \(TraditionalForm\`\[Wedge]\)]], "F)))\n\tG \[LeftRightArrow] (E ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "F)\nCada uno de estos enunciados, cambiando cada letra may\[UAcute]scula \ por una variable de enunciado nos proporcionan las premisas de una forma \ argumentativa cuya conclusi\[OAcute]n vendr\[AAcute] dada por los datos de \ los alumnos para los que queremos ver si aprobar\[AAcute]n o no la \ asignatura. As\[IAcute] para el primer alumno la forma argumentativa ser\ \[IAcute]a:\n\tA", Cell[BoxData[ \(TraditionalForm\`\_1\)]], ": (p ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "q) \[Rule] t\n\tA", Cell[BoxData[ \(TraditionalForm\`\_2\)]], ": ((\[Tilde]p) ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "r) \[Rule] v\n\tA", Cell[BoxData[ \(TraditionalForm\`\_3\)]], ": s \[Rule] (v ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "(\[Tilde]t))\n\tA", Cell[BoxData[ \(TraditionalForm\`\_3\)]], ": ((\[Tilde](p ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "q)) ", Cell[BoxData[ FormBox[ RowBox[{"\[Wedge]", " ", RowBox[{"(", RowBox[{"\[Tilde]", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"\[Tilde]", StyleBox["p", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False, "StrikeThrough"->False, "Masked"->False, "CompatibilityType"->0, "RotationAngle"->0}]}], ")"}], FormBox[\(\(\[Wedge]\)\(\ \)\), "TraditionalForm"], StyleBox["r", FontSlant->"Plain"]}], ")"}]}], ")"}]}], TraditionalForm]]], Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "(\[Tilde]s)) \[Rule] ((t ", Cell[BoxData[ \(TraditionalForm\`\[Vee]\)]], " v) ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "(\[Tilde](t ", Cell[BoxData[ \(TraditionalForm\`\[Wedge]\)]], "v)))\n\tA", Cell[BoxData[ \(TraditionalForm\`\_4\)]], ": w \[LeftRightArrow] (t ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "v)\n \[Therefore] A : (p ", Cell[BoxData[ FormBox[ RowBox[{"\[Wedge]", RowBox[{ StyleBox["q", FontSlant->"Plain"], "\[Wedge]", " "}]}], TraditionalForm]]], "r ", Cell[BoxData[ \(TraditionalForm\`\(\[Wedge]\ s\)\)]], ") \[Rule] w\nPara ver si esta forma argumentativa es o no valida veamos si \ la forma enunciativa (A", Cell[BoxData[ \(TraditionalForm\`\_1\)]], Cell[BoxData[ FormBox[ RowBox[{"\[Wedge]", RowBox[{ FormBox["", "TraditionalForm"], FormBox["", "TraditionalForm"], " ", StyleBox["A", FontSlant->"Plain"], StyleBox[ FormBox[ RowBox[{\(\(\(\(\_2\)\(\[Wedge]\)\) ... \)\[Wedge]A\), FormBox[ RowBox[{\(\(\_5\)\()\)\), " ", "\[Rule]", " ", RowBox[{ StyleBox["A", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["es", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["una", FontSlant->"Plain"], StyleBox[" ", FontSlant->"Plain"], StyleBox["tautolog\[IAcute]a", FontSlant->"Plain"], " "}]}], "TraditionalForm"], " "}], "TraditionalForm"], FontSlant->"Plain"], " "}]}], TraditionalForm]]], " " }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Sii[a_, b_] := Implies[a, b] && Implies[b, a];\)\), "\[IndentingNewLine]", \(\(n = 7;\)\), "\n", \(\(tautologia = True;\)\), "\n", \(\(p = Table[False, {t, n}];\)\), "\n", \(\(A1 := Implies[p[\([1]\)] && p[\([2]\)], p[\([5]\)]];\)\), "\[IndentingNewLine]", \(\(A2 := \ Implies[\((\(! p[\([1]\)]\))\) && p[\([3]\)], p[\([6]\)]];\)\), "\[IndentingNewLine]", \(\(A3 := Implies[p[\([4]\)], p[\([6]\)] && \((\(! p[\([5]\)]\))\)];\)\), "\[IndentingNewLine]", \(\(A4 := Implies[\((\(! \((p[\([1]\)] && p[\([2]\)])\)\))\) && \((\(! \((\(! p[\([1]\)]\) && p[\([3]\)])\)\))\) && \((\(! p[\([4]\)]\))\), \ \((p[\([5]\)] || p[\([6]\)])\) && \((\(! \((p[\([5]\)] && p[\([6]\)])\)\))\)];\)\), "\[IndentingNewLine]", \(\(A5 := Sii[p[\([7]\)], p[\([5]\)] && p[\([6]\)]];\)\), "\[IndentingNewLine]", \(\(AA := Implies[p[\([1]\)] && p[\([2]\)] && p[\([3]\)] && p[\([4]\)], p[\([7]\)]];\)\), "\[IndentingNewLine]", \(\(expresion := Implies[A1 && A2 && A3 && A4 && A5, AA];\)\), "\n", \(\(For[i = 0, i < 2^n, \(i++\), j = i; \[IndentingNewLine]For[f = n, f > 0, \(f--\), resto = Mod[j, 2]; \[IndentingNewLine]j = Floor[j/2]; \[IndentingNewLine]If[resto \[Equal] 0, p[\([f]\)] = True, p[\([f]\)] = False];]; \[IndentingNewLine]If[ TrueQ[expresion], Null, tautologia = False];];\)\), "\n", \(If[tautologia, Print["\"], Print["\"]]\)}], \ "Input"], Cell[BoxData[ \("La forma enunciativa es una tautolog\[IAcute]a"\)], "Print"] }, Closed]], Cell["Por tanto, este alumno si aprobar\[AAcute] la signatura.", "Text", FontSize->14], Cell[TextData[{ "Razonando igual llegamos a la siguiente forma argumentativa para el \ segundo alumno:\n\tA", Cell[BoxData[ \(TraditionalForm\`\_1\)]], ":", " ", "(p ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "q) \[Rule] t\n\tA", Cell[BoxData[ \(TraditionalForm\`\_2\)]], ":", " ", "((\[Tilde]p) ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "r) \[Rule] v\n\tA", Cell[BoxData[ \(TraditionalForm\`\_3\)]], ":", " ", "s \[Rule] (v ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "(\[Tilde]t))\n\tA", Cell[BoxData[ \(TraditionalForm\`\_3\)]], ":", " ", "((\[Tilde](p ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "q)) ", Cell[BoxData[ FormBox[ RowBox[{"\[Wedge]", " ", RowBox[{"(", RowBox[{"\[Tilde]", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"\[Tilde]", StyleBox["p", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False, "StrikeThrough"->False, "Masked"->False, "CompatibilityType"->0, "RotationAngle"->0}]}], ")"}], FormBox[\(\(\[Wedge]\)\(\ \)\), "TraditionalForm"], StyleBox["r", FontSlant->"Plain"]}], ")"}]}], ")"}]}], TraditionalForm]]], Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "(\[Tilde]s)) \[Rule] ((t ", Cell[BoxData[ \(TraditionalForm\`\[Vee]\)]], " v) ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "(\[Tilde](t ", Cell[BoxData[ \(TraditionalForm\`\[Wedge]\)]], "v)))\n\tA", Cell[BoxData[ \(TraditionalForm\`\_4\)]], ":", " ", "w \[LeftRightArrow] (t ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Wedge]\)\(\ \)\)\)]], "v)\n \[Therefore] A : ((\[Tilde]p) ", Cell[BoxData[ FormBox[ RowBox[{"\[Wedge]", RowBox[{ StyleBox["q", FontSlant->"Plain"], "\[Wedge]", " "}]}], TraditionalForm]]], "(\[Tilde]r) ", Cell[BoxData[ \(TraditionalForm\`\(\[Wedge]\ \((\(\[Tilde]\)\(s\))\)\)\)]], ") \[Rule] w\nVeamos si con estos datos, la agumentaci\[OAcute]n es o no \ valida:" }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Sii[a_, b_] := Implies[a, b] && Implies[b, a];\)\), "\[IndentingNewLine]", \(\(n = 7;\)\), "\n", \(\(tautologia = True;\)\), "\n", \(\(p = Table[False, {t, n}];\)\), "\n", \(\(A1 := Implies[p[\([1]\)] && p[\([2]\)], p[\([5]\)]];\)\), "\[IndentingNewLine]", \(\(A2 := \ Implies[\(! p[\([1]\)]\) && p[\([3]\)], p[\([6]\)]];\)\), "\[IndentingNewLine]", \(\(A3 := Implies[p[\([4]\)], p[\([6]\)] && \((\(! p[\([5]\)]\))\)];\)\), "\[IndentingNewLine]", \(\(A4 := Implies[\((\(! \((p[\([1]\)] && p[\([2]\)])\)\))\) && \((\(! \((\(! p[\([1]\)]\) && p[\([3]\)])\)\))\) && \((\(! p[\([4]\)]\))\), \ \((p[\([5]\)] || p[\([6]\)])\) && \((\(! \((p[\([5]\)] && p[\([6]\)])\)\))\)];\)\), "\[IndentingNewLine]", \(\(A5 := Sii[p[\([7]\)], p[\([5]\)] && p[\([6]\)]];\)\), "\[IndentingNewLine]", \(\(AA := Implies[\((\(! p[\([1]\)]\))\) && p[\([2]\)] && \((\(! p[\([3]\)]\))\) && \((\(! p[\([4]\)]\))\), p[\([7]\)]];\)\), "\[IndentingNewLine]", \(\(expresion := Implies[A1 && A2 && A3 && A4 && A5, AA];\)\), "\n", \(\(For[i = 0, i < 2^n, \(i++\), j = i; \[IndentingNewLine]For[f = n, f > 0, \(f--\), resto = Mod[j, 2]; \[IndentingNewLine]j = Floor[j/2]; \[IndentingNewLine]If[resto \[Equal] 0, p[\([f]\)] = True, p[\([f]\)] = False];]; \[IndentingNewLine]If[ TrueQ[expresion], Null, tautologia = False];];\)\), "\n", \(If[tautologia, Print["\"], Print["\"]]\)}], \ "Input"], Cell[BoxData[ \("La forma enunciativa no es una tautolog\[IAcute]a"\)], "Print"] }, Closed]], Cell["Por tanto, esta alumna no aprobar\[AAcute] la signatura.", "Text", FontSize->14] }, Closed]] }, Open ]] }, Open ]] }, FrontEndVersion->"5.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 685}}, WindowSize->{1016, 651}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, StyleDefinitions -> "PASTELCOLOR.NB" ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 194, 4, 192, "Title"], Cell[1973, 59, 40, 0, 41, "Subtitle"], Cell[CellGroupData[{ Cell[2038, 63, 51, 1, 43, "Subsection"], Cell[2092, 66, 274, 7, 96, "Text"], Cell[CellGroupData[{ Cell[2391, 77, 159, 5, 37, "Subsubsection"], Cell[2553, 84, 199, 5, 30, "Text"], Cell[CellGroupData[{ Cell[2777, 93, 2638, 50, 578, "Input"], Cell[5418, 145, 693, 11, 58, "Print"], Cell[6114, 158, 391, 7, 39, "Print"] }, Closed]], Cell[6520, 168, 168, 3, 30, "Text"], Cell[CellGroupData[{ Cell[6713, 175, 2598, 49, 558, "Input"], Cell[9314, 226, 395, 7, 39, "Print"], Cell[9712, 235, 669, 11, 58, "Print"] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[10442, 253, 51, 1, 43, "Subsection"], Cell[10496, 256, 210, 7, 30, "Text"], Cell[CellGroupData[{ Cell[10731, 267, 159, 5, 37, "Subsubsection"], Cell[10893, 274, 598, 14, 118, "Text"], Cell[CellGroupData[{ Cell[11516, 292, 900, 17, 258, "Input"], Cell[12419, 311, 81, 1, 39, "Print"] }, Closed]], Cell[12515, 315, 81, 1, 30, "Text"], Cell[CellGroupData[{ Cell[12621, 320, 968, 19, 258, "Input"], Cell[13592, 341, 81, 1, 39, "Print"] }, Closed]], Cell[13688, 345, 124, 4, 30, "Text"], Cell[CellGroupData[{ Cell[13837, 353, 968, 19, 258, "Input"], Cell[14808, 374, 81, 1, 39, "Print"] }, Closed]], Cell[14904, 378, 142, 4, 30, "Text"], Cell[15049, 384, 622, 13, 118, "Text"], Cell[CellGroupData[{ Cell[15696, 401, 898, 17, 258, "Input"], Cell[16597, 420, 81, 1, 39, "Print"] }, Closed]], Cell[16693, 424, 81, 1, 30, "Text"], Cell[CellGroupData[{ Cell[16799, 429, 965, 19, 258, "Input"], Cell[17767, 450, 81, 1, 39, "Print"] }, Closed]], Cell[17863, 454, 124, 4, 30, "Text"], Cell[CellGroupData[{ Cell[18012, 462, 965, 19, 258, "Input"], Cell[18980, 483, 81, 1, 39, "Print"] }, Closed]], Cell[19076, 487, 144, 4, 30, "Text"] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[19269, 497, 51, 1, 43, "Subsection"], Cell[19323, 500, 1096, 19, 162, "Text"], Cell[CellGroupData[{ Cell[20444, 523, 159, 5, 37, "Subsubsection"], Cell[20606, 530, 6979, 190, 536, "Text"], Cell[CellGroupData[{ Cell[27610, 724, 1776, 38, 358, "Input"], Cell[29389, 764, 81, 1, 39, "Print"] }, Closed]], Cell[29485, 768, 88, 1, 30, "Text"], Cell[29576, 771, 2692, 92, 184, "Text"], Cell[CellGroupData[{ Cell[32293, 867, 1819, 39, 358, "Input"], Cell[34115, 908, 84, 1, 39, "Print"] }, Closed]], Cell[34214, 912, 88, 1, 30, "Text"] }, Closed]] }, Open ]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)