Quantifier Logic : Translation of sentence "All students have already done the exam for all course except course X"

445 Views Asked by At

As the title said, what is the best translation for "All students have already done the exam for all course except course X"? Me and my fellow students debated for quite a long time about this question. We use x is a domain of students and y is a domain of the courses, and Predicate P(x,y) is x already done exam course X. My answer is $$\forall x \forall y (P(x,y) \iff (y \neq Course X))$$ One of my friend answer is $$\forall x \forall y(P(x,y) \implies (y \neq Course X))$$ and the other answer is $$\forall x \forall y (P(x,y) \implies (y \neq Course X)) \land \exists x(\lnot P(x, Course X))$$ Which one do you think is right? And if none are right, what is the translation and why?

4

There are 4 best solutions below

1
On BEST ANSWER

Consider $S$ be the domain of students.

And $C:$ be the domain of course tests.

Let $\text{X-Course}$ be the "name" of the course to be excluded (err, the course that no student has yet taken a test in).

Let $P(x, y)$ denote "$x$ has taken $y$."


$$\forall x \in S, \forall y \in C \Big((y \neq \text{X-Course})\to P(x, y) \Big)$$

Or we can say, $$\forall x \in S, \forall y \in (C\setminus \{\text{X-Course}\}) \Big(P(x, y)\Big)$$

where $C\setminus \{\text{X-Course}\}$ is the set of all course tests, except for the test for Course $X$.

$\Huge($ And if you insist on the fact that we are to assume that the domain for $x$ is "All students", and the domain for $y$ is "All courses", with $P(x, y)$ meaning $x$ has taken the test in course $y$, and $X$ the name for the course in which no test has yet been taken,

Then at its simplest, we have: $$\forall x, \forall y\Big(\big(y\neq X\big) \ \rightarrow P(x, y)\Big)\Huge)$$


Alternatively, let the domain $D$ of x, y, consist of all persons, places, things.

Let $S(x)$ denote that element $x\in D$ is a student.

Let $C(x)$ denote that element $x \in D$ is a test for an academic course.

Let $P(x, y)$ denote "x has taken y".

Let $\text{X-Course }$ name the "not-yet-if-ever tested academic course X"

Then the sentence you are given can be translated as follows:

$$ \forall x, \forall y\Big(\big(S(x) \land C(y) \land (y \neq \text{X-course})\big) \to P(x, y)\Big)$$

7
On

$\forall x,y (P(x,y) \iff (y \neq Course X))$ can also be accepted, meaning no one has done exam for $X$ but all did other exams

EDIT

$$\forall x \forall y ((y \neq Course X) \implies P(x,y)) \land \exists x(\lnot P(x, Course X))$$ So the other answer you provided is close to being right only it has to switch places in the implication. This means each exam not being $X$ has been done but also fact is that not everyone has done $X$, so there is someone who didn't do it

0
On

Definitions:

variables: [($s$: student),($c$: course)]

constant: [$X$: course X]

relation: [$T(s,c)$: student $s$ has taken the exam for course $c$]

Interpretation 1:

$\forall s\forall c((c\neq X)\Rightarrow T(s,c))$.

In words: If a course, $c$, is not course $X$ then students have taken the exam for course $c$.

Interpretation 2(contrapositive of 1):

$\forall s\forall c(\neg T(s,c)\Rightarrow(c=X))$.

In words: If students have not taken the exam for course $c$, then course $c$ is course $X$.

0
On

Actually, all the existing answers do not accurately convey the same meaning as the original sentence (ignoring the grammatical errors), as interpreted by a native English speaker.

The actual meaning is:

Every student has taken the exam for every course $C$ that is not course $X$, but there is some student who has not taken the exam for course $X$ (otherwise we would not say "except $X$").

Which translates to:

$\forall s \in Students\ \forall C \in Courses\ ( C \ne X \to ( \text{$s$ has taken the exam for $C$} ) ) \\\ \land \exists s \in Students\ ( \text{$s$ has not taken the exam for $X$} )$

And I'll leave it to you to finish translating it to pure first-order logic.