Truth tables

A truth function is a function whose domain and codomain is a Boolean set, ๐”น = {true, false}. True and false are sometimes referred to as truth values.

That is, unary truth functions take a Boolean to a Boolean, ๐”น -> ๐”น, while polyadic truth functions take an n-tuple of Booleans to a Boolean. In fact, all truth functions always return a single Boolean value.

taking a n-tuple of Booleans (truth values) and returns a single truth value, i.e. a single Boolean value (True or False). All truth function always return a single Boolean.

  • A unary truth function takes a Boolean (1 var)

    Bool -> Bool

  • A binary truth function takes a 2-tuple of Booleans (2 vars)

    (Bool, Bool) -> Bool

  • A binary truth function takes a 3-tuple of Booleans (3 vars)

    (Bool, Bool, Bool) -> Bool

and so on.

where:

  • v is number of varibles

  • c is number of configurations

  • f is number of truth functions

If we let single letters variables (e.g. p, q, r, s, t, etc.) stand for values of Boolean type (each one is either T or F), we see that

the number of truth functions is related to the number of variables, n, in this way: (2^2)^n, which is 4^n. One Boolean variable ranges over 2 values so there are 2^m possible configurations:

v is num of configurations: c = 2^v

v

c

f

arity

0

2

2

nullary

constants TRUE and FALSE, ฮฑ -> ๐”น

1

2

4

unary

p: ๐”น -> ๐”น

2

4

8

binary

โŸจp: ๐”น, q: ๐”นโŸฉ -> ๐”น

3

8

64

ternary

โŸจp: ๐”น, q: ๐”น, r: ๐”นโŸฉ -> ๐”น

4

16

256

quaternary

โŸจp: ๐”น, q: ๐”น, r: ๐”น, s: ๐”นโŸฉ -> ๐”น

5

25

256

quinary

6

senary

7

septenary

8

octonary

9

novenary

10

denary

11

undenary

12

duodenary

12

tredenary

quaterdenary

An atomic logic variable, e.g. p, can have one of 2 possible values: it can either be true (T, 1) of false (F, 0). A truth function is an n-ary function from n variables to a truth value (T or F).

For any number n, there are 2^2^n possible n-ary truth functions.

One variable

ยฌ โˆง โˆจ โ†’ โ† โ‡”

p p p ฯ„ฮฑฯ… ฯ„ฮฑฯ… ฯ„ฮฑฯ… p ยฌp pโˆงp pโˆจp pโ†’p pโ†p pโ‡”p 1 0 1 1 1 1 1 0 1 0 0 1 1 1

Two variables

โ† โ†’ โ‰ก โ‡” โ‡’ โŠข

p q

โˆง

โˆจ

pโ†’q

qโ†’p

pโ†’(pโ†’q)

pโ†’(qโ†’p)

1 1

1

1

1

1

1 1 1

1 1 1

.

1 0

0

1

0

1

1 0 0

1 0 1

.

0 1

0

1

1

0

0 1 1

0 1 0

.

0 0

0

0

1

1

0 1 1

0 1 1

.

---

-

-

---

---

-------

-------

----------------------------------------------

c a 8 e b d

1000 8 1010 a 1100 c 1110 e

Three variables

โ”€โ”ฌโ”€โ”ฌโ”€โ”ฌโ”€โ”€โ”€โ”0123456789abcdef โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ nโ”‚4โ”‚3โ”‚ 2 โ”‚ โ”€โ”œโ”€โ”ผโ”€โ”ผโ”€โ”€โ”€โ”ค xโ”‚dโ”‚cโ”‚a bโ”‚Fโˆง โˆจT โ”€โ”ผโ”€โ”ผโ”€โ”ผโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 0โ”‚0โ”‚0โ”‚0 0โ”‚00000000โ”‚11111111 1โ”‚0โ”‚0โ”‚0 1โ”‚00001111โ”‚00001111 2โ”‚0โ”‚0โ”‚1 0โ”‚00110011โ”‚00110011 3โ”‚0โ”‚0โ”‚1 1โ”‚01010101โ”‚01010101 โ”€โ”ค โ”‚ โ””โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 4โ”‚0โ”‚1 0 0โ”‚ 5โ”‚0โ”‚1 0 1โ”‚ 6โ”‚0โ”‚1 1 0โ”‚ 7โ”‚0โ”‚1 1 1โ”‚ 8โ”‚1โ”‚0 0 0โ”‚ โ”€โ”ค โ””โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 9โ”‚1 0 0 1โ”‚ aโ”‚1 0 1 0โ”‚ bโ”‚1 0 1 1โ”‚ cโ”‚1 1 0 0โ”‚ dโ”‚1 1 0 1โ”‚ eโ”‚1 1 1 0โ”‚ fโ”‚1 1 1 1โ”‚ โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Misc ternary formulas

(p -> q -> r) -> (p -> q) -> p -> r

p โ‡’ (q --> r) โŸพ (p โŸถ q) โ‡’ (p โŸถ r) 0 0 0 1 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 1 โ‰ก ฯ„ โ‰ก

Last updated