I have been trying to convert the following sentences to First Order Logic. Could you please verify it, if I am doing it right. Thank you
Every firm whose all employees can code is happy.
Fi(X)-> X is a firm
E(Y,X)-> Y is an employee of X
C(Y)-> Y can code
H(X)-> X is happy.
∀X((Fi(X)∧∀y(E(Y,X)→C(Y)))→H(X))
Is this right or is it done this way? Because the above case evaluates to True if even an employee exists that doesn't code.
Does this work?
∀X((F(X)→∀y(E(Y,X)→C(Y)))→H(X))
Every manager who has a female employee is female.
F(X)-> X is a female E(Y,X)-> Y is an employee of X M(X)-> X is a Manager F(Y)-> Y is a female.
∀X(∃Y(M(X)∧E(Y,X)∧F(Y))→F(X))
Is this right?
Thank you
Yes, and that is okay. Any firm with an employee who does not code, may be happy or unhappy. However, if a firm is unhappy then there does exist an employee who cannot code.
No. That should be: $\forall X~\Big(F(X)\to\big(\forall Y~(E(Y,X)\to C(Y))\to H(X)\big)\Big)$
Because $(\phi\wedge \psi)\to \rho \iff \phi\to(\psi\to \rho)$ , and neither is logically equivalent to $(\phi\to\psi)\to \rho$
Yes, that is okay.
A note on capitalisation. We conventioinally use lowercase letters for variables, and constants, while reserving uppercase symbols for predicates. Case sensitivity is also important.
yandYare not interchangable. If you pick a symbol, stick to it.