I'm studying for my exam and I'd appreciate any help.
In this exercise we have the following first order signature : L = ($\varnothing$,P) and P = {$E^2, =^1,G^1 $}.
Here's an interpretation I of domain $D_I$ = {$v_0, v_1,v_2,v_3$ } with:
$E^I $= {$(v_0, v_0), (v_0, v_1), (v_0, v_2), (v_1,v_1), (v_2, v_0), (v_3 , v_0), (v_3 , v_1), (v_3 , v_2) $}
$ =^I $ = {$(v_0, v_0), (v_1,v_1), (v_2, v_2), (v_3 , v_3) $}
$ G^I $ = {$v_0, v_3$}
" I " can be considered as an oriented graph colored, where the relation of adjacency is denoted as "E", grey vertexes are denoted as " G ", and " = " represents equality.
The question is: write a first order formula which represents the sentence "Every non grey vertex has exactly one edge leaving it".
I wrote this formula but I'm not sure if it's correct:
$((\forall x \lnot G(x)) \Rightarrow∃y E(x,y))∧∀x∀y∀z((E(x,y)∧E(x,z))⇒y=z) $
Quantification over individuals that satisfy a given predicate usually does not follow the syntax that you use. Moreover, the statement about uniqueness is a condition satisfied by every non-grey vertex. So I would write
$$\forall x. \lnot G(x) \Rightarrow (\exists y E(x,y) \wedge \forall w \forall z. (E(x,w) \wedge E(x,z) \Rightarrow w = z))$$
The first conjunct in the conclusion of the implication expresses that there exists an edge leaving $x$. The second conjunct expresses that any two edges leaving $x$ have the same terminal endpoint.