The translations of "unless" and "except" into symbolic logic.

The following two exercises come from Logic for Mathematicians by J.B. Rosser, chapter 2 section one page 17. I am not so sure how to interpret the words "unless" and "except".

Notation: $\sim P$ represents negation the negation of $P$, and $PQ$ denotes $P\& Q$ which the author refers to as the logical product of $P$ and $Q$. Also, $P\equiv Q$ denotes "$P$ if and only if $Q$".

Exercise 3. If “$P$ ”, “$Q$ ”, and “$R$ ” are translations for “$x=y$ ” , “$x/z=y/z$ ”, and "$z\ne0$" , write a translation for “if $x=y$ , then $x/z=y/z$ except when $z=0$ ”

Solution: It is not the case that $(P\rightarrow Q)\sim R$ , i.e. we have $\sim[(P\rightarrow Q)\sim R]$ which is equivalent to $\sim[\sim(P\sim Q)\sim R]$ which is equivalent to $\sim\{[\sim P\sim(\sim Q)]\sim R\}$ (Note: the last step was an invalid manipulation, hence my conclusion is wrong) . Since $\sim(\sim Q)$ is equivalent to $Q$ and because the logical product is both associative and commutative, we have $\sim[Q\sim(PR)]$ hence $Q\rightarrow RP$.

My confusion is that I am pretty sure that $Q\equiv RP\space$ holds but i don't think that it would be the right translation. Am I right?

Exercise 4. If “$P$ ” and “$Q$ ” are the translations of “$(n-1)!+1$ is divisible by $n$ ” and “$n$ is prime” then write a translation for “$(n-1)!+1$ is not divisible by $n$ , unless $n$ is prime”

Solution: In other words we have that “the only time $(n-1)!+1$ is divisible by $n$ when $n$ is prime” or “$(n-1)!+1$ is divisible by $n$ when and only when $n$ is prime”, hence $P\equiv Q$.

I am not sure if I interpreted `unless' correctly here.


More Reasoning for Exercise 3:

I arrive at the conclusion $\sim[(P\rightarrow Q)\sim R]$ because it says "$P\rightarrow Q$ except when $\sim R$", which I take to mean that "it is false that both $\sim R$ and $P\rightarrow Q$ are true at the same time"; i.e. it is not the case that $(P\rightarrow Q)\&\sim R$, hence $\sim[(P\rightarrow Q)\sim R]$. From there mechanical manipulation of symbols gets me to $Q\rightarrow RP$ (again this is wrong).

Additionally, though I am certain that $RP \rightarrow Q$ I am not quite sure how to reason this from the sentence “if $x=y$, then $x/z=y/z$ except when $z=0$”. Furthermore, with my interpretation of it being $\sim[(P\rightarrow Q)\sim R]$ I am not sure what symbolic manipulations would give $RP \rightarrow Q$.


Solution 1:

Considering "unless" means "without", "if not", we have several ways to translate "$P$ unless/except $R$". Note that

  • Without $R$, $P$ is true. We can write "$\sim R\to P$".
  • Either $P$ or $R$ is true. We can write "$P$ or $R$"
  • If $P$ fails, $R$ is the reason. We can write "$\sim P\to R$"

Moreover, "$P\to Q$" is logically equivalent to "$\sim P$ or $Q$", also "$\sim(P$ and $\sim Q)$"

So don't confuse by what $P,R$ is. They are only symbols representing propositions.


For Ex3, denote if part "$P\to Q$" by $S$ and unless part "$\sim R$" by $T$, then it's routine to write $$\sim T\to S\equiv\sim(\sim R)\to(P\to Q)\equiv\sim(R\sim(\sim(P\sim Q)))\equiv\sim(R(P\sim Q))$$

Ex4 is similar and more straightforward.


Yes, sometimes we explain "$P$ unless $Q$" as $P\equiv\sim Q$. That means $P$ is true if $Q$ is not and vice versa. But that depends.

If "$P$ unless $Q$" means "$P\equiv\sim Q$", then whenever $Q$ is true, $P$ cannot be true, or "$Q\to\sim P$". Let's check it for Ex3. Assume $z=0$ and $x=y$, we require $x/z=y/z$ is false. However, $x/z=y/z$ is neither true nor false because it's undefined. And Ex4, similarly we assume $n$ is prime, it's expected that $(n−1)!+1$ is not divisible by $n$ is false, or $n\vert (n-1)!+1$ and so is the fact, in which case you can say "$P\equiv\sim Q$".

In above examples, we see "unless" can have different meanings in different context. However for propositional logic, we don't have any context. No one knows what a proposition symbol represents. That's why in propositional logic, "unless" means "if not" instead of "if not and only if not".

Solution 2:

I will follow the suggestion of S.C.Kleene, Mathematical Logic (1967), where he summarize in a table a list of expressions and their possible translation in symbols (pag.64) :

$A \lor B$ is $A$ unless $B$ [usually] and is $A$ except when $B$ [usually].

Try now with the exercises :

Exercise 3 : If $P$, $Q$ and $R$ are translations for “$x=y$” , “$x/z=y/z$” and "$z = 0$", write a translation for “if $x=y$, then $x/z=y/z$ except when $z=0$”

I will start from the mathematical condition, rewritten as : $\lnot z = 0 \rightarrow (x=y \rightarrow x/z=y/z)$ i.e. $ z = 0 \lor (x=y \rightarrow x/z=y/z)$.

We have that : $R \lor (P \rightarrow Q)$, i.e. $(P \rightarrow Q) \lor R$.

We can read it as : “if $x=y$, then $x/z=y/z$, except when $z=0$”

Exercise 4 : If $P$ and $Q$ are the translations of “$(n-1)!+1$ is divisible by $n$” and “$n$ is prime” then write a translation for “$(n-1)!+1$ is not divisible by $n$, unless $n$ is prime”

The mathematical condition is : [$(n-1)!+1$ is divisible by $n$] $\rightarrow$ ($n$ is prime) i.e. $\lnot [(n-1)!+1$ is divisible by $n$] $\lor$ ($n$ is prime).

We have that : $\lnot P \lor Q$.

Solution 3:

Write a translation for "if $x=y$, then $x/z=y/z$ except when $z=0$".

This can also be written, "if $z\neq 0$ then (if $x=y$, then $x/z=y/z)$".

Using the implication operator, we have

$z\neq 0 \implies [x=y \implies x/z = y/z]$.

But you cannot use implication, only conjuction and negation. By definition,

$A\implies B \equiv \neg[A \land \neg B]$

Applying this definition twice, we would have

$\neg[z\neq 0 \land [x=y \land \neg [x/z= y/z]]]$

which can be easily translated into your special notation as

~(R(P(~Q)))

A similar analysis applies to the other exercise. Note that, as used here, "unless" and "except when" are interchangeable.