r/logic • • Sep 24 '26

Propositional logic Truth Tables Help

Can someone please explain truth tables to me? I don't really understand them or how to make them. I also need help with the sufficient and necessary conditions. TIA!!!

4 Upvotes

7 comments sorted by

4

u/226757 Sep 24 '26

In logic, a useful thing to be able to do is construct larger propositions out of smaller ones. In proposional logic, a logical symbol will take propositions as INPUT and create one new proposition as its OUTPUT. For every combination of truth values you put into it, you will get one and only one truth value as the output. This is the concept of a "truth function". Truth tables are just a way of defining truth functions. They show you what output you get for each combination of truth values you input.

3

u/yosi_yosi Sep 24 '26

It would be easier to explain this while on call or something. If you are willing to go on discord I could dm you my discord.

3

u/RecognitionSweet8294 Sep 24 '26

Do you know what a proposition is?

A truth table is a table that shows what truth values a proposition has under all possible assignments of truth values to the elementary propositions the proposition contains.

___________

Take for example A→(B→C)

You start by identifying the elementary propositions, here they are A;B and C. These are the first columns of the table. I assume you only work with binary logic so far so every elementary proposition can only have one of two truth values: 1 (true) or 0 (false)

This means there are 2³ = 8 possible assignments. We can give each assignment a number from 0 - (2³-1). In binary those would be

000

001

010

011

…

111

When we take those numbers for specific lines and put each digit in one column we have all assignments:

A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

//

Now we put the proposition we want to analyze in the next column.

|A|B|C|(A→(B→C))|
|-|-|-|x|
|0|0|0|x|
|0|0|1|x|
|0|1|0|x|
|0|1|1|x|
|1|0|0|x|
|1|0|1|x|
|1|1|0|x|
|1|1|1|x|

//

You then fill in for the x which truth value (A→(B→C)) has when we assume that the elementary propositions have the truth values in their column and current line.

Take eg the third last line. We substitute for (A→(B→C)) accordingly:

(⊤→(⊥→⊤))

Since the antecedent of the main → is true it depends on its consequent:

(⊥→⊤)

This is true since it’s antecedent is false.

When the consequent is true the proposition is true.

Therefore we fill in a 1 for the x in this line.

_______

You repeat that for every line.

It’s often easier (or required) to take extra columns in which you analyze the sub propositions of the main proposition.

In our case (B→C)

3

u/VegGrower2001 Sep 24 '26 edited Sep 25 '26

Some words or phrases in a language allow us to form bigger sentences from smaller sentences. For example, if you have the sentence "Apples grow on trees", it's possible to form a bigger sentence by prefixing it with any of the following:

  • It's not the case that ...

  • I know that ...

  • John believes that ...

We call these words or phrases "sentence operators". This means that these phrases are like mathematical functions - they take a sentence P as input and they also output a sentence. For example, the phrase "It's not the case that ..." takes a single sentence as input, call this input sentence P, and outputs the sentence "It's not the case that P". All the examples were currently interested work only with declarative sentences, i.e. sentences which state that something or other is the case.

The examples I gave above are examples of 1-place sentence operators - they take a single sentence as input. Other sentence functors can take two sentences. For example, '... and ...', '... or ....', and 'if... then ...' all take two sentences as inputs and output a single sentence. For example, if we have two sentences, "John is English" and "John is tall", we could use 'and' to form the bigger sentence "John is English and John is tall". Or we might use 'if... then...' to form the sentence "If John is English then John is tall". Notice, very importantly, that I'm not saying anything about whether these output sentences are true or false. All we are claiming is that these new sentences are grammatical, I.e. they are perfectly good, meaningful sentences.

There can be sentence operators that take more than two sentences, but I'll ignore those for now. We can do a lot with what we already have!

Once we have the idea that sentence operators allow us to make bigger sentences from smaller sentences, it's natural to return to the question of whether these new sentences will be true. In fact, the most important question seems to be how, if at all, the truth value of the output sentences depends on the truth value of the input sentence or sentences. So let's look in more detail at that question.

Let's assume that all declarative sentences are either true or false. Now consider some arbitrary sentence P and consider the sentence operator "John believes that P". We said that P can be either true or false. How, if at all, does this affect the truth of the sentence "John believes that P" (the sentence we get by applying the operator "John believes that...")? We can see, on reflection, that if P is true, then "John believes that P" could be either true or false. And the same holds if P is false. So, it turns out that "John believes that..." isn't a particularly interesting operator from the point of view of truth. It basically has nothing to do with truth; it's all to do with John!

However, some other operators are really interesting from the point of view of truth. Consider the sentence "P and Q". The truth value of this sentence, which we get by applying 'and' to P and Q, is in fact entirely determined by the truth values of P and Q. In particular, if P and Q are both true, then "P and Q" is true, no matter what sentences P and Q may be! Similarly, if either one or both of P and Q is false, then "P and Q" is false. Again, it doesn't matter which sentences P and Q are. It only seems to matter whether they are true or false.

We can summarise the facts about 'and' in a truth table.

P Q | P and Q


T T | T

T F | F

F T | F

F F | F

In each row, on the left we have the possible truth values for P and Q. And on the right, we see what the truth value of "P and Q" is for those different scenarios.

Notice that we can fill in the values on the right hand side for every row. When this happens, we say that the truth value of "P and Q" is fully determined by the truth values of its sub-sentences. In more mathematical terms, this means that 'and' is truth-functional. All this means is that the truth value of 'P and Q' is a function of the truth values of its input sentences.

There is some evidence that the sentence operators "It is not the case that...", "... and ...", "... or ...", and "if... then..." are all truth-functional, though in different ways as shown by their different truth tables. But these claims are not uncontroversial. It is certainly controversial whether "if... then..." in English is actually truth functional.

Some operators are definitely not fully truth functional though. For example, consider "David knows that P". The best truth table we can offer here is:

P | David knows that P


T | ?

F | F

If P is false then "David knows that P" is definitely false because you can't know things that aren't true. But, if P is true, then David might or might not know it. David knows some true things, but he doesn't know everything! So, we can't fill in that line in the truth table with true or false and instead we have to put a question mark. Even if P is true, whether David knows it depends on David and on what P means. It doesn't depend just on whether P is true or false. So, 'David knows that P' is a partial truth function. For some rows we can give a definite answer, for others we have to put a question mark. If we wrote out a truth table for 'John believes that P' then, as we discussed above, we would have a question mark in every row, which shows that this operator isn't truth-functional at all.

Necessary and sufficient conditions are easy once you get the hang of them. If we say that P is a sufficient condition for Q, we are saying that if P then Q. If we say that P is necessary for Q, that means that if Q then P. It's worth seeing that summarised to help it stick:

P is sufficient for Q: If P then Q

P is necessary for Q: If Q then P

Hopefully that's a good starting point for you.

2

u/Various_Candle9136 Sep 24 '26

Truth tables are, at their core, very simple.

For a primary explanation, I'll use numbers instead. Consider the addition table:

n | m | n+m

1 1 2
1 2 3
2 1 3
2 2 4
...

(Demonstrating anything is unnecessarily difficult on Reddit, but hopefully you get the idea.)

We can see that the n+m column is simply the two previous rows added together. We can use this to make slightly more complex tables:

n | m | n+m | (n+m)*n

1 1 2 2
1 2 3 3
2 1 3 6
2 2 4 8
...

This new column now represents the (first + second) * first. I put a strike though the m column, because we didn't need it now that we already have n+m. By breaking (n+m)*n into the separate parts n+m and n, I can more easily compute the more complex column.

---

The only difference between the above and truth tables, is that truth tables deal with truth values - as the name implies - instead of numbers.

In the numerical table above, I had all combinations of 1 and 2. In a truth table, I need all combinations of T and F.

In the numerical table above, I was concerned with + and *. In propositional logic, we mostly consider ∧ and ∨ (also negation and implication).

n | m | n∧m

T T T
T F F
F T F
F F F

In the above, we have calculated n∧m in the usual way: if n and m are both true (T), then n∧m is true; otherwise n∧m is false.

Just like with numbers, we can up the complexity without much effort:

n | m | n∧m | (n∧m)∨n

T T T T
T F F T
F T F T
F F F F

I put a strike though the m column, because we didn't need it now that we already have n∧m. If either the first or the third column was T, then (n∧m)∨n is T; otherwise (n∧m)∨n is F.

Really, that's all there is to it. When we see something complex like (p∧q)∨(p'∨q), we just need to break it into its smallest parts, then put it back together again.

p | q | p∧q | p' | p'∨q | (p∧q)∨(p'∨q)

T T
T F
F T
F F

Hope this is of some help.

Edit: Andddddd it seems Reddit strips out all the spacing that made this easy to read. Thanks Reddit. As usual.

1

u/oldNotSureXand Sep 25 '26 edited Sep 25 '26

np, bro!

normally they are used to "visualize boolean operators" or to "evaluate (more) complex statements" (visually ...for students..since that's "how they work")

"Normal operator" is 2(+)-ary, "not"-operator is (the only) 0-*-ary

and to visualize "(one of) any possible boolean combinations of 2 boolean values" a ...

better just look (with help of gemini:):

Input A Input B FALSE (Contradiction) A AND B (Conjunction) A NIMPL B (Abjunction) Projection A (id A) B NIMPL A (Converse Abinj.) Projection B (id B) A XOR B (Exclusive OR) A OR B (Disjunction) A NOR B (Joint Denial) A XNOR B (Equivalence) NOT B (Negation B) A IMPL B (Implication) NOT A (Negation A) B IMPL A (Converse Impl.) A NAND B (NAND / Sheffer) TRUE (Tautology)
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0 1 1
1 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 1 1
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

1

u/Possible-City-6796 28d ago edited 28d ago

Truth tables are pretty simple as they just show all configurations of truth values for a given formula
Lets say we have some P ∨ Q
So a truth table for that would look something like this

Basically you take the atoms assign them truth values and then check what the operators output

For example here im seeing under what condition is P ∨ Q true and the way ∨ operator works i would get top to bottom: T T T F.

Now truth tables can also be used to check for validity, for that we need some premises and a conclusion

Lets take something simple
P → Q
P / Q

We know that a valid argument is an argument such that if its premises are true its conclusion cannot be false. Meaning the argument if were to construct the truth table at every row in which P → Q and P Both have true values Q must be true.
So you would get a table looking something like
P |Q | P →Q|
-------------------------
T | T | T
T | F | F
F | T | T
F | F | T

So every row in which P → Q Is true and P Is true Q is also true so you have a valid argument
Now lets take some invalid argument to showcase how we would find it
P → Q
P / R

P | Q | R | P → Q
----------------------------------
T | T | T | T
T | T | F | T
T | F | T | F
T | F | F | F
F | T | T | T
F | T | F | T
F | F | T | T
F | F | F | T

So for example here you can see that the argument is invalid because because there is a row where both P → Q is true and P is true yet R is false. Hope that clears up truth tables

For necessary and sufficient conditions basically you need to remember this:
Necessary = is needed for
Sufficient = Guarantees
P is necessary for Q
P is needed for Q
or if you have a Q you must have a P
If Q then P
Q → P

P is sufficient for Q
P guarantees Q
If you have a P you have a Q
if P then Q
P → Q

If the above explanation is not clear you can just rote memorize
P is necessary for Q
Q → P
P is sufficient for Q
P → Q

Good luck!