"A dragon is happy only if it has a green child".
Have I translated this statement correctly into logic (below)?
$\forall X \cdot dragon(X) \wedge happy(X) \Rightarrow \exists Y \cdot childOf(Y,X) \wedge green(Y)$
$childOf(Y,X)$ is true when $Y$ is a child of $X$.
This is correct, if you make sure that $\forall X$ quantifies the whole statement, i.e. if you write: $$\forall X\big(dragon(X)\land happy(X)\to \exists Y\left( childOf(Y,X)\land green(Y)\right)\big)$$