I am not sure whether my friend is saying the truth or if he's lying, how can I get the correct information out of him using logic? In a logic course, one of the problems went as follows:
You forgot whether the Logic class is at 11 or 12. Your friend certainly
knows which; but sometimes he tells the truth and at other times he
deliberately lies, and you know that he will do one of these but you do
not know which. What should you ask him?
Name the statement "logic class  is at 11": $p_1$ and "logic class is at 12": $p_2$.
The hint said that one should find a statement that is logically equivalent to $p_1$ or $p_2$. So I used this statement:
$( (p_1 \implies (p_1 \land (\neg p_1)) \Longleftrightarrow (\neg p_1) )$. So the question I should ask my hypothetical friend is "If the class is at 11, then the class is at 11 and 12 right?" But then whether he says yes or no it is not important, in either case the statement is equivalent to "the class is at 12" !
I am confused. Is this correct? I deliberately made a question from which I can only conclude $p_2$! It's like I am cheating.
If my answer isn't correct, what should I ask?
 A: The central difficulty of this question seems to lie in our restriction to propositional calculus with two particular atomic propositions. Otherwise, if we are allowed to use a richer language in grammatical capabilities or introduce additional propositions, the question would be reduced almost to triviality. So, we need to find a principled interpretation of propositional calculus and a set of assumptions that we shall employ in coherence. It should be emphasised that we shall not interfere with propositional calculus; we shall articulate a setting in semantic and pragmatic terms the formalism of propositional calculus signifies.
We can analyse the "friend" in the question into two disparate characters, let us call them knight and knave in memory of Raymond Smullyan. The knight always takes an honest attitude and tells truths, points to the right road and the like, whereas the knave always takes a deceptive attitude and tells lies, points to the wrong road and the like. Hence, we talk to a person, but we do not know whether he is a knight or a knave.
An important assumption, which is usual in such problems, but should be remarked here, is that we know there are only two choices; the logic class is either at 11 or at 12. Thus, we can infer with certainty that if one choice is not the case, then the other one is. Our collocutor also knows that there are only two choices, furthermore, he knows which one is the case.
By a conditional proposition $p\rightarrow q$, we shall understand that given $p$, our collocutor's response will be about $q$. Thus, $p_{1}\rightarrow p_{2}$ will represent such a situation that we point to $11$ on our wirst watch and our collocutor points to $12$ in response. Alternatively, we may suppose, the conditional indicates that if we asked whether $p_{1}$, then our collocutor would say $p_{2}$. We might conjure up various natural situations on the logical baseline.
Subsequently, the truth values of the propositions $p_{1}$ and $p_{2}$ in the conditional will indicate the given situation in the antecedent and our interlocutor's attitude in the consequent. In order to facilitate explanation, we may additionally indicate the truth values $0$ and $1$ in square brackets.
Since the knight is honest, his attitude will be univocal and mutually opposite for $p_{1}$ and $p_{2}$. Hence, if the given situation is $p_{1}$ and $p_{1}$ is indeed the case ($[1]$), then the knight's attitude for $p_{2}$ will be negative ($[0]$) and vice versa. Since the knave is deceptive, his attitude will be equivocal on $p_{1}$ and $p_{2}$. Hence, if the given situation is $p_{1}$ and $p_{1}$ is indeed the case ($[1]$), then the knave's attitude for $p_{2}$ will be affirmative ($[1]$) and so for the case that the given situation $p_{1}$ is not the case ($[0]$).
By a resultant truth value $0$, we shall understand a negative reply (i.e., "no") and By a resultant truth value $1$, we shall understand a negative reply (i.e., "yes"). We may phrase the relevant question in any way that will sound or appear to us natural.
As we know from truth table, $p_{1}\rightarrow p_{2}$ presents us four resultant possibilities, one with truth value $0$ ("no") and three with truth value $1$ ("yes"). For example, if we asked our collocutor "if we said that logic class was at 11, then would you reply that logic class is at 12?" and he answered "no", we would realise that we had talked to a knight and logic class was indeed at 11. However, upon an affirmative answer, we could not conclude whether we had talked to a knight or knave.
Therefore, let us extend our question to $(p_{1}\rightarrow p_{2})\rightarrow p_{1}$.
We have to specify which truth value of the additional consequent, $p_{1}$, reflects whose attitude. We shall see that the following truth value will result, the green coloured values falling into the knight's lot and the red coloured values into the knave's lot:
$\begin{array}{c c|c c}
p_{1} & p_{2} & p_{1}\rightarrow p_{2} &(p_{1}\rightarrow p_{2})\rightarrow p_{1}\\
\hline
\color{red}{0} &\color{red}{0} &\color{red}{1} &\color{red}{0}\\
\color{green}{0} &\color{green}{1} &\color{green}{1} &\color{green}{0}\\
\hline
\color{green}{1} &\color{green}{0} &\color{green}{0} &\color{green}{1}\\
\color{red}{1} &\color{red}{1} &\color{red}{1} &\color{red}{1}\\
\end{array}$
A natural language question might be "Suppose you would reply that logic class is at 12 if we asked whether logic class was at 11, would you then say that $p_{1}$ now?". We shall consider the knave's replies; the knight's ones are simpler varieties of them along the same baseline.
If $p_{1}$ is indeed not the case ($[0]$), the knave would reply "no". On the condition that if logic class were said to be at 11, he would say that logic class was at 12 (or, if logic class were not at 11, he would say that logic class was not at 12), a "yes" reply would affirm that he would say now that logic class is at 11. Hence, the affirmation would mean that he would not say logic class is at 12, and imply that logic class is not at 11, thus he would unwillingly tell the truth. Therefore, he would alter his attitude to "no".
If $p_{1}$ is indeed the case ($[1]$), the knave would reply "yes". On the condition that if logic class were said to be at 11, he would say that logic class was at 12, a "no" reply would deny that he would say now that logic class is at 11. Hence, the denial would mean that he would not say logic class is at 11, and imply that he would say logic class is at 12, and by the given conditional, logic class is at 11. Thus, he would unwillingly tell the truth. Therefore, he would alter his attitude to "yes".
