Truth table: what it is, how to do it, exercises

Truth table is a logical instrument that contains all the logical values ​​of a compound proposition. The construction of a truth table for a compound proposition involves the logical values ​​of the simple propositions that compose it and the logical operations between these propositions.

Read too: After all, what is logic?

Truth table summary

  • A truth table is an instrument used in mathematical logic to arrange all the logical values ​​of a compound proposition.

  • The main logical operations of the truth table are negation (~), conjunction (˄), disjunction (˅), conditional (→) and biconditional (↔).

  • To construct a truth table for a compound proposition, it is necessary to use the truth tables of fundamental logical operations.

What is the truth table?

Consider P It is q simple propositions, that is, sentences that can be assigned one of the following logical values: true (V) or false (F). A compound proposition formed through operations between P It is q is also a sentence that can be true or false. The logical value of this compound proposition depends on the logical values ​​assigned to

P It is q and the operation(s) between them.

The truth table is a table that presents all logical value possibilities for the compound proposition based on the logical values ​​of P It is q.

In this text we will use the letter V to indicate the true logical value of a proposition and the letter F to indicate the false logical value.

Main connectives of the truth table

Logical connectives (or operators) are symbols or words associated with operations that connect a simple proposition with another simple proposition to produce a compound proposition.

There are five main connectives, whose operation, symbol and meaning are indicated in the table below.

Operation

Symbol

Meaning

Denial

~

no

Conjunction

˄

It is

Disjunction

˅

or

Conditional

if... then

Biconditional

if and only if


How to read:

  • ~ P - "no P

  • P ˄ q — “P It is q

  • P ˅ q — “P or q

  • Pq — “if P then q

  • Pq — “P if and only if q

Observation: The biconditional is the result of the conditional operation in both directions, that is, Pq means Pq It is qP.

How does the truth table work?

The first line of the truth table indicates all the propositions whose logical values ​​we wish to analyze, in addition to the respective operations between them. Each line of the truth table presents the relationship between the logical values ​​of the propositions in the first line.

In order to construct a truth table for any compound proposition, it is necessary to know the truth tables of the fundamental operations, arising from the main logical connectives. Let's see what these truth tables are, obtained by the rules of propositional calculus.

  • Denial truth table

Given a simple proposition P, the logical value of the proposition ~ P is the opposite of the logical value of P. So, if P It's true ~ P is false; and if P It's fake ~ P it's true.

P

~p

V

F

F

V

  • Conjunction truth table

Given the propositions P It is q, the logical value of the proposition P ˄ q is true only when both propositions are true.

P

q

because

V

V

V

V

F

F

F

V

F

F

F

F

  • Disjunction truth table

Given the propositions P It is q, the logical value of the proposition P ˅ q is true when at least one of the propositions is true.

P

q

because

V

V

V

V

F

V

F

V

V

F

F

F

  • Conditional truth table

Given the propositions P It is q, the logical value of the proposition Pq is false when P is true and q is false and is true in other cases.

P

q

p →q

V

V

V

V

F

F

F

V

V

F

F

V

  • Biconditional truth table

Given the propositions P It is q, the logical value of the proposition Pq is true only when both propositions are true or both are false.

P

q

P q

V

V

V

V

F

F

F

V

F

F

F

V


Construction of the truth table

Based on the truth tables of fundamental operations, we can construct truth tables for any compound proposition. For that we must identify the propositions involved and perform the operations according to the truth tables in the previous topic.

Observation: The number of rows in a truth table of a compound proposition formed by n simple propositions is 2n.

Example: Construct the truth table of the proposition ~ (P ˄ q).

We will use a truth table with four columns: one for the proposition P, one for the proposition q, one for the proposition P ˄ q, and the last one for the final proposition, which is ~ (P ˄ q).

P

q

because

~ (p ˄ q)


We can fill the first three columns of this table with information from the truth table of the conjunction operation.

P

q

because

~ (p ˄ q)

V

V

V

V

F

F

F

V

F

F

F

F


Finally, the fourth column is the negation of each logical value in the third column.

P

q

because

~ (p ˄ q)

V

V

V

F

V

F

F

V

F

V

F

V

F

F

F

V


Read too: How Aristotle's logic works

Truth table exercises

Question 1

Build the truth table of the proposition ~ (P ˄ ~ q).

Resolution

We will use a truth table with five columns: one for the proposition P, one for the proposition q, one for the proposition ~ q, one for the proposition P ˄ ~ q, and the last for the final proposition, ~ (P ˄ ~ q).

P

q

~q

p ˄ ~ q

~ (p ˄ ~ q)


Now just fill in each column and perform the respective operations:

P

q

~q

p ˄ ~ q

~ (p ˄ ~ q)

V

V

F

F

V

V

F

V

V

F

F

V

F

F

V

F

F

V

F

V

Question 2

Construct the truth table of the proposition ~ P ˅ q → ~ q.

Resolution

We will use a truth table with six columns: one for the proposition P, one for the proposition q, one for the proposition ~ P, one for the proposition ~ q, one for the proposition ~ P ˅ q, and the last for the final proposition, ~ P ˅ q → ~ q.

P

q

~p

~q

~ p˅ q

~ p˅ q → ~q


Now just fill in each column and perform the respective operations:

P

q

~p

~q

~ p˅ q

~ p˅ q → ~q

V

V

F

F

F

V

V

F

F

V

F

V

F

V

V

F

V

F

F

F

V

V

F

V


Sources

ALENCAR FILHO, E. in. Introduction to mathematical logic. São Paulo: Nobel, 2002.

VAZ, R. M. Formalization of logical reasoning based on mathematical logic. Dissertation (Professional Master’s Degree in Mathematics) – Federal University of Mato Grosso do Sul, Três Lagoas, 2014. Available in https://repositorio.ufms.br/handle/123456789/2333 .

Source: Brazil School - https://brasilescola.uol.com.br/matematica/tabela-verdade.htm

In, on and at: learn to use them

In, on and at: learn to use them

in, on It is at they are prepositions of space or time. Usually they mean "in". In addition, they...

read more
This, that, these and those: when to use?

This, that, these and those: when to use?

This, that, these It is thosethey are demonstrative pronouns in english. This means that they ref...

read more
Was and were: differences and when to use them

Was and were: differences and when to use them

Was It is wereare verbal inflections of verb to be at the simple past, and this tense refers to a...

read more