Source and provenance

All 12 authority files and 1854 lines are shown exactly. The projected chapter slice is byte-checked at SHA-256 3f6186470ab3bfacdaabb2268f9e16150a039bf6c8144d5d2f40d7c8567a3794. AI production model: OpenAI Codex gpt-5.6-sol, Ultra. Source authorship remains with the credited Open Logic Project contributors.

content/first-order-logic/completeness/completeness.tex

42 lines; SHA-256 35cbcfc7f12046ceabc5c4407c43817d71d3907e9e9d57a1b5928fcbe10c672c. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. \documentclass[../../../include/open-logic-chapter]{subfiles}
  4. \begin{document}
  5. \iftag{FOL}
  6. {\olchapter{fol}{com}{The Completeness Theorem}}
  7. {\olchapter{pl}{com}{The Completeness Theorem}}
  8. \olimport{introduction}
  9. \olimport{outline}
  10. \olimport{complete-consistent-sets}
  11. \iftag{FOL}{%
  12. \olimport{henkin-expansions}
  13. }{}
  14. \olimport{lindenbaums-lemma}
  15. \olimport{construction-of-model}
  16. \iftag{FOL}{%
  17. \olimport{identity}
  18. }{}
  19. \olimport{completeness-thm}
  20. \olimport{compactness}
  21. \olimport{compactness-direct}
  22. \iftag{FOL}{%
  23. \olimport{downward-ls}
  24. }{}
  25. \OLEndChapterHook
  26. \end{document}

content/first-order-logic/completeness/introduction.tex

75 lines; SHA-256 40a994a78343dccb102c8347722a6eb85fd3a12dd4c6565a37960f7b24673500. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: introduction
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{com}{int}}
  8. {\olfileid{pl}{com}{int}}
  9. \olsection{Introduction}
  10. The completeness theorem is one of the most fundamental results about
  11. logic. It comes in two formulations, the equivalence of which we'll
  12. prove. In its first formulation it says something fundamental about
  13. the relationship between semantic consequence and our !!{derivation}
  14. system: if !!a{sentence}~$!A$ follows from some !!{sentence}s
  15. $\Gamma$, then there is also !!a{derivation} that establishes $\Gamma
  16. \Proves !A$. Thus, the !!{derivation} system is as strong as it can
  17. possibly be without proving things that don't actually follow.
  18. In its second formulation, it can be stated as a model existence
  19. result: every consistent set of !!{sentence}s is satisfiable.
  20. Consistency is a proof-theoretic notion: it says that our
  21. !!{derivation} system is unable to produce certain !!{derivation}s.
  22. But who's to say that just because there are no !!{derivation}s of a
  23. certain sort from~$\Gamma$, it's guaranteed that there is
  24. \iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!{valuation}{~$\pAssign{v}$}
  25. with $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$}? Before the
  26. completeness theorem was first proved---in fact before we had the
  27. !!{derivation} systems we now do---the great German mathematician
  28. David Hilbert held the view that consistency of mathematical theories
  29. guarantees the existence of the objects they are about. He put it as
  30. follows in a letter to Gottlob Frege:
  31. \begin{quote}
  32. If the arbitrarily given axioms do not contradict one another with
  33. all their consequences, then they are true and the things defined by
  34. the axioms exist. This is for me the criterion of truth and
  35. existence.
  36. \end{quote}
  37. Frege vehemently disagreed. The second formulation of the completeness
  38. theorem shows that Hilbert was right in at least the sense that if the
  39. axioms are consistent, then \emph{some}
  40. \iftag{FOL}{!!{structure}}{!!{valuation}} exists that makes them all
  41. true.
  42. These aren't the only reasons the completeness theorem---or rather,
  43. its proof---is important. It has a number of important consequences,
  44. some of which we'll discuss separately. For instance, since any
  45. !!{derivation} that shows $\Gamma \Proves !A$ is finite and so can
  46. only use finitely many of the !!{sentence}s in~$\Gamma$, it follows by
  47. the completeness theorem that if $!A$ is a consequence of~$\Gamma$, it
  48. is already a consequence of a finite subset of~$\Gamma$. This is
  49. called \emph{compactness}. Equivalently, if every finite subset of
  50. $\Gamma$ is consistent, then $\Gamma$ itself must be consistent.
  51. Although the compactness theorem follows from the completeness theorem
  52. via the detour through !!{derivation}s, it is also possible to use the
  53. \emph{the proof of} the completeness theorem to establish it
  54. directly. For what the proof does is take a set of !!{sentence}s with
  55. a certain property---consistency---and constructs !!a{structure} out
  56. of this set that has certain properties (in this case, that it
  57. satisfies the set). Almost the very same construction can be used to
  58. directly establish compactness, by starting from ``finitely
  59. satisfiable'' sets of !!{sentence}s instead of consistent ones.
  60. \iftag{FOL}{The construction also yields other consequences, e.g.,
  61. that any satisfiable set of !!{sentence}s has a finite or
  62. !!{denumerable}s model. (This result is called the
  63. L\"owenheim--Skolem theorem.) In general, the construction of
  64. !!{structure}s from sets of !!{sentence}s is used often in logic,
  65. and sometimes even in philosophy.}{}
  66. \end{document}

content/first-order-logic/completeness/outline.tex

170 lines; SHA-256 e86bb4893ff5da65af4fa5b8b7eebec5807e0b4aa0562ca5388fac369aec642e. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: outline
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{com}{out}}
  8. {\olfileid{pl}{com}{out}}
  9. \olsection{Outline of the Proof}
  10. The proof of the completeness theorem is a bit complex, and upon first
  11. reading it, it is easy to get lost. So let us outline the proof. The
  12. first step is a shift of perspective, that allows us to see a route to
  13. a proof. When completeness is thought of as ``whenever $\Gamma
  14. \Entails !A$ then $\Gamma \Proves !A$,'' it may be hard to even come
  15. up with an idea: for to show that $\Gamma \Proves !A$ we have to find
  16. !!a{derivation}, and it does not look like the hypothesis that
  17. $\Gamma \Entails !A$ helps us for this in any way. For some proof
  18. systems it is possible to directly construct !!a{derivation}, but we
  19. will take a slightly different approach. The shift in perspective
  20. required is this: completeness can also be formulated as: ``if
  21. $\Gamma$ is consistent, it is satisfiable.'' Perhaps we can use the
  22. information in~$\Gamma$ together with the hypothesis that it is
  23. consistent to construct \iftag{FOL}{!!a{structure}}{!!a{valuation}}
  24. that satisfies every \iftag{FOL}{!!{sentence}}{!!{formula}}
  25. in~$\Gamma$. After all, we know
  26. what kind of \iftag{FOL}{!!{structure}}{!!{valuation}} we are looking
  27. for: one that is as $\Gamma$ describes it!{}
  28. If $\Gamma$ contains only \iftag{FOL}{atomic
  29. !!{sentence}s}{!!{propositional variable}s}, it is easy to construct
  30. a model for it.\iftag{FOL}{ Suppose the atomic !!{sentence}s are all
  31. of the form $\Atom{P}{a_1,\dots,a_n}$ where the $a_i$ are
  32. !!{constant}s.}{} All we have to do is come up with
  33. \iftag{FOL}{%
  34. !!a{domain}~$\Domain{M}$ and an assignment for~$P$ so that
  35. $\Sat{M}{\Atom{P}{a_1,\ldots,a_n}}$. But that's not very hard:
  36. put $\Domain{M} = \Nat$, $\Assign{\Obj c_i}{M} = i$, and for every
  37. $\Atom{P}{a_1,\ldots,a_n} \in \Gamma$, put the tuple $\tuple{k_1,
  38. \dots, k_n}$ into $\Assign{P}{M}$, where $k_i$ is the index of the
  39. constant symbol~$a_i$ (i.e., $a_i \ident \Obj c_{k_i}$).}{%
  40. !!a{valuation}~$\pAssign{v}$ such that $\pSat{v}{p}$ for all $p \in
  41. \Gamma$. Well, let $\pAssign{v}(p) = \True$ iff $p \in \Gamma$.}
  42. Now suppose $\Gamma$ contains some !!{formula}~$\lnot !B$, with $!B$
  43. atomic. We might worry that the construction of
  44. $\iftag{FOL}{\Struct{M}}{\pAssign{v}}$ interferes with the possibility
  45. of making $\lnot !B$ true. But here's where the consistency
  46. of~$\Gamma$ comes in: if $\lnot !B \in \Gamma$, then $!B \notin
  47. \Gamma$, or else $\Gamma$ would be inconsistent. And if $!B \notin
  48. \Gamma$, then according to our construction
  49. of~$\iftag{FOL}{\Struct{M}}{\pAssign{v}}$,
  50. $\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!B}$, so
  51. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\lnot !B}$. So far so good.
  52. What if $\Gamma$ contains complex, non-atomic formulas? Say it
  53. contains $!A \land !B$. To make that true, we should proceed as if
  54. both $!A$ and $!B$ were in~$\Gamma$. And if $!A \lor !B \in \Gamma$,
  55. then we will have to make at least one of them true, i.e., proceed as
  56. if one of them was in~$\Gamma$.
  57. This suggests the following idea: we add additional !!{formula}s
  58. to~$\Gamma$ so as to (a)~keep the resulting set consistent and
  59. (b)~make sure that for every possible atomic !!{sentence}~$!A$, either
  60. $!A$ is in the resulting set, or $\lnot !A$ is, and (c)~such that,
  61. whenever $!A \land !B$ is in the set, so are both $!A$ and $!B$, if
  62. $!A \lor !B$ is in the set, at least one of $!A$ or $!B$ is also, etc.
  63. We keep doing this (potentially forever). Call the set of all
  64. !!{formula}s so added~$\Gamma^*$. Then our construction above would
  65. provide us with \iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}
  66. for which we could prove, by induction, that it satisfies all sentences
  67. in~$\Gamma^*$, and hence also all sentence in~$\Gamma$
  68. since $\Gamma \subseteq \Gamma^*$. It turns out that guaranteeing (a)
  69. and~(b) is enough. A set of sentences for which (b) holds is called
  70. \emph{complete}. So our task will be to extend the consistent
  71. set~$\Gamma$ to a consistent and complete set~$\Gamma^*$.
  72. \iftag{FOL}{%
  73. There is one wrinkle in this plan: if $\lexists[x][!A(x)] \in \Gamma$
  74. we would hope to be able to pick some !!{constant}~$c$ and add $!A(c)$
  75. in this process. But how do we know we can always do that? Perhaps we
  76. only have a few !!{constant}s in our language, and for each one of
  77. them we have $\lnot !A(c) \in \Gamma$. We can't also add $!A(c)$,
  78. since this would make the set inconsistent, and we wouldn't know
  79. whether $\Struct{M}$ has to make $!A(c)$ or $\lnot !A(c)$ true.
  80. Moreover, it might happen that $\Gamma$ contains only sentences in a
  81. language that has no constant symbols at all (e.g., the language of
  82. set theory).
  83. The solution to this problem is to simply add infinitely many
  84. constants at the beginning, plus sentences that connect them with the
  85. quantifiers in the right way. (Of course, we have to verify that this
  86. cannot introduce an inconsistency.)
  87. Our original construction works well if we only have !!{constant}s in
  88. the atomic sentences. But the language might also contain
  89. !!{function}s. In that case, it might be tricky to find the right
  90. functions on~$\Nat$ to assign to these !!{function}s to make
  91. everything work. So here's another trick: instead of using $i$ to
  92. interpret $\Obj c_i$, just take the set of !!{constant}s itself as the
  93. domain. Then $\Struct M$ can assign every !!{constant} to itself:
  94. $\Assign{\Obj c_i}{M} = \Obj c_i$. But why not go all the way: let
  95. $\Domain{M}$ be all \emph{terms} of the language!{} If we do this,
  96. there is an obvious assignment of functions (that take terms as
  97. arguments and have terms as values) to !!{function}s: we assign to the
  98. !!{function}~$\Obj f^n_i$ the function which, given $n$ terms $t_1$,
  99. \dots,~$t_n$ as input, produces the term $\Obj f^n_i(t_1, \dots, t_n)$
  100. as value.
  101. The last piece of the puzzle is what to do with~$\eq$. The
  102. !!{predicate}~$\eq$ has a fixed interpretation: $\Sat{M}{\eq[t][t']}$
  103. iff $\Value{t}{M} = \Value{t'}{M}$. Now if we set things up so that the
  104. !!{value} of a term~$t$ is $t$ itself, then this !!{structure}
  105. will make \emph{no} sentence of the form $\eq[t][t']$ true
  106. unless $t$ and $t'$ are one and the same term. And of
  107. course this is a problem, since basically every interesting theory in
  108. a language with !!{function}s will have as theorems sentences
  109. $\eq[t][t']$ where $t$ and $t'$ are not the same term (e.g., in
  110. theories of arithmetic: $\eq[(\Obj 0+ \Obj 0)][\Obj 0]$). To solve
  111. this problem, we change the domain of~$\Struct M$: instead of using terms as
  112. the objects in~$\Domain{M}$, we use sets of terms, and each set is so
  113. that it contains all those terms which the sentences in~$\Gamma$
  114. require to be equal. So, e.g., if $\Gamma$ is a theory of arithmetic,
  115. one of these sets will contain: $\Obj 0$, $(\Obj 0 + \Obj 0)$, $(\Obj
  116. 0 \times \Obj 0)$, etc. This will be the set we assign to $\Obj 0$,
  117. and it will turn out that this set is also the value of all the terms
  118. in it, e.g., also of $(\Obj 0 + \Obj 0)$. Therefore, the sentence
  119. $\eq[(\Obj 0+ \Obj 0)][\Obj 0]$ will be true in this revised
  120. !!{structure}.}{}
  121. So here's what we'll do. First we investigate the properties of
  122. !!{complete} consistent sets, in particular we prove that
  123. !!a{complete} consistent set contains $!A \land !B$ iff it contains
  124. both $!A$ and~$!B$, $!A \lor !B$ iff it contains at least one of them,
  125. etc. (\olref[ccs]{prop:ccs}).\iftag{FOL}{ Then we define and
  126. investigate ``saturated'' sets of sentences. A saturated set is one
  127. which contains conditionals that link each quantified !!{sentence}
  128. to instances of it (\olref[hen]{defn:henkin-exp}). We show that any
  129. consistent set~$\Gamma$ can always be extended to a saturated
  130. set~$\Gamma'$ (\olref[hen]{lem:henkin}). If a set is consistent,
  131. saturated, and !!{complete} it also has the property that it
  132. contains \iftag{prvEx}{$\lexists[x][!A(x)]$ iff it contains $!A(t)$
  133. for some closed term~$t$}{}\iftag{defEx,defAll}{}{ and
  134. }\iftag{prvAll}{$\lforall[x][!A(x)]$ iff it contains $!A(t)$ for all
  135. closed terms~$t$}{} (\olref[hen]{prop:saturated-instances}).}{}
  136. We'll then take the\iftag{FOL}{ saturated}{} consistent
  137. set~$\iftag{FOL}{\Gamma'}{\Gamma}$ and show that it can be extended
  138. to a \iftag{FOL}{saturated, consistent, and}{consistent and}
  139. !!{complete} set~$\Gamma^*$ (\olref[lin]{lem:lindenbaum}). This set
  140. $\Gamma^*$ is what we'll use to define our \iftag{FOL}{term
  141. model~$\Struct M(\Gamma^*)$}{!!{valuation}~$\pAssign v(\Gamma^*)$}.
  142. \iftag{FOL}{The term model has the set of closed terms as its domain,
  143. and the interpretation of its !!{predicate}s is given by the atomic
  144. !!{sentence}s}{The valuation is determined by the !!{propositional
  145. variable}s} in~$\Gamma^*$ (\olref[mod]{defn:termmodel}). We'll
  146. use the properties of\iftag{FOL}{ saturated,}{} complete consistent
  147. sets to show that indeed
  148. $\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{!A}$ iff $!A \in
  149. \Gamma^*$ (\olref[mod]{lem:truth}), and thus in particular,
  150. $\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{\Gamma}$.
  151. \iftag{FOL}{Finally, we'll consider how to define a term model if
  152. $\Gamma$ contains~$\eq$ as well
  153. (\olref[ide]{defn:term-model-factor}) and show that it
  154. satisfies~$\Gamma^*$ (\olref[ide]{lem:truth}).}{}
  155. \end{document}

content/first-order-logic/completeness/complete-consistent-sets.tex

223 lines; SHA-256 cf7d517de5d2d257492c66f2cf16347fce490f2d932681a3f6ebd2386e9b1ffd. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: complete-sets
  4. % Definition of complete consistent sets. Properties of complete sets required
  5. % for completeness proved are in provability.tex in the
  6. % chapter on the proof system used.
  7. \documentclass[../../../include/open-logic-section]{subfiles}
  8. \begin{document}
  9. \iftag{FOL}
  10. {\olfileid{fol}{com}{ccs}}
  11. {\olfileid{pl}{com}{ccs}}
  12. \olsection{Complete Consistent Sets of \usetoken{P}{sentence}}
  13. \begin{defn}[Complete set]
  14. \ollabel{def:complete-set} A set~$\Gamma$ of !!{sentence}s is
  15. \emph{!!{complete}} iff for any !!{sentence}~$!A$, either $!A \in
  16. \Gamma$ or $\lnot !A \in \Gamma$.
  17. \end{defn}
  18. \begin{explain}
  19. !!^{complete} sets of sentences leave no questions unanswered. For
  20. any !!{sentence}~$!A$, $\Gamma$ ``says'' if $!A$ is true or false. The
  21. importance of !!{complete} sets extends beyond the proof of the
  22. completeness theorem. A theory which is !!{complete} and
  23. axiomatizable, for instance, is always decidable.
  24. \end{explain}
  25. \begin{explain}
  26. !!^{complete} consistent sets are important in the completeness proof
  27. since we can guarantee that every consistent set of
  28. !!{sentence}s~$\Gamma$ is contained in !!a{complete} consistent
  29. set~$\Gamma^*$. !!^a{complete} consistent set contains, for each
  30. !!{sentence}~$!A$, either $!A$ or its negation $\lnot !A$, but not
  31. both. This is true in particular for \iftag{FOL}{atomic
  32. !!{sentence}s}{propositional variables}, so from !!a{complete}
  33. consistent set\iftag{FOL}{ in a language suitably expanded by
  34. !!{constant}s}{}, we can construct
  35. \iftag{FOL}{!!a{structure}}{!!a{valuation}} where the
  36. \iftag{FOL}{interpretation of !!{predicate}s}{truth value assigned to
  37. propositional variables} is defined according to which
  38. \iftag{FOL}{atomic !!{sentence}s}{!!{propositional variable}s} are
  39. in~$\Gamma^*$. This \iftag{FOL}{!!{structure}}{!!{valuation}} can then
  40. be shown to make all !!{sentence}s in~$\Gamma^*$ (and hence also all
  41. those in~$\Gamma$) true. The proof of this latter fact requires that
  42. $\lnot !A \in \Gamma^*$ iff $!A \notin \Gamma^*$, $(!A \lor !B) \in
  43. \Gamma^*$ iff $!A \in \Gamma^*$ or $!B \in \Gamma^*$, etc.
  44. \end{explain}
  45. In what follows, we will often tacitly use the properties of
  46. reflexivity, monotonicity, and transitivity of $\Proves$ (see
  47. \iftag{FOL}{%
  48. \tagrefs{prfSC/{fol:seq:ptn:sec},prfND/{fol:ntd:ptn:sec},prfAX/{fol:axd:ptn:sec},prfTab/{fol:tab:ptn:sec}}}{%
  49. \tagrefs{prfSC/{pl:seq:ptn:sec},prfND/{pl:ntd:ptn:sec},prfAX/{pl:axd:ptn:sec},prfTab/{pl:tab:ptn:sec}}}).
  50. \begin{prop}
  51. \ollabel{prop:ccs}
  52. Suppose $\Gamma$ is !!{complete} and consistent. Then:
  53. \begin{enumerate}
  54. \item \ollabel{prop:ccs-prov-in} If $\Gamma \Proves !A$, then $!A \in
  55. \Gamma$.
  56. \tagitem{prvAnd}{\ollabel{prop:ccs-and} $!A \land !B \in \Gamma$
  57. iff both $!A \in \Gamma$ and $!B \in \Gamma$.}{}
  58. \tagitem{prvOr}{\ollabel{prop:ccs-or} $!A \lor !B \in \Gamma$ iff
  59. either $!A \in \Gamma$ or $!B \in \Gamma$.}{}
  60. \tagitem{prvIf}{\ollabel{prop:ccs-if} $!A \lif !B \in \Gamma$ iff
  61. either $!A \notin \Gamma$ or $!B \in \Gamma$.}{}
  62. \end{enumerate}
  63. \end{prop}
  64. \begin{proof}
  65. Let us suppose for all of the following that $\Gamma$ is !!{complete} and
  66. consistent.
  67. \begin{enumerate}
  68. \item If $\Gamma \Proves !A$, then $!A \in \Gamma$.
  69. Suppose that $\Gamma \Proves !A$. Suppose to the contrary that $!A
  70. \notin \Gamma$. Since $\Gamma$ is !!{complete}, $\lnot !A \in \Gamma$.
  71. By
  72. \iftag{FOL}{%
  73. \tagrefs{prfSC/{fol:seq:prv:prop:explicit-inc},
  74. prfND/{fol:ntd:prv:prop:explicit-inc},
  75. prfAX/{fol:axd:prv:prop:explicit-inc},
  76. prfTab/{fol:tab:prv:prop:explicit-inc}}}{%
  77. \tagrefs{prfSC/{pl:seq:prv:prop:explicit-inc},
  78. prfND/{pl:ntd:prv:prop:explicit-inc},
  79. prfAX/{pl:axd:prv:prop:explicit-inc},
  80. prfTab/{pl:tab:prv:prop:explicit-inc}}},
  81. $\Gamma$ is inconsistent. This contradicts the assumption that
  82. $\Gamma$ is consistent. Hence, it cannot be the case that $!A \notin
  83. \Gamma$, so $!A \in \Gamma$.
  84. \tagitem{defAnd}{}{%
  85. \iftag{probAnd}{Exercise.}{%
  86. $!A \land !B \in \Gamma$ iff both $!A \in \Gamma$ and $!B \in \Gamma$:
  87. For the forward direction, suppose $!A \land !B \in \Gamma$. Then
  88. by
  89. \iftag{FOL}{%
  90. \tagrefs{prfSC/{fol:seq:ppr:prop:provability-land},
  91. prfND/{fol:ntd:ppr:prop:provability-land},
  92. prfAX/{fol:axd:ppr:prop:provability-land},
  93. prfTab/{fol:tab:ppr:prop:provability-land}}}{%
  94. \tagrefs{prfSC/{pl:seq:ppr:prop:provability-land},
  95. prfND/{pl:ntd:ppr:prop:provability-land},
  96. prfAX/{pl:axd:ppr:prop:provability-land},
  97. prfTab/{pl:tab:ppr:prop:provability-land}}}, item~(1),
  98. $\Gamma \Proves !A$ and $\Gamma \Proves !B$. By
  99. \olref{prop:ccs-prov-in}, $!A \in \Gamma$ and $!B \in \Gamma$, as
  100. required.
  101. For the reverse direction, let $!A \in \Gamma$ and $!B \in
  102. \Gamma$. By
  103. \iftag{FOL}{%
  104. \tagrefs{prfSC/{fol:seq:ppr:prop:provability-land},
  105. prfND/{fol:ntd:ppr:prop:provability-land},
  106. prfAX/{fol:axd:ppr:prop:provability-land},
  107. prfTab/{fol:tab:ppr:prop:provability-land}}}{%
  108. \tagrefs{prfSC/{pl:seq:ppr:prop:provability-land},
  109. prfND/{pl:ntd:ppr:prop:provability-land},
  110. prfAX/{pl:axd:ppr:prop:provability-land},
  111. prfTab/{pl:tab:ppr:prop:provability-land}}}, item~(2),
  112. $\Gamma \Proves !A \land !B$. By \olref{prop:ccs-prov-in}, $!A \land
  113. !B \in \Gamma$.}}
  114. \tagitem{defOr}{}{%
  115. \iftag{probOr}{Exercise.}{%
  116. First we show that if $!A \lor !B \in \Gamma$, then either $!A \in
  117. \Gamma$ or $!B \in \Gamma$. Suppose $!A \lor !B \in \Gamma$ but $!A
  118. \notin \Gamma$ and $!B \notin \Gamma$. Since $\Gamma$ is
  119. !!{complete}, $\lnot !A \in \Gamma$ and $\lnot !B \in \Gamma$. By
  120. \iftag{FOL}{%
  121. \tagrefs{prfSC/{fol:seq:ppr:prop:provability-lor},
  122. prfND/{fol:ntd:ppr:prop:provability-lor},
  123. prfAX/{fol:axd:ppr:prop:provability-lor},
  124. prfTab/{fol:tab:ppr:prop:provability-lor}}}{%
  125. \tagrefs{prfSC/{pl:seq:ppr:prop:provability-lor},
  126. prfND/{pl:ntd:ppr:prop:provability-lor},
  127. prfAX/{pl:axd:ppr:prop:provability-lor},
  128. prfTab/{pl:tab:ppr:prop:provability-lor}}},
  129. item (1), $\Gamma$ is inconsistent, a contradiction. Hence, either $!A
  130. \in \Gamma$ or $!B \in \Gamma$.
  131. For the reverse direction, suppose that $!A \in \Gamma$ or $!B \in
  132. \Gamma$. By
  133. \iftag{FOL}{%
  134. \tagrefs{prfSC/{fol:seq:ppr:prop:provability-lor},
  135. prfND/{fol:ntd:ppr:prop:provability-lor},
  136. prfAX/{fol:axd:ppr:prop:provability-lor},
  137. prfTab/{fol:tab:ppr:prop:provability-lor}}}{%
  138. \tagrefs{prfSC/{pl:seq:ppr:prop:provability-lor},
  139. prfND/{pl:ntd:ppr:prop:provability-lor},
  140. prfAX/{pl:axd:ppr:prop:provability-lor},
  141. prfTab/{pl:tab:ppr:prop:provability-lor}}}, item (2),
  142. $\Gamma \Proves !A \lor !B$. By \olref{prop:ccs-prov-in}, $!A \lor
  143. !B \in \Gamma$, as required.}}
  144. \tagitem{defIf}{}{%
  145. \iftag{probIf}{Exercise.}{%
  146. For the forward direction, suppose $!A \lif !B \in \Gamma$, and suppose
  147. to the contrary that $!A \in \Gamma$ and $!B \notin \Gamma$. On these
  148. assumptions, $!A \lif !B \in \Gamma$ and $!A \in \Gamma$. By
  149. \iftag{FOL}{%
  150. \tagrefs{prfSC/{fol:seq:ppr:prop:provability-lif},
  151. prfND/{fol:ntd:ppr:prop:provability-lif},
  152. prfAX/{fol:axd:ppr:prop:provability-lif},
  153. prfTab/{fol:tab:ppr:prop:provability-lif}}}{%
  154. \tagrefs{prfSC/{pl:seq:ppr:prop:provability-lif},
  155. prfND/{pl:ntd:ppr:prop:provability-lif},
  156. prfAX/{pl:axd:ppr:prop:provability-lif},
  157. prfTab/{pl:tab:ppr:prop:provability-lif}}}, item (1),
  158. $\Gamma \Proves !B$. But then by \olref{prop:ccs-prov-in}, $!B \in
  159. \Gamma$, contradicting the assumption that $!B \notin \Gamma$.
  160. For the reverse direction, first consider the case where $!A \notin
  161. \Gamma$. Since $\Gamma$ is !!{complete}, $\lnot !A \in \Gamma$. By
  162. \iftag{FOL}{%
  163. \tagrefs{prfSC/{fol:seq:ppr:prop:provability-lif},
  164. prfND/{fol:ntd:ppr:prop:provability-lif},
  165. prfAX/{fol:axd:ppr:prop:provability-lif},
  166. prfTab/{fol:tab:ppr:prop:provability-lif}}}{%
  167. \tagrefs{prfSC/{pl:seq:ppr:prop:provability-lif},
  168. prfND/{pl:ntd:ppr:prop:provability-lif},
  169. prfAX/{pl:axd:ppr:prop:provability-lif},
  170. prfTab/{pl:tab:ppr:prop:provability-lif}}}, item (2),
  171. $\Gamma \Proves !A \lif !B$. Again by \olref{prop:ccs-prov-in}, we get
  172. that $!A \lif !B \in \Gamma$, as required.
  173. Now consider the case where $!B \in \Gamma$. By
  174. \iftag{FOL}{%
  175. \tagrefs{prfSC/{fol:seq:ppr:prop:provability-lif},
  176. prfND/{fol:ntd:ppr:prop:provability-lif},
  177. prfTab/{fol:tab:ppr:prop:provability-lif},
  178. prfAX/{fol:axd:ppr:prop:provability-lif}}}{%
  179. \tagrefs{prfSC/{pl:seq:ppr:prop:provability-lif},
  180. prfND/{pl:ntd:ppr:prop:provability-lif},
  181. prfTab/{pl:tab:ppr:prop:provability-lif},
  182. prfAX/{pl:axd:ppr:prop:provability-lif}}},
  183. item (2) again, $\Gamma \Proves !A \lif !B$. By
  184. \olref{prop:ccs-prov-in}, $!A \lif !B \in \Gamma$.}}
  185. \end{enumerate}
  186. \end{proof}
  187. \tagprob{FOL}
  188. \begin{prob}
  189. Complete the proof of \olref[fol][com][ccs]{prop:ccs}.
  190. \end{prob}
  191. \tagendprob
  192. \tagprob{notFOL}
  193. \begin{prob}
  194. Complete the proof of \olref[pl][com][ccs]{prop:ccs}.
  195. \end{prob}
  196. \tagendprob
  197. \end{document}

content/first-order-logic/completeness/henkin-expansions.tex

213 lines; SHA-256 a42f0551e062db3102c47f082be24cd4f8506504989a0008df4b87564e1f9335. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: henkin-expansion
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{com}{hen}
  7. \olsection{Henkin Expansion}
  8. \begin{explain}
  9. Part of the challenge in proving the completeness theorem is that the
  10. model we construct from a complete consistent set~$\Gamma$ must make
  11. all the quantified !!{formula}s in~$\Gamma$ true. In order to
  12. guarantee this, we use a trick due to Leon Henkin. In essence, the
  13. trick consists in expanding the language by infinitely many !!{constant}s
  14. and adding, for each !!{formula} with one free !!{variable} $!A(x)$ a
  15. formula of the form
  16. \iftag{prvEx}
  17. {$\lexists[x][!A(x)] \lif !A(c)$}
  18. {$\lnot\lforall[x][!A(x)] \lif \lnot !A(c)$},
  19. where $c$ is one of the new !!{constant}s. When we construct the
  20. !!{structure} satisfying~$\Gamma$, this will guarantee that each
  21. \iftag{prvEx}
  22. {true existential sentence has a witness}
  23. {false universal sentence has a counterexample}
  24. among the new constants.
  25. \end{explain}
  26. \begin{prop}
  27. \ollabel{prop:lang-exp}
  28. If $\Gamma$ is consistent in $\Lang L$ and $\Lang L'$ is obtained from
  29. $\Lang L$ by adding !!a{denumerable} set of new !!{constant}s $\Obj d_0$,
  30. $\Obj d_1$, \dots, then $\Gamma$ is consistent in~$\Lang L'$.
  31. \end{prop}
  32. \begin{defn}[Saturated set]
  33. A set $\Gamma$ of !!{formula}s of a language $\Lang {L}$ is
  34. \emph{saturated} iff for each !!{formula}~$!A(x) \in \Frm[L]$ with one
  35. free !!{variable}~$x$ there is !!a{constant}~$c \in \Lang{L}$ such
  36. that
  37. \iftag{prvEx}
  38. {$\lexists[x][!A(x)] \lif !A(c) \in \Gamma$}
  39. {$\lnot\lforall[x][!A(x)] \lif \lnot !A(c) \in \Gamma$}.
  40. \end{defn}
  41. The following definition will be used in the proof of the next theorem.
  42. \begin{defn}
  43. \ollabel{defn:henkin-exp}
  44. Let $\Lang L'$ be as in \olref{prop:lang-exp}. Fix an enumeration
  45. $!A_0(x_0)$, $!A_1(x_1)$, \dots of all !!{formula}s~$!A_i(x_i)$
  46. of~$\Lang L'$ in which one variable ($x_i$) occurs free. We define
  47. the !!{sentence}s~$!D_n$ by induction on~$n$.
  48. Let $c_0$ be the first !!{constant} among the $\Obj d_i$ we added
  49. to~$\Lang{L}$ which does not occur in~$!A_0(x_0)$. Assuming that
  50. $!D_0$, \dots,~$!D_{n-1}$ have already been defined, let $c_n$ be the
  51. first among the new !!{constant}s~$\Obj d_i$ that occurs neither in
  52. $!D_0$, \dots,~$!D_{n-1}$ nor in~$!A_n(x_n)$.
  53. Now let $!D_{n}$ be the !!{formula} \iftag{prvEx}
  54. {$\lexists[x_{n}][!A_{n}(x_{n})] \lif
  55. !A_{n}(c_{n})$}{$\lnot\lforall[x_{n}][!A_{n}(x_{n})] \lif \lnot
  56. !A_{n}(c_{n})$}.
  57. \end{defn}
  58. \begin{lem}
  59. \ollabel{lem:henkin}
  60. Every consistent set~$\Gamma$ can be extended to a saturated
  61. consistent set~$\Gamma'$.
  62. \end{lem}
  63. \begin{proof}
  64. Given a consistent set of sentences~$\Gamma$ in a language~$\Lang{L}$,
  65. expand the language by adding !!a{denumerable} set of new
  66. !!{constant}s to form~$\Lang{L'}$. By \olref{prop:lang-exp}, $\Gamma$
  67. is still consistent in the richer language. Further, let $!D_i$ be as
  68. in \olref{defn:henkin-exp}. Let
  69. \begin{align*}
  70. \Gamma_0 & = \Gamma \\
  71. \Gamma_{n+1} & = \Gamma_n \cup \{!D_n \}
  72. \end{align*}
  73. i.e., $\Gamma_{n+1} = \Gamma \cup \{ !D_0, \dots, !D_n \}$, and let
  74. $\Gamma' = \bigcup_{n} \Gamma_n$. $\Gamma'$ is clearly saturated.
  75. If $\Gamma'$ were inconsistent, then for some $n$, $\Gamma_n$ would be
  76. inconsistent (Exercise: explain why). So to show that $\Gamma'$ is
  77. consistent it suffices to show, by induction on~$n$, that each
  78. set~$\Gamma_n$ is consistent.
  79. The induction basis is simply the claim that $\Gamma_0 = \Gamma$ is
  80. consistent, which is the hypothesis of the theorem. For the induction
  81. step, suppose that $\Gamma_{n}$ is consistent but $\Gamma_{n+1} =
  82. \Gamma_n \cup \{!D_n\}$ is inconsistent. Recall that $!D_n$~is
  83. \iftag{prvEx}
  84. {$\lexists[x_{n}][!A_{n}(x_n)] \lif !A_{n}(c_{n})$}
  85. {$\lnot\lforall[x_{n}][!A_{n}(x_n)] \lif \lnot !A_{n}(c_{n})$},
  86. where $!A_n(x_n)$ is !!a{formula} of $\Lang{L'}$ with only the
  87. variable~$x_n$ free. By the way we've chosen the~$c_n$ (see
  88. \olref{defn:henkin-exp}), $c_n$ does not occur in~$!A_n(x_n)$ nor
  89. in~$\Gamma_n$.
  90. If $\Gamma_n \cup \{!D_n\}$ is inconsistent, then $\Gamma_n
  91. \Proves \lnot !D_n$, and hence both of the following hold:
  92. \iftag{prvEx}{
  93. \[
  94. \Gamma_n \Proves \lexists[x_n][!A_n(x_n)]
  95. \qquad
  96. \Gamma_n \Proves \lnot !A_n(c_n)
  97. \]}{
  98. \[
  99. \Gamma_n \Proves \lnot\lforall[x_n][!A_n(x_n)]
  100. \qquad
  101. \Gamma_n \Proves !A_n(c_n)
  102. \]}
  103. Since $c_n$ does not occur in
  104. $\Gamma_n$ or in~$!A_n(x_n)$,
  105. \tagrefs{prfAX/{fol:axd:qpr:thm:strong-generalization},prfSC/{fol:seq:qpr:thm:strong-generalization},prfND/{fol:ntd:qpr:thm:strong-generalization},prfTab/{fol:tab:qpr:thm:strong-generalization}} applies.
  106. From \iftag{prvEx}
  107. {$\Gamma_n \Proves \lnot !A_n(c_n)$}
  108. {$\Gamma_n \Proves !A_n(c_n)$},
  109. we obtain
  110. \iftag{prvEx}
  111. {$\Gamma_n \Proves \lforall[x_n][\lnot !A_n(x_n)]$}
  112. {$\Gamma_n \Proves \lforall[x_n][!A_n(x_n)]$}.
  113. Thus we have that both
  114. \iftag{prvEx}
  115. {$\Gamma_n \Proves \lexists[x_n][!A_n(x_n)]$ and
  116. $\Gamma_n \Proves \lforall[x_n][\lnot !A_n(x_n)]$}
  117. {$\Gamma_n \Proves \lnot\lforall[x_n][!A_n(x_n)]$ and
  118. $\Gamma_n \Proves \lforall[x_n][!A_n(x_n)]$},
  119. so $\Gamma_n$ itself is inconsistent.
  120. \iftag{prvEx}
  121. {(Note that
  122. \iftag{prvAll}
  123. {$\lforall[x_n][\lnot !A_n(x_n)] \Proves
  124. \lnot\lexists[x_n][!A_n(x_n)]$}
  125. {$\lforall[x_n][\lnot !A_n]$ is defined as
  126. $\lnot\lexists[x_n][\lnot\lnot !A_n(x_n)]$ and
  127. $\lnot\lexists[x_n][\lnot\lnot !A_n(x_n)] \Proves
  128. \lnot\lexists[x_n][!A_n(x_n)]$}.)}{}
  129. Contradiction: $\Gamma_n$ was supposed to be consistent. Hence
  130. $\Gamma_n \cup \{ !D_n\}$ is consistent.
  131. \end{proof}
  132. \begin{explain}
  133. We'll now show that \emph{complete}, consistent sets which are
  134. saturated have the property that \iftag{prvAll}{it contains a
  135. universally quantified !!{sentence} iff it contains all its
  136. instances}{}\iftag{defAll,defEx}{}{ and }\iftag{prvAll}{it contains an
  137. existentially quantified !!{sentence} iff it contains at least one
  138. instance}{}. We'll use this to show that the !!{structure} we'll
  139. generate from a complete, consistent, saturated set makes all its
  140. quantified sentences true.
  141. \end{explain}
  142. \begin{prop}\ollabel{prop:saturated-instances}
  143. Suppose $\Gamma$ is complete, consistent, and saturated.
  144. \begin{tagenumerate}{prvEx,prvAll}
  145. \tagitem{prvEx}{$\lexists[x][!A(x)] \in \Gamma$ iff $!A(t) \in \Gamma$
  146. for at least one closed term~$t$.}{}
  147. \tagitem{prvAll}{$\lforall[x][!A(x)] \in \Gamma$ iff $!A(t) \in \Gamma$
  148. for all closed terms~$t$.}{}
  149. \end{tagenumerate}
  150. \end{prop}
  151. \begin{proof}
  152. \begin{tagenumerate}{prvEx,prvAll}
  153. \tagitem{prvEx}{%
  154. \iftag{probEx}{Exercise.}{First suppose that $\lexists[x][!A(x)]
  155. \in \Gamma$. Because $\Gamma$ is saturated,
  156. $(\lexists[x][!A(x)] \lif !A(c)) \in \Gamma$ for some
  157. !!{constant}~$c$. By
  158. \tagrefs{prfAX/{fol:axd:ppr:prop:provability-lif},prfSC/{fol:seq:ppr:prop:provability-lif},prfND/{fol:ntd:ppr:prop:provability-lif},prfTab/{fol:tab:ppr:prop:provability-lif}}, item~(1),
  159. and \olref[ccs]{prop:ccs}\olref[ccs]{prop:ccs-prov-in}, $!A(c)
  160. \in \Gamma$.
  161. For the other direction, saturation is not necessary: Suppose
  162. $!A(t) \in \Gamma$. Then $\Gamma \Proves \lexists[x][!A(x)]$ by
  163. \tagrefs{prfAX/{fol:axd:qpr:prop:provability-quantifiers},prfSC/{fol:seq:qpr:prop:provability-quantifiers},prfND/{fol:ntd:qpr:prop:provability-quantifiers},prfTab/{fol:tab:qpr:prop:provability-quantifiers}}, item~(1). By
  164. \olref[ccs]{prop:ccs}\olref[ccs]{prop:ccs-prov-in},
  165. $\lexists[x][!A(x)] \in \Gamma$.}}{}
  166. \tagitem{prvAll}{%
  167. \iftag{probAll}{Exercise.}{Suppose that $!A(t) \in \Gamma$ for
  168. all closed terms~$t$. By way of contradiction, assume
  169. $\lforall[x][!A(x)] \notin \Gamma$. Since $\Gamma$ is complete,
  170. $\lnot\lforall[x][!A(x)] \in \Gamma$. By saturation,
  171. \iftag{prvEx}{$(\lexists[x][\lnot !A(x)] \lif \lnot !A(c)) \in
  172. \Gamma$}{$(\lnot\lforall[x][!A(x)] \lif \lnot !A(c)) \in
  173. \Gamma$} for some !!{constant}~$c$. By assumption, since $c$
  174. is a closed term, $!A(c) \in \Gamma$. But this would make
  175. $\Gamma$ inconsistent. (Exercise: give the !!{derivation} that shows
  176. \[
  177. \lnot \lforall[x][!A(x)],
  178. \iftag{prvEx}{\lexists[x][\lnot !A(x)] \lif \lnot
  179. !A(c)}{\lnot\lforall[x][!A(x)] \lif \lnot
  180. !A(c)}, !A(c)
  181. \]
  182. is inconsistent.)
  183. For the reverse direction, we do not need saturation: Suppose
  184. $\lforall[x][!A(x)] \in \Gamma$. Then $\Gamma \Proves !A(t)$
  185. by
  186. \tagrefs{prfAX/{fol:axd:qpr:prop:provability-quantifiers},prfSC/{fol:seq:qpr:prop:provability-quantifiers},prfND/{fol:ntd:qpr:prop:provability-quantifiers},prfTab/{fol:tab:qpr:prop:provability-quantifiers}},
  187. item~(2). We get $!A(t) \in \Gamma$ by
  188. \olref[ccs]{prop:ccs}.}}{}
  189. \end{tagenumerate}
  190. \end{proof}
  191. \end{document}

content/first-order-logic/completeness/lindenbaums-lemma.tex

99 lines; SHA-256 1ee3d9dd14df1c3368c3e7a12d68e4d6627b9e92030a00820270b75ceb4bdf78. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: lindenbaums-lemma
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{com}{lin}}
  8. {\olfileid{pl}{com}{lin}}
  9. \olsection{Lindenbaum's Lemma}
  10. \begin{explain}
  11. We now prove a lemma that shows that any consistent set of
  12. !!{sentence}s is contained in some set of sentences which is not just
  13. consistent, but also !!{complete}. The proof works by adding one
  14. !!{sentence} at a time, guaranteeing at each step that the set remains
  15. consistent. We do this so that for every $!A$, either $!A$ or $\lnot
  16. !A$ gets added at some stage. The union of all stages in that
  17. construction then contains either $!A$ or its negation~$\lnot !A$ and
  18. is thus complete. It is also consistent, since we make sure at each
  19. stage not to introduce an inconsistency.
  20. \end{explain}
  21. \begin{lem}[Lindenbaum's Lemma]
  22. \ollabel{lem:lindenbaum} Every consistent
  23. set~$\Gamma$ in a language~$\Lang{L}$ can be
  24. extended to !!a{complete} and consistent set~$\Gamma^*$.
  25. \end{lem}
  26. \begin{proof}
  27. Let $\Gamma$ be consistent. Let $!A_0$, $!A_1$,
  28. \dots{} be an enumeration of all the !!{sentence}s of~$\Lang L$.
  29. Define $\Gamma_0 = \Gamma$, and
  30. \[
  31. \Gamma_{n+1} =
  32. \begin{cases}
  33. \Gamma_n \cup \{ !A_n \} & \textrm{if $\Gamma_n \cup \{!A_n\}$ is
  34. consistent;} \\
  35. \Gamma_n \cup \{ \lnot !A_n \} & \textrm{otherwise.}
  36. \end{cases}
  37. \]
  38. Let $\Gamma^* = \bigcup_{n \geq 0} \Gamma_n$.
  39. Each $\Gamma_n$ is consistent: $\Gamma_0$ is consistent by definition.
  40. If $\Gamma_{n+1} = \Gamma_n \cup \{!A_n\}$, this is because the latter
  41. is consistent. If it isn't, $\Gamma_{n+1} = \Gamma_n \cup \{\lnot
  42. !A_n\}$. We have to verify that $\Gamma_n \cup \{\lnot !A_n\}$ is
  43. consistent. Suppose it's not. Then \emph{both} $\Gamma_n \cup
  44. \{!A_n\}$ and $\Gamma_n \cup \{\lnot !A_n\}$ are inconsistent. This
  45. means that $\Gamma_n$ would be inconsistent by
  46. \iftag{FOL}{%
  47. \tagrefs{prfAX/{fol:axd:prv:prop:provability-exhaustive},
  48. prfSC/{fol:seq:prv:prop:provability-exhaustive},
  49. prfND/{fol:ntd:prv:prop:provability-exhaustive},
  50. prfTab/{fol:tab:prv:prop:provability-exhaustive}}}{%
  51. \tagrefs{prfAX/{pl:axd:prv:prop:provability-exhaustive},
  52. prfSC/{pl:seq:prv:prop:provability-exhaustive},
  53. prfND/{pl:ntd:prv:prop:provability-exhaustive},
  54. prfTab/{pl:tab:prv:prop:provability-exhaustive}}},
  55. contrary to the induction hypothesis.
  56. For every~$n$ and every $i < n$, $\Gamma_i \subseteq \Gamma_n$. This
  57. follows by a simple induction on~$n$. For $n=0$, there are no $i < 0$,
  58. so the claim holds automatically. For the inductive step, suppose it
  59. is true for~$n$. We show that if $i < n+1$ then $\Gamma_i \subseteq
  60. \Gamma_{n+1}$. We have $\Gamma_{n+1} = \Gamma_n \cup \{!A_n\}$ or $=
  61. \Gamma_n \cup \{\lnot !A_n\}$ by construction. So $\Gamma_n \subseteq
  62. \Gamma_{n+1}$. If $i < n+1$, then $\Gamma_i \subseteq \Gamma_n$ by
  63. inductive hypothesis (if $i < n$) or the trivial fact that $\Gamma_n
  64. \subseteq \Gamma_n$ (if $i = n$). We get that $\Gamma_i \subseteq
  65. \Gamma_{n+1}$ by transitivity of~$\subseteq$.
  66. From this it follows that $\Gamma^*$ is consistent. Here's why: Let
  67. $\Gamma' \subseteq \Gamma^*$ be finite. Each $!B \in \Gamma'$ is also
  68. in~$\Gamma_i$ for some~$i$. Let $n$ be the largest of these. Since
  69. $\Gamma_i \subseteq \Gamma_n$ if $i \le n$, every $!B \in \Gamma'$ is
  70. also $\in \Gamma_n$, i.e., $\Gamma' \subseteq \Gamma_n$, and
  71. $\Gamma_n$~is consistent. So, every finite subset $\Gamma' \subseteq
  72. \Gamma^*$ is consistent. By \iftag{FOL}{%
  73. \tagrefs{prfAX/{fol:axd:ptn:prop:proves-compact},
  74. prfSC/{fol:seq:ptn:prop:proves-compact},
  75. prfND/{fol:ntd:ptn:prop:proves-compact},
  76. prfTab/{fol:tab:ptn:prop:proves-compact}}}{%
  77. \tagrefs{prfAX/{pl:axd:ptn:prop:proves-compact},
  78. prfSC/{pl:seq:ptn:prop:proves-compact},
  79. prfND/{pl:ntd:ptn:prop:proves-compact},
  80. prfTab/{pl:tab:ptn:prop:proves-compact}}}, $\Gamma^*$ is
  81. consistent.
  82. Every !!{sentence} of $\Frm[L]$ appears on the list used to
  83. define~$\Gamma^*$. If $!A_n \notin \Gamma^*$, then that is because
  84. $\Gamma_n \cup \{!A_n\}$ was inconsistent. But then $\lnot !A_n
  85. \in \Gamma^*$, so $\Gamma^*$ is !!{complete}.
  86. \end{proof}
  87. \end{document}

content/first-order-logic/completeness/construction-of-model.tex

279 lines; SHA-256 e8f3c25a2b378ac1996cc9cebb1192b2bdc2527df547e922008dad3822d29969. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: construction-of-model
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{com}{mod}}
  8. {\olfileid{pl}{com}{mod}}
  9. \olsection{Construction of a Model}
  10. \begin{explain}
  11. \iftag{FOL}{Right now we are not concerned about $\eq$, i.e., we only
  12. want to show that a consistent set~$\Gamma$ of !!{sentence}s not
  13. containing~$\eq$ is satisfiable. We first extend~$\Gamma$ to a
  14. consistent, !!{complete}, and saturated set~$\Gamma^*$. In this
  15. case, the definition of a model~$\Struct{M(\Gamma^*)}$ is simple: We
  16. take the set of closed terms of~$\Lang{L'}$ as the domain. We assign
  17. every !!{constant} to itself, and make sure that more generally, for
  18. every closed term~$t$, $\Value{t}{M(\Gamma^*)} = t$. The
  19. !!{predicate}s are assigned extensions in such a way that an atomic
  20. !!{sentence} is true in $\Struct{M(\Gamma^*)}$ iff it is
  21. in~$\Gamma^*$. This will obviously make all the atomic
  22. !!{sentence}s in~$\Gamma^*$ true in $\Struct{M(\Gamma^*)}$. The rest
  23. are true provided the $\Gamma^*$ we start with is consistent,
  24. complete, and saturated.}{We are now ready to define !!a{valuation}
  25. that makes all $!A \in \Gamma$ true. To do this, we first apply
  26. Lindenbaum's Lemma: we get a complete consistent $\Gamma^* \supseteq
  27. \Gamma$. We let the !!{propositional variable}s in~$\Gamma^*$
  28. determine~$\pAssign v(\Gamma^*)$.}
  29. \end{explain}
  30. \iftag{FOL}{%
  31. \begin{defn}[Term model]
  32. \ollabel{defn:termmodel}
  33. Let $\Gamma^*$ be !!a{complete} and consistent,
  34. saturated set of !!{sentence}s in a language~$\Lang L$. The \emph{term
  35. model}~$\Struct M(\Gamma^*)$ of $\Gamma^*$ is the !!{structure}
  36. defined as follows:
  37. \begin{enumerate}
  38. \item The !!{domain}~$\Domain{M(\Gamma^*)}$ is the set of all closed
  39. terms of~$\Lang L$.
  40. \item The interpretation of !!a{constant} $c$ is $c$ itself:
  41. $\Assign{c}{M(\Gamma^*)} = c$.
  42. \item The !!{function}~$f$ is assigned the function which, given as
  43. arguments the closed terms $t_1$, \dots, $t_n$, has as value the
  44. closed term $f(t_1, \dots, t_n)$:
  45. \[
  46. \Assign{f}{M(\Gamma^*)}(t_1, \dots, t_n) = f(t_1,\dots, t_n)
  47. \]
  48. \item If $R$ is an $n$-place !!{predicate}, then
  49. \[
  50. \tuple{t_1, \dots,
  51. t_n} \in \Assign{R}{M(\Gamma^*)} \text{ iff } \Atom{R}{t_1, \dots,
  52. t_n} \in \Gamma^*.
  53. \]
  54. \end{enumerate}
  55. \end{defn}
  56. }{%
  57. \begin{defn}
  58. \ollabel{defn:termmodel}
  59. Suppose $\Gamma^*$ is a complete consistent set of !!{formula}s. Then we let
  60. \[
  61. \pAssign v(\Gamma^*)(p) = \begin{cases}
  62. \True & \text{if $p \in \Gamma^*$}\\
  63. \False & \text{if $p \notin \Gamma^*$}
  64. \end{cases}
  65. \]
  66. \end{defn}
  67. }
  68. \iftag{FOL}{%
  69. We will now check that we indeed have $\Value{t}{M(\Gamma^*)} = t$.
  70. \begin{lem}
  71. \ollabel{lem:val-in-termmodel} Let $\Struct M(\Gamma^*)$ be the term model
  72. of \olref{defn:termmodel}, then $\Value{t}{M(\Gamma^*)} = t$.
  73. \end{lem}
  74. \begin{proof}
  75. The proof is by induction on $t$, where the base case, when $t$
  76. is !!a{constant}, follows directly from the definition of the term
  77. model. For the induction step assume $t_1, \ldots, t_n$ are closed terms
  78. such that $\Value{t_i}{M(\Gamma^*)} = t_i$ and that $f$ is an $n$-ary
  79. !!{function}. Then
  80. \begin{align*}
  81. \Value{f(t_1,\ldots,t_n)}{M(\Gamma^*)} &= \Assign{f}{M(\Gamma^*)}(\Value{t_1}
  82. {M(\Gamma^*)},
  83. \ldots, \Value{t_n}{M(\Gamma^*)}) \\
  84. &= \Assign{f}{M(\Gamma^*)}(t_1, \dots, t_n) \\
  85. &= f(t_1,\dots, t_n),
  86. \end{align*}
  87. and so by induction this holds for every closed term~$t$.
  88. \end{proof}
  89. }
  90. \iftag{FOL}{%
  91. \begin{explain}
  92. \iftag{prvEx}{!!^a{structure}~$\Struct{M}$ may make an existentially
  93. quantified !!{sentence}~$\lexists[x][!A(x)]$ true without there
  94. being an instance~$!A(t)$ that it makes true.}{}
  95. \iftag{prvAll}{!!^a{structure}~$\Struct{M}$ may make all
  96. instances~$!A(t)$ of a universally quantified
  97. !!{sentence}~$\lforall[x][!A(x)]$ true, without
  98. making~$\lforall[x][!A(x)]$ true.}{} This is because in general
  99. not every !!{element} of~$\Domain{M}$ is the value of a closed term
  100. ($\Struct{M}$ may not be covered). This is the reason the
  101. satisfaction relation is defined via variable assignments. However,
  102. for our term model~$\Struct{M(\Gamma^*)}$ this wouldn't be
  103. necessary---because it is covered. This is the content of the next
  104. result.
  105. \end{explain}
  106. \begin{prop}
  107. \ollabel{prop:quant-termmodel}
  108. Let $\Struct M(\Gamma^*)$ be the term model of \olref{defn:termmodel}.
  109. \begin{tagenumerate}{prvEx,prvAll}
  110. \tagitem{prvEx}{$\Sat{M(\Gamma^*)}{\lexists[x][!A(x)]}$ iff
  111. $\Sat{M(\Gamma^*)}{!A(t)}$ for at least one closed term~$t$.}{}
  112. \tagitem{prvAll}{$\Sat{M(\Gamma^*)}{\lforall[x][!A(x)]}$ iff
  113. $\Sat{M(\Gamma^*)}{!A(t)}$ for all closed terms~$t$.}{}
  114. \end{tagenumerate}
  115. \end{prop}
  116. \begin{proof}
  117. \begin{tagenumerate}{prvEx,prvAll}
  118. \tagitem{prvEx}{%
  119. \iftag{probEx}{Exercise.}{By \olref[syn][ass]{prop:sat-quant},
  120. $\Sat{M(\Gamma^*)}{\lexists[x][!A(x)]}$ iff for at least one
  121. variable assignment~$s$, $\Sat{M(\Gamma^*)}{!A(x)}[s]$. As
  122. $\Domain{M(\Gamma^*)}$ consists of the closed terms of~$\Lang{L}$,
  123. this is the case iff there is at least one closed term~$t$ such
  124. that $s(x) = t$ and $\Sat{M(\Gamma^*)}{!A(x)}[s]$. By
  125. \olref[fol][syn][ext]{prop:ext-formulas},
  126. $\Sat{M(\Gamma^*)}{!A(x)}[s]$ iff $\Sat{M(\Gamma^*)}{!A(t)}[s]$,
  127. where $s(x) = t$. By \olref[fol][syn][ass]{prop:sentence-sat-true},
  128. $\Sat{M(\Gamma^*)}{!A(t)}[s]$ iff $\Sat{M(\Gamma^*)}{!A(t)}$,
  129. since $!A(t)$ is a sentence.}}{}
  130. \tagitem{prvAll}{%
  131. \iftag{probAll}{Exercise.}{By \olref[syn][ass]{prop:sat-quant},
  132. $\Sat{M(\Gamma^*)}{\lforall[x][!A(x)]}$ iff for every variable
  133. assignment $s$, $\Sat{M(\Gamma^*)}{!A(x)}[s]$. Recall that
  134. $\Domain{M(\Gamma^*)}$ consists of the closed terms of~$\Lang{L}$,
  135. so for every closed term~$t$, $s(x) = t$ is such a variable
  136. assignment, and for any variable assignment, $s(x)$ is some closed
  137. term~$t$. By \olref[fol][syn][ext]{prop:ext-formulas},
  138. $\Sat{M(\Gamma^*)}{!A(x)}[s]$ iff $\Sat{M(\Gamma^*)}{!A(t)}[s]$,
  139. where $s(x) = t$. By \olref[fol][syn][ass]{prop:sentence-sat-true},
  140. $\Sat{M(\Gamma^*)}{!A(t)}[s]$ iff $\Sat{M(\Gamma^*)}{!A(t)}$,
  141. since $!A(t)$ is a sentence.}}{}
  142. \end{tagenumerate}
  143. \end{proof}
  144. }{}
  145. \tagprob[FOL]{probEx,probAll}
  146. \begin{prob}
  147. Complete the proof of \olref[fol][com][mod]{prop:quant-termmodel}.
  148. \end{prob}
  149. \tagendprob
  150. \begin{lem}[Truth Lemma]
  151. \ollabel{lem:truth} \iftag{FOL}{Suppose $!A$ does not contain~$\eq$. Then}{}
  152. $\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{!A}$ iff $!A \in \Gamma^*$.
  153. \end{lem}
  154. \begin{proof}
  155. We prove both directions simultaneously, and by induction on $!A$.
  156. \begin{enumerate}
  157. \tagitem{prvFalse}{\indcase{!A}{\lfalse}
  158. {$\iftag{FOL}{\Sat/{M(\Gamma^*)}{\lfalse}}{\pSat/{v(\Gamma^*)}{\lfalse}}$
  159. by definition of satisfaction. On the other hand, $\lfalse \notin
  160. \Gamma^*$ since $\Gamma^*$ is consistent.}}{}
  161. \tagitem{prvTrue}{\indcase{!A}{\ltrue}
  162. {$\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{\ltrue}$
  163. by definition of satisfaction. On the other hand, $\ltrue \in
  164. \Gamma^*$ since $\Gamma^*$ is consistent and !!{complete}, and
  165. $\Gamma^* \Proves \ltrue$.}}{}
  166. \tagitem{FOL}{\indcase{!A}{R(t_1, \dots, t_n)}
  167. {$\Sat{M(\Gamma^*)}{\Atom{R}{t_1, \dots, t_n}}$ iff $\tuple{t_1,
  168. \dots, t_n} \in \Assign{R}{M(\Gamma^*)}$ (by the definition of
  169. satisfaction) iff $R(t_1, \dots, t_n) \in \Gamma^*$ (by the
  170. construction of $\Struct
  171. M(\Gamma^*)$).}}{\indcase{!A}{p}{$\pSat{v(\Gamma^*)}{p}$ iff
  172. $\pAssign v(\Gamma^*)(p) = \True$ (by the definition of
  173. satisfaction) iff $p \in \Gamma^*$ (by the construction of
  174. $\pAssign v(\Gamma^*)$).}}
  175. \tagitem{prvNot}{%
  176. \indcase{!A}{\lnot !B}
  177. {$\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{\indfrm}$ iff
  178. $\iftag{FOL}{\Sat/{M(\Gamma^*)}{!B}}{\pSat/{v(\Gamma^*)}{!B}}$ (by
  179. definition of satisfaction). By induction hypothesis,
  180. $\iftag{FOL}{\Sat/{M(\Gamma^*)}{!B}}{\pSat/{v(\Gamma^*)}{!B}}$ iff
  181. $!B \notin \Gamma^*$. Since $\Gamma^*$ is consistent and
  182. !!{complete}, $!B
  183. \notin \Gamma^*$ iff $\lnot !B \in \Gamma^*$.}}{}
  184. \tagitem{prvAnd}{%
  185. \iftag{probAnd}{%
  186. \indcase!{!A}{!B \land !C}{}}{%
  187. \indcase{!A}{!B \land
  188. !C}{$\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{\indfrm}$
  189. iff we have both
  190. $\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{!B}$ and
  191. $\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{!C}$ (by
  192. definition of satisfaction) iff both $!B \in \Gamma^*$ and $!C \in
  193. \Gamma^*$ (by the induction hypothesis). By
  194. \olref[ccs]{prop:ccs}\olref[ccs]{prop:ccs-and}, this is the case
  195. iff $(!B \land !C) \in \Gamma^*$.}}}{}
  196. \tagitem{prvOr}{%
  197. \iftag{probOr}{%
  198. \indcase!{!A}{!B \lor !C}{}}{%
  199. \indcase{!A}{!B \lor !C}
  200. {$\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{\indfrm}$
  201. iff $\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{!B}$ or
  202. $\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{!C}$ (by
  203. definition of satisfaction) iff $!B \in \Gamma^*$ or $!C \in
  204. \Gamma^*$ (by induction hypothesis). This is the case iff $(!B
  205. \lor !C) \in \Gamma^*$ (by
  206. \olref[ccs]{prop:ccs}\olref[ccs]{prop:ccs-or}).}}}{}
  207. \tagitem{prvIf}{%
  208. \iftag{probIf}{%
  209. \indcase!{!A}{!B \lif !C}{}}{%
  210. \indcase{!A}{!B \lif !C}
  211. {$\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{\indfrm}$
  212. iff $\iftag{FOL}{\Sat/{M(\Gamma^*)}}{\pSat/{v(\Gamma^*)}}{!B}$ or $\iftag{FOL}{\Sat{M (\Gamma^*)}}{\pSat{v(\Gamma^*)}}{!C}$ (by
  213. definition of satisfaction) iff $!B \notin \Gamma^*$ or $!C \in
  214. \Gamma^*$ (by induction hypothesis). This is the case iff $(!B
  215. \lif !C) \in \Gamma^*$ (by
  216. \olref[ccs]{prop:ccs}\olref[ccs]{prop:ccs-if}).}}}{}
  217. \iftag{FOL}{%
  218. \tagitem{prvAll}{%
  219. \iftag{probAll}{%
  220. \indcase!{!A}{\lforall[x][!B(x)]}{}}{%
  221. \indcase{!A}{\lforall[x][!B(x)]}{$\Sat{M(\Gamma^*)}{\indfrm}$ iff
  222. $\Sat{M(\Gamma^*)}{!B(t)}$ for all terms~$t$
  223. (\olref{prop:quant-termmodel}). By induction hypothesis, this
  224. is the case iff $!B(t) \in \Gamma^*$ for all terms~$t$, by
  225. \olref[hen]{prop:saturated-instances}, this in turn is the case
  226. iff $\lforall[x][!A(x)] \in \Gamma^*$.}}}{}
  227. \tagitem{prvEx}{%
  228. \iftag{probEx}{%
  229. \indcase!{!A}{\lexists[x][!B(x)]}{}}{%
  230. \indcase{!A}{\lexists[x][!B(x)]}{$\Sat{M(\Gamma^*)}{\indfrm}$ iff
  231. $\Sat{M(\Gamma^*)}{!B(t)}$ for at least one term~$t$
  232. (\olref{prop:quant-termmodel}). By induction hypothesis, this
  233. is the case iff $!B(t) \in \Gamma^*$ for at least one term~$t$.
  234. By \olref[hen]{prop:saturated-instances}, this in turn is the
  235. case iff $\lexists[x][!B(x)] \in \Gamma^*$.}}}{}
  236. }{}
  237. \end{enumerate}
  238. \end{proof}
  239. \tagprob[FOL]{probOr,probAnd,probIf,probEx,probAll}
  240. \begin{prob}
  241. Complete the proof of \olref[fol][com][mod]{lem:truth}.
  242. \end{prob}
  243. \tagendprob
  244. \tagprob[notFOL]{probOr,probAnd,probIf}
  245. \begin{prob}
  246. Complete the proof of \olref[pl][com][mod]{lem:truth}.
  247. \end{prob}
  248. \tagendprob
  249. \end{document}

content/first-order-logic/completeness/identity.tex

205 lines; SHA-256 2b497ead07aad76f2db101bd56768abd9bc71df7c819164edf0183656d148e7d. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: identity
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{com}{ide}
  7. \olsection{Identity}
  8. \begin{explain}
  9. The construction of the term model given in the preceding section is
  10. enough to establish completeness for first-order logic for
  11. sets~$\Gamma$ that do not contain~$\eq$. The term model satisfies
  12. every $!A \in \Gamma^*$ which does not contain~$\eq$ (and hence all
  13. $!A \in \Gamma$). It does not work, however, if $\eq$ is present.
  14. The reason is that $\Gamma^*$ then may contain
  15. !!a{sentence}~$\eq[t][t']$, but in the term model the value of any
  16. term is that term itself. Hence, if $t$ and $t'$ are different terms,
  17. their values in the term model---i.e., $t$ and $t'$,
  18. respectively---are different, and so $\eq[t][t']$ is false. We can
  19. fix this, however, using a construction known as ``factoring.''
  20. \end{explain}
  21. \begin{defn}
  22. Let $\Gamma^*$ be a consistent and !!{complete} set of sentences
  23. in~$\Lang L$. We define the relation $\approx$ on the set of closed
  24. terms of~$\Lang L$ by
  25. \[
  26. t \approx t' \text{\quad iff \quad} \eq[t][t'] \in \Gamma^*
  27. \]
  28. \end{defn}
  29. \begin{prop}
  30. \ollabel{prop:approx-equiv}
  31. The relation $\approx$ has the following properties:
  32. \begin{enumerate}
  33. \item $\approx$ is reflexive.
  34. \item $\approx$ is symmetric.
  35. \item $\approx$ is transitive.
  36. \item If $t \approx t'$, $f$ is !!a{function}, and $t_1$, \dots,
  37. $t_{i-1}$, $t_{i+1}$, \dots, $t_n$ are closed terms, then
  38. \[
  39. \Atom{f}{t_1,\dots, t_{i-1}, t, t_{i+1}, \dots, t_n} \approx
  40. \Atom{f}{t_1,\dots, t_{i-1}, t', t_{i+1}, \dots, t_n}.
  41. \]
  42. \item If $t \approx t'$, $R$ is !!a{predicate}, and $t_1$, \dots,
  43. $t_{i-1}$, $t_{i+1}$, \dots, $t_n$ are closed terms, then
  44. \begin{multline*}
  45. \Atom{R}{t_1,\dots, t_{i-1}, t, t_{i+1}, \dots, t_n} \in \Gamma^* \text{ iff } \\
  46. \Atom{R}{t_1,\dots, t_{i-1}, t', t_{i+1}, \dots, t_n} \in \Gamma^*.
  47. \end{multline*}
  48. \end{enumerate}
  49. \end{prop}
  50. \begin{proof}
  51. Since $\Gamma^*$ is consistent and !!{complete}, $\eq[t][t'] \in
  52. \Gamma^*$ iff $\Gamma^* \Proves \eq[t][t']$. Thus it is enough to
  53. show the following:
  54. \begin{enumerate}
  55. \item $\Gamma^* \Proves \eq[t][t]$ for all closed terms~$t$.
  56. \item If $\Gamma^* \Proves \eq[t][t']$ then $\Gamma^* \Proves \eq[t'][t]$.
  57. \item If $\Gamma^* \Proves \eq[t][t']$ and $\Gamma^* \Proves
  58. \eq[t'][t'']$, then $\Gamma^* \Proves \eq[t][t'']$.
  59. \item If $\Gamma^* \Proves \eq[t][t']$, then
  60. \[
  61. \Gamma^* \Proves
  62. \eq[\Atom{f}{t_1,\dots,t_{i-1},t,t_{i+1},,\dots,t_n}][\Atom{f}{t_1,\dots,t_{i-1},t',t_{i+1},\dots,t_n}]
  63. \]
  64. for every $n$-place !!{function}~$f$ and closed terms $t_1$, \dots,
  65. $t_{i-1}$, $t_{i+1}$, \dots,~$t_n$.
  66. \item If $\Gamma^* \Proves \eq[t][t']$ and
  67. $\Gamma^* \Proves
  68. \Atom{R}{t_1,\dots,t_{i-1},t,t_{i+1},\dots,t_n}$, then
  69. $\Gamma^* \Proves \Atom{R}{t_1,\dots,t_{i-1},t',t_{i+1},\dots,t_n}$
  70. for every $n$-place !!{predicate}~$R$ and closed terms $t_1$, \dots,
  71. $t_{i-1}$, $t_{i+1}$, \dots,~$t_n$.
  72. \end{enumerate}
  73. \end{proof}
  74. \begin{prob}
  75. Complete the proof of~\olref[fol][com][ide]{prop:approx-equiv}.
  76. \end{prob}
  77. \begin{defn}
  78. Suppose $\Gamma^*$ is a consistent and !!{complete} set in a
  79. language~$\Lang L$, $t$ is a closed term, and $\approx$ as in the
  80. previous definition. Then:
  81. \[
  82. \equivrep{t}{\approx} = \Setabs{t'}{t'\in \Trm[L], t \approx t'}
  83. \]
  84. and $\equivclass{\Trm[L]}{\approx} = \Setabs{\equivrep{t}{\approx}}{t \in \Trm[L]}$.
  85. \end{defn}
  86. \begin{defn}
  87. \ollabel{defn:term-model-factor}
  88. Let $\Struct M = \Struct M(\Gamma^*)$ be the term model
  89. for~$\Gamma^*$ from \olref[mod]{defn:termmodel}. Then $\Struct{\equivclass{M}{\approx}}$ is the following
  90. !!{structure}:
  91. \begin{enumerate}
  92. \item $\Domain{\equivclass{M}{\approx}} = \equivclass{\Trm[L]}{\approx}$.
  93. \item $\Assign{c}{\equivclass{M}{\approx}} = \equivrep{c}{\approx}$
  94. \item $\Assign{f}{\equivclass{M}{\approx}}(\equivrep{t_1}{\approx}, \dots,
  95. \equivrep{t_n}{\approx}) = \equivrep{\Atom{f}{t_1,\dots, t_n}}{\approx}$
  96. \item $\tuple{\equivrep{t_1}{\approx}, \dots, \equivrep{t_n}{\approx}} \in
  97. \Assign{R}{\equivclass{M}{\approx}}$ iff
  98. $\Sat{M}{\Atom{R}{t_1,\dots, t_n}}$, i.e., iff $\Atom{R}{t_1,\dots,
  99. t_n} \in \Gamma^*$.
  100. \end{enumerate}
  101. \end{defn}
  102. \begin{explain}
  103. Note that we have defined $\Assign{f}{\equivclass{M}{\approx}}$ and
  104. $\Assign{R}{\equivclass{M}{\approx}}$ for elements of
  105. $\equivclass{\Trm[L]}{\approx}$ by referring to them as
  106. $\equivrep{t}{\approx}$, i.e., via \emph{representatives}~$t \in
  107. \equivrep{t}{\approx}$. We have to make sure that these definitions
  108. do not depend on the choice of these representatives, i.e., that for
  109. some other choices~$t'$ which determine the same equivalence classes
  110. ($\equivrep{t}{\approx} = \equivrep{t'}{\approx}$), the definitions
  111. yield the same result. For instance, if $R$ is a one-place
  112. !!{predicate}, the last clause of the definition says that
  113. $\equivrep{t}{\approx} \in \Assign{R}{\equivclass{M}{\approx}}$ iff
  114. $\Sat{M}{\Atom{R}{t}}$. If for some other term~$t'$ with $t \approx
  115. t'$, $\Sat/{M}{\Atom{R}{t}}$, then the definition would require
  116. $\equivrep{t'}{\approx} \notin \Assign{R}{\equivclass{M}{\approx}}$.
  117. If $t \approx t'$, then $\equivrep{t}{\approx} =
  118. \equivrep{t'}{\approx}$, but we can't have both $\equivrep{t}{\approx}
  119. \in \Assign{R}{\equivclass{M}{\approx}}$ and $\equivrep{t}{\approx}
  120. \notin \Assign{R}{\equivclass{M}{\approx}}$. However,
  121. \olref{prop:approx-equiv} guarantees that this cannot happen.
  122. \end{explain}
  123. \begin{prop}
  124. $\Struct{\equivclass{M}{\approx}}$ is well defined, i.e., if $t_1$,
  125. \dots, $t_n$, $t_1'$, \dots, $t_n'$ are closed terms,
  126. and $t_i \approx t_i'$ then
  127. \begin{enumerate}
  128. \item $\equivrep{\Atom{f}{t_1,\dots, t_n}}{\approx} =
  129. \equivrep{\Atom{f}{t_1',\dots, t_n'}}{\approx}$, i.e.,
  130. \[
  131. \Atom{f}{t_1,\dots, t_n} \approx \Atom{f}{t_1',\dots, t_n'}
  132. \]
  133. and
  134. \item $\Sat{M}{\Atom{R}{t_1,\dots, t_n}}$ iff
  135. $\Sat{M}{\Atom{R}{t_1',\dots, t_n'}}$, i.e.,
  136. \[
  137. \Atom{R}{t_1,\dots, t_n} \in \Gamma^* \text{ iff }
  138. \Atom{R}{t_1',\dots, t_n'} \in \Gamma^*.
  139. \]
  140. \end{enumerate}
  141. \end{prop}
  142. \begin{proof}
  143. Follows from \olref{prop:approx-equiv} by induction on~$n$.
  144. \end{proof}
  145. As in the case of the term model, before proving the truth lemma we need the
  146. following lemma.
  147. \begin{lem}
  148. \ollabel{lem:val-in-termmodel-factored} Let $\Struct M = \Struct M
  149. (\Gamma^*)$, then $\Value{t}{\equivclass{M}{\approx}} = \equivrep{t}
  150. {\approx}$.
  151. \end{lem}
  152. \begin{proof}
  153. The proof is similar to that of \olref[mod]{lem:val-in-termmodel}.
  154. \end{proof}
  155. \begin{prob}
  156. Complete the proof of~\olref[fol][com][ide]{lem:val-in-termmodel-factored}.
  157. \end{prob}
  158. \begin{lem}
  159. \ollabel{lem:truth}
  160. $\Sat{\equivclass{M}{\approx}}{!A}$ iff $!A \in \Gamma^*$ for all
  161. sentences~$!A$.
  162. \end{lem}
  163. \begin{proof}
  164. By induction on~$!A$, just as in the proof of \olref[mod]{lem:truth}.
  165. The only case that needs additional attention is when $!A \ident
  166. \eq[t][t']$.
  167. \begin{align*}
  168. \Sat{\equivclass{M}{\approx}}{\eq[t][t']} & \text{ iff } \equivrep{t}{\approx} = \equivrep{t'}{\approx}
  169. \text{ (by definition of $\Struct{\equivclass{M}{\approx}}$)}\\
  170. & \text{ iff } t \approx t' \text{ (by definition of $\equivrep{t}{\approx}$)}\\
  171. & \text{ iff } \eq[t][t'] \in \Gamma^* \text{ (by definition of $\approx$).}
  172. \end{align*}
  173. \end{proof}
  174. \begin{digress}
  175. Note that while $\Struct{M(\Gamma^*)}$ is always !!{enumerable} and
  176. infinite, $\Struct{\equivclass{M}{\approx}}$ may be finite, since it
  177. may turn out that there are only finitely many classes
  178. $\equivrep{t}{\approx}$. This is to be expected, since $\Gamma$ may
  179. contain !!{sentence}s which require any !!{structure} in which they
  180. are true to be finite. For instance, $\lforall[x][\lforall[y][x =
  181. y]]$ is a consistent !!{sentence}, but is satisfied only in
  182. !!{structure}s with !!a{domain} that contains exactly one
  183. !!{element}.
  184. \end{digress}
  185. \end{document}

content/first-order-logic/completeness/completeness-thm.tex

125 lines; SHA-256 5510644c6a3ff18e97d5e97a928d00cb0b091506e8c10bafa504c1b2c38b242b. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: completeness-theorem
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{com}{cth}}
  8. {\olfileid{pl}{com}{cth}}
  9. \olsection{The Completeness Theorem}
  10. \begin{explain}
  11. Let's combine our results: we arrive at the completeness theorem.
  12. \end{explain}
  13. \begin{thm}[Completeness Theorem]
  14. \ollabel{thm:completeness}
  15. Let $\Gamma$ be a set of !!{sentence}s. If $\Gamma$ is consistent, it
  16. is satisfiable.
  17. \end{thm}
  18. \begin{proof}
  19. Suppose $\Gamma$ is consistent.\iftag{FOL}{ By
  20. \olref[hen]{lem:henkin}, there is a saturated consistent set
  21. $\Gamma' \supseteq \Gamma$.}{} By \olref[lin]{lem:lindenbaum}, there
  22. is a $\Gamma^* \supseteq \iftag{FOL}{\Gamma'}{\Gamma}$ which is
  23. consistent and !!{complete}.
  24. \iftag{FOL}{
  25. Since $\Gamma' \subseteq \Gamma^*$, for each
  26. !!{formula}~$!A(x)$, $\Gamma^*$ contains !!a{sentence} of the form
  27. \iftag{prvEx}
  28. {$\lexists[x][!A(x)] \lif !A(c)$}
  29. {$\lnot\lforall[x][!A(x)] \lif \lnot !A(c)$}
  30. and so $\Gamma^*$ is saturated. If $\Gamma$
  31. does not contain~$\eq$, then by}{By}
  32. \olref[mod]{lem:truth},
  33. $\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{!A}$ iff $!A \in
  34. \Gamma^*$. From this it follows in particular that for all $!A \in
  35. \Gamma$, $\iftag{FOL}{\Sat{M(\Gamma^*)}}{\pSat{v(\Gamma^*)}}{!A}$, so
  36. $\Gamma$ is satisfiable.\iftag{FOL}{
  37. If $\Gamma$ does contain~$\eq$,
  38. then by \olref[ide]{lem:truth}, for all !!{sentence}s~$!A$,
  39. $\Sat{\equivclass{M}{\approx}}{!A}$ iff $!A \in \Gamma^*$. In
  40. particular, $\Sat{\equivclass{M}{\approx}}{!A}$ for all $!A \in
  41. \Gamma$, so $\Gamma$ is satisfiable.}{}
  42. \end{proof}
  43. \begin{cor}[Completeness Theorem, Second Version]
  44. \ollabel{cor:completeness}
  45. For all $\Gamma$ and !!{sentence}s~$!A$: if $\Gamma \Entails !A$ then
  46. $\Gamma \Proves !A$.
  47. \end{cor}
  48. \begin{proof}
  49. Note that the $\Gamma$'s in \olref{cor:completeness} and
  50. \olref{thm:completeness} are universally quantified. To make sure we
  51. do not confuse ourselves, let us restate \olref{thm:completeness}
  52. using a different variable: for any set of !!{sentence}s~$\Delta$, if
  53. $\Delta$ is consistent, it is satisfiable. By contraposition, if
  54. $\Delta$ is not satisfiable, then $\Delta$ is inconsistent. We will
  55. use this to prove the corollary.
  56. Suppose that $\Gamma \Entails !A$. Then $\Gamma \cup \{\lnot !A\}$ is
  57. unsatisfiable by \olref[syn][sem]{prop:entails-unsat}. Taking $\Gamma
  58. \cup \{\lnot !A\}$ as our $\Delta$, the previous version of
  59. \olref{thm:completeness} gives us that $\Gamma \cup \{\lnot !A\}$ is
  60. inconsistent. By
  61. \iftag{FOL}{%
  62. \tagrefs{prfAX/{fol:axd:prv:prop:prov-incons},
  63. prfSC/{fol:seq:prv:prop:prov-incons},
  64. prfND/{fol:ntd:prv:prop:prov-incons},
  65. prfTab/{fol:tab:prv:prop:prov-incons}}}{%
  66. \tagrefs{prfAX/{pl:axd:prv:prop:prov-incons},
  67. prfSC/{pl:seq:prv:prop:prov-incons},
  68. prfND/{pl:ntd:prv:prop:prov-incons},
  69. prfTab/{pl:tab:prv:prop:prov-incons}}},
  70. $\Gamma \Proves !A$.
  71. \end{proof}
  72. \tagprob{FOL}
  73. \begin{prob}
  74. Use \olref[fol][com][cth]{cor:completeness} to prove
  75. \olref[fol][com][cth]{thm:completeness}, thus showing that the two
  76. formulations of the completeness theorem are equivalent.
  77. \end{prob}
  78. \tagendprob
  79. \tagprob{notFOL}
  80. \begin{prob}
  81. Use \olref[pl][com][cth]{cor:completeness} to prove
  82. \olref[pl][com][cth]{thm:completeness}, thus showing that the two
  83. formulations of the completeness theorem are equivalent.
  84. \end{prob}
  85. \tagendprob
  86. \tagprob{FOL}
  87. \begin{prob}
  88. In order for !!a{derivation} system to be complete, its rules must be
  89. strong enough to prove every unsatisfiable set inconsistent. Which of
  90. the rules of !!{derivation} were necessary to prove completeness? Are any
  91. of these rules not used anywhere in the proof? In order to answer
  92. these questions, make a list or diagram that shows which of the rules
  93. of !!{derivation} were used in which results that lead up to the proof of
  94. \olref[fol][com][cth]{thm:completeness}. Be sure to note any tacit
  95. uses of rules in these proofs.
  96. \end{prob}
  97. \tagendprob
  98. \tagprob{notFOL}
  99. \begin{prob}
  100. In order for !!a{derivation} system to be complete, its rules must be
  101. strong enough to prove every unsatisfiable set inconsistent. Which of
  102. the rules of !!{derivation} were necessary to prove completeness? Are any
  103. of these rules not used anywhere in the proof? In order to answer
  104. these questions, make a list or diagram that shows which of the rules
  105. of !!{derivation} were used in which results that lead up to the proof of
  106. \olref[pl][com][cth]{thm:completeness}. Be sure to note any tacit
  107. uses of rules in these proofs.
  108. \end{prob}
  109. \tagendprob
  110. \end{document}

content/first-order-logic/completeness/compactness.tex

199 lines; SHA-256 a872b7018576b26eb53179792e27b5b0af3338b5220712086e1be7d928b3d65c. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: compactness
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{com}{com}}
  8. {\olfileid{pl}{com}{com}}
  9. \olsection{The Compactness Theorem}
  10. One important consequence of the completeness theorem is the
  11. compactness theorem. The compactness theorem states that if each
  12. \emph{finite} subset of a set of !!{sentence}s is satisfiable, the
  13. entire set is satisfiable---even if the set itself is infinite. This
  14. is far from obvious. There is nothing that seems to rule out, at first
  15. glance at least, the possibility of there being infinite sets of
  16. !!{sentence}s which are contradictory, but the contradiction only
  17. arises, so to speak, from the infinite number. The compactness
  18. theorem says that such a scenario can be ruled out: there are no
  19. unsatisfiable infinite sets of !!{sentence}s each finite subset of
  20. which is satisfiable. Like the completeness theorem, it has a version
  21. related to entailment: if an infinite set of !!{sentence}s entails
  22. something, already a finite subset does.
  23. \begin{defn}
  24. A set $\Gamma$ of !!{formula}s is \emph{finitely satisfiable} iff every finite $\Gamma_0 \subseteq \Gamma$ is satisfiable.
  25. \end{defn}
  26. \begin{thm}[Compactness Theorem]
  27. \ollabel{thm:compactness}
  28. The following hold for any sentences $\Gamma$ and $!A$:
  29. \begin{enumerate}
  30. \item $\Gamma \Entails !A$ iff there is a finite $\Gamma_0
  31. \subseteq \Gamma$ such that $\Gamma_0 \Entails !A$.
  32. \item $\Gamma$ is satisfiable iff it is finitely
  33. satisfiable.
  34. \end{enumerate}
  35. \end{thm}
  36. \begin{proof}
  37. We prove (2). If $\Gamma$ is satisfiable, then there is
  38. \iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}
  39. such that $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$ for all $!A \in
  40. \Gamma$. Of course, this $\iftag{FOL}{\Struct{M}}{\pAssign{v}}$ also
  41. satisfies every finite subset of~$\Gamma$, so $\Gamma$ is finitely
  42. satisfiable.
  43. Now suppose that $\Gamma$ is finitely satisfiable. Then every finite
  44. subset~$\Gamma_0 \subseteq \Gamma$ is satisfiable. By soundness
  45. (\iftag{FOL}{%
  46. \tagrefs{prfAX/{fol:axd:sou:cor:consistency-soundness},
  47. prfSC/{fol:seq:sou:cor:consistency-soundness},
  48. prfND/{fol:ntd:sou:cor:consistency-soundness},
  49. prfTab/{fol:tab:sou:cor:consistency-soundness}}}{%
  50. \tagrefs{prfAX/{pl:axd:sou:cor:consistency-soundness},
  51. prfSC/{pl:seq:sou:cor:consistency-soundness},
  52. prfND/{pl:ntd:sou:cor:consistency-soundness},
  53. prfTab/{pl:tab:sou:cor:consistency-soundness}}}),
  54. every finite subset is consistent. Then $\Gamma$ itself must be
  55. consistent by
  56. \iftag{FOL}{%
  57. \tagrefs{prfAX/{fol:axd:ptn:prop:proves-compact},
  58. prfSC/{fol:seq:ptn:prop:proves-compact},
  59. prfND/{fol:ntd:ptn:prop:proves-compact},
  60. prfTab/{fol:tab:ptn:prop:proves-compact}}}{%
  61. \tagrefs{prfAX/{pl:axd:ptn:prop:proves-compact},
  62. prfSC/{pl:seq:ptn:prop:proves-compact},
  63. prfND/{pl:ntd:ptn:prop:proves-compact},
  64. prfTab/{pl:tab:ptn:prop:proves-compact}}}.
  65. By completeness (\olref[cth]{thm:completeness}), since $\Gamma$~is
  66. consistent, it is satisfiable.
  67. \end{proof}
  68. \tagprob{FOL}
  69. \begin{prob}
  70. Prove (1) of \olref[fol][com][com]{thm:compactness}.
  71. \end{prob}
  72. \tagendprob
  73. \tagprob{notFOL}
  74. \begin{prob}
  75. Prove (1) of \olref[pl][com][com]{thm:compactness}.
  76. \end{prob}
  77. \tagendprob
  78. \iftag{FOL}{%
  79. \begin{ex}
  80. In every model~$\Struct{M}$ of a theory~$\Gamma$, each term~$t$ of
  81. course picks out !!a{element} of~$\Domain{M}$. Can we guarantee that
  82. it is also true that every !!{element} of~$\Domain{M}$ is picked out
  83. by some term or other? In other words, are there theories~$\Gamma$ all
  84. models of which are covered? The compactness theorem shows that this
  85. is not the case if $\Gamma$ has infinite models. Here's how to see
  86. this: Let $\Struct{M}$ be an infinite model of~$\Gamma$, and let $c$
  87. be !!a{constant} not in the language of~$\Gamma$. Let $\Delta$ be the
  88. set of all sentences $\eq/[c][t]$ for $t$ a term in the
  89. language~$\Lang{L}$ of~$\Gamma$, i.e.,
  90. \[
  91. \Delta = \Setabs{\eq/[c][t]}{t \in \Trm[L]}.
  92. \]
  93. A finite subset of $\Gamma \cup \Delta$ can be written as $\Gamma'
  94. \cup \Delta'$, with $\Gamma' \subseteq \Gamma$ and $\Delta' \subseteq
  95. \Delta$. Since $\Delta'$ is finite, it can contain only finitely many
  96. terms. Let $a \in \Domain{M}$ be !!a{element} of $\Domain{M}$ not
  97. picked out by any of them, and let $\Struct{M'}$ be the !!{structure}
  98. that is just like $\Struct{M}$, but also $\Assign{c}{M'} = a$. Since
  99. $a \neq \Value{t}{M}$ for all~$t$ occurring in~$\Delta'$,
  100. $\Sat{M'}{\Delta'}$. Since $\Sat{M}{\Gamma}$, $\Gamma' \subseteq
  101. \Gamma$, and $c$ does not occur in~$\Gamma$, also
  102. $\Sat{M'}{\Gamma'}$. Together, $\Sat{M'}{\Gamma' \cup \Delta'}$ for
  103. every finite subset $\Gamma' \cup \Delta'$ of $\Gamma \cup \Delta$. So
  104. every finite subset of $\Gamma \cup \Delta$ is satisfiable. By
  105. compactness, $\Gamma \cup \Delta$ itself is satisfiable. So there are
  106. models~$\Sat{M}{\Gamma \cup \Delta}$. Every such $\Struct{M}$ is a
  107. model of~$\Gamma$, but is not covered, since $\Value{c}{M} \neq
  108. \Value{t}{M}$ for all terms~$t$ of~$\Lang{L}$.
  109. \end{ex}
  110. \begin{ex}
  111. Consider !!a{language} $\Lang{L}$ containing the !!{predicate}~$<$,
  112. !!{constant}s $\Obj{0}$, $\Obj{1}$, and !!{function}s $+$, $\times$, and
  113. $-$. Let $\Gamma$ be the set of all !!{sentence}s in this
  114. !!{language} true in the !!{structure}~$\Struct{Q}$ with domain~$\Rat$ and the obvious
  115. interpretations. $\Gamma$~is the set of all !!{sentence}s
  116. of~$\Lang{L}$ true about the rational numbers. Of course, in~$\Rat$
  117. (and even in~$\Real$), there are no numbers~$r$ which are greater than~$0$
  118. but less than $1/k$ for all $k \in \PosInt$. Such a number, if it
  119. existed, would be an \emph{infinitesimal:} non-zero, but infinitely
  120. small. The compactness theorem can be used to show that there are
  121. models of~$\Gamma$ in which infinitesimals exist. We do not have
  122. !!a{function} for division in our language (division by zero is
  123. undefined, and !!{function}s have to be interpreted by total functions).
  124. However, we can still express that $r < 1/k$, since this is the case iff
  125. $r \cdot k < 1$. Now let $c$ be a new !!{constant} and let $\Delta$ be
  126. \[
  127. \{\Obj{0} < c\}
  128. \cup \Setabs{ c \times \num k < \Obj{1} }{k \in \PosInt}
  129. \]
  130. (where $\num{k} = (\Obj{1} + (\Obj{1} + \dots + (\Obj{1} +
  131. \Obj{1})\dots))$ with $k$~$\Obj{1}$'s). For any finite
  132. subset~$\Delta_0$ of~$\Delta$ there is a~$K$ such that for all the
  133. !!{sentence}s $c \times \num{k} < \Obj{1}$ in~$\Delta_0$ have $k < K$.
  134. If we expand $\Struct{Q}$ to~$\Struct{Q'}$ with $\Assign{c}{Q'} = 1/K$
  135. we have that $\Sat{Q'}{\Gamma_0 \cup \Delta_0}$ for any finite
  136. $\Gamma_0 \subseteq \Gamma$, and so $\Gamma \cup \Delta$ is finitely
  137. satisfiable (Exercise: prove this in detail). By compactness, $\Gamma
  138. \cup \Delta$ is satisfiable. Any model~$\Struct{S}$ of $\Gamma \cup
  139. \Delta$ contains an infinitesimal, namely~$\Assign{c}{S}$.
  140. \end{ex}
  141. }{}
  142. \tagprob{FOL}
  143. \begin{prob}
  144. In the standard model of arithmetic~$\Struct{N}$, there is no
  145. !!{element}~$k \in \Domain{N}$ which satisfies every formula~$\num{n}
  146. < x$ (where $\num{n}$ is $\Obj{0}^{\prime\dots\prime}$ with $n$
  147. $\prime$'s). Use the compactness theorem to show that the set of
  148. !!{sentence}s in the language of arithmetic which are true in the standard
  149. model of arithmetic $\Struct{N}$ are also true in
  150. !!a{structure}~$\Struct{N'}$ that contains !!a{element} which
  151. \emph{does} satisfy every formula $\num{n} < x$.
  152. \end{prob}
  153. \tagendprob
  154. \iftag{FOL}{
  155. \begin{ex}
  156. We know that first-order logic with !!{identity} can express that the
  157. size of the !!{domain} must have some minimal size: The
  158. sentence~$!A_{\ge n}$ (which says ``there are at least $n$ distinct
  159. objects'') is true only in structures where $\Domain{M}$ has at
  160. least~$n$ objects. So if we take
  161. \[
  162. \Delta = \Setabs{!A_{\ge n}}{n \ge 1}
  163. \]
  164. then any model of $\Delta$ must be infinite. Thus, we can guarantee
  165. that a theory only has infinite models by adding~$\Delta$ to it: the
  166. models of $\Gamma \cup \Delta$ are all and only the infinite models
  167. of~$\Gamma$.
  168. So first-order logic can express infinitude. The compactness theorem
  169. shows that it cannot express finitude, however. For suppose some set
  170. of sentences $\Lambda$ were satisfied in all and only finite
  171. !!{structure}s. Then $\Delta \cup \Lambda$ is finitely
  172. satisfiable. Why? Suppose $\Delta' \cup \Lambda' \subseteq \Delta \cup
  173. \Lambda$ is finite with $\Delta' \subseteq \Delta$ and $\Lambda'
  174. \subseteq \Lambda$. Let $n$ be the largest number such that $!A_{\ge n}
  175. \in \Delta'$. $\Lambda$, being satisfied in all finite structures, has
  176. a model~$\Struct{M}$ with finitely many but $\ge n$ !!{element}s. But
  177. then $\Sat{M}{\Delta' \cup \Lambda'}$. By compactness, $\Delta \cup
  178. \Lambda$ has an infinite model, contradicting the assumption that
  179. $\Lambda$ is satisfied only in finite !!{structure}s.
  180. \end{ex}
  181. }{}
  182. \end{document}

content/first-order-logic/completeness/compactness-direct.tex

161 lines; SHA-256 e6398fcc96ac7a2e787c5128d1b2dbf8f515dbd0e780004831abcfd0c3f327d8. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: compactness-direct
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{com}{cpd}}
  8. {\olfileid{pl}{com}{cpd}}
  9. \olsection{A Direct Proof of the Compactness Theorem}
  10. We can prove the Compactness Theorem directly, without appealing to
  11. the Completeness Theorem, using the same ideas as in the proof of the
  12. completeness theorem. In the proof of the Completeness Theorem we
  13. started with a consistent set~$\Gamma$ of !!{sentence}s, expanded it
  14. to a consistent\iftag{FOL}{, saturated,}{} and !!{complete}
  15. set~$\Gamma^*$ of !!{sentence}s, and then showed that in the
  16. \iftag{FOL}{term
  17. model~$\Struct{M(\Gamma^*)}$}{!!{valuation}~$\pAssign{v(\Gamma^*)}$}
  18. constructed from $\Gamma^*$, all !!{sentence}s of~$\Gamma$ are true,
  19. so $\Gamma$ is satisfiable.
  20. We can use the same method to show that a finitely satisfiable set of
  21. sentences is satisfiable. We just have to prove the corresponding
  22. versions of the results leading to the truth lemma where we replace
  23. ``consistent'' with ``finitely satisfiable.''
  24. \begin{prop}
  25. \ollabel{prop:fsat-ccs}
  26. Suppose $\Gamma$ is !!{complete} and finitely satisfiable. Then:
  27. \begin{enumerate}
  28. \tagitem{prvAnd}{$(!A \land !B) \in \Gamma$
  29. iff both $!A \in \Gamma$ and $!B \in \Gamma$.}{}
  30. \tagitem{prvOr}{$(!A \lor !B) \in \Gamma$ iff
  31. either $!A \in \Gamma$ or $!B \in \Gamma$.}{}
  32. \tagitem{prvIf}{$(!A \lif !B) \in \Gamma$ iff
  33. either $!A \notin \Gamma$ or $!B \in \Gamma$.}{}
  34. \end{enumerate}
  35. \end{prop}
  36. \tagprob{FOL}
  37. \begin{prob}
  38. Prove \olref[fol][com][cpd]{prop:fsat-ccs}. Avoid the use of $\Proves$.
  39. \end{prob}
  40. \tagendprob
  41. \tagprob{notFOL}
  42. \begin{prob}
  43. Prove \olref[pl][com][cpd]{prop:fsat-ccs}. Avoid the use of $\Proves$.
  44. \end{prob}
  45. \tagendprob
  46. \iftag{FOL}{%
  47. \begin{lem}
  48. \ollabel{lem:fsat-henkin} Every finitely satisfiable set~$\Gamma$ can
  49. be extended to a saturated finitely satisfiable set~$\Gamma'$.
  50. \end{lem}
  51. }{}
  52. \tagprob{FOL}
  53. \begin{prob}
  54. Prove \olref[fol][com][cpd]{lem:fsat-henkin}. (Hint: The crucial step
  55. is to show that if $\Gamma_n$ is finitely satisfiable, so is $\Gamma_n
  56. \cup \{!D_n\}$, without any appeal to !!{derivation}s or consistency.)
  57. \end{prob}
  58. \tagendprob
  59. \iftag{FOL}{
  60. \begin{prop}\ollabel{prop:fsat-instances}
  61. Suppose $\Gamma$ is complete, finitely satisfiable, and saturated.
  62. \begin{tagenumerate}{prvEx,prvAll}
  63. \tagitem{prvEx}{$\lexists[x][!A(x)] \in \Gamma$ iff $!A(t) \in \Gamma$
  64. for at least one closed term~$t$.}{}
  65. \tagitem{prvAll}{$\lforall[x][!A(x)] \in \Gamma$ iff $!A(t) \in \Gamma$
  66. for all closed terms~$t$.}{}
  67. \end{tagenumerate}
  68. \end{prop}
  69. }{}
  70. \tagprob{FOL}
  71. \begin{prob}
  72. Prove \olref[fol][com][cpd]{prop:fsat-instances}.
  73. \end{prob}
  74. \tagendprob
  75. \begin{lem}
  76. \ollabel{lem:fsat-lindenbaum} Every finitely satisfiable set~$\Gamma$
  77. can be extended to !!a{complete} and finitely satisfiable
  78. set~$\Gamma^*$.
  79. \end{lem}
  80. \tagprob{FOL}
  81. \begin{prob}
  82. Prove \olref[fol][com][cpd]{lem:fsat-lindenbaum}. (Hint: the crucial
  83. step is to show that if $\Gamma_n$ is finitely satisfiable, then
  84. either $\Gamma_n \cup \{!A_n\}$ or $\Gamma_n \cup \{\lnot !A_n\}$ is
  85. finitely satisfiable.)
  86. \end{prob}
  87. \tagendprob
  88. \tagprob{notFOL}
  89. \begin{prob}
  90. Prove \olref[pl][com][cpd]{lem:fsat-lindenbaum}. (Hint: the crucial
  91. step is to show that if $\Gamma_n$ is finitely satisfiable, then
  92. either $\Gamma_n \cup \{!A_n\}$ or $\Gamma_n \cup \{\lnot !A_n\}$ is
  93. finitely satisfiable.)
  94. \end{prob}
  95. \tagendprob
  96. \begin{thm}[Compactness]
  97. \ollabel{thm:compactness-direct} $\Gamma$ is satisfiable if and only
  98. if it is finitely satisfiable.
  99. \end{thm}
  100. \begin{proof}
  101. If $\Gamma$ is satisfiable, then there is
  102. \iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}
  103. such that $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$ for all $!A \in \Gamma$.
  104. Of course, this \iftag{FOL}{$\Struct{M}$}{$\pAssign{v}$} also
  105. satisfies every finite subset of~$\Gamma$, so $\Gamma$ is finitely
  106. satisfiable.
  107. Now suppose that $\Gamma$ is finitely satisfiable.\iftag{FOL}{ By
  108. \olref{lem:fsat-henkin}, there is a finitely satisfiable, saturated
  109. set $\Gamma' \supseteq \Gamma$.}{} By \olref{lem:fsat-lindenbaum},
  110. $\iftag{FOL}{\Gamma'}{\Gamma}$ can be extended to !!a{complete} and
  111. finitely satisfiable set~$\Gamma^*$\iftag{FOL}{, and $\Gamma^*$ is
  112. still saturated}{}. Construct the \iftag{FOL}{term
  113. model~$\Struct{M(\Gamma^*)}$}{!!{valuation}~$\pAssign{v(\Gamma^*)}$}
  114. as in \olref[mod]{defn:termmodel}.\iftag{FOL}{ Note that
  115. \olref[mod]{prop:quant-termmodel} did not rely on the fact that
  116. $\Gamma^*$ is consistent (or !!{complete} or saturated, for that
  117. matter), but just on the fact that $\Struct{M(\Gamma^*)}$ is covered.}{}
  118. The proof of the Truth Lemma (\olref[mod]{lem:truth}) goes through if
  119. we replace references to \olref[ccs]{prop:ccs}\iftag{FOL}{ and
  120. \olref[hen]{prop:saturated-instances} by references to
  121. \olref{prop:fsat-ccs} and \olref{prop:fsat-instances}}.
  122. \end{proof}
  123. \tagprob{FOL}
  124. \begin{prob}
  125. Write out the complete proof of the Truth Lemma
  126. (\olref[fol][com][mod]{lem:truth}) in the version required for the
  127. proof of \olref[fol][com][cpd]{thm:compactness-direct}.
  128. \end{prob}
  129. \tagendprob
  130. \tagprob{notFOL}
  131. \begin{prob}
  132. Write out the complete proof of the Truth Lemma
  133. (\olref[pl][com][mod]{lem:truth}) in the version required for the
  134. proof of \olref[pl][com][cpd]{thm:compactness-direct}.
  135. \end{prob}
  136. \tagendprob
  137. \end{document}

content/first-order-logic/completeness/downward-ls.tex

63 lines; SHA-256 6f442281e52dd720acdd540039544c4e8b998906154aa5c4cf7f5da0d9500c48. Open preserved source.

  1. % Part: first-order-logic
  2. % Chapter: completeness
  3. % Section: downward-ls
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{com}{dls}
  7. \olsection{The L\"owenheim--Skolem Theorem}
  8. The L\"owenheim--Skolem Theorem says that if a theory has an infinite
  9. model, then it also has a model that is at most !!{denumerable}. An
  10. immediate consequence of this fact is that first-order logic cannot
  11. express that the size of !!a{structure} is !!{nonenumerable}: any
  12. !!{sentence} or set of !!{sentence}s satisfied in all
  13. !!{nonenumerable} !!{structure}s is also satisfied in some
  14. !!{enumerable} structure.
  15. \begin{thm}
  16. \ollabel{thm:downward-ls} If $\Gamma$ is consistent then it has
  17. !!a{enumerable} model, i.e., it is satisfiable in !!a{structure}
  18. whose domain is either finite or !!{denumerable}.
  19. \end{thm}
  20. \begin{proof}
  21. If $\Gamma$ is consistent, the !!{structure}~$\Struct M$ delivered by
  22. the proof of the completeness theorem has a domain $\Domain{M}$ that
  23. is no larger than the set of the terms of the language~$\Lang L$. So
  24. $\Struct M$ is at most !!{denumerable}.
  25. \end{proof}
  26. \begin{thm}
  27. \ollabel{noidentity-ls} If $\Gamma$ is a consistent set of !!{sentence}s
  28. in the language of first-order logic without identity, then it has
  29. !!a{denumerable} model, i.e., it is satisfiable in !!a{structure}
  30. whose domain is infinite and !!{enumerable}.
  31. \end{thm}
  32. \begin{proof}
  33. If $\Gamma$ is consistent and contains no sentences in which identity
  34. appears, then the !!{structure}~$\Struct M$ delivered by the proof of
  35. the completeness theorem has a domain $\Domain{M}$ identical to the set
  36. of terms of the language~$\Lang L'$. So $\Struct{M}$ is
  37. !!{denumerable}, since $\Trm[L']$ is.
  38. \end{proof}
  39. \begin{ex}[Skolem's Paradox]
  40. Zermelo--Fraenkel set theory~$\Log{ZFC}$ is a very powerful framework
  41. in which practically all mathematical statements can be expressed,
  42. including facts about the sizes of sets. So for instance, $\Log{ZFC}$
  43. can prove that the set~$\Real$ of real numbers is !!{nonenumerable},
  44. it can prove Cantor's Theorem that the power set of any set is larger
  45. than the set itself, etc. If $\Log{ZFC}$ is consistent, its models
  46. are all infinite, and moreover, they all contain !!{element}s about
  47. which the theory says that they are !!{nonenumerable}, such as the
  48. element that makes true the theorem of~$\Log{ZFC}$ that the power set
  49. of the natural numbers exists. By the L\"owenheim--Skolem Theorem,
  50. $\Log{ZFC}$ also has !!{enumerable} models---models that contain
  51. ``!!{nonenumerable}'' sets but which themselves are !!{enumerable}.
  52. \end{ex}
  53. \end{document}