Skip to content
Topos Uranos

Generalized De Morgan and distributive laws

Summary

Until now De Morgan's laws and the distributive laws have been stated for two terms; normal forms, by contrast, gather conjunctions and disjunctions of any number of terms, and require those laws in that generality. This lesson defines by recursion the conjunction and the disjunction of a list of formulas (φ1,…,φn)(\varphi_1, \ldots, \varphi_n), which are written ⋀i=1nφi\bigwedge_{i=1}^{n} \varphi_i and ⋁i=1nφi\bigvee_{i=1}^{n} \varphi_i, associating to the left, and proves by induction on the number of terms the value lemma (a conjunction is true if and only if all its terms are; a disjunction, if and only if some term is), generalized associativity, which licenses regrouping, the independence of order and of repetitions, the generalized De Morgan laws and generalized distributivity in the form that the lesson on normal forms will use: the conjunction of two disjunctions, of nn and of mm terms, is equivalent to the disjunction of the nmnm conjunctions of one term from each, and dually. The problems count valuations, locate the error in a proof that passes off a regrouping as a definition, measure the growth of a distribution and obtain from it a tautology of 2n2^n terms.

Learning objectives

  1. Write conjunctions and disjunctions of nn terms with the notation ⋀\bigwedge and ⋁\bigvee, unfold them as strings associated to the left and compute their truth value with the value lemma.
  2. Prove by induction on the number of terms generalized associativity, the independence of order and of repetitions and the generalized De Morgan laws, distinguishing at each step identity of strings from semantic equivalence.
  3. Prove generalized distributivity and its dual by organizing the induction on two indices, and count the terms that a distribution produces.
  4. Locate the error in a proof by induction whose base case is miswritten or whose step hides a regrouping, and repair it.

Laws for any number of terms

The lesson on semantic consequence and equivalence established the laws of equivalence for two terms: among them, the commutativity and associativity of ∧\wedge and of ∨\vee, De Morgan's laws and the two distributivities. Now, a formula in disjunctive normal form is a disjunction of conjunctions, each with as many terms as needed, and transforming a formula into that form requires negating, regrouping and distributing conjunctions and disjunctions of any length. If this is so, the binary laws do not suffice as they stand: they must be extended to nn terms, and this must be done once and for all nn.

For each fixed nn, the De Morgan law of nn terms could be verified with a truth table of 2n2^n rows, written with nn variables, and the uniform substitution of the previous lesson, applied to the biconditional between both sides, would extend it to arbitrary formulas. But there are infinitely many values of nn, and no number of tables exhausts them. It follows that the claim “for every nn” is not an equivalence between two formulas but a statement about infinitely many equivalences, formulated in the metalanguage; its proof is, like those of the lesson on induction on the natural numbers and on formulas, an external proof, and its instrument is induction on the number of terms. The notation ⋀i=1nφi\bigwedge_{i=1}^{n} \varphi_i also belongs to the metalanguage: it is not a new symbol of the language but a name for a string of circles and disks, just as (φ∧ψ)(\varphi \wedge \psi) is.

Three relations that must not be confused should be fixed from the outset. The equality α=β\alpha = \beta says that α\alpha and β\beta are the same string; definitions, which are written with :=:=, introduce names for strings, and what is obtained by unfolding a definition is equal, not merely equivalent. Semantic equivalence α≡β\alpha \eqsem \beta says that v(α)=v(β)v(\alpha) = v(\beta) for every valuation vv. The provable equivalence α⊣⊢β\alpha \dashv\vdash \beta of the unit on deduction says that each formula is deducible from the other. This lesson works with the first two; the third appears only in a remark.

What is used

From the lesson on the semantics of propositional logic we take valuations, functions from the variables v1,v2,…v_1, v_2, \ldots to {0,1}\{0, 1\}, and their extension to all formulas, which is written with the same letter vv; the value of the defined connectives, computed from the official abbreviations: v(¬φ)=1−v(φ)v(\neg\varphi) = 1 - v(\varphi), v((φ∧ψ))=v(φ) v(ψ)v((\varphi \wedge \psi)) = v(\varphi)\,v(\psi), so that the conjunction has value 11 if and only if its two components have value 11, and v((φ∨ψ))=1v((\varphi \vee \psi)) = 1 if and only if v(φ)=1v(\varphi) = 1 or v(ψ)=1v(\psi) = 1; the coincidence lemma (if two valuations agree on the variables of a formula, they agree on the formula); and the formulas ⊤\top and ⊥\bot, a fixed tautology and a fixed contradiction. From the lesson on semantic consequence and equivalence we take that ≡\eqsem is reflexive, symmetric and transitive, the semantic replacement theorem and the catalogue of laws with their names: commutativity, (φ∧ψ)≡(ψ∧φ)(\varphi \wedge \psi) \eqsem (\psi \wedge \varphi) and (φ∨ψ)≡(ψ∨φ)(\varphi \vee \psi) \eqsem (\psi \vee \varphi); associativity, (φ∧(ψ∧χ))≡((φ∧ψ)∧χ)(\varphi \wedge (\psi \wedge \chi)) \eqsem ((\varphi \wedge \psi) \wedge \chi) and its analogue for ∨\vee; De Morgan, ¬(φ∧ψ)≡(¬φ∨¬ψ)\neg(\varphi \wedge \psi) \eqsem (\neg\varphi \vee \neg\psi) and ¬(φ∨ψ)≡(¬φ∧¬ψ)\neg(\varphi \vee \psi) \eqsem (\neg\varphi \wedge \neg\psi); distributivity, (φ∧(ψ∨χ))≡((φ∧ψ)∨(φ∧χ))(\varphi \wedge (\psi \vee \chi)) \eqsem ((\varphi \wedge \psi) \vee (\varphi \wedge \chi)) and (φ∨(ψ∧χ))≡((φ∨ψ)∧(φ∨χ))(\varphi \vee (\psi \wedge \chi)) \eqsem ((\varphi \vee \psi) \wedge (\varphi \vee \chi)); double negation, ¬¬φ≡φ\neg\neg\varphi \eqsem \varphi; idempotence, (φ∨φ)≡φ(\varphi \vee \varphi) \eqsem \varphi; identity, (φ∧⊤)≡φ(\varphi \wedge \top) \eqsem \varphi; and excluded middle, ⊨(φ∨¬φ)\models (\varphi \vee \neg\varphi). The laws hold for arbitrary formulas φ\varphi, ψ\psi, χ\chi, which are metavariables.

At each step of the proofs that follow, a part of a formula is replaced by an equivalent one. The semantic replacement theorem licenses this for one occurrence at a time; the following lemma, which is a particular case of it, gives it at once for the parts of a negation, a conjunction or a disjunction. It should be noted that this is not a syntactic triviality: ¬α\neg\alpha is the string (α↓α)(\alpha \downarrow \alpha), in which α\alpha occurs twice, and (α∧β)(\alpha \wedge \beta) therefore contains eight occurrences of α\alpha and eight of β\beta.

LemmaCompatibility of the connectives with equivalence

If α≡α′\alpha \eqsem \alpha' and β≡β′\beta \eqsem \beta', then ¬α≡¬α′\neg\alpha \eqsem \neg\alpha', (α∧β)≡(α′∧β′)(\alpha \wedge \beta) \eqsem (\alpha' \wedge \beta') and (α∨β)≡(α′∨β′)(\alpha \vee \beta) \eqsem (\alpha' \vee \beta').

Proof

  1. v(α)=v(α′),v(β)=v(β′)\dato{h}{v(\alpha) = v(\alpha'), \qquad v(\beta) = v(\beta')}

    Let vv be any valuation. By hypothesis, α\alpha and α′\alpha' have the same value, and so do β\beta and β′\beta'.

  2. v(¬α)=1−v(α)=1−v(α′)=v(¬α′),v((α∧β))=v(α) v(β)=v(α′) v(β′)=v((α′∧β′))v(\neg\alpha) = 1 - \resaltar{v(\alpha)} = 1 - \resaltar{v(\alpha')} = v(\neg\alpha'), \qquad v((\alpha \wedge \beta)) = \resaltar{v(\alpha)\,v(\beta)} = \resaltar{v(\alpha')\,v(\beta')} = v((\alpha' \wedge \beta'))

    The value of a negation and that of a conjunction depend only on the values of their components.

  3. v((α∨β))=1  ⇔  v(α)+v(β)≥1  ⇔  v(α′)+v(β′)≥1  ⇔  v((α′∨β′))=1v((\alpha \vee \beta)) = 1 \;\Leftrightarrow\; v(\alpha) + v(\beta) \geq 1 \;\Leftrightarrow\; v(\alpha') + v(\beta') \geq 1 \;\Leftrightarrow\; v((\alpha' \vee \beta')) = 1

    The same holds for disjunction: it has value 11 if and only if some component has value 11, and the components have the same values on both sides.

  4. ¬α≡¬α′,(α∧β)≡(α′∧β′),(α∨β)≡(α′∨β′)\neg\alpha \eqsem \neg\alpha', \qquad (\alpha \wedge \beta) \eqsem (\alpha' \wedge \beta'), \qquad (\alpha \vee \beta) \eqsem (\alpha' \vee \beta')

    Since vv was arbitrary, the three equivalences hold.