I was given the english statement: If someone can be stabbed, then someone will kill him for sure
I'm a newbie in AI, and struggling with simple statements like this one. For example, I'm having even a trouble with naming verbs (can be stabbed => stab(x,y) or should it be stabbed(x,y), or canBeStabbed(x,y)?).
My statement for now looks like that:
ExEy stab(x,y) => kill(y,x)
Is that correct? Or am I missing something?
Thanks for any help.
Let $CanBeStabbed(x)$ mean that $x$ can be stabbed.
Let $WillKillForSure(x,y)$ mean that $x$ will kill $y$ for sure.
Of course you can use other, simpler names.
Then "Someone will kill $y$ for sure" is denoted by $$\exists x\; WillKillForSure(x,y)$$
The statement "If $y$ can be stabbed, then someone will kill $y$ for sure" will therefore be $$ CanBeStabbed(y) \Rightarrow \big(\exists x\; WillKillForSure(x,y)\big)$$
The English sattement implies that it is supposed to be true for anyone that can be stabbed, that is $$ \forall y \Big(CanBeStabbed(y) \Rightarrow \big(\exists x\; WillKillForSure(x,y)\big)\Big)$$
That is enough, but if you insist on using two-argument function for stabbing, you can also define $CanStab(x,y)$ to mean that $x$ can stab $y$. Then you can replace $CanBeStabbed(y)$ by $$ \exists x\; CanStab(x,y)$$ Then the formula would be $$ \forall y \Big(\big( \exists x\; CanStab(x,y)\big) \Rightarrow \big(\exists x\; WillKillForSure(x,y)\big)\Big)$$ It needs to be stressed that it's different than $$ \forall y \exists x \Big( CanStab(x,y) \Rightarrow WillKillForSure(x,y)\Big)$$ The first allows that the $x$ that can stab is totally different than the $x$ that will kill; in the second the $x$ that will kill must be a one that can stab.