You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
5.0 KiB

1 month ago
  1. We start by translating $\varphi$ to $\hat{\varphi} = \skel$ and assign the following variables to the theory literals:
  2. \begin{itemize}
  3. \item $e_{0}\Leftrightarrow(a=b)$
  4. \item $e_{1}\Leftrightarrow(a=f(a))$
  5. \item $e_{2}\Leftrightarrow(b=f(a))$
  6. \item $e_{3}\Leftrightarrow(d=a)$
  7. \end{itemize}
  8. $ \hat{\varphi} = (\clause{e_{0}; e_{1}; e_{2}}) \land (\clause{\lnot e_{0}; e_{1}}) \land (\clause{\lnot e_{1}; e_{2}}) \land (\clause{e_{2}; e_{3}}) \land (\clause{\lnot e_{2}; e_{1}}) \land (\clause{\lnot e_{3}; \lnot e_{1}}) $
  9. \hspace{-0.09cm}\scalebox{0.85}{
  10. \begin{dplltabular}{4}
  11. \dpllStep{1|2|3|4}
  12. \dpllDecL{0|1|2|2}
  13. \dpllAssi{ - |$\lnot e_{0}$|$\lnot e_{0}, \lnot e_{1}$|$\lnot e_{0}, \lnot e_{1}, \lnot e_{2}$}
  14. \dpllClause{1}{$e_{0}, e_{1}, e_{2}$}{$e_{0}, e_{1}, e_{2}$|$e_{1}, e_{2}$|$e_{2}$|\conflict}
  15. \dpllClause{2}{$\lnot e_{0}, e_{1}$}{$\lnot e_{0}, e_{1}$|\done|\done|\done}
  16. \dpllClause{3}{$\lnot e_{1}, e_{2}$}{$\lnot e_{1}, e_{2}$|$\lnot e_{1}, e_{2}$|\done|\done}
  17. \dpllClause{4}{$e_{2}, e_{3}$}{$e_{2}, e_{3}$|$e_{2}, e_{3}$|$e_{2}, e_{3}$|$e_{3}$}
  18. \dpllClause{5}{$\lnot e_{2}, e_{1}$}{$\lnot e_{2}, e_{1}$|$\lnot e_{2}, e_{1}$|$\lnot e_{2}$|\done}
  19. \dpllClause{6}{$\lnot e_{3}, \lnot e_{1}$}{$\lnot e_{3}, \lnot e_{1}$|$\lnot e_{3}, \lnot e_{1}$|\done|\done}
  20. \dpllBCP{ - | - |$\lnot e_{2}$| - }
  21. \dpllPL{ - | - | - | - }
  22. \dpllDeci{$\lnot e_{0}$|$\lnot e_{1}$| - | - }
  23. \end{dplltabular}
  24. }
  25. Conflict in step 4\\
  26. \scalebox{0.75}{
  27. \begin{tikzpicture}[>=latex,line join=bevel,]
  28. \pgfsetlinewidth{1bp}
  29. %%
  30. \pgfsetcolor{black}
  31. % Edge: 1 -> 4
  32. \draw [->] (21.08bp,83.506bp) .. controls (26.44bp,80.758bp) and (33.44bp,77.508bp) .. (40.0bp,75.5bp) .. controls (51.601bp,71.949bp) and (65.006bp,69.732bp) .. (85.898bp,67.281bp);
  33. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  34. \pgfsetstrokecolor{strokecol}
  35. \draw (54.0bp,83.0bp) node {$$1$$};
  36. % Edge: 1 -> 5
  37. \draw [->] (21.966bp,90.636bp) .. controls (35.227bp,93.477bp) and (58.98bp,98.567bp) .. (86.047bp,104.37bp);
  38. \draw (54.0bp,107.0bp) node {$$5$$};
  39. % Edge: 2 -> 4
  40. \draw [->] (21.717bp,33.396bp) .. controls (33.05bp,36.904bp) and (52.243bp,43.253bp) .. (68.0bp,50.5bp) .. controls (71.462bp,52.092bp) and (75.062bp,53.969bp) .. (87.382bp,61.048bp);
  41. \draw (54.0bp,58.0bp) node {$$1$$};
  42. % Edge: 4 -> 3
  43. \draw [->] (107.67bp,69.723bp) .. controls (115.24bp,72.246bp) and (126.02bp,75.839bp) .. (145.09bp,82.197bp);
  44. % Edge: 5 -> 3
  45. \draw [->] (107.67bp,102.94bp) .. controls (115.41bp,100.08bp) and (126.51bp,95.995bp) .. (145.47bp,89.01bp);
  46. % Node: 1
  47. \begin{scope}
  48. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  49. \pgfsetstrokecolor{strokecol}
  50. \draw (11.0bp,88.5bp) ellipse (11.0bp and 11.0bp);
  51. \draw (11.0bp,88.5bp) node {$\lnot e_{1}$};
  52. \end{scope}
  53. % Node: 4
  54. \begin{scope}
  55. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  56. \pgfsetstrokecolor{strokecol}
  57. \draw (97.0bp,66.5bp) ellipse (11.0bp and 11.0bp);
  58. \draw (97.0bp,66.5bp) node {$e_{2}$};
  59. \end{scope}
  60. % Node: 5
  61. \begin{scope}
  62. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  63. \pgfsetstrokecolor{strokecol}
  64. \draw (97.0bp,106.5bp) ellipse (11.0bp and 11.0bp);
  65. \draw (97.0bp,106.5bp) node {$\lnot e_{2}$};
  66. \end{scope}
  67. % Node: 2
  68. \begin{scope}
  69. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  70. \pgfsetstrokecolor{strokecol}
  71. \draw (11.0bp,30.5bp) ellipse (11.0bp and 11.0bp);
  72. \draw (11.0bp,30.5bp) node {$\lnot e_{0}$};
  73. \end{scope}
  74. % Node: 3
  75. \begin{scope}
  76. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  77. \pgfsetstrokecolor{strokecol}
  78. \draw (156.0bp,85.5bp) ellipse (11.0bp and 11.0bp);
  79. \draw (156.0bp,85.5bp) node {$\bot$};
  80. \end{scope}
  81. %
  82. \end{tikzpicture}
  83. }
  84. \begin{prooftree}
  85. \AxiomC{$1. \; e_{0} \lor e_{1} \lor e_{2}$}
  86. \AxiomC{$5. \; \lnot e_{2} \lor e_{1}$}
  87. \BinaryInfC{$e_{0} \lor e_{1}$}
  88. \end{prooftree}
  89. \hspace{-0.09cm}\scalebox{0.85}{
  90. \begin{dplltabular}{4}
  91. \dpllStep{5|6|7|8}
  92. \dpllDecL{1|1|1|1}
  93. \dpllAssi{$\lnot e_{0}$|$\lnot e_{0}, e_{1}$|$\lnot e_{0}, e_{1}, e_{2}$|\makecell{$\lnot e_{0}, e_{1}, e_{2}, $ \\ $\lnot e_{3}$}}
  94. \dpllClause{1}{$e_{0}, e_{1}, e_{2}$}{$e_{1}, e_{2}$|\done|\done|\done}
  95. \dpllClause{2}{$\lnot e_{0}, e_{1}$}{\done|\done|\done|\done}
  96. \dpllClause{3}{$\lnot e_{1}, e_{2}$}{$\lnot e_{1}, e_{2}$|$e_{2}$|\done|\done}
  97. \dpllClause{4}{$e_{2}, e_{3}$}{$e_{2}, e_{3}$|$e_{2}, e_{3}$|\done|\done}
  98. \dpllClause{5}{$\lnot e_{2}, e_{1}$}{$\lnot e_{2}, e_{1}$|\done|\done|\done}
  99. \dpllClause{6}{$\lnot e_{3}, \lnot e_{1}$}{$\lnot e_{3}, \lnot e_{1}$|$\lnot e_{3}$|$\lnot e_{3}$|\done}
  100. \dpllClause{7}{$e_{0}, e_{1}$}{$e_{1}$|\done|\done|\done}
  101. \dpllBCP{$e_{1}$|$e_{2}$|$\lnot e_{3}$| - }
  102. \dpllPL{ - | - | - | - }
  103. \dpllDeci{ - | - | - | - }
  104. \end{dplltabular}
  105. }
  106. $\Model_{\EUF} := (a \neq b) \land (a = f(a)) \land (b = f(a)) \land (d \neq a) $ \\
  107. Check if the assignment is consistent with the theory:
  108. \begin{align*}
  109. &\{a, f(a)\}, \{b, f(a)\}, \{d\}\\
  110. &\{d\}, \{a, b, f(a)\}
  111. \end{align*}
  112. $\Model_{\EUF}$ is not consistent with the theory, because of: $(a \neq b) $\\
  113. $\Rightarrow$ We need to add a blocking clause from $\Model_{\EUF}: \\ $
  114. $BC :=e_{0} \lor \neg e_{1} \lor \neg e_{2} \lor e_{3}$\\