Some Solutions to Enderton’s Mathematical Introduction to Logic Kelvin Soh
∗
October 30, 2014
Overview This document details my attempt to solve some of the problems in Herbert Enderton’s A Enderton’s A Mathematical Introduction to Logic (2nd Edition) [1]. Edition) [1]. Its main purpose is to facilitate my own learning. I have posted it online as a possible resource for others also using the book. It’d be great if this document helps anyone out in any form or fashion. Do feel free to email me if you have any comments or to point out any errors (of which there will likely be plenty).
1
Sen Senten tential tial Logi Logicc
1.1
The The Langu Language age of Senten Sententia tiall Logic Logic
Lemma 1 The number of left parenthesis, right parenthesis and connective symbols are equal in a wff. induction on principle. principle. Let l, r and c be, respecProof: We will use the inducti tively, the number of left parenthesis, right parenthesis and connective symbols in a wff. Base case: l = r = c = 0. Inducti Induction on hypothesi hypothesis: s: Let α and β be two wffs. lα = rα = cα and lβ = r β = c β . Inducti Inductive ve step: step: Let γ = (¬α). lγ = lα + 3, rγ = rα + 3, cγ = cα + 3 = so lγ = rγ = cγ by the induction induction hypothesi hypothesis. s. By a simila similarr argumen argument, t, the number of left parenthesis, right parenthesis and connective symbols in (α ∧ β ), (α ∨ β ), (α → β ) and (α ↔ β ) are equal. QED ∗
[email protected],
[email protected], www.mathelement.com/about/ www.mathelement.com/about/
1
Exercises (Page 19) 2. Show that there are no wffs of length 2, 3, or 6, but that any other postive length is possible. All wffs must have at least one sentence symbol. By lemma 1 (from this document), any wff with connectives will be of length at least 4. Thus any wff of length 2 or 3 must not contain any connectives. However the only wffs that do not contain any connectives are made up of just one sentence symbol. Hence no wff can be of length 2 or 3. From the proof of lemma 1, each formula building operation adds 3 to the length of its constituents. Suppose a wff of length 6 is possible and denote it by α. Consider a shortest construction sequence and its last element. Since α is not just a sentence symbol, α = E ¬ (β ) or α = E (β, γ ) for some wffs β and γ where = ∧ , ∨, ↔ or →. If α = E ¬ (β ), β must have length 3 we have shown to be impossible. If α = E (β, γ ), β and γ have total length 3. Hence one of β, γ has length 2 which we have also shown to be impossible. A1 , φ = (¬A1 ) and ψ = (A1 ∨ A2 ) are examples of wff of length 1, 4 and 5 respectively. ζ = (ψ ∨ A1 ) is an example of a wff with length 9. For any other length n, n ≥ 7, n can be written as n = 3k + 1, n = 3k + 2 or n = 3(k + 1) for some k ≥ 2. If n = 3k + 1, we can construct it with φ and k − 1 repeated negations. If n = 3k + 2, we can construct it with ψ and k − 1 repeated negations. If n = 3(k + 1), we can construct it using ζ and k − 2 repeated negations. 3. Let α be a wff; let c be the number of places at which the binary connective symbols (∧, ∨, →, ↔) occur in α. Show by using the induction principle that s = c + 1. Base case: For a sentence symbol, c = 0 and s = 1 so s = c + 1. Induction hypothesis: Let α and β be two wffs such that s α = c α + 1 and sβ = c β + 1. Inductive step: Let γ = (¬α). cγ = c α . sγ = s α = c α + 1 = c γ + 1. Let φ = (αβ ). cφ = c α + cβ + 1. sφ = s α + sβ = (cα + 1) + (cβ + 1) = c φ + 1.
2
4. Assume we have a construction sequence ending in ϕ, where ϕ does not contain the symbol A4 . Suppose we delete all the expressions in the construction sequence that contains A4 . Show that the result is still a legal construction sequence. Let the original construction sequence be < ε1 , . . . , εn > and the new sequence be < ε1 , . . . , εk >. Since ϕ does not contain the symbol A4 , it was not deleted so ε k = ϕ . We now consider the other terms in the new sequence, εi . Since εi = ε j for some i ≤ j , we have at least one of the following (due to < ε1 , . . . , ε j > being a construction sequence): (A) εi = ε j is a sentence symbol (B) εi = ε j = E ¬ (εk ) for some k < j (C) εi = ε j = E (εk , εl ) for some k < j,l < j If we are in case A, εi satisfies the requirement for a construction sequence. If we are in case B or C, since εi does not contain A4 , ε k and εl must not contain it either. Hence they remain in the new sequence and we can write εk = ε a for some a. Since the original ordering of the sequence was maintained and k < j , a < i. Similarly, εl = εb for some b < i. The new sequence thus satisfies the 3 conditions and it is a legal construction sequence as well. 5. Suppose the α is a wff not containing the negation symbol ¬. (a) Show that the length of α is odd. (b) Show that more than a quareter of the symbols are sentence symbols. We will first follow wthe suggestion and prove by the induction principle that the length of α , l α is of the form 4k + 1 and the number of sentence symbols, sα is k + 1. Base case: If α is a sentence symbol, lα = 1 = 4(0)+1 and sα = 1 = (0)+1. Induction hypothesis: Suppose we are given wffs β and γ such that lβ = 4k + 1 and sβ = k + 1, lγ = 4h + 1 and sγ = h + 1. Inductive step: Since α does not contain ¬, we need not consider (¬β ). Now considering ϕ = (β γ ), lϕ = 3 + lβ + lγ = 4(k + h + 1) + 1. sϕ = s β + sγ = (h + k + 1) + 1. The result implies (a) immediately. (b) follows as 4kk+1 > 14 . +1
3
1.2
Truth Assignments
Exercises (Page 27) 1. Show that neither of the following two formulas tautologically implies the other: (A ↔ ( B ↔ C )) ((A ∧ (B ∧ C)) ∨ ((¬A) ∧ ((¬B) ∧ (¬C)))). Let α and β denote the two formulas above respectively. Consider v such that v (A) = v (B) = v (C) = F . Then v¯(β ) = T but v¯(α) = F . Hence β | = α . Now consider v such that v (A) = T, v (B) = v (C) = F . Then v¯(α) = T |= β . but v¯(β ) = F . Hence α 2. (a) Is (((P → Q ) → P ) → P ) a tautology? (b) Define σk recursively as followss: σ0 = (P → Q ) and σk+1 = (σk → P ). For which values of k is σk a tautology? (a) Yes. This can be checked by the truth table. (b) σk is a tautology iff k = 2n for n ≥ 1. We shall prove this by induction on n to show that if k = 2n, σk is a tautology while if k = 2n + 1, σk is not a tautology. Base case: For n = 1, part (a) shows that σ2 is a tautology. Since σ2 is a tautology, σ3 = (σ2 → P) is not a tautology by considering any truth assignment v such that v (P) = F . Inductive step: σ2n+2 = ((σ2n → P ) → P ). By the induction hypothesis, σ2n is a tautology so v¯(σ2n ) = T for all truth assignments v . By checking the truth table we can conclude that σ2n+2 is a tautology. σ2n+1 = (σ2n → P). σ2n+1 is not a tautology by considering any truth assignment v such that v (P) = F . 3. (a) Determine whether or not ((P → Q ) ∨ (Q → P )) is a tautology. (b) Determine whether or not ((P ∧ Q ) → R) tautologically implies ((P → R ) ∨ (Q → R )). (a) It is a tautology by checking of the truth table. (b) Yes (by checking of the truth table). In fact they are tautologically equivalent.
4
4. Show that the following hold: (a) Σ; α |= β iff Σ |= (α → β ). (b) α β iff |= (α ↔ β ). (a) “⇒”: (Given Σ; α |= β ) For any v such that v¯(σ) = T for all σ ∈ Σ, if v¯(α) = T , then v¯(β ) = T since Σ; α |= β . Hence v¯(α → β ) = T . If v¯(α) = F , then v¯(α → β ) = T . Hence Σ |= (α → β ). “⇐”: (Given Σ |= (α → β )) For any v such that v¯(σ) = T and v¯(α) = T , v¯(β ) = T since Σ |= (α → β ). Hence Σ; α |= β . (b) α β iff for any v , v¯(α) = v¯(β ) = T or v¯(α) = v¯(β ) = F iff v¯(α ↔ β ) = T for all v iff |= (α ↔ β ). 5. Prove or refute each of the following assertions: (a) If either Σ |= α or Σ |= β , then Σ |= (α ∨ β ). (b) If Σ |= (α ∨ β ), then either Σ |= α or Σ |= β . (a) True. For any v such that v¯(σ) = T for all σ ∈ Σ, if Σ |= α, then v¯(α) = T so v¯(α ∨ β ) = T . Otherwise Σ |= β so v¯(α) = T and hence v¯(α ∨ β ) = T . Hence Σ |= (α ∨ β ). (b) False. Let Σ = ∅, α = A and β = (¬A) where A is a sentence symbol. |= α and Σ |= β . Then Σ |= (α ∨ β ) but Σ 6. (a) Show that if v1 and v2 are truth assignments which agree on all the sentence symbols in the wff α, then v¯1 (α) = v¯2 (α). Use the induction principle. (b) Let S be a set of sentence symbols that includes those in Σ and τ (and possibly more). Show that Σ |= τ iff every truth assignment for S which satisfies every member of Σ also satisfies τ . (a) If α = A i , where A i is a sentence symbol, α , then v¯1 (α) = v¯2 (α) because v1 and v2 agree on all the sentence symbols in α. The inductive step follow immediately from the induction hypothesis. Thus v¯1 (α) = v¯2 (α) by the induction principle. (b) The forward implication follows directly from the definition of tautological implication. The reverse follows from part (a).
5
8. (Substitution) Consider a sequence α1 , α2 , . . . of wffs. For each wff ϕ let ϕ ∗ be the result of replcaing the sentence symbol A n by α n for each n. (a) Let v be a truth assignment for the set of all sentence symbols; define u to be the truth assignment for which u(An ) = v¯(αn ). Show that u¯(ϕ) = v¯(ϕ∗ ). Use the induction principle. (b) Show that if ϕ is a tautology, then so is ϕ∗ . (a) Base case: ϕ = Ai for some i. Then ϕ∗ = αi . Then u ¯(ϕ) = u(Ai ) = ∗ v¯(αi ) = v¯(ϕ ). Induction hypothesis 1: Let ϕ = (¬β ) where u¯(β ) = v¯(β ∗) where β ∗ is the result of replacing the sentence symbol An by αn for each n. Inductive step 1: By the induction hypothesis, u¯(β ) = v¯(β ∗ ). Hence ¯(¬β ) = v¯(¬β ∗ ). Since ϕ∗ = (¬β ∗ ), u ¯(ϕ) = v¯(ϕ∗ ). u Induction hypothesis 2: Let ϕ = (β γ ) where represents → , ↔, ∨ or ∧. Then u ¯(β ) = v¯(β ∗ ) and u¯(γ ) = v¯(γ ∗ ). Inductive step 2: By the induction hypothesis, u¯(β γ ) = v¯(β ∗ Since ϕ∗ = (β ∗ γ ∗), u¯(ϕ) = v¯(ϕ∗ ).
γ ∗ ).
(b) Suppose that ϕ is a tautology but ϕ∗ is not a tautology. Since ϕ∗ is not a tautology, there exists a truth assignment v such that v¯(ϕ∗ ) = F . By part (a), we can obtain a truth assignment u such that u¯(ϕ) = v¯(ϕ∗ ) = F . Then ϕ is not a tautology, which is a contradiction. 9. (Duality) Let α be a wff whose only connective symbols are ∧, ∨ and ¬. Let α∗ be the result of interchanging ∧ and ∨ and replacing each sentence symbol by its negation. Show that α ∗ is tautologically equivalent to (¬α). Use the induction principle. Base case: If α = A , α∗ = (¬A). (¬α) = (¬A). So α∗ (¬α). Inductive step: By the induction hypothesis, let β, γ be such that ∗ β (¬β ) and γ ∗ (¬γ ) . Suppose α = (¬β ) . Since β ∗ (¬β ), v¯(β ∗ ) = v¯(¬β ) for any truth assignment v . Hence v¯(¬β ∗) = v¯(¬(¬β )). α∗ = (¬β )∗ = (¬β ∗ ) so v¯(α∗ ) = v¯(¬α). Thus α∗ (¬α). Now suppose α = (β ∨ γ ). Note α∗ = β ∗ ∧ γ ∗ . For any truth assignment v , v¯(α∗ ) = v¯(β ∗ ∧ γ ∗ )
= v¯((¬β ) ∧ (¬γ ) ) by the induction hypothesis = v¯(¬(β ∨ γ )) by De Morgan’s law = v¯(¬α). 6
Hence α∗ (¬α). The case for α = (β ∧ γ ) is similar. Since α’s only connective symbols are ∧, ∨ and ¬, we do not consider the cases for → and ↔. 10. Say that a set Σ1 of wffs is equivalent to a set Σ2 of wffs iff for any wff α, we have Σ1 |= α iff Σ2 |= α. A set Σ is independent iff no member of Σ is tautologically implied by the remaining members in Σ. Show that the following hold. (a) A finite set of wffs has an independent equivalent subset. (b) An infinite set need not have an independent equivalent subset. (Solution adapted from tutorial solutions for NUS MA4207: Mathematical Logic, 13/14 Semester 2 by Dilip Raghavan) (a) We will prove this by induction on the size of Σ. For the base case, Σ is empty. Then ∅ is a subset that is independent and equivalent (vacuously). Now we are given a set Σ of wffs of size n. If Σ is independent then we are done. Otherwise ∃ϕ ∈ Σ such that Σ \ {ϕ} |= ϕ. By the induction hypothesis, there is an independent equivalent subset of Σ \ {ϕ}, say Σ1 . Claim: Σ 1 is an independent equivalent subset of Σ. Proof: Σ1 is independent by the induction hypothesis. To prove equivalence, for any wff α, if Σ1 |= α, then Σ |= α since Σ1 ⊆ Σ. If Σ |= α, we consider an arbitrary truth assignment v such that v¯(ψ) = T for all ψ ∈ Σ 1 . For any σ ∈ Σ, if σ ∈ Σ \ {ϕ}, v¯(σ) = T since Σ1 is equivalent to Σ \ {ϕ}. The remaining case is σ = ϕ . Since Σ \{ϕ} |= ϕ and Σ1 equivalent to Σ \{ϕ}, v¯(σ ) = T . Hence v¯(σ ) = T for all σ ∈ Σ. Since Σ |= α, v¯(α) = T so Σ1 |= α That is, Σ1 is equivalent to Σ. (b) The set {A0 , (A0 ∧ A1 ), ((A0 ∧ A1 ) ∧ A2 ), . . .} is a counterexample. No set with at least two elements is independent since the “earliest” member will be tautologically implied by the later members and no set with one member is equivalent since the subsequent member is not tautologically implied by it. 11. Show that a truth assignment v satisfies the wff (· · · (A1 ↔ A 2 ) ↔ · · · ↔ A n ) iff v (Ai ) = F for an even number of i’s, 1 ≤ i ≤ n . 7
Let α denote the wff given. Fix an arbitrary n . Let the number of i’s such that v (Ai = F , 1 ≤ i ≤ n be k. We will prove the assertion by induction k, 0 ≤ k ≤ n . For k = 0, we can prove inductively that v¯(α) = T . For k = 1, by associativivity for ↔, we can reorder the sentence symbols such that v (A1 ) = F and v (Ai ) = T for all 2 ≤ i ≤ n. We can then prove inductively that v¯(α) = F . For k = 2 j − 1, 0 ≤ k ≤ n, we reorder the sentence symbols such that v (Ai ) = F for all 1 ≤ i ≤ k and v (Ai ) = T for all k +1 ≤ i ≤ n (the notation will be slightly different for k = n or k = n − 1 but these can be handled in a similar fashion.) By the induction hypothesis, v¯(A1 ↔ · · · ↔ Ak−1 ) = T since k − 1 is even. Then v¯(A1 ↔ · · · ↔ Ak−1 ↔ A k ) = F since v (Ak ) = F . It can then be proved inductively that v¯(α) = F . For k = 2 j , 0 ≤ k ≤ n, we reorder the sentence symbols such that v (Ai ) = F for all 1 ≤ i ≤ k and v (Ai ) = T for all k +1 ≤ i ≤ n (the notation will be slightly different for k = n or k = n − 1 but these can be handled in a similar fashion.) By the induction hypothesis, v¯(A1 ↔ · · · ↔ Ak−1 ) = F since k − 1 is odd. Then v¯(A1 ↔ · · · ↔ A k−1 ↔ A k ) = T since v (Ak ) = F . It can then be proved inductively that v¯(α) = T . 14. Let S be the set of all sentence symbols, and assume that v : S → {F, T } is a truth assignment. Show there is at most one extension v¯ meeting conditions 0-5 listed at the beginning of the section. The induction principle can be used to prove the result. Condition 0 will ensure the validity of the base case while conditions 1-5 are used in the inductive step. 15. Of the following three formulas, which tautologically imply which? (a) (A ↔ B ) (b) (¬((A → B ) → ( ¬(B → A )))) (c) (((¬A) ∨ B) ∧ (A ∨ (¬B))) By the method of truth tables, all three are tautologically equivalent.
1.3
A Parsing Algorithm
Exercises (Page 33) 2. Give an example of wffs α and β and expressions γ and δ such that (α ∧ β ) = (γ ∧ δ ) but α = γ . 8
Let α = (A0 ∧ A1 ), β = A 2 , γ = (A0 and δ = ∧A1 ) ∧ A2 . 3. Carry out the argument for Lemma 13B for the case of the operation E ¬ The proper initial segments are of the following: (A) ( (B) (¬ (C) (¬α0
where α0 is a proper initial segment of (¬α)
(D) (¬α Cases A and B have the desired property. By applying the inductive hypothesis, α0 has the desired property so case C is settled. For case D, α is a wff so it has an equal number of left and right parenthesis. Hence case D has the desired property as well.
2
First-Order Logic
2.2
Truth and Models
Exercises (Page 99) 1. Show that (a) Γ; α |= ϕ iff Γ |= (α → ϕ ); and (b) ϕ
ψ iff |=
(ϕ ↔ ψ ).
(a) Given Γ; α |= ϕ . By definition, for every structure A and every variable assignment s such that A satisfies every member of Γ and α with s, A also satisfies ϕ with s. Now given an arbitrary structure A and an arbitrary variable assignment s such that A satisfies every member of Γ with s, either | =A α[s] or |=A α[s]. For the former, |=A (α → ϕ)[s] by definition. For the latter, since Γ; α |= ϕ, |=A ϕ[s] so |=A (α → ϕ)[s]. Hence Γ |= (α → ϕ ). Conversely, given Γ |= (α → ϕ);, for arbitrary structure A and variable assignment s such that every member of Γ as well as α is satisfied by A with s, |=A ϕ[s] since |=A α[s] and Γ |= (α → ϕ );. Thus Γ; α |= ϕ . (b) Given ϕ ψ . For an arbitrary structure A and variable assignment s, either |=A ϕ[s] or | =A ϕ[s]. For the former, |= Aψ [s] so |=A (ϕ ↔ ψ )[s]. For the latter, | = Aψ[s] so |=A ( ϕ ↔ ψ )[s]. Hence |= (ϕ ↔ ψ ).
9
2. Show that no one of the following sentences is logically implied by the other two. (a) ∀x∀y∀z (P xy → P yz → P xz ). (b) ∀x∀y(P xy → P yx → x = y ). (c) ∀x∃yPxy → ∃y∀xPxy . First take the structure defined by (N; ≤) where P is the predicate symbol denoting the ≤ relation. (a) is true by the transitivity of ≤. (b) is true as well. However, (c) is false as ∀x∃yPxy is true (as it translates to “for any natural number there is a bigger number”) but ∃ y ∀xPxy is false (“there exists a biggest natural number”). Next take the structure defined by ({1, 2, 3}; {1, 1 1, 2 2, 1 2, 2}). (a) is true, (c) is true (vacuously) while (b) is false. Finally, the structure defined by ({1, 2, 3}; {1, 2 2, 3}) is true for (b) and (c) but false for (a). 3. Show that
{∀x(α → β ), ∀x α} |= ∀ x β. Take an arbitrary structure A and variable assignment s such that |=A ∀x(α → β )[s] and |=A ∀x α[s]. For every d ∈ |A|, |=A (α → β )[s(x|d)] and |=A α[s(x|d)]. Hence |=A β [s(x|d)] so |=A ∀xβ [s]. Hence {∀x(α → β ), ∀x α} |= ∀ x β. 4. Show that if x does not occur free in α, then α |= ∀ x α. Take an arbitrary structure A and variable assignment s such that |=A α[s]. For every d ∈ |A|, the variable assignment s (x|d) agree at all variables except at (possibly) x. Since x does not occur free in α , the two variable assignments agree at all variables (if any) that occur free in α. By Theorem 22A (from the book), |=A α [s(x|d)] so |=A ∀x α[s]. Hence α, then α |= ∀ x α. 5. Show that the formula x = y → P z f x → Pzfy (where f is a one-place function symbol and P is a two-place predicate symbol) is valid. Suppose the formula is not valid. Then there exists a structure A and variable assignment s such that | =A x = y → Pzfx → Pzfy [s]. Hence |=A x = y [s], |=A Pzfx[s] and | =A Pzfy[s]. Hence, ¯s(x) = s¯(y ), A s¯(z ), ¯ P A . s(f x) ∈ P and s¯(z ), ¯ s(f y) ∈ Since s¯(x) = s¯(y), s¯(f x) = f A (¯s(x)) = f A (¯s(y)) = s¯(f y ). However, this P A . contradicts s¯(z ), ¯ s(f x) ∈ P A and s¯(z ), ¯ s(f y) ∈ 10
8. Assume that Σ is a set of sentences such that for any sentence τ , either Σ |= τ or σ |= ¬ τ . Assume that A is a model of Σ. Show that for any sentence τ , we have |=A τ iff Σ |= τ . If Σ |= τ , since A is a model of Σ, |=A τ by definition. If Σ |= τ , Σ |= ¬ τ by the property of Σ. Since A is a model of Σ, |=A ¬τ so | =A τ . 9. Assume that the language has equality and a two-place predicate symbol P . For each of the following conditions, find a sentence σ such that the structure A is a model of σ iff the condition is met. (a) |A| has exactly two members. (b) P A is a function from |A| into |A|. (c) P A is a permutation of |A|. (a) ∃x∃y(x = y ∧ ∀z (z = x ∨ z = y )). (b) ∀x∃y(P xy ∧ ∀z (P xz → z = y )). (c) ∀x∃y(P xy ∧ ∀z (P xz → z = y )) ∧ ∀y∃x(P xy ∧ ∀z (P zy → z = x )).
10. Show that
|=A ∀v2 Qv1 v2 cA iff
|=A ∀v2 Qcv2
where Q is a two-place predicate symbol and c is a constant symbol.
|=A ∀ v2 Qv 1 v2 cA iff for all d ∈ |A|, |=A Qv1 v2 [ s(v2 |d)] where s(v1 ) = c A iff cA , d ∈ Q A for all d ∈ A iff |=A Qcv2 [s(v2 |d)] iff |=A ∀ v2 Qcv 2 . 11. For each of the following relations, give a formula which defines it in (N; +; ·). (a) {0}. (b) {1}. (c) {m, n|n is the successor of m in (d) {m, n|m < n in
N}.
(a) ∀v2 v2 = v 1 + v2 . 11
N}.
(b) ∀v2 v2 = v 1 · v2 . (c) v1 + 1 = v2 . More formally, we can use (b) to replace the number “1”. (i.e. ∃v3 ( ∀v4 v4 = v 3 · v4 ∧ v1 + v3 = v 2 .) (d) Let the successor relationship defined in (c) be denoted by S . ∃v3 (∃v4 Sv 4 v3 ∧ v1 + v3 = v 2 ). 12. Let
R
be the structure (R; +; ·).
(a) Give a formula that defines in R the interval [0, ∞). (b) Give a formula that defines in R the set {2}. (c) Show that any finite union of intervals, the endpoints of which are algebraic, is definable in R. (a) ∃v2 v1 = v 2 · v2 . (b) 1 can be defined in the same way as in question 11b. Then the following formula defines {2}: v1 = 1 + 1. (c) Note that zero and all integers larger than 1 are definable in a manner similar to question 11a and 12b respectively. The negative numbers can be defined by v1 + a = 0 where a is a positive integer. The ordering relation, {m, n|m ≤ n } can be defined by ∃v3 ∃v4 ( v3 = v 4 · v4 ∧ v1 + v3 = v 2 ). The ordering relation {m, n|m < n} can be defined using ≤ by (v1 ≤ v 2 ∧ v1 = v 2 ). Each algebraic number can be identified as the k-th smallest root of a polynomial of degree n with integer coefficients where k ≤ n . (Note that such a polynomial is not unique but exists by definition of an algebraic number) Without loss of generality we may assume there are no roots of multiplicity greater than 1 in the polynomial. Let αk be the string representing the formula (an · vkn + an−1 · vkn−1 + . . . + a0 ) where ai represents the integer coefficients of an n-th degree polynomial with integer coefficients and vkn is shorthand for multiplying vk n times. An algebraic number x can then be defined by ∃v1 . . . ∃vn−1 (α1 ∧ . . . ∧ αn ) ∧ (v1 < .. . < vk−1 < x < vk < .. . < vn−1 ). An interval with algebraic endpoints can then be defined using the ordering relations and the algebraic numbers. A finite union of such intervals can then be defined by disjunctions of the formulas representing each interval.
12
13. Prove part (a) of the homomorphism theorem. We proceed by using the induction principle. h : |A| → |B|, s : V → |A|, h ◦ s : V → |B|. For a constant symbol c, h(¯ s(c)) = h(cA ) = cB since h is a homomorphism. h ◦ s(c) = cB by definition of the extension of a variable assignment. For a variable symbol v , h(¯s(v )) = h ◦ s(v ) by the definition of composition of functions. Induction hypothesis: suppose h(¯s(ti )) = h ◦ s(ti ) for 1 ≤ i ≤ n . Inductive step: let f be an n-ary function symbol. h(¯ s(f t1 . . . tn ) = h f A s¯(t1 ), . . . , ¯ s(tn ) by definition of s¯
= f h s¯(t ) , . . . , h s¯(t ) by definition of h. B
1
n
= f B h ◦ s(t1 ), . . . , h ◦ s(tn ) by the induction hypothesis = h ◦ s(f t1 . . . tn ) by definition of h ◦ s.
15. Show that the addition relation, {m,n,p| p = m + n} is not definable in (N; ·). Let the automorphism h : N → N be defined as follows: h(0) = 0, h(1) = 1, h(2) = 3, h(3) = 2. By the fundamental theorem of algebra, all other natural numbers n have a unique prime factorization a2
n = 2
a3
·3 ·
pa
p
p prime p= 2,3
where ai ≥ 0. We define a3
h(n) = 2
a2
·3 ·
pa
p
p prime p= 2,3
Note that h is indeed well-defined and onto and is thus an automorphism. 4, 3, 7 would belong to the addition relation but h(4), h(3), h(7) = 9, 2, 7 does not belong to the addition relation so the relation is not definable.
13
16. Give a sentence having models of size 2n for every positive integer n, but no finite models of odd size. Following the suggestion of the book, we let R and B be one-place predicate symbols and f be a one-place function symbol. Let α be the formula ∀x (Rx ∨ Bx ) ∧ ¬(Rx ∧ Bx ) . This formula asserts that in a given structure A, all elements in |A| are either “red” or “blue”. Next, let β be the formula ∀x(Bx → Rf x ∧ Rx → Bf x). This asserts that f reverses the color of the elements. Finally, let γ be the formula ∀x∃yf y = x. This asserts that f is a permutation. (i.e. the range of f = the domain of f .) Let σ be the sentence α ∧ β ∧ γ . No finite model of odd size is a model of σ as f is a color-reversing permutation. If |A| is odd, it is impossible for the range of f to be the domain of f . On the other hand, for every positive integer n , a model of size 2n exists where R and B are equal sized partitions of |A|.
17. (a) Consider a language with equality whose only paraameter (aside from ∀) is a two-place predicate symbol P . Show that if A is finite and A ≡ B, then A is isomorphic to B. Once again we follow the suggestion from the book. Let the size of |A| be n. Let α be the formula (v1 = ... = vn ) and β be the formula ¬∃vn+1 (v1 = v n+1 ∧ . . . ∧ vn = v n+1). This asserts that there are n and only n elements in |A|. ... = s(vn ). For each Let s be a variable assignment such that s(v1 ) = 1 ≤ i, j ≤ n, let γ i,j be the formula P vi v j if |=A P vi v j [s] and ¬P vi v j if |=A P vi v j [s]. Now let θ be the formula α ∧ β ∧ γ i,j and σ the sentence ∃v1 . . . ∃vn θ.
i,j
A has
exactly n elements and each γ i,j is satisfied by A with s. Hence σ is satisfied by A with s. However, σ has no free variables so σ is true in A. Now given structure B such that A ≡ B. Hence σ is true in B. By α, there are exactly n elements in |B|. Since σ is true in B, there is a truth assignment sb such that |=B = . . . = s b (v2 ) since γ i,j [sb ]. Moreover, sb (v1 )
i,j
alpha is true in B. Each element ai in |A| can be uniquely identified with s(vi ) and each element bi in |B| can be uniquely identified with sb (vi ) since ... = s(vn ) and there are exactly n elements in the universes of A s(v1 ) = and B.
14
Consider the function h : |A| → |B| defined h(ai ) = sb (vi ). h is welldefined, one-one and onto because of the preceding discussion. h is a homomorphism as γ i,j is true in both A and B. Thus, A is isomorphic with B.
20. Assume that the language has equality and a two-place predicate symbol P . Consider the two structures (N; <) and (R; <) for the language. (a) Find a sentence true in one structure and false in the other.
∃x∀y (x = y → x < y) is true in (N; <) but not (R; <). ∀x∀y ∃z ( x < y → x < z < y ) is true in (R; <) but not in (N; <).
27. Assume that the paremeters of the language are ∀ and a two-place predicate symbol P . List all of the non-isomorphic structures of size 2.
|A| = { a, b}. 0 elements in P . 1 element in P : {a, a}, {a, b}. 2 elements in P : {a, a}, {b, b} , {a, a}, {a, b} , {a, a}, {b, a} , {a, b}, {b, a} . 3 elements in P : 4 elements in P .
{a, a}, {a, b}, {b, a} , {a, a}, {a, b}, {b, b} .
28. For each of the 4 structures, give a sentence true in that structure and false in the other three:
• (R; ×). • (R∗ ; ×∗ ) where
R∗
is the set of non-zero reals.
• (N;+). • (P; +∗ ) where P is the set of positive integers. (“0 × a = 0 ): ∃x∀y x ◦ y = x is true in (R; ×). (Existence of inverse element): ∀x∃y x ◦ y = 1 is true in (R∗ ; ×∗ ). Remark: “1” can be defined by the formula ∀v z ◦ v = v . (Existence of identity element and 0+0=0): ∃x ( ∀y x ◦ y = y ∧ x ◦ x = x ) is true in (N;+). (Non-existence of identity element): ¬∃x∀y x ◦ y = y is true in (P; +∗ ).
15
References [1] Enderton, H. B., “A Mathematical Introduction to Logic (2nd Edition)”, Hardcourt/Academic Press, 2001. [2] Raghavan, D. National University of Singapore (NUS) MA4207: Mathematical Logic, 2013/2014 Semester 2.
About me I am currently (2014) reading my Masters (coursework) in Mathematics at the National University of Singapore (NUS), having earlier graduated with a degree in chemical engineering. My interests include graph theory, combinatorics and teaching. There are bound to be flaws (typo or conceptual) and I will be very happy to hear about them at
[email protected].
16