number headings |
---|
auto, first-level 1, max 6, 1.1 |
#Remember
- [[FO - First order logic]] is powerful and expressive
- Model-checking is decidable (in [[PSPACE]]) when the universe is finite.
- [[Satisfiability]],[[Validity]],[[logical equivalence]] are all undecidable (proven a by the [[Turing machine]] to [[Domino-Problem]] reduction)
- For infinite universes one ca fix a model and study its FO-Theories. Some [[FO-theories]] are decidable some not.
- Some FO-Theories can be compared to other FO-Theories using [[Logical reduction]]
Goal: check which properties/ languages are definable in logic (for instance [[FO - First order logic]])
==Examples:==
- Is the property "Universe has even [[Cardinality]]" definable in [[FO - First order logic]]?
- Is the class of "Strongly connected graphs" definable in [[FO - First order logic]] using edges? (Not possible in [[FO - First order logic]])
- Is the language
$L=(AA)*$ definable in [[FO - First order logic]] using$\leq$ (Not possible in [[FO - First order logic]])
meaning:
$L=(AA)*$ is the set of all finite strings that have even length
Problem: If we want to prove one of this properties it is very easy to proof if it is possible to prove. We write down the formula, check if it says what we want it says and it is done. It is different though if we can not find a prove. It is very difficult to show that something is not possible.
GOAL: check whether
Example:
[[The evaluation game]] for [[QBF]]
input:
The Structure
==Question:==
Now we use a [[Tableaux]] tree structure back from [[Verification 3]] to see if the formula is valid. We add
This is the first picture of the [[Tableaux]]. We start with a
After the branches with the
Tree top:
<iframe class="quiver-embed" src="https://q.uiver.app/?q=WzAsMTYsWzQsMCwiXFx0ZXh0Y29sb3J7cmVkfXtcXGZvcmFsbCBwfSJdLFs1LDEsIlxcdGV4dGNvbG9ye2dyZWVufXtcXGV4aXN0cyBxfSJdLFszLDEsIlxcdGV4dGNvbG9ye2dyZWVufXtcXGV4aXN0cyBxfSJdLFsxLDIsIlxcdGV4dGNvbG9ye3JlZH17XFxmb3JhbGwgcn0iXSxbMywyLCJcXHRleHRjb2xvcntyZWR9e1xcZm9yYWxsIHJ9Il0sWzUsMiwiXFx0ZXh0Y29sb3J7cmVkfXtcXGZvcmFsbCByfSJdLFs3LDIsIlxcdGV4dGNvbG9ye3JlZH17XFxmb3JhbGwgcn0iXSxbMCwzLCIqIl0sWzEsMywiKiJdLFsyLDMsIioiXSxbMywzLCIqIl0sWzUsMywiKiJdLFs2LDMsIioiXSxbNywzLCIqIl0sWzgsMywiKiJdLFs4LDJdLFswLDEsInA9MSIsMV0sWzAsMiwicD0wIiwxXSxbMiwzLCJxPTAiLDFdLFsyLDQsInE9MSIsMV0sWzEsNSwicT0wIiwxXSxbMSw2LCJxPTEiLDFdLFszLDddLFszLDhdLFs0LDldLFs0LDEwXSxbNSwxMV0sWzUsMTJdLFs2LDEzXSxbNiwxNF1d&embed" width="1200" height="560" style="border-radius: 8px; border: none;"></iframe>Tree bottom:
<iframe class="quiver-embed" src="https://q.uiver.app/#?q=WzAsOCxbMSwwLCJcXHsgKHAgXFxsb3IgXFxuZWcgcSkgXFxsYW5kIChyIFxcbG9yIHEpIFxcfSJdLFsxLDEsIlxce3AgXFxsb3IgXFxuZWcgcSxyIFxcbG9yIHFcXH0iXSxbMSwyLCJcXHtwLHIgXFxsb3IgcVxcfSJdLFsyLDIsIlxce1xcbmVnIHEsciBcXGxvciBxXFx9Il0sWzEsMywiXFx7cCxxXFx9Il0sWzIsMywiXFx7XFxuZWcgcSxyXFx9Il0sWzAsMywiXFx7cCxyXFx9Il0sWzMsMywiXFx7XFxuZWcgcSxxXFx9Il0sWzAsMV0sWzEsMl0sWzEsM10sWzIsNF0sWzMsNV0sWzIsNl0sWzMsN11d&embed" width="891" height="560" style="border-radius: 8px; border: none;"></iframe>Question: How do we evaluate the tree? What happens if there is a contradiction like in this tree.
This is very similar to a game ([[2-player game]])
[[Player]]:
-
$\textcolor{red}{\text{Adam }(\forall,\land)}$ in literature called Verifyer -
$\textcolor{green}{\text{Eve }(\exists,\lor) }$ in literature called Falsifier
One game can have multiple rounds. One round of the game consists of Adam and Eve choosing branches of the node (either go left or right) taking turns.
What is the goal ?
Eve wants to find a [[Strategy]] that allows her to reach a
$True$ leaf (of the board) no matter what Adam does!
[[Board]] / Arena: Is a tree or a graph might be finite or infinite. In our case it is the tree that we drew above.
What is the point? What is behind this? We want to check if a formula holds on a Structure! Here we have a Lemma!
[[Lemma 8]]:
==Example:==
Our structure
What is the board: Upper tree:
<iframe class="quiver-embed" src="https://q.uiver.app/?q=WzAsNyxbMiwwLCJcXGZvcmFsbCBwIl0sWzEsMSwiXFxleGlzdHMgcSJdLFszLDEsIlxcZXhpc3QgcSJdLFswLDIsIioiXSxbMSwyLCIqIl0sWzMsMiwiKiJdLFs0LDIsIioiXSxbMCwxLCJwPTAiLDIseyJjb2xvdXIiOlswLDYwLDYwXX1dLFswLDIsInA9MSIsMCx7ImNvbG91ciI6WzAsNjAsNjBdfV0sWzEsMywicT0wIiwxLHsiY29sb3VyIjpbMTIwLDYwLDYwXX0sWzEyMCw2MCw2MCwxXV0sWzEsNCwicT0xIiwwLHsiY29sb3VyIjpbMTIwLDYwLDYwXX0sWzEyMCw2MCw2MCwxXV0sWzIsNSwicT0wIiwxLHsiY29sb3VyIjpbMTIwLDYwLDYwXX0sWzEyMCw2MCw2MCwxXV0sWzIsNiwicT0xIiwwLHsiY29sb3VyIjpbMTIwLDYwLDYwXX0sWzEyMCw2MCw2MCwxXV1d&embed" width="688" height="432" style="border-radius: 8px; border: none;"></iframe>Lower tree:
<iframe class="quiver-embed" src="https://q.uiver.app/?q=WzAsNSxbMiwwLCJcXHsocCBcXGxhbmQgXFxuZWcgcSkgXFxsb3IgKFxcbmVnIHAgXFxsYW5kIHEpXFx9Il0sWzAsMSwiXFx7XFx7IChwIFxcbGFuZCBcXG5lZyBxKSBcXH0iXSxbNCwxLCJcXHsoXFxuZWcgcCBcXGxhbmQgcSlcXH0iXSxbMCwyLCJcXHtwLFxcbmVnIHFcXH0iXSxbNCwyLCJcXHtcXG5lZyBwLHFcXH0iXSxbMCwxXSxbMCwyXSxbMSwzXSxbMiw0XV0=&embed" width="700" height="300" style="border-radius: 8px; border: none;"></iframe>Now we evaluate the turns
Due to our way to paint the graph the
First what happens if
$p=0,q=0$
- left branch:
${p=0,\neg q = 1} \to \text{False}$ - right branch:
${\neg p=1, q = 0} \to \text{False}$ As both leafs are False the$\textcolor{green}{Eve}$ does not have a choice and this branch is counted as False.
Now we look at the other option of
$p=0,q=1$
- left branch:
${p=0,\neg q = 0} \to \text{False}$ - right branch:
${\neg p=1, q = 1} \to \text{True}$ As the second leave is True$\textcolor{green}{Eve}$ always can choose to go to the True leave hereby this branch counts as True
Concluding if
What happens if
$p=1,q=0$
- left branch:
${p=1,\neg q = 1} \to \text{True}$ - right branch:
${\neg p=0, q = 0} \to \text{False}$ As the first leaf is True$\textcolor{green}{Eve}$ always can choose to go to the True leaf, hereby this branch counts as True.
Now we look at the other option of
$p=1,q=1$
${p=1,\neg q = 0} \to \text{False}$ ${\neg p=0, q = 1} \to \text{False}$ As both leaves after the crossing are False the$\textcolor{green}{Eve}$ does not have a choice and this branch is counted as False.
To sum up if
Summarizing if
This means that
This was an example for [[QBF]]. We could also do [[The evaluation game]] also for [[FO - First order logic]] the only difference is that the universe does not only contain two elements but
What do we need:
- We need the formula
$\phi$ in [[Negation Normal Form]] (due to a negation swapping the roles of Adam and Eve)
Arena:
Nodes: are named
$\alpha$ and$\lambda$
$\alpha$ : is a sub-formula of$\phi$ $\lambda$ is a binding interpreting the Free variables$\alpha$ into the universe$U_s$
Rules:
First lets look at the easy case:
- if
$\alpha=R(x_1,...,x_k)$ then the game ends$\textcolor{green}{Eve}$ wins if$(\lambda(x_1),...\lambda(x_k)) \in R^s$ , otherwise$\textcolor{red}{Adam}$ wins. ==Meaning:== Before we have been in [[QBF]] the we did not have proper relationship symbols. Now the Relationship symbols$R$ are in leafs and need to be applied to our variables$x$ i.e.$R(x_1,...,x_k)$ . Afterwards we interpret the resulting variables$x$ and see if it is part of the interpretation of the relation. For instance the in the [[QBF]] example the interpretation of p i.e.$\lambda(p)$ needed to be equal to one. - if
$\alpha=\neg R(x_1,...,x_k)$ then game ends$\textcolor{red}{Adam}$ wins if$(\lambda(x_1),...\lambda(x_k)) \in R^s$ , otherwise$\textcolor{green}{Eve}$ wins. ==Meaning:== the same as above only that the result is negated by the$\neg$ following that$\textcolor{red}{Adam}$ wins - if
$\alpha = \alpha_1 \lor \alpha_2$ : then eve can choose which branch to take down the tree. i.e.$\alpha'={\alpha_1,\alpha_2}$ hoping that the chosen branch is True. The game continues at$(\alpha',\lambda)$ . The tree looks like this and eve can choose which branch to follow down:
- if
$\alpha = \alpha_1 \land \alpha_2$ : then Adam can choose which branch to take down the tree. i.e.$\alpha'={\alpha_1,\alpha_2}$ hoping that the chosen branch is False. The game continues at$(\alpha',\lambda)$ . - if
$\alpha = \exists x \alpha'(x)$ $\textcolor{green}{Eve}$ can choose any element$u$ that is part of the universe$U^s$ ($u \in U^S$ ) to be assigned (bound) to x, the game continues with at the position$(\alpha',\lambda')$ where$\lambda'= \lambda[x:=u]$ i.e. a variable$x$ gets assigned and element$u$ of the universe$U^S$ - if
$\alpha = \forall x \alpha'(x)$ $\textcolor{red}{Adam}$ can choose any element$u$ that is part of the universe$U^s$ ($u \in U^S$ ) to be assigned (bound) to x, the game continues with at the position$(\alpha',\lambda')$ where$\lambda'= \lambda[x:=u]$ i.e. a variable$x$ gets assigned and element$u$ of the universe$U^S$
Break
Sometimes the question is if a certain property
Example: We have a [[Definability]] problem and we express a property in [[Monadic second order logic]], a more complex logic than [[FO - First order logic|FO]]. Now we want to know can we also express this property in [[FO - First order logic]]?
[!note] Notation:
$P: \text{ property (i.e. a set of structures)}$ $S: Structure$ $\phi: \text{FO formula}$
-
$P$ is [[Definability|defined by]]$\phi$ if for every$S$ $S \in P \iff S \models \phi$
-
$S,S'$ [[elementary equivalence|elementary equivalent]] if for every$\phi$ :$S\models \phi \iff S'\models \phi$
[[elementary equivalence]] is probably called [[elementary equivalence]] because [[FO - First order logic]] was previously called elementary logic.
[!Note] [[Lemma 9]] If there are two structure
$S,S'$ such that:$S \in P$ and$S\notin P$ and$S$ and$S'$ are [[elementary equivalence|elementary equivalent]] then$\text{\textcolor{red}{P is not definable in First order logic}}$
==Proof through contradiction==:
We have
Lets assume we have a property P that is [[Definability|defined by]]
[[Definability| defined by]] means that every Structure
$S \models \phi$ $S \in P$
Now we know that
So that P is definable in [[FO - First order logic]] the following statement needs to hold:
But by definition
If we want to prove that a property is not definable than we find two structures S and S' that are elementary equivalent and one fulfills the property and one not. Then we can point at [[Lemma 9]] and have proven that the property is not definable in [[FO - First order logic]].
Note
The number of Quantifiers is normally much smaller than the [[Quantifier rank]].
The [[Quantifier rank]] is smaller or equal the number of Quantifiers.
Example:
2 Ranks are because of the two Quantifiers
It is only one Rank for
One could resolve the formula to the following making the rank clearer:
Note
[[elementary equivalence]] is more strict as [[n-equivalence]].
[!note] [[Lemma 10]] If there are two structure
$S,S'$ such that:$S \in P$ and$S\notin P$ and$S$ and$S'$ are [[n-equivalence|n-equivalent]] then$\text{\textcolor{red}{P is not definable in First order logic}}$
==NEW GOAL:==
We want to construct a game
==Players:==
-
Duplicator :
Goal: Wants to prove that
$S'$ and$S$ are [[n-equivalence|n-equivalent]]. -
Spoiler :
Goal: Want to disprove that
$S'$ and$S$ are [[n-equivalence|n-equivalent]]
==Arena:==
The arena is a graph. The nodes of the graph are tuples
One plays n rounds.
At the start there are two empty sets
==one round:==
Spoiler begins: and chooses an element
Duplicator responds: and chooses and element
==Who wins?==
The duplicator wins if after n turns the two sets (now containing the chosen elements of
==Board:==
Two Graphs
==First turn:==
The Spoiler chooses a node in
And the duplicator responds. In this stage of the game he can choose any node. He can't loose. But in this example he chooses the one in the upper left corner node in
![[Verification 7_image_3.png|500]]
The result of this round is that both sets have a single isolated node in them. They are still isomorphic.
==Second turn==
Now the duplicator chooses another node that is isolated. There are still no nodes that have no connections (edge).
![[Verification 7_image_4.png|500]]
The challenge for the duplicator is now to find a node that is also isolated. And he finds one by the node in the lower left corner.
![[Verification 7_image_5.png|500]]
==Third turn:==
The Spoiler chooses now a third node that is isolated!
![[Verification 7_image_6.png|500]]
But here the duplicator can not respond anymore independent of the choice he does he can not choose a third node that is isolated! ==He loses after two turns!==
Spoiler has a strategy to kill the duplicator in the third rounds! They are only [[n-equivalence|2-equivalent]]
Note: One can also choose the same node twice, but in the example the structure is still different!
==Board:==
Two Graphs
==Questions to ask:==
- Can the Duplicator survive n rounds e.g. 3 rounds?
- Can we survive n rounds for every n? -> a finite number of rounds
- Can the Duplicator survive for ever?
==Turn 1===
The spoiler chooses one element in
==Turn 2==
The spoiler chooses to adjacent elements in
The duplicator chooses another element in
==Turn 3==
Now the spoiler chooses a node not in
The duplicator can not choose a element between the previous chosen two elements of the Spoiler and hereby he loses.
Spoiler has a strategy to kill the duplicator in the third rounds! They are only [[n-equivalence|2-equivalent]]
Question: How does this translate to [[n-equivalence]] Does it mean that the above formula can be at most [[n-equivalence|3-equivalent]] because it has only three nested Quantifiers?
On [[isomorphic|non-isomorpic]] finite structures, Spoiler wins the Ehrenfeucht Fraise game eventually.
==Why? == Due to the finite amount of elements in the structure at some point all elements of one of the two structures will be selected. Then, due to its [[isomorphic|non-isomorphic]] nature a ==element that is not present in one of the two structures will be chosen==. In that moment the Spoiler wins as the Duplicator can not chose the element as it is not present.
[!note] A measure of similarity [[remoteness]] How long the duplicator survies in the game is a measure of how simmilar two structures are. The longer he survives the more simmilar the structures are.