How do you represent the following sentence in first-order logic

first-order-logiclogicpredicate-logic

Q) The best score in Greek is always higher than the best score in French.
AIMA book shows this solution-:
Ans=>∀s ∃x ∀y Score(x,G,s) > Score(y,F, s).

AIMA has defined-:
score(x,c,s) as score obtained by student x in course c in semester s.

My Confusion-:
I understand ∃x Score(x,G,s) part.
But I am confused why are we saying ∀y? Shouldn't that be just ∃y as we want to compare with the best score?

Best Answer

All we need is that all French scores are lower than the best Greek score. It then automatically follows that the best French score also obeys that. And vice versa, if the best French score is lower than the best Greek one, then the same is true for all French scores (as these are lower or equal). So implicitly the solution is using the above argument (based on transitivity of $>$) to avoid mentioning "the best score in French" at all.

It's not a literal translation of the sentence in that sense but one that is equivalent to it if $<$ is indeed transitive (and all best scores are well-defined, because the domain is finite or some such reason).

You could formulate it more literally by introducing the owners of both best scores first and then comparing them:

$$\forall s \exists x \exists x': (\forall y: \text{score}(x,G,s) \ge \text{score}(y,G,s)) \land (\forall y: \text{score}(x',F,s) \ge \text{score}(y,F,s)) \land (\text{score}(x,G,s) > \text{score}(x',F,s))$$