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.

41 lines
2.2 KiB

2 months 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(y=f(x))$
  4. \item $e_{1}\Leftrightarrow(y=f(y))$
  5. \item $e_{2}\Leftrightarrow(f(x)=z)$
  6. \item $e_{3}\Leftrightarrow(f(y)=x)$
  7. \item $e_{4}\Leftrightarrow(f(y)=z)$
  8. \item $e_{5}\Leftrightarrow(z=x)$
  9. \end{itemize}
  10. $\hat{\varphi} = (\clause{\lnot e_{0}; \lnot e_{1}}) \land (\clause{e_{0}; e_{1}}) \land (\clause{e_{2}; e_{3}; \lnot e_{4}}) \land (\clause{e_{1}; \lnot e_{5}}) \land (\clause{e_{3}; e_{5}; e_{4}}) \land (\clause{e_{0}; e_{5}})$
  11. \hspace{-0.09cm}\scalebox{0.85}{
  12. \begin{dplltabular}{6}
  13. \dpllStep{1|2|3|4|5|6}
  14. \dpllDecL{0|0|0|1|1|1}
  15. \dpllAssi{ - |$e_{2}$|$e_{2}, e_{3}$|$e_{2}, e_{3}, \lnot e_{0}$|\makecell{$e_{2}, e_{3}, \lnot e_{0}, $ \\ $e_{1}$}|\makecell{$e_{2}, e_{3}, \lnot e_{0}, $ \\ $e_{1}, e_{5}$}}
  16. \dpllClause{1}{$\lnot e_{0}, \lnot e_{1}$}{$\lnot e_{0}, \lnot e_{1}$|$\lnot e_{0}, \lnot e_{1}$|$\lnot e_{0}, \lnot e_{1}$|\done|\done|\done}
  17. \dpllClause{2}{$e_{0}, e_{1}$}{$e_{0}, e_{1}$|$e_{0}, e_{1}$|$e_{0}, e_{1}$|$e_{1}$|\done|\done}
  18. \dpllClause{3}{$e_{2}, e_{3}, \lnot e_{4}$}{$e_{2}, e_{3}, \lnot e_{4}$|\done|\done|\done|\done|\done}
  19. \dpllClause{4}{$e_{1}, \lnot e_{5}$}{$e_{1}, \lnot e_{5}$|$e_{1}, \lnot e_{5}$|$e_{1}, \lnot e_{5}$|$e_{1}, \lnot e_{5}$|\done|\done}
  20. \dpllClause{5}{$e_{3}, e_{5}, e_{4}$}{$e_{3}, e_{5}, e_{4}$|$e_{3}, e_{5}, e_{4}$|\done|\done|\done|\done}
  21. \dpllClause{6}{$e_{0}, e_{5}$}{$e_{0}, e_{5}$|$e_{0}, e_{5}$|$e_{0}, e_{5}$|$e_{5}$|$e_{5}$|\done}
  22. \dpllBCP{ - | - | - |$e_{1}$|$e_{5}$| - }
  23. \dpllPL{$e_{2}$|$e_{3}$| - | - | - | - }
  24. \dpllDeci{ - | - |$\lnot e_{0}$| - | - | - }
  25. \end{dplltabular}
  26. }
  27. $\Model_{\EUF} := (y \neq f(x)) \land (y = f(y)) \land (f(x) = z) \land (f(y) = x) \land (z = x) $ \\
  28. Check if the assignment is consistent with the theory:
  29. \begin{align*}
  30. &\{y, f(y)\}, \{f(x), z\}, \{f(y), x\}, \{z, x\}\\
  31. &\{f(x), f(y), x, y, z\}
  32. \end{align*}
  33. $\Model_{\EUF}$ is not consistent with the theory, because of: $(y \neq f(x)) $\\
  34. $\Rightarrow$ We need to add a blocking clause from $\Model_{\EUF}: \\ $
  35. $BC :=\neg e_{2} \lor \neg e_{3} \lor e_{0} \lor \neg e_{1} \lor \neg e_{5}$\\