Skip to content
Topos Uranos

Summary

Every formula determines a truth table; this lesson proves the converse statement: every table, that is, every assignment of truth values to the rows, is the table of some formula. It defines truth functions, counts those of nn arguments (22n2^{2^{n}}) and makes precise when a formula represents one of them. It then proves the functional completeness theorem by means of the table formula, a disjunction of conjunctions of literals built row by row, which the lesson on normal forms will use as the first proof of the existence of the disjunctive normal form. Since every formula of the course is a string of circles and disks, it follows with no further work that joint denial suffices by itself, and the lesson shows how any function is written with it. Finally, it studies which sets of connectives suffice to represent all functions: it proves a general criterion, applies it to {¬,∧}\{\neg, \wedge\}, {¬,∨}\{\neg, \vee\}, {¬,→}\{\neg, \rightarrow\}, {↓}\{\downarrow\} and to alternative denial, and proves that {∧,∨,→,↔}\{\wedge, \vee, \rightarrow, \leftrightarrow\} does not suffice, because all its formulas preserve the value 11.

Learning objectives

  1. Count the truth functions of nn arguments and decide, by means of the functions they represent, when two formulas are equivalent.
  2. Build, from the table of a truth function, a formula that represents it, and look for a shorter equivalent formula when that is convenient.
  3. Explain why, in the language of the course, joint denial suffices by itself, and write with it alone formulas that represent given functions.
  4. Prove that a set of connectives is adequate by expressing joint denial with its formulas.
  5. Prove that a set of connectives is not adequate by means of a property that all its formulas preserve.

Truth functions

The lesson on the semantics of propositional logic assigned to each formula, under each valuation, a truth value, and showed that this value depends only on the values of the variables that occur in it; hence every formula with nn variables has a truth table of 2n2^{n} rows. The question of this lesson is the inverse one. Given an arbitrary table, that is, a column of ones and zeros written at will next to the 2n2^{n} rows, is there a formula that has it as its table? If this holds for every table, the language has no expressive gaps: everything that can be said about the truth value of nn statements, as a function of their values, is said by a formula. And since in this course every compound formula is a joint denial, the answer will also tell whether a single connective suffices to say everything.

What is used from the previous lessons

A valuation is a function vv from the set of variables {v1,v2,…}\{v_1, v_2, \ldots\} to {0,1}\{0, 1\}, where 11 is the true and 00 the false; its extension to all formulas, also written vv, is defined by recursion: v((φ↓ψ))=1v((\varphi \downarrow \psi)) = 1 if and only if v(φ)=0v(\varphi) = 0 and v(ψ)=0v(\psi) = 0. From the official abbreviations, the same lesson computed, in the theorem on the values of the defined connectives, the value of each connective; written with sums and products, they are the following, for every valuation vv and all formulas φ\varphi and ψ\psi:

v(¬φ)=1−v(φ),v((φ∧ψ))=v(φ) v(ψ),v((φ∨ψ))=v(φ)+v(ψ)−v(φ) v(ψ)v(\neg\varphi) = 1 - v(\varphi), \qquad v((\varphi \wedge \psi)) = v(\varphi)\,v(\psi), \qquad v((\varphi \vee \psi)) = v(\varphi) + v(\psi) - v(\varphi)\,v(\psi)
v((φ→ψ))=1−v(φ)+v(φ) v(ψ),v((φ↓ψ))=(1−v(φ)) (1−v(ψ))v((\varphi \rightarrow \psi)) = 1 - v(\varphi) + v(\varphi)\,v(\psi), \qquad v((\varphi \downarrow \psi)) = (1 - v(\varphi))\,(1 - v(\psi))

Moreover, v((φ↔ψ))=v(φ) v(ψ)+(1−v(φ)) (1−v(ψ))v((\varphi \leftrightarrow \psi)) = v(\varphi)\,v(\psi) + (1 - v(\varphi))\,(1 - v(\psi)), which equals 11 if and only if v(φ)=v(ψ)v(\varphi) = v(\psi), and v((φ⊻ψ))=v(φ)+v(ψ)−2 v(φ) v(ψ)v((\varphi \veebar \psi)) = v(\varphi) + v(\psi) - 2\,v(\varphi)\,v(\psi), which equals 11 if and only if v(φ)≠v(ψ)v(\varphi) \neq v(\psi). Since the values are 00 or 11, the square of a value is the value itself, v(φ) v(φ)=v(φ)v(\varphi)\,v(\varphi) = v(\varphi), and a product of values equals 11 if and only if each factor equals 11; both observations will be used without repeating them. The coincidence lemma is also used: if two valuations agree on the variables of φ\varphi, that is, on the variables that are subformulas of φ\varphi, they give φ\varphi the same value. From the lesson on semantic consequence and equivalence we take semantic equivalence: φ≡ψ\varphi \eqsem \psi when v(φ)=v(ψ)v(\varphi) = v(\psi) for every valuation vv. Finally, the letter convention of the lesson on formalization applies: pp, qq and rr denote the variables v1v_1, v2v_2 and v3v_3.

Truth functions and their number

Let nn be a natural number. A row of nn values is a sequence a=(a1,…,an)a = (a_1, \ldots, a_n) in which each aia_i is 00 or 11; the set of all of them is denoted {0,1}n\{0, 1\}^{n}. A truth function of nn arguments is a function

f ⁣:{0,1}n→{0,1}f\colon \{0, 1\}^{n} \to \{0, 1\}

that assigns a truth value to each row. It is presented as a table: the rows are written in the order of the table, starting from the one in which all the values are 11 (for two arguments, 1 11\,1, 1 01\,0, 0 10\,1, 0 00\,0), and next to each row its value is written. A truth function is, therefore, a truth table without a formula: the right-hand column, with nothing written in its header.

PropositionThere are 22n2^{2^{n}} truth functions of nn arguments

For every natural number nn, there are exactly 2n2^{n} rows of nn values and 22n2^{2^{n}} truth functions of nn arguments.

Proof

  1. 1 0 1    ⟼    ∙∘∙\dato{filas}{1\,0\,1 \;\; \longmapsto \;\; \sigI\sigO\sigI}

    A row is a sequence of nn symbols, each of which is 11 or 00. If the disk is written in place of 11 and the circle in place of 00, the rows correspond, one to one, to the strings of length nn over the two-symbol alphabet, of which there are 2n2^{n} by the first solved problem of the lesson on induction, proved there by induction on nn.

  2. f    ⟼    f(1,…,1)    …    f(0,…,0)f \;\; \longmapsto \;\; f(1, \ldots, 1) \;\; \ldots \;\; f(0, \ldots, 0)

    A truth function is determined by its values on the rows, and any choice of those values gives a function. If the values are written in the order of the table, the functions correspond, one to one, to the sequences of 2n2^{n} symbols, each 11 or 00.

  3. 22n2^{\resaltar{2^{n}}}

    By the same count, applied now to sequences of length 2n2^{n}, there are 22 to the power 2n2^{n} functions.

  4. 22=4,24=16,28=256,216=65 5362^{2} = 4, \quad 2^{4} = 16, \quad 2^{8} = 256, \quad 2^{16} = 65\,536

    The first values show how fast the number grows: with five arguments there are already more than four billion functions.

ExampleThe functions of one and of two arguments

The four functions of one argument are the constant 11, the identity, the one that changes the value and the constant 00; the formulas ⊤\top, pp, ¬p\neg p and ⊥\bot, where ⊤:=(p→p)\top := (p \rightarrow p) and ⊥:=¬⊤\bot := \neg\top are those fixed in the lesson on semantics, have, respectively, those tables. Among the sixteen functions of two arguments are those of the six connectives of the course: joint denial, disjunction, conjunction, implication, the biconditional and exclusive disjunction. Ten others remain, among them the two constants, those that take only one of the arguments into account and alternative denial, which equals 00 only when both arguments equal 11; solved problem 1 classifies them all.

Formulas that represent functions

A formula and a truth function are related as follows. If φ\varphi is a formula whose variables are among v1,…,vnv_1, \ldots, v_n, φ\varphi is said to represent the truth function ff of nn arguments when, for every valuation vv,

v(φ)=f(v(v1),…,v(vn))v(\varphi) = f(v(v_1), \ldots, v(v_n))

that is, when the table of φ\varphi, written with the variables v1,…,vnv_1, \ldots, v_n, is the table of ff. The condition on the variables is not a detail: the formula (p∧q)(p \wedge q) represents no function of one argument, because its value does not depend only on that of pp.

PropositionThe function of a formula

Let φ\varphi be a formula whose variables are among v1,…,vnv_1, \ldots, v_n. Then φ\varphi represents exactly one truth function of nn arguments, which is denoted fφf_\varphi. If ψ\psi is another formula whose variables are among v1,…,vnv_1, \ldots, v_n, then φ≡ψ\varphi \eqsem \psi if and only if fφ=fψf_\varphi = f_\psi.

Proof

  1. va(vi)=ai(i≤n),va(vk)=0(k>n)\dato{va}{v_a(v_i) = a_i \quad (i \leq n), \qquad v_a(v_k) = 0 \quad (k > n)}

    For each row aa there is a valuation that gives each viv_i the value aia_i: it suffices to give the other variables the value 00.

  2. v(vi)=v′(vi)=ai(i≤n)    ⇒    v(φ)=v′(φ)=fφ(a)v(v_i) = v'(v_i) = a_i \quad (i \leq n) \;\; \Rightarrow \;\; v(\varphi) = v'(\varphi) = \resaltar{f_\varphi(a)}

    If two valuations give v1,…,vnv_1, \ldots, v_n the values of the row aa, they agree on the variables of φ\varphi, and by the coincidence lemma they give φ\varphi the same value. That common value is taken as fφ(a)f_\varphi(a); by construction, φ\varphi represents fφf_\varphi.

  3. g(a)=va(φ)=fφ(a)g(a) = v_a(\varphi) = f_\varphi(a)

    If φ\varphi also represents a function gg, on each row aa we have g(a)=va(φ)=fφ(a)g(a) = v_a(\varphi) = f_\varphi(a): the represented function is unique.

  4. v(φ)=fφ(v(v1),…,v(vn))=fψ(v(v1),…,v(vn))=v(ψ)v(\varphi) = f_\varphi(v(v_1), \ldots, v(v_n)) = f_\psi(v(v_1), \ldots, v(v_n)) = v(\psi)

    If fφ=fψf_\varphi = f_\psi, then for every valuation vv the values of φ\varphi and of ψ\psi are the value of the same function on the same row; hence φ≡ψ\varphi \eqsem \psi.

  5. fφ(a)=va(φ)=va(ψ)=fψ(a)f_\varphi(a) = v_a(\varphi) = v_a(\psi) = f_\psi(a)

    Conversely, if φ≡ψ\varphi \eqsem \psi, then on each row aa the valuation vav_a gives the same value to both formulas, and therefore fφ(a)=fψ(a)f_\varphi(a) = f_\psi(a).

There are infinitely many formulas with variables among v1,…,vnv_1, \ldots, v_n and only 22n2^{2^{n}} functions; therefore, many formulas represent the same function, and the proposition says that they are exactly those equivalent to one another. What remains to be known is whether every function is represented by some formula, or whether some tables are left without a formula that has them.