Source and provenance

All nine authority files and all 918 lines are shown exactly and copied byte-for-byte. Reader corrections are disclosures only; the source text below is not altered.

content/first-order-logic/axiomatic-deduction/axiomatic-deduction.tex

59 lines; SHA-256 ba510c171a8d19895307b36b2b06d3f64970bc5d926cfad52412da2a0727db20. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: axiomatic-deduction
  3. \documentclass[../../../include/open-logic-chapter]{subfiles}
  4. \begin{document}
  5. \iftag{FOL}
  6. {\olchapter{fol}{axd}{Axiomatic \usetoken{P}{derivation}}}
  7. {\olchapter{pl}{axd}{Axiomatic \usetoken{P}{derivation}}}
  8. \begin{editorial}
  9. No effort has been made yet to ensure that the material in this
  10. chapter respects various tags indicating which connectives and
  11. quantifiers are primitive or defined: all are assumed to be
  12. primitive, except $\liff$ which is assumed to be defined. If the FOL
  13. tag is true, we produce a version with quantifiers, otherwise
  14. without.
  15. \end{editorial}
  16. \olimport{rules-and-proofs}
  17. \olimport{axioms-rules-propositional}
  18. \iftag{FOL}{%
  19. \olimport{axioms-rules-quantifiers}
  20. }{}
  21. \olimport{proving-things}
  22. \iftag{FOL}{%
  23. \olimport{proving-things-quant}
  24. }{}
  25. \olimport{proof-theoretic-notions}
  26. \olimport{deduction-theorem}
  27. \iftag{FOL}{%
  28. \olimport{deduction-theorem-quantifiers}
  29. }{}
  30. \olimport{provability-consistency}
  31. \olimport{provability-propositional}
  32. \iftag{FOL}{%
  33. \olimport{provability-quantifiers}
  34. }{}
  35. \olimport{soundness}
  36. \iftag{FOL}{
  37. \olimport{identity}
  38. }{}
  39. \OLEndChapterHook
  40. \end{document}

content/first-order-logic/axiomatic-deduction/rules-and-proofs.tex

96 lines; SHA-256 c630189af9db5f45a849e5d1b6362895bf575dd6d2236a169eb5e0fdba9ed439. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: axiomatic-deduction
  3. % Section: rules-and-proofs
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{axd}{rul}}
  8. {\olfileid{pl}{axd}{rul}}
  9. \olsection{Rules and \usetoken{P}{derivation}}
  10. \begin{explain}
  11. Axiomatic !!{derivation}s are perhaps the simplest !!{derivation} system for
  12. logic. !!^a{derivation} is just a sequence of !!{formula}s. To
  13. count as !!a{derivation}, every !!{formula} in the sequence must
  14. either be an instance of an axiom, or must follow from one or more
  15. !!{formula}s that precede it in the sequence by a rule of inference.
  16. !!^a{derivation} !!{derive}s its last !!{formula}.
  17. \end{explain}
  18. \begin{defn}[!!^{derivability}]
  19. If $\Gamma$ is a set of !!{formula}s of $\Lang L$ then a
  20. \emph{!!{derivation}} from~$\Gamma$ is a finite sequence $!A_1$,
  21. \dots,~$!A_n$ of !!{formula}s where for each $i \le n$ one of the
  22. following holds:
  23. \begin{enumerate}
  24. \item $!A_i \in \Gamma$; or
  25. \item $!A_i$ is an axiom; or
  26. \item $!A_i$ follows from some $!A_j$ (and $!A_k$) with $j < i$ (and
  27. $k < i$) by a rule of inference.
  28. \end{enumerate}
  29. \end{defn}
  30. What counts as a correct !!{derivation} depends on which inference
  31. rules we allow (and of course what we take to be axioms). And an
  32. inference rule is an if-then statement that tells us that, under
  33. certain conditions, a step~$A_i$ in !!a{derivation} is a correct
  34. inference step.
  35. \begin{defn}[Rule of inference]
  36. A \emph{rule of inference} gives a sufficient condition for what
  37. counts as a correct inference step in !!a{derivation} from~$\Gamma$.
  38. \end{defn}
  39. For instance, since any one-element sequence $!A$ with $!A \in \Gamma$
  40. trivially counts as !!a{derivation}, the following might be a very
  41. simple rule of inference:
  42. \begin{quote}
  43. If $!A \in \Gamma$, then $!A$ is always a correct inference step in
  44. any !!{derivation} from~$\Gamma$.
  45. \end{quote}
  46. Similarly, if $!A$ is one of the axioms, then $!A$ by itself is
  47. !!a{derivation}, and so this is also a rule of inference:
  48. \begin{quote}
  49. If $!A$ is an axiom, then $!A$ is a correct inference step.
  50. \end{quote}
  51. It gets more interesting if the rule of inference appeals to
  52. !!{formula}s that appear before the step considered. The following
  53. rule is called \emph{modus ponens:}
  54. \begin{quote}
  55. If $!B \lif !A$ and $!B$ occur higher up in the !!{derivation},
  56. then~$!A$ is a correct inference step.
  57. \end{quote}
  58. If this is the only rule of inference, then our definition of
  59. !!{derivation} above amounts to this: $!A_1$, \dots,~$!A_n$ is
  60. !!a{derivation} iff for each $i \le n$ one of the following holds:
  61. \begin{enumerate}
  62. \item $!A_i \in \Gamma$; or
  63. \item $!A_i$ is an axiom; or
  64. \item for some $j < i$, $!A_j$ is $!B \lif !A_i$, and for some $k < i$,
  65. $!A_k$ is~$!B$.
  66. \end{enumerate}
  67. The last clause says that $!A_i$ follows from~$!A_j$ ($!B \lif !A_i$) and $!A_k$
  68. ($!B$) by modus ponens. If we can go from $1$ to~$n$, and
  69. each time we find !!a{formula}~$!A_i$ that is either in~$\Gamma$, an
  70. axiom, or which a rule of inference tells us that it is a correct
  71. inference step, then the entire sequence counts as a correct
  72. !!{derivation}.
  73. \begin{defn}[!!^{derivability}]
  74. A !!{formula}~$!A$ is \emph{!!{derivable}} from $\Gamma$, written
  75. $\Gamma \Proves !A$, if there is !!a{derivation} from $\Gamma$ ending
  76. in $!A$.
  77. \end{defn}
  78. \begin{defn}[Theorems]
  79. !!^a{formula}~$!A$ is a \emph{theorem} if there is !!a{derivation}
  80. of~$!A$ from the empty set. We write $\Proves !A$ if $!A$ is a
  81. theorem and $\Proves/ !A$ if it is not.
  82. \end{defn}
  83. \end{document}

content/first-order-logic/axiomatic-deduction/axioms-rules-propositional.tex

43 lines; SHA-256 8d19f7612edbb87db30f052b75e8208638a5c68570ef05faf6332111fbbc69fe. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: axiomatic-deduction
  3. % Section: axioms-rules-propositional
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{axd}{prp}}
  8. {\olfileid{pl}{axd}{prp}}
  9. \olsection{Axioms and Rules for the Propositional Connectives}
  10. \begin{defn}[Axioms]
  11. The set of $\PAx$ of \emph{axioms} for the propositional connectives comprises
  12. all !!{formula}s of the following forms:
  13. \begin{align}
  14. & (!A \land !B) \lif !A \ollabel{ax:land1}\\
  15. & (!A \land !B) \lif !B \ollabel{ax:land2}\\
  16. & !A \lif (!B \lif (!A \land !B)) \ollabel{ax:land3}\\
  17. & !A \lif (!A \lor !B) \ollabel{ax:lor1}\\
  18. & !A \lif (!B \lor !A) \ollabel{ax:lor2}\\
  19. & (!A \lif !C) \lif ((!B \lif !C) \lif ((!A \lor !B) \lif !C)) \ollabel{ax:lor3}\\
  20. & !A \lif (!B \lif !A) \ollabel{ax:lif1}\\
  21. & (!A \lif (!B \lif !C)) \lif ((!A \lif !B) \lif (!A \lif !C)) \ollabel{ax:lif2}\\
  22. & (!A \lif !B) \lif ((!A \lif \lnot !B) \lif \lnot !A) \ollabel{ax:lnot1}\\
  23. & \lnot !A \lif (!A \lif !B) \ollabel{ax:lnot2}\\
  24. & \ltrue \ollabel{ax:ltrue}\\
  25. & \lfalse \lif !A \ollabel{ax:lfalse1}\\
  26. & (!A \lif \lfalse) \lif \lnot !A \ollabel{ax:lfalse2}\\
  27. & \lnot\lnot !A \lif !A \ollabel{ax:dne}
  28. \end{align}
  29. \end{defn}
  30. \begin{defn}[Modus ponens]
  31. If $!B$ and $!B \lif !A$ already occur in !!a{derivation}, then $!A$ is
  32. a correct inference step.
  33. \end{defn}
  34. We'll abbreviate the rule modus ponens as ``\MP.''
  35. \end{document}

content/first-order-logic/axiomatic-deduction/proving-things.tex

132 lines; SHA-256 ac5dc1913eb14bc8d0ba0adb9d45d08b0882f02c4d7f152b654fc153f61fb1a7. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: axiomatic-deduction
  3. % Section: proving-things
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{axd}{pro}}
  8. {\olfileid{pl}{axd}{pro}}
  9. \olsection{Examples of \usetoken{P}{derivation}}
  10. \begin{ex}
  11. Suppose we want to prove $(\lnot !D \lor !E) \lif (!D \lif
  12. !E)$. Clearly, this is not an instance of any of our axioms, so we
  13. have to use the \MP{} rule to !!{derive} it. Our only rule is~MP, which
  14. given $!A$ and $!A \lif !B$ allows us to justify~$!B$. One
  15. strategy would be to use \olref[prp]{ax:lor3} with $!A$ being $\lnot
  16. !D$, $!B$ being $!E$, and $!C$ being $!D \lif !E$, i.e., the instance
  17. \[
  18. (\lnot !D \lif (!D \lif !E)) \lif ((!E \lif (!D \lif !E)) \lif ((\lnot
  19. !D \lor !E) \lif (!D \lif !E))).
  20. \]
  21. Why? Two applications of MP yield the last part, which is what we
  22. want. And we easily see that $\lnot !D \lif (!D \lif !E)$ is an
  23. instance of \olref[prp]{ax:lnot2}, and $!E \lif (!D \lif !E)$ is an
  24. instance of \olref[prp]{ax:lif1}. So our !!{derivation} is:
  25. \begin{derivation}
  26. 1. & $\lnot !D \lif (!D \lif !E)$ & \olref[prp]{ax:lnot2} \\
  27. 2. & $(\lnot !D \lif (!D \lif !E)) \lif {}$\\
  28. &\qquad $((!E \lif (!D \lif !E)) \lif ((\lnot !D \lor !E) \lif (!D \lif !E)))$ & \olref[prp]{ax:lor3}\\
  29. 3. & $(!E \lif (!D \lif !E)) \lif ((\lnot !D \lor !E) \lif (!D \lif !E))$ & 1, 2, \MP\\
  30. 4. & $!E \lif (!D \lif !E)$ & \olref[prp]{ax:lif1}\\
  31. 5. & $(\lnot !D \lor !E) \lif (!D \lif !E)$ & 3, 4, \MP
  32. \end{derivation}
  33. \end{ex}
  34. \begin{ex}\ollabel{ex:identity}
  35. Let's try to find !!a{derivation} of $!D \lif !D$. It is not an
  36. instance of an axiom, so we have to use \MP{} to !!{derive} it.
  37. \olref[prp]{ax:lif1} is an axiom of the form~$!A \lif !B$ to which we
  38. could apply~\MP. To be useful, of course, the $!B$ which \MP{} would
  39. justify as a correct step in this case would have to be~$!D \lif !D$,
  40. since this is what we want to !!{derive}. That means $!A$ would also
  41. have to be $!D$, i.e., we might look at this instance of
  42. \olref[prp]{ax:lif1}:
  43. \[
  44. !D \lif (!D \lif !D)
  45. \]
  46. In order to apply \MP, we would also need to justify the corresponding
  47. second premise, namely~$!A$. But in our case, that would be~$!D$, and
  48. we won't be able to !!{derive}~$!D$ by itself. So we need a different
  49. strategy.
  50. The other axiom involving just~$\lif$ is \olref[prp]{ax:lif2}, i.e.,
  51. \[
  52. (!A \lif (!B \lif !C)) \lif ((!A \lif !B) \lif (!A \lif !C))
  53. \]
  54. We could get to the last nested conditional by applying \MP{}
  55. twice. Again, that would mean that we want an instance of
  56. \olref[prp]{ax:lif2} where $!A \lif !C$ is $!D \lif !D$, the !!{formula} we
  57. are aiming for. Then of course, $!A$ and $!C$ are both~$!D$. How
  58. should we pick~$!B$ so that both $!A \lif (!B \lif !C)$ and $!A \lif
  59. !B$, i.e., in our case $!D \lif (!B \lif !D)$ and $!D \lif !B$, are
  60. also !!{derivable}? Well, the first of these is already an instance of
  61. \olref[prp]{ax:lif1}, whatever we decide $!B$ to be. And $!D \lif !B$ would
  62. be another instance of \olref[prp]{ax:lif1} if $!B$ were $(!D \lif !D)$.
  63. So, our !!{derivation} is:
  64. \begin{derivation}
  65. 1. & $!D \lif ((!D \lif !D) \lif !D)$ & \olref[prp]{ax:lif1}\\
  66. 2. & $(!D \lif ((!D \lif !D) \lif !D)) \lif {}$\\
  67. & \qquad $((!D \lif (!D \lif !D)) \lif (!D \lif !D))$ & \olref[prp]{ax:lif2}\\
  68. 3. & $(!D \lif (!D \lif !D)) \lif (!D \lif !D)$ & 1, 2, \MP\\
  69. 4. & $!D \lif (!D \lif !D)$ & \olref[prp]{ax:lif1}\\
  70. 5. & $!D \lif !D$ & 3, 4, \MP
  71. \end{derivation}
  72. \end{ex}
  73. \begin{ex}\ollabel{ex:chain}
  74. Sometimes we want to show that there is !!a{derivation} of some
  75. !!{formula} from some other !!{formula}s~$\Gamma$. For instance, let's
  76. show that we can !!{derive} $!A \lif !C$ from $\Gamma = \{!A \lif !B,
  77. !B \lif !C\}$.
  78. \begin{derivation}
  79. 1. & $!A \lif !B$ & \Hyp\\
  80. 2. & $!B \lif !C$ & \Hyp\\
  81. 3. & $(!B \lif !C) \lif (!A \lif (!B \lif !C))$ & \olref[prp]{ax:lif1} \\
  82. 4. & $!A \lif (!B \lif !C)$ & 2, 3, \MP\\
  83. 5. & $(!A \lif (!B \lif !C)) \lif {}$\\
  84. & \qquad $((!A \lif !B) \lif (!A \lif !C))$ & \olref[prp]{ax:lif2}\\
  85. 6. & $((!A \lif !B) \lif (!A \lif !C))$ & 4, 5, \MP\\
  86. 7. & $!A \lif !C$ & 1, 6, \MP
  87. \end{derivation}
  88. The lines labelled ``\Hyp'' (for ``hypothesis'') indicate that the
  89. !!{formula} on that line is !!a{element} of~$\Gamma$.
  90. \end{ex}
  91. \begin{prop}
  92. \ollabel{prop:chain} If $\Gamma \Proves !A \lif !B$ and $\Gamma
  93. \Proves !B \lif !C$, then $\Gamma \Proves !A \lif !C$
  94. \end{prop}
  95. \begin{proof}
  96. Suppose $\Gamma \Proves !A \lif !B$ and $\Gamma \Proves !B \lif
  97. !C$. Then there is !!a{derivation} of $!A \lif !B$ from~$\Gamma$;
  98. and !!a{derivation} of~$!B \lif !C$ from~$\Gamma$ as well. Combine
  99. these into a single !!{derivation} by concatenating them. Now add
  100. lines 3--7 of the !!{derivation} in the preceding example. This is
  101. !!a{derivation} of $!A \lif !C$---which is the last line of the new
  102. !!{derivation}---from~$\Gamma$. Note that the justifications of
  103. lines 4 and~7 remain valid if the reference to line number~1 is
  104. replaced by reference to the last line of the !!{derivation} of~$!A
  105. \lif !B$, and reference to line number~2 by reference to the last
  106. line of the !!{derivation} of~$!B \lif !C$.
  107. \end{proof}
  108. \begin{prob}
  109. Show that the following hold by exhibiting !!{derivation}s from the
  110. axioms:
  111. \begin{enumerate}
  112. \item $(!A \land !B) \lif (!B \land !A)$
  113. \item $((!A \land !B) \lif !C) \lif (!A \lif (!B \lif !C))$
  114. \item $\lnot(!A \lor !B) \lif \lnot !A$
  115. \end{enumerate}
  116. \end{prob}
  117. \end{document}

content/first-order-logic/axiomatic-deduction/proof-theoretic-notions.tex

136 lines; SHA-256 d5cd7ef578090b935af9013ba65f020ea8c043b95ec17ed9a758a01129bbf859. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: axiomatic-deduction
  3. % Section: proof-theoretic-notions
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{axd}{ptn}}
  8. {\olfileid{pl}{axd}{ptn}}
  9. \olsection{Proof-Theoretic Notions}
  10. \begin{explain}
  11. Just as we've defined a number of important semantic notions
  12. (\iftag{FOL}{validity}{tautology}, entailment, satisfiability), we now
  13. define corresponding \emph{proof-theoretic notions}. These are not
  14. defined by appeal to satisfaction of !!{sentence}s in !!{structure}s,
  15. but by appeal to the !!{derivability} or !!{nonderivability} of
  16. certain formulas. It was an important discovery that these notions
  17. coincide. That they do is the content of the \emph{soundness} and
  18. \emph{completeness theorems}.
  19. \end{explain}
  20. \begin{defn}[!!^{derivability}]
  21. !!^a{formula}~$!A$ is \emph{!!{derivable}} from $\Gamma$, written
  22. $\Gamma \Proves !A$, if there is !!a{derivation} from~$\Gamma$ ending
  23. in~$!A$.
  24. \end{defn}
  25. \begin{defn}[Theorems]
  26. !!^a{formula}~$!A$ is a \emph{theorem} if there is !!a{derivation} of
  27. $!A$ from the empty set. We write $\Proves !A$ if $!A$ is a theorem
  28. and $\Proves/ !A$ if it is not.
  29. \end{defn}
  30. \begin{defn}[Consistency]
  31. A set $\Gamma$ of !!{formula}s is \emph{consistent} if and only if
  32. $\Gamma\Proves/ \lfalse$; it is \emph{inconsistent} otherwise.
  33. \end{defn}
  34. \begin{prop}[Reflexivity]
  35. \ollabel{prop:reflexivity}
  36. If $!A \in \Gamma$, then $\Gamma \Proves !A$.
  37. \end{prop}
  38. \begin{proof}
  39. The !!{formula}~$!A$ by itself is !!a{derivation} of~$!A$ from~$\Gamma$.
  40. \end{proof}
  41. \begin{prop}[Monotonicity]
  42. \ollabel{prop:monotonicity}
  43. If $\Gamma \subseteq \Delta$ and $\Gamma \Proves !A$, then $\Delta
  44. \Proves !A$.
  45. \end{prop}
  46. \begin{proof}
  47. Any !!{derivation} of $!A$ from $\Gamma$ is also !!a{derivation} of
  48. $!A$ from~$\Delta$.
  49. \end{proof}
  50. \begin{prop}[Transitivity]
  51. \ollabel{prop:transitivity}
  52. If $\Gamma \Proves !A$ and $\{!A\} \cup \Delta \Proves
  53. !B$, then $\Gamma \cup \Delta \Proves !B$.
  54. \end{prop}
  55. \begin{proof}
  56. Suppose $\{!A\} \cup \Delta \Proves !B$. Then there is
  57. !!a{derivation} $!B_1$, \dots, $!B_l = !B$ from~$\{!A\} \cup
  58. \Delta$. Some of the steps in that !!{derivation} will be correct
  59. because of a rule which refers to a prior line~$!B_i = !A$. By
  60. hypothesis, there is !!a{derivation} of~$!A$ from~$\Gamma$, i.e.,
  61. !!a{derivation}~$!A_1$, \dots, $!A_k = !A$ where every $!A_i$ is an
  62. axiom, !!a{element} of~$\Gamma$, or correct by a rule of
  63. inference. Now consider the sequence
  64. \[
  65. !A_1, \dots, !A_k = !A, !B_1, \dots, !B_l = !B.
  66. \]
  67. This is a correct !!{derivation} of~$!B$ from $\Gamma \cup \Delta$
  68. since every $B_i = !A$ is now justified by the same rule which
  69. justifies~$!A_k = !A$.
  70. \end{proof}
  71. Note that this means that in particular if $\Gamma \Proves !A$ and $!A
  72. \Proves !B$, then $\Gamma \Proves !B$. It follows also that if $!A_1,
  73. \dots, !A_n \Proves !B$ and $\Gamma \Proves !A_i$ for each~$i$, then
  74. $\Gamma \Proves !B$.
  75. \begin{prop}
  76. \ollabel{prop:incons}
  77. $\Gamma$ is inconsistent iff $\Gamma \Proves !A$ for every~$!A$.
  78. \end{prop}
  79. \begin{proof}
  80. Exercise.
  81. \end{proof}
  82. \tagprob{FOL}
  83. \begin{prob}
  84. Prove \olref[fol][axd][ptn]{prop:incons}.
  85. \end{prob}
  86. \tagendprob
  87. \tagprob{notFOL}
  88. \begin{prob}
  89. Prove \olref[pl][axd][ptn]{prop:incons}.
  90. \end{prob}
  91. \tagendprob
  92. \begin{prop}[Compactness]
  93. \ollabel{prop:proves-compact}
  94. \begin{enumerate}
  95. \item If $\Gamma \Proves !A$ then there is a finite subset $\Gamma_0
  96. \subseteq \Gamma$ such that $\Gamma_0 \Proves !A$.
  97. \item If every finite subset of~$\Gamma$ is
  98. consistent, then $\Gamma$ is consistent.
  99. \end{enumerate}
  100. \end{prop}
  101. \begin{proof}
  102. \begin{enumerate}
  103. \item If $\Gamma \Proves !A$, then there is a finite sequence of
  104. !!{formula}s $!A_1$, \dots,~$!A_n$ so that $!A \ident !A_n$ and
  105. each $!A_i$ is either a logical axiom, !!a{element} of~$\Gamma$
  106. or follows from previous !!{formula}s by modus ponens. Take
  107. $\Gamma_0$ to be those $!A_i$ which are in~$\Gamma$. Then the
  108. !!{derivation} is likewise !!a{derivation} from~$\Gamma_0$, and
  109. so $\Gamma_0 \Proves !A$.
  110. \item This is the contrapositive of~(1) for the special case $!A
  111. \ident \lfalse$.
  112. \end{enumerate}
  113. \end{proof}
  114. \end{document}

content/first-order-logic/axiomatic-deduction/deduction-theorem.tex

132 lines; SHA-256 f74129e7541a9452530ebc0ab630c8763cd0d4177532baf43cd249c635642cd4. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: axiomatic-deduction
  3. % Section: deduction-theorem
  4. % verification of properties of provability needed for maximally
  5. % consistent sets in the completeness chapter.
  6. \documentclass[../../../include/open-logic-section]{subfiles}
  7. \begin{document}
  8. \iftag{FOL}
  9. {\olfileid{fol}{axd}{ded}}
  10. {\olfileid{pl}{axd}{ded}}
  11. \olsection{The Deduction Theorem}
  12. As we've seen, giving !!{derivation}s in an axiomatic system is
  13. cumbersome, and !!{derivation}s may be hard to find. Rather than
  14. actually write out long lists of !!{formula}s, it is generally easier
  15. to argue that such !!{derivation}s exist, by making use of a few
  16. simple results. We've already established three such results:
  17. \olref[ptn]{prop:reflexivity} says we can always assert that $\Gamma
  18. \Proves !A$ when we know that $!A \in
  19. \Gamma$. \olref[ptn]{prop:monotonicity} says that if $\Gamma \Proves !A$
  20. then also $\Gamma \cup \{!B\} \Proves !A$. And
  21. \olref[ptn]{prop:transitivity} implies that if $\Gamma \Proves !A$ and
  22. $!A \Proves !B$, then $\Gamma \Proves !B$. Here's another simple
  23. result, a ``meta''-version of modus ponens:
  24. \begin{prop}
  25. \ollabel{prop:mp} If $\Gamma \Proves !A$ and $\Gamma \Proves !A \lif
  26. !B$, then $\Gamma \Proves !B$.
  27. \end{prop}
  28. \begin{proof}
  29. We have that $\{!A, !A \lif !B\} \Proves !B$:
  30. \begin{derivation}
  31. 1. & $!A$ & Hyp.\\
  32. 2. & $!A \lif !B$ & Hyp.\\
  33. 3. & $!B$ & 1, 2, MP
  34. \end{derivation}
  35. By \olref[ptn]{prop:transitivity}, $\Gamma \Proves !B$.
  36. \end{proof}
  37. The most important result we'll use in this context is the deduction
  38. theorem:
  39. \begin{thm}[Deduction Theorem]
  40. \ollabel{thm:deduction-thm} $\Gamma \cup \{!A\} \Proves !B$ if and
  41. only if $\Gamma \Proves !A \lif !B$.
  42. \end{thm}
  43. \begin{proof}
  44. The ``if'' direction is immediate. If $\Gamma \Proves !A \lif !B$
  45. then also $\Gamma \cup \{!A\} \Proves !A \lif !B$ by
  46. \olref[ptn]{prop:monotonicity}. Also, $\Gamma \cup \{!A\} \Proves !A$ by
  47. \olref[ptn]{prop:reflexivity}. So, by \olref{prop:mp}, $\Gamma \cup
  48. \{!A\} \Proves !B$.
  49. For the ``only if'' direction, we proceed by induction on the length
  50. of the !!{derivation} of $!B$ from $\Gamma \cup \{!A\}$.
  51. For the induction basis, we prove the claim for every !!{derivation}
  52. of length~$1$. !!^a{derivation} of~$!B$ from $\Gamma \cup \{!A\}$ of
  53. length~$1$ consists of $!B$ by itself; and if it is correct $!B$ is
  54. either $\in \Gamma \cup \{!A\}$ or is an axiom. If $!B \in \Gamma$ or
  55. is an axiom, then $\Gamma \Proves !B$. We also have that $\Gamma
  56. \Proves !B \lif (!A \lif !B)$ by \olref[prp]{ax:lif1}, and
  57. \olref{prop:mp} gives $\Gamma \Proves !A \lif !B$. If $!B \in \{ !A\}$
  58. then $\Gamma \Proves !A \lif !B$ because the last !!{sentence}~$!A
  59. \lif !B$ is the same as $!A \lif !A$, and we have !!{derive}d that in
  60. \olref[pro]{ex:identity}.
  61. For the inductive step, suppose !!a{derivation} of~$!B$ from
  62. $\Gamma \cup \{!A\}$ ends with a step~$!B$ which is justified by modus
  63. ponens. (If it is not justified by modus ponens, $!B \in \Gamma$, $!B
  64. \ident !A$, or $!B$ is an axiom, and the same reasoning as in the
  65. induction basis applies.) Then some previous steps in the
  66. !!{derivation} are $!C \lif !B$ and $!C$, for some !!{formula}~$!C$,
  67. i.e., $\Gamma \cup \{!A\} \Proves !C \lif !B$ and $\Gamma \cup \{!A\}
  68. \Proves !C$, and the respective !!{derivation}s are shorter, so the
  69. inductive hypothesis applies to them. We thus have both:
  70. \begin{align*}
  71. & \Gamma \Proves !A \lif (!C \lif !B); \\
  72. & \Gamma \Proves !A \lif !C.
  73. \end{align*}
  74. But also
  75. \[
  76. \Gamma \Proves (!A \lif (!C \lif !B)) \lif
  77. ((!A\lif !C) \lif (!A \lif !B)),
  78. \]
  79. by \olref[prp]{ax:lif2}, and two applications of \olref{prop:mp} give
  80. $\Gamma \Proves !A \lif !B$, as required.
  81. \end{proof}
  82. Notice how \olref[prp]{ax:lif1} and \olref[prp]{ax:lif2} were chosen
  83. precisely so that the Deduction Theorem would hold.
  84. The following are some useful facts about !!{derivability}, which we
  85. leave as exercises.
  86. \begin{prop}
  87. \ollabel{prop:derivfacts}
  88. \begin{enumerate}
  89. \item $\Proves (!A \lif !B) \lif ((!B \lif !C)
  90. \lif (!A \lif !C)$; \ollabel{derivfacts:a}
  91. \item If $\Gamma \cup \{ \lnot !A\}
  92. \Proves \lnot !B$ then $\Gamma \cup \{ !B\} \Proves
  93. !A$ (Contraposition); \ollabel{derivfacts:b}
  94. \item $\{ !A, \lnot!A\} \Proves
  95. !B$ (Ex Falso Quodlibet, Explosion); \ollabel{derivfacts:c}
  96. \item $\{ \lnot\lnot!A\} \Proves
  97. !A$ (Double Negation Elimination);\ollabel{derivfacts:d}
  98. \item If $\Gamma \Proves \lnot\lnot!A$ then $\Gamma \Proves
  99. !A$;\ollabel{derivfacts:e}
  100. \end{enumerate}
  101. \end{prop}
  102. \tagprob{FOL}
  103. \begin{prob}
  104. Prove \olref[fol][axd][ded]{prop:derivfacts}
  105. \end{prob}
  106. \tagendprob
  107. \tagprob{notFOL}
  108. \begin{prob}
  109. Prove \olref[pl][axd][ded]{prop:derivfacts}
  110. \end{prob}
  111. \tagendprob
  112. \end{document}

content/first-order-logic/axiomatic-deduction/provability-consistency.tex

93 lines; SHA-256 069b652fa3cf1c8e7719ae95d355398b866c9ecf42ff747b755ddbf5fd3b6eef. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: axiomatic-deduction
  3. % Section: provability-consistency
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{axd}{prv}}
  8. {\olfileid{pl}{axd}{prv}}
  9. \olsection{\usetoken{S}{derivability} and Consistency}
  10. We will now establish a number of properties of the !!{derivability}
  11. relation. They are independently interesting, but each will play a
  12. role in the proof of the completeness theorem.
  13. \begin{prop}\ollabel{prop:provability-contr}
  14. If $\Gamma \Proves !A$ and $\Gamma \cup \{!A\}$ is inconsistent,
  15. then $\Gamma$ is inconsistent.
  16. \end{prop}
  17. \begin{proof}
  18. If $\Gamma \cup \{!A\}$ is inconsistent, then $\Gamma \cup \{!A\}
  19. \Proves \lfalse$. By \olref[ptn]{prop:reflexivity}, $\Gamma \Proves
  20. !B$ for every $!B \in \Gamma$. Since also $\Gamma \Proves !A$ by
  21. hypothesis, $\Gamma \Proves !B$ for every $!B \in \Gamma \cup
  22. \{!A\}$. By \olref[ptn]{prop:transitivity}, $\Gamma \Proves
  23. \lfalse$, i.e., $\Gamma$ is inconsistent.
  24. \end{proof}
  25. \begin{prop}
  26. \ollabel{prop:prov-incons}
  27. $\Gamma \Proves !A$ iff $\Gamma \cup \{\lnot !A\}$ is inconsistent.
  28. \end{prop}
  29. \begin{proof}
  30. First suppose $\Gamma \Proves !A$. Then $\Gamma \cup \{\lnot !A\}
  31. \Proves !A$ by \olref[ptn]{prop:monotonicity}. $\Gamma \cup \{\lnot
  32. !A\} \Proves \lnot !A$ by \olref[ptn]{prop:reflexivity}. We also have
  33. $\Proves \lnot !A \lif (!A \lif \lfalse)$ by \olref[prp]{ax:lnot2}. So
  34. by two applications of \olref[ded]{prop:mp}, we have $\Gamma \cup \{\lnot
  35. !A\} \Proves \lfalse$.
  36. Now assume $\Gamma \cup \{\lnot !A\}$ is inconsistent, i.e., $\Gamma
  37. \cup \{\lnot !A\} \Proves \lfalse$. By the deduction theorem, $\Gamma
  38. \Proves \lnot !A \lif \lfalse$. $\Gamma \Proves (\lnot !A \lif
  39. \lfalse) \lif \lnot\lnot !A$ by \olref[prp]{ax:lfalse2}, so $\Gamma
  40. \Proves \lnot\lnot !A$ by \olref[ded]{prop:mp}. Since $\Gamma \Proves
  41. \lnot\lnot !A \lif !A$ (\olref[prp]{ax:dne}), we have $\Gamma
  42. \Proves !A$ by \olref[ded]{prop:mp} again.
  43. \end{proof}
  44. \begin{prob}
  45. Prove that $\Gamma \Proves \lnot !A$ iff $\Gamma \cup \{!A\}$ is
  46. inconsistent.
  47. \end{prob}
  48. \begin{prop}\ollabel{prop:explicit-inc}
  49. If $\Gamma \Proves !A$ and $\lnot !A \in \Gamma$, then $\Gamma$ is
  50. inconsistent.
  51. \end{prop}
  52. \begin{proof}
  53. $\Gamma \Proves \lnot !A \lif (!A \lif \lfalse)$ by \olref[prp]{ax:lnot2}.
  54. $\Gamma \Proves \lfalse$ by two applications of \olref[ded]{prop:mp}.
  55. \end{proof}
  56. \begin{prop}\ollabel{prop:provability-exhaustive}
  57. If $\Gamma \cup \{!A\}$ and $\Gamma \cup \{\lnot !A\}$ are both
  58. inconsistent, then $\Gamma$ is inconsistent.
  59. \end{prop}
  60. \begin{proof}
  61. Exercise.
  62. \end{proof}
  63. \tagprob{FOL}
  64. \begin{prob}
  65. Prove \olref[fol][axd][prv]{prop:provability-exhaustive}
  66. \end{prob}
  67. \tagendprob
  68. \tagprob{notFOL}
  69. \begin{prob}
  70. Prove \olref[pl][axd][prv]{prop:provability-exhaustive}
  71. \end{prob}
  72. \tagendprob
  73. \end{document}

content/first-order-logic/axiomatic-deduction/provability-propositional.tex

84 lines; SHA-256 4dd07507288e361d9d65dcbb7c3de67f4e3c83e9853b6d9032dcc9cba3cef187. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: axiomatic-deduction
  3. % Section: provability-propositional
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{axd}{ppr}}
  8. {\olfileid{pl}{axd}{ppr}}
  9. \olsection{\usetoken{S}{derivability} and the Propositional Connectives}
  10. \begin{explain}
  11. We establish that the !!{derivability} relation~$\Proves$ of
  12. axiomatic deduction is strong enough to establish some basic facts
  13. involving the propositional connectives, such as that $!A \land !B
  14. \Proves !A$ and $!A, !A \lif !B \Proves !B$ (modus ponens). These
  15. facts are needed for the proof of the completeness theorem.
  16. \end{explain}
  17. \begin{prop}\ollabel{prop:provability-land}
  18. \begin{enumerate}
  19. \item \ollabel{prop:provability-land-left} Both $!A \land !B \Proves
  20. !A$ and $!A \land !B \Proves !B$
  21. \item \ollabel{prop:provability-land-right} $!A, !B \Proves !A \land !B$.
  22. \end{enumerate}
  23. \end{prop}
  24. \begin{proof}
  25. \begin{enumerate}
  26. \item From \olref[prp]{ax:land1} and \olref[prp]{ax:land1} by
  27. modus ponens.
  28. \item From \olref[prp]{ax:land3} by two applications of
  29. modus ponens.
  30. \end{enumerate}
  31. \end{proof}
  32. \begin{prop}\ollabel{prop:provability-lor}
  33. \begin{enumerate}
  34. \item $!A \lor !B, \lnot !A, \lnot !B$ is inconsistent.
  35. \item Both $!A \Proves !A \lor !B$ and $!B \Proves !A \lor !B$.
  36. \end{enumerate}
  37. \end{prop}
  38. \begin{proof}
  39. \begin{enumerate}
  40. \item From \olref[prp]{ax:lnot1} we get $\Proves \lnot !A \lif (!A
  41. \lif \lfalse)$ and $\Proves \lnot !B \lif (!B \lif \lfalse)$. So
  42. by the deduction theorem, we have $\{\lnot !A\} \Proves !A \lif
  43. \lfalse$ and $\{\lnot !B\} \Proves !B \lif \lfalse$. From
  44. \olref[prp]{ax:lor3} we get $\{\lnot !A, \lnot !B\} \Proves (!A
  45. \lor !B) \lif \lfalse$. By the deduction theorem, $\{!A \lor !B,
  46. \lnot !A, \lnot !B\} \Proves \lfalse$.
  47. \item From \olref[prp]{ax:lor1} and \olref[prp]{ax:lor2} by modus
  48. ponsens.
  49. \end{enumerate}
  50. \end{proof}
  51. \begin{prop}\ollabel{prop:provability-lif}
  52. \begin{enumerate}
  53. \item \ollabel{prop:provability-lif-left} $!A, !A \lif !B \Proves !B$.
  54. \item \ollabel{prop:provability-lif-right}
  55. Both $\lnot !A \Proves !A \lif !B$ and $!B \Proves !A \lif !B$.
  56. \end{enumerate}
  57. \end{prop}
  58. \begin{proof}
  59. \begin{enumerate}
  60. \item We can !!{derive}:
  61. \begin{derivation}
  62. 1. & $!A$ & \Hyp\\
  63. 2. & $!A \lif !B$ & \Hyp\\
  64. 3. & $!B$ & 1, 2, \MP
  65. \end{derivation}
  66. \item By \olref[prp]{ax:lnot2} and \olref[prp]{ax:lif1} and the
  67. deduction theorem, respectively.
  68. \end{enumerate}
  69. \end{proof}
  70. \end{document}

content/first-order-logic/axiomatic-deduction/soundness.tex

143 lines; SHA-256 a3a783ae2add6b2420527ad65c82eb6a5e0c02ac8a44e3b34b757bc27985c1cf. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: axiomatic-deduction
  3. % Section: soundness
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{axd}{sou}}
  8. {\olfileid{pl}{axd}{sou}}
  9. \olsection{Soundness}
  10. \begin{explain}
  11. !!^a{derivation} system, such as axiomatic deduction, is \emph{sound}
  12. if it cannot !!{derive} things that do not actually hold. Soundness is
  13. thus a kind of guaranteed safety property for !!{derivation} systems.
  14. Depending on which proof theoretic property is in question, we would
  15. like to know for instance, that
  16. \begin{enumerate}
  17. \item every !!{derivable}~$!A$ is valid;
  18. \item if $!A$ is !!{derivable} from some others~$\Gamma$, it is also a
  19. consequence of them;
  20. \item if a set of !!{formula}s~$\Gamma$ is inconsistent, it is
  21. unsatisfiable.
  22. \end{enumerate}
  23. These are important properties of !!a{derivation} system. If any of them do
  24. not hold, the !!{derivation} system is deficient---it would !!{derive} too much.
  25. Consequently, establishing the soundness of !!a{derivation} system is of the
  26. utmost importance.
  27. \end{explain}
  28. \begin{prop}
  29. If $!A$ is an axiom, then
  30. \iftag{FOL}
  31. {$\Sat{M}{!A}[s]$ for each !!{structure}~$\Struct{M}$ and assignment~$s$.}
  32. {$\pSat{v}{!A}$ for each !!{valuation}~$\pAssign{v}$.}
  33. \end{prop}
  34. \begin{proof}
  35. \iftag{FOL}{We have to verify that all the axioms are valid. For
  36. instance, here is the case for \olref[qua]{ax:q1}: suppose $t$ is
  37. !!{free for} $x$ in $!A$, and assume
  38. $\Sat{M}{\lforall[x][!A]}[s]$. Then by definition of satisfaction,
  39. for each $\varAssign{s'}{s}{x}$, also $\Sat{M}{!A}[s']$, and in particular
  40. this holds when $s'(x) = \Value{t}{M}[s]$. By
  41. \olref[syn][ext]{prop:ext-formulas},
  42. $\Sat{M}{\Subst{!A}{t}{x}}[s]$. This shows that
  43. $\Sat{M}{(\lforall[x][!A] \lif \Subst{!A}{t}{x})}[s]$.}{Do truth
  44. tables for each axiom to verify that they are tautologies.}
  45. \end{proof}
  46. \begin{thm}[Soundness]
  47. \ollabel{thm:soundness}
  48. If $\Gamma \Proves !A$ then $\Gamma \Entails !A$.
  49. \end{thm}
  50. \begin{proof}
  51. By induction on the length of the !!{derivation} of $!A$ from
  52. $\Gamma$. If there are no steps justified by inferences, then all
  53. !!{formula}s in the !!{derivation} are either instances of axioms or are
  54. in~$\Gamma$. By the previous proposition, all the axioms are
  55. \iftag{FOL}{valid}{tautologies}, and hence if $!A$ is an axiom then
  56. $\Gamma \Entails !A$. If $!A \in \Gamma$, then trivially $\Gamma
  57. \Entails !A$.
  58. If the last step of the !!{derivation} of~$!A$ is justified by modus
  59. ponens, then there are !!{formula}s $!B$ and $!B \lif !A$ in the
  60. !!{derivation}, and the induction hypothesis applies to the part of
  61. the !!{derivation} ending in those !!{formula}s (since they contain at
  62. least one fewer step justified by an inference). So, by induction
  63. hypothesis, $\Gamma \Entails !B$ and $\Gamma \Entails !B \lif
  64. !A$. Then $\Gamma \Entails !A$ by
  65. \iftag{FOL}
  66. {\olref[syn][sem]{thm:sem-deduction}}
  67. {\olref[pl][syn][sem]{thm:sem-deduction}}.
  68. \iftag{FOL}{Now suppose the last step is justified by
  69. \QR. Then that step has the form $!C \lif \lforall[x][B(x)]$ and
  70. there is a preceding step $!C \lif !B(c)$ with $c$ not in $\Gamma$,
  71. $!C$, or $\lforall[x][B(x)]$. By induction hypothesis, $\Gamma
  72. \Entails !C \lif !B(c)$. By
  73. \olref[syn][sem]{thm:sem-deduction}, $\Gamma \cup \{!C\} \Entails
  74. !B(c)$.
  75. Consider some structure~$\Struct{M}$ such that $\Sat{M}{\Gamma \cup
  76. \{!C\}}$. We need to show that $\Sat{M}{\lforall[x][!B(x)]}$. Since
  77. $\lforall[x][!B(x)]$ is !!a{sentence}, this means we have to show that
  78. for every variable assignment~$s$, $\Sat{M}{!B(x)}[s]$
  79. (\olref[syn][ass]{prop:sat-quant}). Since $\Gamma \cup \{!C\}$
  80. consists entirely of sentences, $\Sat{M}{!D}[s]$ for all $!D \in
  81. \Gamma$ by \olref[syn][sat]{defn:satisfaction}. Let $\Struct{M'}$ be
  82. like $\Struct{M}$ except that $\Assign{c}{M'} = s(x)$. Since $c$ does
  83. not occur in~$\Gamma$ or~$!C$, $\Sat{M'}{\Gamma \cup \{!C\}}$ by
  84. \olref[syn][ext]{cor:extensionality-sent}. Since $\Gamma \cup \{!C\}
  85. \Entails !B(c)$, $\Sat{M'}{B(c)}$. Since $!B(c)$ is !!a{sentence},
  86. $\Sat{M'}{!B(c)}[s]$ by
  87. \olref[syn][ass]{prop:sentence-sat-true}. $\Sat{M'}{!B(x)}[s]$ iff
  88. $\Sat{M'}{!B(c)}[s]$ by \olref[syn][ext]{prop:ext-formulas} (recall that
  89. $!B(c)$ is just $\Subst{!B(x)}{c}{x}$). So,
  90. $\Sat{M'}{!B(x)}[s]$. Since $c$ does not occur in~$!B(x)$, by
  91. \olref[syn][ext]{prop:extensionality}, $\Sat{M}{!B(x)}[s]$. But $s$
  92. was an arbitrary variable assignment, so
  93. $\Sat{M}{\lforall[x][!B(x)]}$. Thus $\Gamma \cup \{!C\} \Entails
  94. \lforall[x][!B(x)]$. By \olref[syn][sem]{thm:sem-deduction}, $\Gamma
  95. \Entails !C \lif \lforall[x][!B(x)]$.
  96. The case where $!A$ is justified by \QR{} but is of the form
  97. $\lexists[x][!B(x)] \lif !C$ is left as an exercise.}{}
  98. \end{proof}
  99. \tagprob{FOL}
  100. \begin{prob}
  101. Complete the proof of \olref[fol][axd][sou]{thm:soundness}.
  102. \end{prob}
  103. \tagendprob
  104. \begin{cor}
  105. \ollabel{cor:weak-soundness}
  106. If $\Proves !A$, then $!A$ is \iftag{FOL}{valid}{a tautology}.
  107. \end{cor}
  108. \begin{cor}
  109. \ollabel{cor:consistency-soundness}
  110. If $\Gamma$ is satisfiable, then it is consistent.
  111. \end{cor}
  112. \begin{proof}
  113. We prove the contrapositive. Suppose that $\Gamma$ is not consistent.
  114. Then $\Gamma \Proves \lfalse$, i.e., there is !!a{derivation} of
  115. $\lfalse$ from~$\Gamma$. By \olref{thm:soundness}, any
  116. \iftag{FOL}{!!{structure}~$\Struct{M}$}{!!{valuation}~$\pAssign{v}$}
  117. that satisfies $\Gamma$ must satisfy~$\lfalse$. Since
  118. \iftag{FOL}{$\Sat/{M}{\lfalse}$ for every
  119. !!{structure}~$\Struct{M}$}{$\pSat/{v}{\lfalse}$ for every
  120. !!{valuation}~$\pAssign{v}$}, no
  121. \iftag{FOL}{$\Struct{M}$}{$\pAssign{v}$} can satisfy $\Gamma$, i.e.,
  122. $\Gamma$ is not satisfiable.
  123. \end{proof}
  124. \end{document}