Which of the following are possible (semantically and syntactically correct) first-order-logic translation of "Salma loves any class which is harder than every Algorithms class".
Is the following translation correct ? and Why ?
$\forall x \forall y[[Class(x) \land AlClass(y) \land Harder(x,y)] \to Loves(Salma,x)]$
My prof considered it as a wrong translation.
I believe this would actually end up meaning "Salma loves any class which is harder than some Algorithms class."
To see why, consider taking any $x$ and $y$ where $x$ is a class, $y$ is an algorithms class, and $x$ is harder than $y,$ and see that this implies that Salma loves $x,$ regardless of whether $x$ is harder than any other algorithms class.
I believe a correct translation would be $\forall x \Big[\big[\text{Class}(x) \wedge [\forall y \text{AlClass}(y) \to \text{Harder}(x,y)]\big] \to \text{Loves}(\text{Salma}, x)\Big].$
Edit: here's a more concrete counterexample for why the two translations are not the same.
Let's say we had three classes, $a, b_1, b_2,$ where $b_1$ and $b_2$ are algorithms classes and $a$ is harder than $b_1,$ but not $b_2.$
Using your translation, because the sentence must hold for all $x$ and $y,$ it must hold when we use the substution $x = a, y = b_1,$ so $[\text{Class}(a) \wedge \text{AlClass}(b_1) \wedge \text{Harder}(a, b_1)] \to \text{Loves}(\text{Salma}, a).$
Now from our definitions we know that $\text{Class}(a), \text{AlClass}(b_1),$ and $\text{Harder}(a, b_1)$ are all true, so by conjunction we get $\text{Class}(a) \wedge \text{AlClass}(b_1) \wedge \text{Harder}(a, b_1),$ and by Modus Ponens we get $\text{Loves}(\text{Salma}, a).$ So, Salma must love $a,$ regardless of whether $a$ is harder than $b_2,$ or any other algorithms class.
But if you look at my translation, letting $x = a,$ it is not true that $\forall y [\text{AlClass}(y) \to \text{Harder}(a, y)]$ because this is not true for $b_2,$ which both is an algorithms class and is not strictly less hard than $a.$ This doesn't proclude Salma from loving $a,$ but this translation does not imply that Salma must love $a.$