# Represent “If $p$ is true, then either $q$ or $r$ or $s$ is true; there are no other possibilities” with symbolic logic and linear algebra.

I am trying to figure out how to use symbolic logic to represent the following theorem from linear algebra.

The theorem states that, "A system of linear equations has zero, one or infinitely many solutions. There are no other possibilities."

Initially, I thought it would have the form

$$p \implies (q \lor r \lor s)$$

but this clearly does not include the "There are no other possibilities" part.

How do I represent the theorem using symbolic logic?

• You could also say "If there are two solutions, then there are infinitely many" – Arthur Feb 1 '17 at 19:19
• The longer I think about it, the less this makes sense. I have never come across the sentence "There are no other possibilities." (I'm German) - it just seems completely redundant. There are three terms on the right hand side. And no more. – ThomasR Feb 1 '17 at 20:28

## 2 Answers

The expression with $q,$ $r,$ and $s$ means we have to define each of these expressions separately. It also obscures important facts that we already knew before we began to consider this particular theorem. For example, if a system has exactly one solution, it does not have exactly two solutions.

Instead, let $S(\phi)$ denote the solution set of an arbitrary system $\phi.$ Let $p(\phi)$ denote the statement that $\phi$ is a system of linear equations. The theorem states that $$p(\phi) \implies \lvert S(\phi) \rvert \in \{0,1,\lvert \mathbb R \rvert\}.$$ This tells us there is no other possibility; for example, $\lvert S(\phi) \rvert = 2$ is not possible, because $2 \not\in \{0,1,\lvert \mathbb R \rvert\}.$

I used $\lvert \mathbb R \rvert$ to represent the cardinality of the number of solutions, since (I think) the point of the theorem was that if there is more than one solution, the solutions can be parameterized by real numbers (or complex numbers if that's the field you're using). You can simplify this a little further if you have a nice symbol to represent the cardinality $\lvert \mathbb R \rvert.$ In any case, the third element of the set (in addition to $0$ and $1$) should be whatever you consider to be "infinitely many."

I assume you meant:

$p$: the system is a system of linear equations

$q$: there are zero solutions to the system

$r$: there is one solution to the system

$s$: there are infinitely many solutions to the system

OK, then notice that $q \lor r \lor s$ does rule out any other possibility than one of these three.

But, the statement does not say that you can't have something like both $p$ and $r$. So, to rule that out, we can do:

$p \to ((q \land \neg r \land \neg s) \lor (\neg q \land r \land \neg s) \lor (\neg q \land \neg r \land s))$

• Actually, the way $q\lor r\lor s$ rules out other possibilities is because (for example) "the system has exactly one solution" is mutually exclusive from "the system has exactly $17$ solutions." That is, independently of the theorem, we already knew that $q\implies\lnot r,$ and so forth. So the original implication as written is sufficient and does not need all those extra "$\lnot$" terms. – David K Feb 1 '17 at 19:42
• @DavidK Yes, we know that, but the task is to express this mutual exclusion in logic. If we don't express this, and we try to use formal logic to make further inferences using this sentence, then we are in trouble, because in the logic system, we can't infer $q \to \neg r$ from the original sentence alone. – Bram28 Feb 1 '17 at 20:11
• We should not need to infer $q\implies\lnot r$ from the original sentence, because this is a fact that we didn't need the theorem to prove. Consider this: if we need to put $\lnot r$ explicitly in the theorem statement because "we can't infer $q\implies\lnot r$," then how do we infer $q\implies\lnot u$ where $u$ is "the system has exactly $2$ solutions? If we can't independently make that conclusion, then $p\lor q\lor r$ does not rule out the other possibilities. – David K Feb 1 '17 at 20:26
• My conclusion from all the disagreement we're having here, by the way, is that the original choice of notation was suboptimal. – David K Feb 1 '17 at 20:42
• @DavidK Yes, I certainly agree with that! I had wanted to change the notation as well using predicates $L(x)$ for '$x$ is a system of linear equations and $S(x,y)$ for '$x$ is a solution to $y$' ... and then realized that I can't express 'infinity' in FOL! :p So I do like your solution! – Bram28 Feb 1 '17 at 20:58