Source and provenance

All fourteen authority files and all 1,984 lines are shown exactly and packaged byte-for-byte. Two source prose defects remain unchanged and are disclosed with explicit reader corrections. Open the exact accepted projected chapter transcript (SHA-256 aeb0985c36e99f18eccc0e957d3c039e8d590f9c9f390c9d061b34b014dbb75f). Technical source commit: 9620cc73f9c8e0ad003c514a5d3748f29611c4c0. AI production model: OpenAI Codex gpt-5.6-sol, Ultra. Source authorship remains with the credited Open Logic Project contributors.

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

55 lines; SHA-256 8fa1e5a3e1211ce9c55e0ff66acbb8d5a6a9af360529d7775587a626fbe49b8e. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. \documentclass[../../../include/open-logic-chapter]{subfiles}
  4. \begin{document}
  5. \iftag{FOL}
  6. {\olchapter{fol}{ntd}{Natural Deduction}}
  7. {\olchapter{pl}{ntd}{Natural Deduction}}
  8. \begin{editorial}
  9. This chapter presents a natural deduction system in the style of
  10. Gentzen/Prawitz.
  11. To include or exclude material relevant to natural deduction as a
  12. proof system, use the ``prfND'' tag.
  13. \end{editorial}
  14. \olimport{rules-and-proofs}
  15. \olimport{propositional-rules}
  16. \iftag{FOL}{%
  17. \olimport{quantifier-rules}
  18. }{}
  19. \olimport{derivations}
  20. \olimport{proving-things}
  21. \iftag{FOL}{%
  22. \olimport{proving-things-quant}
  23. }{}
  24. \olimport{proof-theoretic-notions}
  25. \olimport{provability-consistency}
  26. \olimport{provability-propositional}
  27. \iftag{FOL}{%
  28. \olimport{provability-quantifiers}
  29. }{}
  30. \olimport{soundness}
  31. \iftag{FOL}{%
  32. \olimport{identity}
  33. \olimport{soundness-identity}
  34. }{}
  35. \OLEndChapterHook
  36. \end{document}

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

52 lines; SHA-256 0556326eefd6fbb957243d9f94969fd23adefb4af69f80419d4a2818d53088f0. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: rules-and-proofs
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{ntd}{rul}}
  8. {\olfileid{pl}{ntd}{rul}}
  9. \olsection{Rules and \usetoken{P}{derivation}}
  10. \begin{explain}
  11. Natural deduction systems are meant to closely parallel the informal
  12. reasoning used in mathematical proof (hence it is somewhat
  13. ``natural''). Natural deduction proofs begin with assumptions.
  14. Inference rules are then applied. Assumptions are ``!!{discharged}''
  15. by the \Intro{\lnot}, \Intro{\lif}, \iftag{FOL}{\Elim{\lor} and
  16. \Elim{\lexists}}{ and \Elim{\lor}} inference rules, and the label of
  17. the !!{discharged} assumption is placed beside the inference for
  18. clarity.
  19. \end{explain}
  20. \begin{defn}[Assumption]
  21. An \emph{assumption} is any !!{sentence}
  22. in the topmost position of any branch.
  23. \end{defn}
  24. !!^{derivation}s in natural deduction are certain trees of
  25. !!{sentence}s, where the topmost !!{sentence}s are assumptions, and if
  26. !!a{sentence} stands below one, two, or three other sequents, it must
  27. follow correctly by a rule of inference. The !!{sentence}s at the top
  28. of the inference are called the \emph{premises} and the !!{sentence}
  29. below the \emph{conclusion} of the inference. The rules come in
  30. pairs, an introduction and an elimination rule for each
  31. !!{operator}. They introduce !!a{operator} in the conclusion or
  32. remove !!a{operator} from a premise of the rule. Some of the rules
  33. allow an assumption of a certain type to be \emph{!!{discharged}}. To
  34. indicate which assumption is !!{discharged} by which inference, we
  35. also assign labels to both the assumption and the inference. This is
  36. indicated by writing the assumption as ``$\Discharge{!A}{n}$.''
  37. % Only include this sentence is on of \land, lor, lif or lnot is defined.
  38. \iftag{notprvNot,notprvAnd,notprvOr,notprvIf}{}%
  39. {It is customary to consider rules for all the !!{operator}s $\land$, $\lor$, $\lif$, $\lnot$, and $\lfalse$, even if some of those are defined.}
  40. \end{document}

content/first-order-logic/natural-deduction/propositional-rules.tex

120 lines; SHA-256 c22d2603cc9c4a79d630a4bc00b817c57c07b000e5d4bc443815e13b4f4cb515. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: propositional-rules
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{ntd}{prl}}
  8. {\olfileid{pl}{ntd}{prl}}
  9. \olsection{Propositional Rules}
  10. \subsection{Rules for $\land$}
  11. \begin{defish}
  12. \AxiomC{$!A$}
  13. \AxiomC{$!B$}
  14. \RightLabel{\Intro{\land}}
  15. \BinaryInfC{$!A \land !B$}
  16. \DisplayProof
  17. \hfill
  18. \begin{tabular}{r}
  19. \AxiomC{$!A \land !B$}
  20. \RightLabel{\Elim{\land}}
  21. \UnaryInfC{$!A$}
  22. \DisplayProof
  23. \\[3ex]
  24. \AxiomC{$!A \land !B$}
  25. \RightLabel{\Elim{\land}}
  26. \UnaryInfC{$!B$}
  27. \DisplayProof
  28. \end{tabular}
  29. \end{defish}
  30. \subsection{Rules for $\lor$}
  31. \begin{defish}
  32. \begin{tabular}{r}
  33. \AxiomC{$!A$}
  34. \RightLabel{\Intro{\lor}}
  35. \UnaryInfC{$!A \lor !B$}
  36. \DisplayProof
  37. \\[3ex]
  38. \AxiomC{$!B$}
  39. \RightLabel{\Intro{\lor}}
  40. \UnaryInfC{$!A \lor !B$}
  41. \DisplayProof
  42. \end{tabular}
  43. \hfill
  44. \AxiomC{$!A \lor !B$}
  45. \AxiomC{$\Discharge{!A}{n}$}
  46. \DeduceC{$!C$}
  47. \AxiomC{$\Discharge{!B}{n}$}
  48. \DeduceC{$!C$}
  49. \DischargeRule{\Elim{\lor}}{n}
  50. \TrinaryInfC{$!C$}
  51. \DisplayProof
  52. \end{defish}
  53. \subsection{Rules for $\lif$}
  54. \begin{defish}
  55. \AxiomC{$\Discharge{!A}{n}$}
  56. \DeduceC{$!B$}
  57. \DischargeRule{\Intro{\lif}}{n}
  58. \UnaryInfC{$!A \lif !B$}
  59. \DisplayProof
  60. \hfill
  61. \AxiomC{$!A \lif !B$}
  62. \AxiomC{$!A$}
  63. \RightLabel{\Elim{\lif}}
  64. \BinaryInfC{$!B$}
  65. \DisplayProof
  66. \end{defish}
  67. \subsection{Rules for $\lnot$}
  68. \begin{defish}
  69. \AxiomC{$\Discharge{!A}{n}$}
  70. \noLine
  71. \DeduceC{$\lfalse$}
  72. \DischargeRule{\Intro{\lnot}}{n}
  73. \UnaryInfC{$\lnot !A$}
  74. \DisplayProof
  75. \hfill
  76. \AxiomC{$\lnot !A$}
  77. \AxiomC{$!A$}
  78. \RightLabel{\Elim{\lnot}}
  79. \BinaryInfC{$\lfalse$}
  80. \DisplayProof
  81. \end{defish}
  82. \subsection{Rules for $\lfalse$}
  83. \begin{defish}
  84. \AxiomC{$\lfalse$}
  85. \RightLabel{\FalseInt}
  86. \UnaryInfC{$!A$}
  87. \DisplayProof
  88. \hfill
  89. \AxiomC{$\Discharge{\lnot !A}{n}$}
  90. \DeduceC{$\lfalse$}
  91. \DischargeRule{\FalseCl}{n}
  92. \UnaryInfC{$!A$}
  93. \DisplayProof
  94. \end{defish}
  95. Note that $\Intro{\lnot}$ and $\FalseCl$ are very similar: The
  96. difference is that $\Intro{\lnot}$ derives a negated
  97. !!{sentence}~$\lnot !A$ but $\FalseCl$ a positive !!{sentence}~$!A$.
  98. Whenever a rule indicates that some assumption may be discharged, we
  99. take this to be a permission, but not a requirement. E.g., in the
  100. $\Intro{\lif}$ rule, we may discharge any number of assumptions of the
  101. form~$!A$ in the !!{derivation} of the premise~$!B$, including zero.
  102. \end{document}

content/first-order-logic/natural-deduction/quantifier-rules.tex

111 lines; SHA-256 5d9c3a507fe1b79e4d376963b5e3efca4a3352cc7cef7d18255c61e60592f71b. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: quantifier-rules
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{ntd}{qrl}
  7. \olsection{Quantifier Rules}
  8. \subsection{Rules for $\lforall$}
  9. \begin{defish}
  10. \AxiomC{$!A(a)$}
  11. \RightLabel{\Intro{\lforall}}
  12. \UnaryInfC{$\lforall[x][\Atom{!A}{x}]$}
  13. \DisplayProof
  14. \hfill
  15. \AxiomC{$\lforall[x][\Atom{!A}{x}]$}
  16. \RightLabel{\Elim{\lforall}}
  17. \UnaryInfC{$!A(t)$}
  18. \DisplayProof
  19. \end{defish}
  20. In the rules for~$\lforall$, $t$ is a closed term (a term that does
  21. not contain any variables), and $a$~is !!a{constant} which does not
  22. occur in the conclusion~$\lforall[x][!A(x)]$, or in any assumption
  23. which is !!{undischarged} in the !!{derivation} ending with the
  24. premise~$!A(a)$. We call $a$ the \emph{eigenvariable} of the
  25. \Intro{\lforall} inference.\footnote{We use the term ``eigenvariable''
  26. even though $a$ in the above rule is a constant. This has historical
  27. reasons.}
  28. \subsection{Rules for $\lexists$}
  29. \begin{defish}
  30. \AxiomC{$\Atom{!A}{t}$}
  31. \RightLabel{\Intro{\lexists}}
  32. \UnaryInfC{$\lexists[x][\Atom{!A}{x}]$}
  33. \DisplayProof
  34. \hfill
  35. \AxiomC{$\lexists[x][\Atom{!A}{x}]$}
  36. \AxiomC{[$\Atom{!A}{a}$]$^n$}
  37. \DeduceC{$!C$}
  38. \DischargeRule{\Elim{\lexists}}{n}
  39. \BinaryInfC{$!C$}
  40. \DisplayProof
  41. \end{defish}
  42. Again, $t$ is a closed term, and $a$ is !!a{constant} which does not
  43. occur in the premise $\lexists[x][!A(x)]$, in the conclusion~$!C$, or
  44. any assumption which is !!{undischarged} in the !!{derivation}s ending
  45. with the two premises (other than the assumptions $!A(a)$). We call
  46. $a$ the \emph{eigenvariable} of the \Elim{\lexists} inference.
  47. The condition that an eigenvariable neither occur in the premises nor
  48. in any assumption that is !!{undischarged} in the !!{derivation}s
  49. leading to the premises for the \Intro{\lforall} or \Elim{\lexists}
  50. inference is called the \emph{eigenvariable condition}.
  51. \begin{explain}
  52. Recall the convention that when $!A$ is !!a{formula} with the
  53. !!{variable}~$x$ free, we indicate this by writing~$!A(x)$. In the
  54. same context, $!A(t)$ then is short for~$\Subst{!A}{t}{x}$. So we
  55. could also write the $\Intro\lexists$ rule as:
  56. \begin{prooftree}
  57. \AxiomC{$\Subst{!A}{t}{x}$}
  58. \RightLabel{\Intro{\lexists}}
  59. \UnaryInfC{$\lexists[x][!A]$}
  60. \end{prooftree}
  61. Note that $t$ may already occur in~$!A$, e.g., $!A$~might
  62. be~$\Atom{\Obj P}{t,x}$. Thus, inferring $\lexists[x][\Atom{\Obj
  63. P}{t,x}]$ from~$\Atom{\Obj P}{t,t}$ is a correct application
  64. of~$\Intro\lexists$---you may ``replace'' one or more, and not
  65. necessarily all, occurrences of~$t$ in the premise by the bound
  66. !!{variable}~$x$. However, the eigenvariable conditions in
  67. $\Intro\lforall$ and~$\Elim\lexists$ require that the !!{constant}~$a$
  68. does not occur in~$!A$. So, you cannot correctly infer
  69. $\lforall[x][\Atom{\Obj P}{a,x}]$ from $\Atom{\Obj P}{a,a}$
  70. using~$\Intro\lforall$.
  71. \end{explain}
  72. \begin{explain}
  73. In \Intro{\lexists} and \Elim{\lforall} there are no restrictions, and
  74. the term~$t$ can be anything, so we do not have to worry about any
  75. conditions. On the other hand, in the \Elim{\lexists} and
  76. \Intro{\lforall} rules, the eigenvariable condition requires that the
  77. !!{constant}~$a$ does not occur anywhere in the conclusion or in an
  78. !!{undischarged} assumption. The condition is necessary to ensure that
  79. the system is sound, i.e., only !!{derive}s !!{sentence}s from
  80. !!{undischarged} assumptions from which they follow. Without this
  81. condition, the following would be allowed:
  82. \begin{prooftree}
  83. \AxiomC{$\lexists[x][!A(x)]$}
  84. \AxiomC{$\Discharge{!A(a)}{1}$}
  85. \RightLabel{*\Intro{\lforall}}
  86. \UnaryInfC{$\lforall[x][!A(x)]$}
  87. \RightLabel{\Elim{\lexists}}
  88. \BinaryInfC{$\lforall[x][!A(x)]$}
  89. \end{prooftree}
  90. However, $\lexists[x][!A(x)] \Entails/ \lforall[x][!A(x)]$.
  91. As the elimination rules for quantifiers only allow substituting
  92. closed terms for !!{variable}s, it follows that any !!{formula} that
  93. can be derived from a set of !!{sentence}s is itself !!a{sentence}.
  94. \end{explain}
  95. \end{document}

content/first-order-logic/natural-deduction/derivations.tex

110 lines; SHA-256 04cdbaa301a71243b78d880551ce2f8edbf6f059764eceacd5b8910f0459cb26. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: derivations
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{ntd}{der}}
  8. {\olfileid{pl}{ntd}{der}}
  9. \olsection{\usetoken{P}{derivation}}
  10. \begin{explain}
  11. We've said what an assumption is, and we've given the rules of
  12. inference. !!^{derivation}s in natural deduction are inductively
  13. generated from these: each !!{derivation} either is an assumption
  14. on its own, or consists of one, two, or three !!{derivation}s followed
  15. by a correct inference.
  16. \end{explain}
  17. \begin{defn}[!!^{derivation}]
  18. \Article{derivation} \emph{!!{derivation}} of !!a{sentence}~$!A$ from
  19. assumptions~$\Gamma$ is a finite tree of !!{sentence}s satisfying the
  20. following conditions:
  21. \begin{enumerate}
  22. \item The topmost !!{sentence}s of the tree are either in $\Gamma$ or
  23. are !!{discharged} by an inference in the tree.
  24. \item The bottommost !!{sentence} of the tree is~$!A$.
  25. \item Every !!{sentence} in the tree except the sentence~$!A$ at
  26. the bottom is a premise of a correct application of an inference
  27. rule whose conclusion stands directly below that !!{sentence} in the
  28. tree.
  29. \end{enumerate}
  30. We then say that $!A$ is the \emph{conclusion} of the !!{derivation}
  31. and $\Gamma$ its !!{undischarged} assumptions.
  32. If !!a{derivation} of $!A$ from~$\Gamma$ exists, we say that $!A$ is
  33. \emph{!!{derivable}} from~$\Gamma$, or in symbols: $\Gamma \Proves
  34. !A$. If there is !!a{derivation} of~$!A$ in which every assumption is
  35. !!{discharged}, we write~$\Proves !A$.
  36. \end{defn}
  37. \begin{ex}
  38. Every assumption on its own is !!a{derivation}. So, e.g., $!A$ by
  39. itself is !!a{derivation}, and so is $!B$ by itself. We can obtain a
  40. new !!{derivation} from these by applying, say, the $\Intro{\land}$
  41. rule,
  42. \begin{prooftree}
  43. \AxiomC{$!A$}
  44. \AxiomC{$!B$}
  45. \RightLabel{\Intro{\land}}
  46. \BinaryInfC{$!A \land !B$}
  47. \end{prooftree}
  48. These rules are meant to be general: we can replace the $!A$ and~$!B$
  49. in it with any !!{sentence}s, e.g., by $!C$ and~$!D$. Then the
  50. conclusion would be $!C \land !D$, and so
  51. \begin{prooftree}
  52. \AxiomC{$!C$}
  53. \AxiomC{$!D$}
  54. \RightLabel{\Intro{\land}}
  55. \BinaryInfC{$!C \land !D$}
  56. \end{prooftree}
  57. is a correct !!{derivation}. Of course, we can also switch the
  58. assumptions, so that $!D$ plays the role of~$!A$ and $!C$ that
  59. of~$!B$. Thus,
  60. \begin{prooftree}
  61. \AxiomC{$!D$}
  62. \AxiomC{$!C$}
  63. \RightLabel{\Intro{\land}}
  64. \BinaryInfC{$!D \land !C$}
  65. \end{prooftree}
  66. is also a correct !!{derivation}.
  67. We can now apply another rule, say, $\Intro{\lif}$, which allows us to
  68. conclude a conditional and allows us to !!{discharge} any assumption
  69. that is identical to the antecedent of that conditional. So both of
  70. the following would be correct !!{derivation}s:
  71. \begin{prooftree}
  72. \AxiomC{$\Discharge{!C}{1}$}
  73. \AxiomC{$!D$}
  74. \RightLabel{\Intro{\land}}
  75. \BinaryInfC{$!C \land !D$}
  76. \DischargeRule{\Intro{\lif}}{1}
  77. \UnaryInfC{$!C \lif (!C \land !D)$}
  78. \DisplayProof\bottomAlignProof
  79. \AxiomC{$!C$}
  80. \AxiomC{$\Discharge{!D}{1}$}
  81. \RightLabel{\Intro{\land}}
  82. \BinaryInfC{$!C \land !D$}
  83. \DischargeRule{\Intro{\lif}}{1}
  84. \UnaryInfC{$!D \lif (!C \land !D)$}
  85. \end{prooftree}
  86. They show, respectively, that $!D \Proves !C \lif (!C \land !D)$ and
  87. $!C \Proves !D \lif (!C \land !D)$.
  88. Remember that discharging of assumptions is a permission, not a
  89. requirement: we don't have to discharge the assumptions. In
  90. particular, we can apply a rule even if the assumptions are not
  91. present in the !!{derivation}. For instance, the following is legal, even
  92. though there is no assumption~$!A$ to be !!{discharged}:
  93. \begin{prooftree}
  94. \AxiomC{$!B$}
  95. \DischargeRule{\Intro{\lif}}{1}
  96. \UnaryInfC{$!A \lif !B$}
  97. \end{prooftree}
  98. \end{ex}
  99. \end{document}

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

310 lines; SHA-256 ff58b86389a21dbc6f240f49e62d5fca0bdb4d3ba54e0d364792cdcddd34724f. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: proving-things
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{ntd}{pro}}
  8. {\olfileid{pl}{ntd}{pro}}
  9. \olsection{Examples of \usetoken{P}{derivation}}
  10. \begin{ex}
  11. Let's give !!a{derivation} of the !!{sentence} $(!A \land !B) \lif !A$.
  12. We begin by writing the desired conclusion at the bottom of the
  13. !!{derivation}.
  14. \begin{prooftree}
  15. \AxiomC{}
  16. \UnaryInfC{$(!A\land !B) \lif !A$}
  17. \end{prooftree}
  18. Next, we need to figure out what kind of inference could result in
  19. !!a{sentence} of this form. The !!{main operator} of the
  20. conclusion is $\lif$, so we'll try to arrive at the
  21. conclusion using the \Intro{\lif} rule. It is best to write down
  22. the assumptions involved and label the inference rules as you
  23. progress, so it is easy to see whether all assumptions have been
  24. !!{discharged} at the end of the proof.
  25. \begin{prooftree}
  26. \AxiomC{$\Discharge{!A \land !B}{1}$}
  27. \DeduceC{$!A$}
  28. \DischargeRule{\Intro{\lif}}{1}
  29. \UnaryInfC{$(!A\land !B) \lif !A$}
  30. \end{prooftree}
  31. We now need to fill in the steps from the assumption $!A \land !B$ to $!A$.
  32. Since we only have one connective to deal with, $\land$, we must
  33. use the $\land$ elim rule. This gives us the following proof:
  34. \begin{prooftree}
  35. \AxiomC{$\Discharge{!A \land !B}{1}$}
  36. \RightLabel{\Elim{\land}}
  37. \UnaryInfC{$!A$}
  38. \DischargeRule{\Intro{\lif}}{1}
  39. \UnaryInfC{$(!A\land !B) \lif !A$}
  40. \end{prooftree}
  41. We now have a correct !!{derivation} of $(!A \land
  42. !B) \lif !A$.
  43. \end{ex}
  44. \begin{ex}
  45. Now let's give !!a{derivation} of $(\lnot !A \lor !B)
  46. \lif (!A \lif !B)$.
  47. We begin by writing the desired conclusion at the bottom of the
  48. !!{derivation}.
  49. \begin{prooftree}
  50. \AxiomC{}
  51. \UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}
  52. \end{prooftree}
  53. To find a logical rule that could give us this conclusion, we
  54. look at the logical connectives in the conclusion: $\lnot$,
  55. $\lor$, and $\lif$. We only care at the moment about the first
  56. occurrence of $\lif$ because it is the !!{main operator} of the
  57. !!{sentence} in the end-sequent, while $\lnot$, $\lor$ and the second
  58. occurrence of $\lif$ are inside the scope of another connective, so we
  59. will take care of those later. We therefore start with the
  60. \Intro{\lif} rule. A correct application must look like this:
  61. \begin{prooftree}
  62. \AxiomC{$\Discharge{\lnot !A \lor !B}{1}$}
  63. \DeduceC{$!A \lif !B$}
  64. \DischargeRule{\Intro{\lif}}{1}
  65. \UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}
  66. \end{prooftree}
  67. This leaves us with two possibilities to continue. Either we can
  68. keep working from the bottom up and look for another application
  69. of the \Intro{\lif} rule, or we can work from the top down and apply a
  70. \Elim{\lor} rule. Let us apply the latter. We will use the assumption
  71. $\lnot !A \lor !B$ as the leftmost premise of \Elim{\lor}. For a valid
  72. application of \Elim{\lor}, the other two premises must be identical
  73. to the conclusion $!A \lif !B$, but each may be derived in turn from
  74. another assumption, namely one of the two disjuncts of $\lnot !A \lor !B$.
  75. So our !!{derivation} will look like this:
  76. \begin{prooftree}
  77. \AxiomC{$\Discharge{\lnot !A \lor !B}{1}$}
  78. \AxiomC{$\Discharge{\lnot !A}{2}$}
  79. \DeduceC{$!A \lif !B$}
  80. \AxiomC{$\Discharge{!B}{2}$}
  81. \DeduceC{$!A \lif !B$}
  82. \DischargeRule{\Elim{\lor}}{2}
  83. \TrinaryInfC{$!A \lif !B$}
  84. \DischargeRule{\Intro{\lif}}{1}
  85. \UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}
  86. \end{prooftree}
  87. In each of the two branches on the right, we want to !!{derive} $!A
  88. \lif !B$, which is best done using \Intro{\lif}.
  89. \begin{prooftree}
  90. \AxiomC{$\Discharge{\lnot !A \lor !B}{1}$}
  91. \AxiomC{$\Discharge{\lnot !A}{2}, \Discharge{!A}{3}$}
  92. \DeduceC{$!B$}
  93. \DischargeRule{\Intro{\lif}}{3}
  94. \UnaryInfC{$!A \lif !B$}
  95. \AxiomC{$\Discharge{!B}{2}, \Discharge{!A}{4}$}
  96. \DeduceC{$!B$}
  97. \DischargeRule{\Intro{\lif}}{4}
  98. \UnaryInfC{$!A \lif !B$}
  99. \DischargeRule{\Elim{\lor}}{2}
  100. \TrinaryInfC{$!A \lif !B$}
  101. \DischargeRule{\Intro{\lif}}{1}
  102. \UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}
  103. \end{prooftree}
  104. For the two missing parts of the !!{derivation}, we need
  105. !!{derivation}s of $!B$ from $\lnot !A$ and $!A$ in the middle, and
  106. from $!A$ and $!B$ on the left. Let's take the former first. $\lnot
  107. !A$ and $!A$ are the two premises of \Elim{\lnot}:
  108. \begin{prooftree}
  109. \AxiomC{$\Discharge{\lnot !A}{2}$}
  110. \AxiomC{$\Discharge{!A}{3}$}
  111. \RightLabel{\Elim{\lnot}}
  112. \BinaryInfC{$\lfalse$}
  113. \DeduceC{$!B$}
  114. \end{prooftree}
  115. By using \FalseInt, we can obtain $!B$ as a conclusion and
  116. complete the branch.
  117. \begin{prooftree}
  118. \AxiomC{$\Discharge{\lnot !A \lor !B}{1}$}
  119. \AxiomC{$\Discharge{\lnot !A}{2}$}
  120. \AxiomC{$\Discharge{!A}{3}$}
  121. \RightLabel{\Intro{\lfalse}}
  122. \BinaryInfC{$\lfalse$}
  123. \RightLabel{\FalseInt}
  124. \UnaryInfC{$!B$}
  125. \DischargeRule{\Intro{\lif}}{3}
  126. \UnaryInfC{$!A \lif !B$}
  127. \AxiomC{$\Discharge{!B}{2}, \Discharge{!A}{4}$}
  128. \DeduceC{$!B$}
  129. \DischargeRule{\Intro{\lif}}{4}
  130. \UnaryInfC{$!A \lif !B$}
  131. \DischargeRule{\Elim{\lor}}{2}
  132. \TrinaryInfC{$!A \lif !B$}
  133. \DischargeRule{\Intro{\lif}}{1}
  134. \UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}
  135. \end{prooftree}
  136. Let's now look at the rightmost branch. Here it's important to
  137. realize that the definition of !!{derivation} \emph{allows assumptions
  138. to be discharged} but \emph{does not require} them to be. In other
  139. words, if we can derive $!B$ from one of the assumptions $!A$ and $!B$
  140. without using the other, that's ok. And to !!{derive} $!B$ from~$!B$
  141. is trivial: $!B$ by itself is such !!a{derivation}, and no inferences
  142. are needed. So we can simply delete the assumption~$!A$.
  143. \begin{prooftree}
  144. \AxiomC{$\Discharge{\lnot !A \lor !B}{1}$}
  145. \AxiomC{$\Discharge{\lnot !A}{2}$}
  146. \AxiomC{$\Discharge{!A}{3}$}
  147. \RightLabel{\Elim{\lnot}}
  148. \BinaryInfC{$\lfalse$}
  149. \RightLabel{\FalseInt}
  150. \UnaryInfC{$!B$}
  151. \DischargeRule{\Intro{\lif}}{3}
  152. \UnaryInfC{$!A \lif !B$}
  153. \AxiomC{$\Discharge{!B}{2}$}
  154. \RightLabel{\Intro{\lif}}
  155. \UnaryInfC{$!A \lif !B$}
  156. \DischargeRule{\Elim{\lor}}{2}
  157. \TrinaryInfC{$!A \lif !B$}
  158. \DischargeRule{\Intro{\lif}}{1}
  159. \UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}
  160. \end{prooftree}
  161. Note that in the finished !!{derivation}, the rightmost \Intro{\lif}
  162. inference does not actually discharge any assumptions.
  163. \end{ex}
  164. \begin{ex}
  165. So far we have not needed the \FalseCl{} rule. It is special in that
  166. it allows us to discharge an assumption that isn't a sub-!!{formula} of
  167. the conclusion of the rule. It is closely related to the \FalseInt{}
  168. rule. In fact, the \FalseInt{} rule is a special case of the
  169. \FalseCl{} rule---there is a logic called ``intuitionistic logic'' in
  170. which only \FalseInt{} is allowed. The \FalseCl{} rule is a last
  171. resort when nothing else works. For instance, suppose we want to
  172. !!{derive} $!A \lor \lnot !A$. Our usual strategy would be to attempt
  173. to !!{derive} $!A \lor \lnot !A$ using $\Intro{\lor}$. But this would
  174. require us to !!{derive} either $!A$ or $\lnot !A$ from no
  175. assumptions, and this can't be done. \FalseCl{} to the rescue!
  176. \begin{prooftree}
  177. \AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}
  178. \DeduceC{$\lfalse$}
  179. \DischargeRule{\FalseCl}{1}
  180. \UnaryInfC{$!A \lor \lnot !A$}
  181. \end{prooftree}
  182. Now we're looking for !!a{derivation} of $\lfalse$ from $\lnot(!A \lor
  183. \lnot !A)$. Since $\lfalse$ is the conclusion of $\Elim{\lnot}$ we
  184. might try that:
  185. \begin{prooftree}
  186. \AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}
  187. \DeduceC{$\lnot !A$}
  188. \AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}
  189. \DeduceC{$!A$}
  190. \RightLabel{\Elim{\lnot}}
  191. \BinaryInfC{$\lfalse$}
  192. \DischargeRule{\FalseCl}{1}
  193. \UnaryInfC{$!A \lor \lnot !A$}
  194. \end{prooftree}
  195. Our strategy for finding !!a{derivation} of~$\lnot !A$ calls for an
  196. application of~$\Intro{\lnot}$:
  197. \begin{prooftree}
  198. \AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}, \Discharge{!A}{2}$}
  199. \DeduceC{$\lfalse$}
  200. \DischargeRule{\Intro{\lnot}}{2}
  201. \UnaryInfC{$\lnot !A$}
  202. \AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}
  203. \DeduceC{$!A$}
  204. \RightLabel{\Elim{\lnot}}
  205. \BinaryInfC{$\lfalse$}
  206. \DischargeRule{\FalseCl}{1}
  207. \UnaryInfC{$!A \lor \lnot !A$}
  208. \end{prooftree}
  209. Here, we can get $\lfalse$ easily by applying $\Elim{\lnot}$ to the
  210. assumption $\lnot(!A \lor \lnot !A)$ and $!A \lor \lnot !A$ which
  211. follows from our new assumption $!A$ by~$\Intro{\lor}$:
  212. \begin{prooftree}
  213. \AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}
  214. \AxiomC{$\Discharge{!A}{2}$}
  215. \RightLabel{\Intro{\lor}}
  216. \UnaryInfC{$!A \lor \lnot !A$}
  217. \RightLabel{\Elim{\lnot}}
  218. \BinaryInfC{$\lfalse$}
  219. \DischargeRule{\Intro{\lnot}}{2}
  220. \UnaryInfC{$\lnot !A$}
  221. \AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}
  222. \DeduceC{$!A$}
  223. \RightLabel{\Elim{\lnot}}
  224. \BinaryInfC{$\lfalse$}
  225. \DischargeRule{\FalseCl}{1}
  226. \UnaryInfC{$!A \lor \lnot !A$}
  227. \end{prooftree}
  228. On the right side we use the same strategy, except we get $!A$ by~\FalseCl:
  229. \begin{prooftree}
  230. \AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}
  231. \AxiomC{$\Discharge{!A}{2}$}
  232. \RightLabel{\Intro{\lor}}
  233. \UnaryInfC{$!A \lor \lnot !A$}
  234. \RightLabel{\Elim{\lnot}}
  235. \BinaryInfC{$\lfalse$}
  236. \DischargeRule{\Intro{\lnot}}{2}
  237. \UnaryInfC{$\lnot !A$}
  238. \AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}
  239. \AxiomC{$\Discharge{\lnot !A}{3}$}
  240. \RightLabel{\Intro{\lor}}
  241. \UnaryInfC{$!A \lor \lnot !A$}
  242. \RightLabel{\Elim{\lnot}}
  243. \BinaryInfC{$\lfalse$}
  244. \DischargeRule{\FalseCl}{3}
  245. \UnaryInfC{$!A$}
  246. \RightLabel{\Elim{\lnot}}
  247. \BinaryInfC{$\lfalse$}
  248. \DischargeRule{\FalseCl}{1}
  249. \UnaryInfC{$!A \lor \lnot !A$}
  250. \end{prooftree}
  251. \end{ex}
  252. \begin{prob}
  253. Give !!{derivation}s that show the following:
  254. \begin{enumerate}
  255. \item $!A \land (!B \land !C) \Proves (!A \land !B) \land !C$.
  256. \item $!A \lor (!B \lor !C) \Proves (!A \lor !B) \lor !C$.
  257. \item $!A \lif (!B \lif !C) \Proves !B \lif (!A \lif !C)$.
  258. \item $!A \Proves \lnot\lnot !A$.
  259. \end{enumerate}
  260. \end{prob}
  261. \begin{prob}
  262. Give !!{derivation}s that show the following:
  263. \begin{enumerate}
  264. \item $(!A \lor !B) \lif !C \Proves !A \lif !C$.
  265. \item $(!A \lif !C) \land (!B \lif !C) \Proves (!A \lor !B) \lif !C$.
  266. \item $\Proves \lnot(!A \land \lnot !A)$.
  267. \item $!B \lif !A \Proves \lnot !A \lif \lnot !B$.
  268. \item $\Proves (!A \lif \lnot !A) \lif \lnot !A$.
  269. \item $\Proves \lnot(!A \lif !B) \lif \lnot !B$.
  270. \item $!A \lif !C \Proves \lnot (!A \land \lnot !C)$.
  271. \item $!A \land \lnot !C \Proves \lnot (!A \lif !C)$.
  272. \item $!A \lor !B, \lnot !B \Proves !A$.
  273. \item $\lnot !A \lor \lnot !B \Proves \lnot(!A \land !B)$.
  274. \item $\Proves (\lnot !A \land \lnot !B) \lif\lnot(!A \lor !B)$.
  275. \item $\Proves \lnot(!A \lor !B) \lif (\lnot !A \land \lnot !B)$.
  276. \end{enumerate}
  277. \end{prob}
  278. \begin{prob}
  279. Give !!{derivation}s that show the following:
  280. \begin{enumerate}
  281. \item $\lnot(!A \lif !B) \Proves !A$.
  282. \item $\lnot(!A \land !B) \Proves \lnot !A \lor \lnot !B$.
  283. \item $!A \lif !B \Proves \lnot !A \lor !B$.
  284. \item $\Proves \lnot \lnot !A \lif !A$.
  285. \item $!A \lif !B, \lnot !A \lif !B \Proves !B$.
  286. \item $(!A \land !B) \lif !C \Proves (!A \lif !C) \lor (!B \lif !C)$.
  287. \item $(!A \lif !B) \lif !A \Proves !A$.
  288. \item $\Proves (!A \lif !B) \lor (!B \lif !C)$.
  289. \end{enumerate}
  290. (These all require the $\FalseCl$~rule.)
  291. \end{prob}
  292. \end{document}

content/first-order-logic/natural-deduction/proving-things-quant.tex

255 lines; SHA-256 6f49b930a86f60a1cca318d70259378f7bc6b5ebb76f307665c4eb4363e8235f. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: proving-things-quant
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{ntd}{prq}
  7. \olsection{\usetoken{P}{derivation} with Quantifiers}
  8. \begin{ex}
  9. When dealing with quantifiers, we have to make sure not to violate the
  10. eigenvariable condition, and sometimes this requires us to play around
  11. with the order of carrying out certain inferences. In general, it
  12. helps to try and take care of rules subject to the eigenvariable
  13. condition first (they will be lower down in the finished proof).
  14. Let's see how we'd give !!a{derivation} of the !!{formula}
  15. $\lexists[x][\lnot !A(x)] \lif \lnot \lforall[x][!A(x)]$.
  16. Starting as usual, we write
  17. \begin{prooftree}
  18. \AxiomC{}
  19. \UnaryInfC{$\lexists[x][\lnot !A(x)]\lif \lnot \lforall[x][!A(x)]$}
  20. \end{prooftree}
  21. We start by writing down what it would take to justify that last step
  22. using the \Intro{\lif} rule.
  23. \begin{prooftree}
  24. \AxiomC{$\Discharge{\lexists[x][\lnot !A(x)]}{1}$}
  25. \DeduceC{$\lnot \lforall[x][!A(x)]$}
  26. \DischargeRule{\Intro{\lif}}{1}
  27. \UnaryInfC{$\lexists[x][\lnot !A(x)]\lif \lnot \lforall[x][!A(x)]$}
  28. \end{prooftree}
  29. Since there is no obvious rule to apply to $\lnot \lforall[x][!A(x)]$,
  30. we will proceed by setting up the !!{derivation} so we can use the
  31. \Elim{\lexists} rule. Here we must pay attention to the eigenvariable
  32. condition, and choose a constant that does not appear in
  33. $\lexists[x][!A(x)]$ or any assumptions that it depends on.
  34. (Since no !!{constant}s appear, however, any choice will do fine.)
  35. \begin{prooftree}
  36. \AxiomC{$\Discharge{\lexists[x][\lnot !A(x)]}{1}$}
  37. \AxiomC{$\Discharge{\lnot !A(a)}{2}$}
  38. \DeduceC{$\lnot \lforall[x][!A(x)]$}
  39. \DischargeRule{\Elim{\lexists}}{2}
  40. \BinaryInfC{$\lnot \lforall[x][!A(x)]$}
  41. \DischargeRule{\Intro{\lif}}{1}
  42. \UnaryInfC{$\lexists[x][\lnot !A(x)] \lif \lnot \lforall[x][!A(x)]$}
  43. \end{prooftree}
  44. In order to derive $\lnot \lforall[x][!A(x)]$, we will attempt to use
  45. the \Intro{\lnot} rule: this requires that we derive a contradiction,
  46. possibly using $\lforall[x][!A(x)]$ as an additional assumption. Of
  47. course, this contradiction may involve the assumption $\lnot !A(a)$
  48. which will be discharged by the \Elim{\lexists} inference. We can set it
  49. up as follows:
  50. \begin{prooftree}
  51. \AxiomC{$\Discharge{\lexists[x][\lnot !A(x)]}{1}$}
  52. \AxiomC{$\Discharge{\lnot !A(a)}{2}, \Discharge{\lforall[x][!A(x)]}{3}$}
  53. \DeduceC{$\lfalse$}
  54. \DischargeRule{\Intro{\lnot}}{3}
  55. \UnaryInfC{$\lnot \lforall[x][!A(x)]$}
  56. \DischargeRule{\Elim{\lexists}}{2}
  57. \BinaryInfC{$\lnot \lforall[x][!A(x)]$}
  58. \DischargeRule{\Intro{\lif}}{1}
  59. \UnaryInfC{$\lexists[x][\lnot !A(x)]\lif \lnot \lforall[x][!A(x)]$}
  60. \end{prooftree}
  61. It looks like we are close to getting a contradiction. The easiest
  62. rule to apply is the \Elim{\lforall}, which has no eigenvariable
  63. conditions. Since we can use any term we want to replace the
  64. universally quantified~$x$, it makes the most sense to continue
  65. using~$a$ so we can reach a contradiction.
  66. \begin{prooftree}
  67. \AxiomC{$\Discharge{\lexists[x][\lnot !A(x)]}{1}$}
  68. \AxiomC{$\Discharge{\lnot !A(a)}{2}$}
  69. \AxiomC{$\Discharge{\lforall[x][!A(x)]}{3}$}
  70. \RightLabel{\Elim{\lforall}}
  71. \UnaryInfC{$!A(a)$}
  72. \RightLabel{\Elim{\lnot}}
  73. \BinaryInfC{$\lfalse$}
  74. \DischargeRule{\Intro{\lnot}}{3}
  75. \UnaryInfC{$\lnot \lforall[x][!A(x)]$}
  76. \DischargeRule{\Elim{\lexists}}{2}
  77. \BinaryInfC{$\lnot \lforall[x][!A(x)]$}
  78. \DischargeRule{\Intro{\lif}}{1}
  79. \UnaryInfC{$\lexists[x][\lnot !A(x)]\lif \lnot \lforall[x][!A(x)]$}
  80. \end{prooftree}
  81. It is important, especially when dealing with quantifiers, to double
  82. check at this point that the eigenvariable condition has not been
  83. violated. Since the only rule we applied that is subject to the
  84. eigenvariable condition was \Elim{\exists}, and the eigenvariable~$a$
  85. does not occur in any assumptions it depends on, this is a
  86. correct !!{derivation}.
  87. \end{ex}
  88. \begin{ex}
  89. Sometimes we may derive !!a{formula} from other !!{formula}s.
  90. In these cases, we may have undischarged assumptions. It is
  91. important to keep track of our assumptions as well
  92. as the end goal.
  93. Let's see how we'd give !!a{derivation} of the !!{formula}
  94. $\lexists[x][!C(x,b)]$ from the assumptions $\lexists[x][(!A(x)
  95. \land !B(x))]$ and $\lforall[x][(!B(x) \lif !C(x,b))]$.
  96. Starting as usual, we write the conclusion at the
  97. bottom.
  98. \begin{prooftree}
  99. \AxiomC{}
  100. \UnaryInfC{$\lexists[x][!C(x,b)]$}
  101. \end{prooftree}
  102. We have two premises to work with. To use the first, i.e., try to find
  103. !!a{derivation} of $\lexists[x][!C(x, b)]$ from $\lexists[x][(!A(x)
  104. \land !B(x))]$ we would use the \Elim{\lexists} rule. Since it has
  105. an eigenvariable condition, we will apply that rule first. We get the
  106. following:
  107. \begin{prooftree}
  108. \AxiomC{$\lexists[x][(!A(x) \land !B(x))]$}
  109. \AxiomC{$\Discharge{!A(a) \land !B(a)}{1}$}
  110. \DeduceC{$\lexists[x][!C(x,b)]$}
  111. \DischargeRule{\Elim{\lexists}}{1}
  112. \BinaryInfC{$\lexists[x][!C(x,b)]$}
  113. \end{prooftree}
  114. The two assumptions we are working with share~$!B$. It may be useful
  115. at this point to apply \Elim{\land} to separate out~$!B(a)$.
  116. \begin{prooftree}
  117. \AxiomC{$\lexists[x][(!A(x) \land !B(x)])$}
  118. \AxiomC{$\Discharge{!A(a)
  119. \land !B(a)}{1}$}
  120. \RightLabel{\Elim{\land}}
  121. \UnaryInfC{$!B(a)$}
  122. \DeduceC{$\lexists[x][!C(x,b)]$}
  123. \DischargeRule{\Elim{\lexists}}{1}
  124. \BinaryInfC{$\lexists[x][!C(x,b)]$}
  125. \end{prooftree}
  126. The second assumption we have to work with is~$\lforall[x][(!B(x) \lif
  127. !C(x,b))]$. Since there is no eigenvariable condition we can
  128. instantiate $x$ with the !!{constant}~$a$ using \Elim{\lforall} to get
  129. $!B(a) \lif !C(a, b)$. We now have both $!B(a) \lif !C(a,b)$ and
  130. $!B(a)$. Our next move should be a straightforward application of the
  131. \Elim{\lif} rule.
  132. \begin{prooftree}
  133. \AxiomC{$\lexists[x][(!A(x) \land !B(x))]$}
  134. \AxiomC{$\lforall[x][(!B(x) \lif !C(x,b))]$}
  135. \RightLabel{\Elim{\lforall}}
  136. \UnaryInfC{$!B(a) \lif !C(a,b)$}
  137. \AxiomC{$\Discharge{!A(a)
  138. \land !B(a)}{1}$}
  139. \RightLabel{\Elim{\land}}
  140. \UnaryInfC{$!B(a)$}
  141. \RightLabel{\Elim{\lif}}
  142. \BinaryInfC{$!C(a,b)$}
  143. \DeduceC{$\lexists[x][!C(x,b)]$}
  144. \DischargeRule{\Elim{\lexists}}{1}
  145. \insertBetweenHyps{\hspace{-5em}}
  146. \BinaryInfC{$\lexists[x][!C(x,b)]$}
  147. \end{prooftree}
  148. We are so close!{} One application of \Intro{\lexists} and we
  149. have reached our goal.
  150. \begin{prooftree}
  151. \AxiomC{$\lexists[x][(!A(x) \land !B(x))]$}
  152. \AxiomC{$\lforall[x][(!B(x) \lif !C(x,b))]$}
  153. \RightLabel{\Elim{\lforall}}
  154. \UnaryInfC{$!B(a) \lif !C(a,b)$}
  155. \AxiomC{$\Discharge{!A(a)
  156. \land !B(a)}{1}$}
  157. \RightLabel{\Elim{\land}}
  158. \UnaryInfC{$!B(a)$}
  159. \RightLabel{\Elim{\lif}}
  160. \BinaryInfC{$!C(a,b)$}
  161. \RightLabel{\Intro{\lexists}}
  162. \UnaryInfC{$\lexists[x][!C(x,b)]$}
  163. \DischargeRule{\Elim{\lexists}}{1}
  164. \insertBetweenHyps{\hspace{-5em}}
  165. \BinaryInfC{$\lexists[x][!C(x,b)]$}
  166. \end{prooftree}
  167. Since we ensured at each step that the eigenvariable
  168. conditions were not violated, we can be confident that this
  169. is a correct !!{derivation}.
  170. \end{ex}
  171. \begin{ex}
  172. Give !!a{derivation} of the !!{formula}
  173. $\lnot\lforall[x][!A(x)]$ from the assumptions $\lforall[x][!A(x)]
  174. \lif \lexists[y][!B(y)]$ and $\lnot\lexists[y][!B(y)]$.
  175. Starting as usual, we write the target !!{formula} at the bottom.
  176. \begin{prooftree}
  177. \AxiomC{}
  178. \UnaryInfC{$\lnot\lforall[x][!A(x)]$}
  179. \end{prooftree}
  180. The last line of the !!{derivation} is a negation, so let's try using
  181. \Intro{\lnot}. This will require that we figure out how to !!{derive}
  182. a contradiction.
  183. \begin{prooftree}
  184. \AxiomC{$\Discharge{\lforall[x][!A(x)]}{1}$}
  185. \DeduceC{$\lfalse$}
  186. \DischargeRule{\Intro{\lnot}}{1}
  187. \UnaryInfC{$\lnot\lforall[x][!A(x)]$}
  188. \end{prooftree}
  189. So far so good. We can use \Elim{\lforall} but it's not obvious
  190. if that will help us get to our goal. Instead, let's use one of our
  191. assumptions. $\lforall[x][!A(x)] \lif \lexists[y][!B(y)]$ together
  192. with $\lforall[x][!A(x)]$ will allow us to use the \Elim{\lif} rule.
  193. \begin{prooftree}
  194. \AxiomC{$\lforall[x][!A(x)] \lif \lexists[y][!B(y)]$}
  195. \AxiomC{$\Discharge{\lforall[x][!A(x)]}{1}$}
  196. \RightLabel{\Elim{\lif}}
  197. \BinaryInfC{$\lexists[y][!B(y)]$}
  198. \DeduceC{$\lfalse$}
  199. \DischargeRule{\Intro{\lnot}}{1}
  200. \UnaryInfC{$\lnot\lforall[x][!A(x)]$}
  201. \end{prooftree}
  202. We now have one final assumption to work with,
  203. and it looks like this will help us reach a contradiction
  204. by using \Elim{\lnot}.
  205. \begin{prooftree}
  206. \AxiomC{$\lnot\lexists[y][!B(y)]$}
  207. \AxiomC{$\lforall[x][!A(x)] \lif \lexists[y][!B(y)]$}
  208. \AxiomC{$\Discharge{\lforall[x][!A(x)]}{1}$}
  209. \RightLabel{\Elim{\lif}}
  210. \BinaryInfC{$\lexists[y][!B(y)]$}
  211. \RightLabel{\Elim{\lnot}}
  212. \BinaryInfC{$\lfalse$}
  213. \DischargeRule{\Intro{\lnot}}{1}
  214. \UnaryInfC{$\lnot\lforall[x][!A(x)]$}
  215. \end{prooftree}
  216. \end{ex}
  217. \begin{prob}
  218. Give !!{derivation}s that show the following:
  219. \begin{enumerate}
  220. \item $\Proves (\lforall[x][!A(x)] \land \lforall[y][!B(y)]) \lif
  221. \lforall[z][(!A(z) \land !B(z))]$.
  222. \item $\Proves (\lexists[x][!A(x)] \lor \lexists[y][!B(y)]) \lif
  223. \lexists[z][(!A(z) \lor !B(z))]$.
  224. \item $\lforall[x][(!A(x) \lif !B)] \Proves \lexists[y][!A(y)] \lif !B$.
  225. \item $\lforall[x][\lnot !A(x)] \Proves \lnot\lexists[x][!A(x)]$.
  226. \item $\Proves \lnot\lexists[x][!A(x)] \lif \lforall[x][\lnot !A(x)]$.
  227. \item $\Proves \lnot\lexists[x][\lforall[y][((!A(x,y) \lif \lnot
  228. !A(y,y)) \land (\lnot !A(y,y) \lif !A(x,y)))]]$.
  229. \end{enumerate}
  230. \end{prob}
  231. \begin{prob}
  232. Give !!{derivation}s that show the following:
  233. \begin{enumerate}
  234. \item $\Proves \lnot\lforall[x][!A(x)] \lif \lexists[x][\lnot!A(x)]$.
  235. \item $(\lforall[x][!A(x)] \lif !B) \Proves \lexists[y][(!A(y) \lif !B)]$.
  236. \item $\Proves \lexists[x][(!A(x) \lif \lforall[y][!A(y)])]$.
  237. \end{enumerate}
  238. (These all require the $\FalseCl$~rule.)
  239. \end{prob}
  240. \end{document}

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

159 lines; SHA-256 7e05743251dd0c5071685193a98c28baea1c77b06836f11e3f3e3aa6a6bd9198. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: proof-theoretic-notions
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{ntd}{ptn}}
  8. {\olfileid{pl}{ntd}{ptn}}
  9. \olsection{Proof-Theoretic Notions}
  10. \begin{editorial}
  11. This section collects the definitions the provability relation
  12. and consistency for natural deduction.
  13. \end{editorial}
  14. \begin{explain}
  15. Just as we've defined a number of important semantic notions
  16. (validity, entailment, satisfiability), we now define corresponding
  17. \emph{proof-theoretic notions}. These are not defined by appeal to
  18. satisfaction of !!{sentence}s in !!{structure}s, but by appeal to the
  19. !!{derivability} or !!{nonderivability} of certain !!{sentence}s from
  20. others. It was an important discovery that these notions coincide.
  21. That they do is the content of the \emph{soundness} and
  22. \emph{completeness theorems}.
  23. \end{explain}
  24. \begin{defn}[Theorems]
  25. A !!{sentence}~$!A$ is a \emph{theorem} if there is !!a{derivation}
  26. of~$!A$ in natural deduction in which all assumptions are
  27. !!{discharged}. We write $\Proves !A$ if $!A$ is a theorem and
  28. $\Proves/ !A$ if it is not.
  29. \end{defn}
  30. \begin{defn}[!!^{derivability}]
  31. !!^a{sentence} $!A$ is \emph{!!{derivable} from} a set of
  32. !!{sentence}s~$\Gamma$, $\Gamma \Proves !A$, if there is a
  33. !!{derivation} with conclusion~$!A$ and in which every assumption
  34. is either !!{discharged} or is in~$\Gamma$. If $!A$ is not
  35. !!{derivable} from $\Gamma$ we write $\Gamma \Proves/ !A$.
  36. \end{defn}
  37. \begin{defn}[Consistency]
  38. A set of !!{sentence}s~$\Gamma$ is \emph{inconsistent} iff $\Gamma
  39. \Proves \lfalse$. If $\Gamma$ is not inconsistent, i.e., if
  40. $\Gamma \Proves/ \lfalse$, we say it is \emph{consistent}.
  41. \end{defn}
  42. \begin{prop}[Reflexivity]
  43. \ollabel{prop:reflexivity}
  44. If $!A \in \Gamma$, then $\Gamma \Proves !A$.
  45. \end{prop}
  46. \begin{proof}
  47. The assumption $!A$ by itself is !!a{derivation} of~$!A$ where every
  48. !!{undischarged} assumption (i.e., $!A$) is in~$\Gamma$.
  49. \end{proof}
  50. \begin{prop}[Monotonicity]
  51. \ollabel{prop:monotonicity}
  52. If $\Gamma \subseteq \Delta$ and $\Gamma \Proves !A$, then $\Delta
  53. \Proves !A$.
  54. \end{prop}
  55. \begin{proof}
  56. Any !!{derivation} of $!A$ from $\Gamma$ is also !!a{derivation} of
  57. $!A$ from~$\Delta$.
  58. \end{proof}
  59. \begin{prop}[Transitivity]
  60. \ollabel{prop:transitivity}
  61. If $\Gamma \Proves !A$ and $\{!A\} \cup \Delta \Proves
  62. !B$, then $\Gamma \cup \Delta \Proves !B$.
  63. \end{prop}
  64. \begin{proof}
  65. If $\Gamma \Proves !A$, there is !!a{derivation}~$\delta_0$ of~$!A$
  66. with all !!{undischarged} assumptions in~$\Gamma$. If $\{!A\} \cup
  67. \Delta \Proves !B$, then there is !!a{derivation}~$\delta_1$ of~$!B$
  68. with all !!{undischarged} assumptions in~$\{!A\} \cup \Delta$.
  69. Now consider:
  70. \begin{prooftree}
  71. \AxiomC{$\Delta, \Discharge{!A}{1}$}
  72. \RightLabel{$\delta_1$}
  73. \DeduceC{$!B$}
  74. \DischargeRule{\Intro{\lif}}{1}
  75. \UnaryInfC{$!A \lif !B$}
  76. \AxiomC{$\Gamma$}
  77. \RightLabel{$\delta_0$}
  78. \DeduceC{$!A$}
  79. \RightLabel{\Elim{\lif}}
  80. \BinaryInfC{$!B$}
  81. \end{prooftree}
  82. The !!{undischarged} assumptions are now all among $\Gamma \cup
  83. \Delta$, so this shows $\Gamma \cup \Delta \Proves !B$.
  84. \end{proof}
  85. When $\Gamma = \{!A_1, !A_2, \ldots, !A_k\}$ is a finite set we may use the simplified notation $!A_1,!A_2,\ldots,!A_k \Proves !B$ for $\Gamma \Proves !B$, in particular $!A \Proves !B$ means that $\{!A\} \Proves !B$.
  86. Note that if $\Gamma \Proves !A$ and $!A
  87. \Proves !B$, then $\Gamma \Proves !B$. It follows also that if $!A_1,
  88. \dots, !A_n \Proves !B$ and $\Gamma \Proves !A_i$ for each~$i$, then
  89. $\Gamma \Proves !B$.
  90. \begin{prop}
  91. \ollabel{prop:incons}
  92. The following are equivalent.
  93. \begin{enumerate}
  94. \item \( \Gamma \) is inconsistent.
  95. \item \( \Gamma \Proves {!A} \) for every !!{sentence}~\( {!A} \).
  96. \item \( \Gamma \Proves {!A} \) and \( \Gamma \Proves \lnot {!A} \) for some !!{sentence}~\( {!A} \).
  97. \end{enumerate}
  98. \end{prop}
  99. \begin{proof}
  100. Exercise.
  101. \end{proof}
  102. \tagprob{FOL}
  103. \begin{prob}
  104. Prove \olref[fol][ntd][ptn]{prop:incons}
  105. \end{prob}
  106. \tagendprob
  107. \tagprob{notFOL}
  108. \begin{prob}
  109. Prove \olref[pl][ntd][ptn]{prop:incons}
  110. \end{prob}
  111. \tagendprob
  112. \begin{prop}[Compactness]
  113. \ollabel{prop:proves-compact}
  114. \begin{enumerate}
  115. \item If $\Gamma \Proves !A$ then there is a finite subset $\Gamma_0
  116. \subseteq \Gamma$ such that $\Gamma_0 \Proves !A$.
  117. \item If every finite subset of~$\Gamma$ is
  118. consistent, then $\Gamma$ is consistent.
  119. \end{enumerate}
  120. \end{prop}
  121. \begin{proof}
  122. \begin{enumerate}
  123. \item If $\Gamma \Proves !A$, then there is
  124. !!a{derivation}~$\delta$ of~$!A$ from~$\Gamma$. Let $\Gamma_0$
  125. be the set of !!{undischarged} assumptions of~$\delta$. Since
  126. any !!{derivation} is finite, $\Gamma_0$ can only contain
  127. finitely many !!{sentence}s. So, $\delta$ is !!a{derivation}
  128. of~$!A$ from a finite~$\Gamma_0 \subseteq \Gamma$.
  129. \item This is the contrapositive of (1) for the special case $!A
  130. \ident \lfalse$.
  131. \end{enumerate}
  132. \end{proof}
  133. \end{document}

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

131 lines; SHA-256 9d967013e14c7f911bf612ddab65b22a2e5f8d90f182926741c0bf7cab5076bc. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: provability-consistency
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{ntd}{prv}}
  8. {\olfileid{pl}{ntd}{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. Let the !!{derivation} of~$!A$ from~$\Gamma$ be~$\delta_1$ and the
  19. !!{derivation} of~$\lfalse$ from $\Gamma \cup \{!A\}$
  20. be~$\delta_2$. We can then !!{derive}:
  21. \begin{prooftree}
  22. \AxiomC{$\Gamma, \Discharge{!A}{1}$}
  23. \RightLabel{$\delta_2$}
  24. \DeduceC{$\lfalse$}
  25. \DischargeRule{\Intro{\lnot}}{1}
  26. \UnaryInfC{$\lnot !A$}
  27. \AxiomC{$\Gamma$}
  28. \RightLabel{$\delta_1$}
  29. \DeduceC{$!A$}
  30. \RightLabel{\Elim{\lnot}}
  31. \BinaryInfC{$\lfalse$}
  32. \end{prooftree}
  33. In the new !!{derivation}, the assumption~$!A$ is !!{discharged}, so it is
  34. !!a{derivation} from~$\Gamma$.
  35. \end{proof}
  36. \begin{prop}
  37. \ollabel{prop:prov-incons}
  38. $\Gamma \Proves !A$ iff $\Gamma \cup \{\lnot !A\}$ is inconsistent.
  39. \end{prop}
  40. \begin{proof}
  41. First suppose $\Gamma \Proves !A$, i.e., there is
  42. !!a{derivation}~$\delta_0$ of~$!A$ from !!{undischarged}
  43. assumptions~$\Gamma$. We obtain !!a{derivation} of $\lfalse$ from
  44. $\Gamma \cup \{\lnot !A\}$ as follows:
  45. \begin{prooftree}
  46. \AxiomC{$\lnot !A$}
  47. \AxiomC{$\Gamma$}
  48. \RightLabel{$\delta_0$}
  49. \DeduceC{$!A$}
  50. \RightLabel{\Elim{\lnot}}
  51. \BinaryInfC{$\lfalse$}
  52. \end{prooftree}
  53. Now assume $\Gamma \cup \{\lnot !A\}$ is inconsistent, and let
  54. $\delta_1$ be the corresponding !!{derivation} of~$\lfalse$ from
  55. !!{undischarged} assumptions in~$\Gamma \cup \{\lnot !A\}$. We obtain
  56. !!a{derivation} of~$!A$ from~$\Gamma$ alone by using~$\FalseCl$:
  57. \begin{prooftree}
  58. \AxiomC{$\Gamma, \Discharge{\lnot !A}{1}$}
  59. \RightLabel{$\delta_1$}
  60. \DeduceC{$\lfalse$}
  61. \RightLabel{\FalseCl}
  62. \DischargeRule{\FalseCl}{1}
  63. \UnaryInfC{$!A$}
  64. \end{prooftree}
  65. \end{proof}
  66. \begin{prob}
  67. Prove that $\Gamma \Proves \lnot !A$ iff $\Gamma \cup \{!A\}$ is
  68. inconsistent.
  69. \end{prob}
  70. \begin{prop}\ollabel{prop:explicit-inc}
  71. If $\Gamma \Proves !A$ and $\lnot !A \in \Gamma$, then $\Gamma$ is
  72. inconsistent.
  73. \end{prop}
  74. \begin{proof}
  75. Suppose $\Gamma \Proves !A$ and $\lnot !A \in \Gamma$. Then there
  76. is !!a{derivation}~$\delta$ of~$!A$ from~$\Gamma$. Consider this
  77. simple application of the $\Elim{\lnot}$ rule:
  78. \begin{prooftree}
  79. \AxiomC{$\lnot !A$}
  80. \AxiomC{$\Gamma$}
  81. \RightLabel{$\delta$}
  82. \DeduceC{$!A$}
  83. \RightLabel{\Elim{\lnot}}
  84. \BinaryInfC{$\lfalse$}
  85. \end{prooftree}
  86. Since $\lnot !A \in \Gamma$, all !!{undischarged} assumptions are
  87. in~$\Gamma$, this shows that $\Gamma \Proves \lfalse$.
  88. \end{proof}
  89. \begin{prop}\ollabel{prop:provability-exhaustive}
  90. If $\Gamma \cup \{!A\}$ and $\Gamma \cup \{\lnot !A\}$ are both
  91. inconsistent, then $\Gamma$ is inconsistent.
  92. \end{prop}
  93. \begin{proof}
  94. There are !!{derivation}s $\delta_1$ and $\delta_2$ of~$\lfalse$ from
  95. $\Gamma \cup \{ !A \}$ and $\lfalse$ from $\Gamma \cup \{ \lnot !A
  96. \}$, respectively. We can then !!{derive}
  97. \begin{prooftree}
  98. \AxiomC{$\Gamma, \Discharge{\lnot !A}{2}$}
  99. \RightLabel{$\delta_2$}
  100. \DeduceC{$\lfalse$}
  101. \DischargeRule{\Intro{\lnot}}{2}
  102. \UnaryInfC{$\lnot \lnot !A$}
  103. \AxiomC{$\Gamma, \Discharge{!A}{1}$}
  104. \RightLabel{$\delta_1$}
  105. \DeduceC{$\lfalse$}
  106. \DischargeRule{\Intro{\lnot}}{1}
  107. \UnaryInfC{$\lnot !A$}
  108. \RightLabel{\Elim{\lnot}}
  109. \BinaryInfC{$\lfalse$}
  110. \end{prooftree}
  111. Since the assumptions $!A$ and $\lnot !A$ are !!{discharged}, this is
  112. !!a{derivation} of~$\lfalse$ from~$\Gamma$ alone. Hence $\Gamma$ is
  113. inconsistent.
  114. \end{proof}
  115. \end{document}

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

133 lines; SHA-256 7be41cbf7877f1b7163f3cc9ad98867b4cf793b69f4a98e5734f731e3e802016. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: provability-propositional
  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}{ntd}{ppr}}
  10. {\olfileid{pl}{ntd}{ppr}}
  11. \olsection{\usetoken{S}{derivability} and the Propositional Connectives}
  12. \begin{explain}
  13. We establish that the !!{derivability} relation~$\Proves$ of natural
  14. deduction is strong enough to establish some basic facts
  15. involving the propositional connectives, such as that $!A \land !B
  16. \Proves !A$ and $!A, !A \lif !B \Proves !B$ (modus ponens). These
  17. facts are needed for the proof of the completeness theorem.
  18. \end{explain}
  19. \begin{prop}\ollabel{prop:provability-land}
  20. \begin{enumerate}
  21. \item \ollabel{prop:provability-land-left} Both $!A \land !B \Proves
  22. !A$ and $!A \land !B \Proves !B$
  23. \item \ollabel{prop:provability-land-right} $!A, !B \Proves !A \land !B$.
  24. \end{enumerate}
  25. \end{prop}
  26. \begin{proof}
  27. \begin{enumerate}
  28. \item We can !!{derive} both
  29. \begin{prooftree}
  30. \AxiomC{$!A \land !B$}
  31. \RightLabel{\Elim{\land}}
  32. \UnaryInfC{$!A$}
  33. \DisplayProof\qquad\bottomAlignProof
  34. \AxiomC{$!A \land !B$}
  35. \RightLabel{\Elim{\land}}
  36. \UnaryInfC{$!B$}
  37. \end{prooftree}
  38. \item We can !!{derive}:
  39. \begin{prooftree}
  40. \AxiomC{$!A$}
  41. \AxiomC{$!B$}
  42. \RightLabel{\Intro{\land}}
  43. \BinaryInfC{$!A \land !B$}
  44. \end{prooftree}
  45. \end{enumerate}
  46. \end{proof}
  47. \begin{prop}\ollabel{prop:provability-lor}
  48. \begin{enumerate}
  49. \item $!A \lor !B, \lnot !A, \lnot !B$ is inconsistent.
  50. \item Both $!A \Proves !A \lor !B$ and $!B \Proves !A \lor !B$.
  51. \end{enumerate}
  52. \end{prop}
  53. \begin{proof}
  54. \begin{enumerate}
  55. \item Consider the following !!{derivation}:
  56. \begin{prooftree}
  57. \AxiomC{$!A \lor !B$}
  58. \AxiomC{$\lnot !A$}
  59. \AxiomC{$\Discharge{!A}{1}$}
  60. \RightLabel{\Elim{\lnot}}
  61. \BinaryInfC{$\lfalse$}
  62. \AxiomC{$\lnot !B$}
  63. \AxiomC{$\Discharge{!B}{1}$}
  64. \RightLabel{\Elim{\lnot}}
  65. \BinaryInfC{$\lfalse$}
  66. \DischargeRule{\Elim{\lor}}{1}
  67. \TrinaryInfC{$\lfalse$}
  68. \end{prooftree}
  69. This is !!a{derivation} of~$\lfalse$ from !!{undischarged}
  70. assumptions $!A \lor !B$, $\lnot !A$, and $\lnot !B$.
  71. \item We can !!{derive} both
  72. \begin{prooftree}
  73. \AxiomC{$!A$}
  74. \RightLabel{\Intro{\lor}}
  75. \UnaryInfC{$!A \lor !B$}
  76. \DisplayProof\qquad\bottomAlignProof
  77. \AxiomC{$!B$}
  78. \RightLabel{\Intro{\lor}}
  79. \UnaryInfC{$!A \lor !B$}
  80. \end{prooftree}
  81. \end{enumerate}
  82. \end{proof}
  83. \begin{prop}\ollabel{prop:provability-lif}
  84. \begin{enumerate}
  85. \item \ollabel{prop:provability-lif-left} $!A, !A \lif !B \Proves !B$.
  86. \item \ollabel{prop:provability-lif-right}
  87. Both $\lnot !A \Proves !A \lif !B$ and $!B \Proves !A \lif !B$.
  88. \end{enumerate}
  89. \end{prop}
  90. \begin{proof}
  91. \begin{enumerate}
  92. \item We can !!{derive}:
  93. \begin{prooftree}
  94. \AxiomC{$!A \lif !B$}
  95. \AxiomC{$!A$}
  96. \RightLabel{\Elim{\lif}}
  97. \BinaryInfC{$!B$}
  98. \end{prooftree}
  99. \item This is shown by the following two !!{derivation}s:
  100. \begin{prooftree}
  101. \AxiomC{$\lnot !A$}
  102. \AxiomC{$\Discharge{!A}{1}$}
  103. \RightLabel{\Elim{\lnot}}
  104. \BinaryInfC{$\lfalse$}
  105. \RightLabel{\FalseInt}
  106. \UnaryInfC{$!B$}
  107. \DischargeRule{\Intro{\lif}}{1}
  108. \UnaryInfC{$!A \lif !B$}
  109. \DisplayProof\qquad\bottomAlignProof
  110. \AxiomC{$!B$}
  111. \RightLabel{\Intro{\lif}}
  112. \UnaryInfC{$!A \lif !B$}
  113. \end{prooftree}
  114. Note that $\Intro{\lif}$ may, but does not have to, !!{discharge} the
  115. assumption~$!A$.
  116. \end{enumerate}
  117. \end{proof}
  118. \end{document}

content/first-order-logic/natural-deduction/provability-quantifiers.tex

63 lines; SHA-256 c4a24bb64b2d02c75fcf5dcebe13d48c4684afd8f210da029ceefcb450990bf1. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: provability-quantifiers
  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. \olfileid{fol}{ntd}{qpr}
  9. \olsection{\usetoken{S}{derivability} and the Quantifiers}
  10. \begin{explain}
  11. The completeness theorem also requires that the natural deduction
  12. rules yield the facts about~$\Proves$ established in this section.
  13. \end{explain}
  14. \begin{thm}
  15. \ollabel{thm:strong-generalization} If $c$ is a constant not occurring
  16. in $\Gamma$ or $!A(x)$ and $\Gamma \Proves !A(c)$, then $\Gamma
  17. \Proves \lforall[x][!A(x)]$.
  18. \end{thm}
  19. \begin{proof}
  20. Let $\delta$ be !!a{derivation} of $!A(c)$ from $\Gamma$. By adding a
  21. \Intro{\lforall} inference, we obtain !!a{derivation} of
  22. $\lforall[x][!A(x)]$. Since $c$ does not occur in $\Gamma$ or $!A(x)$,
  23. the eigenvariable condition is satisfied.
  24. \end{proof}
  25. \begin{prop}
  26. \ollabel{prop:provability-quantifiers}
  27. \begin{tagenumerate}{prvEx,prvAll}
  28. \tagitem{prvEx}{$!A(t) \Proves \lexists[x][!A(x)]$.}{}
  29. \tagitem{prvAll}{$\lforall[x][!A(x)] \Proves !A(t)$.}{}
  30. \end{tagenumerate}
  31. \end{prop}
  32. \begin{proof}
  33. \begin{tagenumerate}{prvEx,prvAll}
  34. \tagitem{prvEx}{The following is !!a{derivation}
  35. of~$\lexists[x][!A(x)]$ from~$!A(t)$:
  36. \begin{prooftree}
  37. \AxiomC{$!A(t)$}
  38. \RightLabel{\Intro{\lexists}}
  39. \UnaryInfC{$\lexists[x][!A(x)]$}
  40. \end{prooftree}}{}
  41. \tagitem{prvAll}{The following is !!a{derivation} of~$!A(t)$
  42. from~$\lforall[x][!A(x)]$:
  43. \begin{prooftree}
  44. \AxiomC{$\lforall[x][!A(x)]$}
  45. \RightLabel{\Elim{\lforall}}
  46. \UnaryInfC{$!A(t)$}
  47. \end{prooftree}}{}
  48. \end{tagenumerate}
  49. \end{proof}
  50. \end{document}

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

314 lines; SHA-256 e470b5e3a94dd4445dcedc0bbb2d4bb9c5520a3f79ea754f37e4ae1501376e35. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: soundness
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \iftag{FOL}
  7. {\olfileid{fol}{ntd}{sou}}
  8. {\olfileid{pl}{ntd}{sou}}
  9. \olsection{Soundness}
  10. \begin{explain}
  11. !!^a{derivation} system, such as natural deduction, is \emph{sound}
  12. if it cannot !!{derive} things that do not actually follow. 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} !!{sentence} is \iftag{FOL}{valid}{a tautology};
  18. \item if !!a{sentence} is !!{derivable} from some others, it is also a
  19. consequence of them;
  20. \item if a set of !!{sentence}s is inconsistent, it is unsatisfiable.
  21. \end{enumerate}
  22. These are important properties of !!a{derivation} system. If any of
  23. them do not hold, the !!{derivation} system is deficient---it would
  24. !!{derive} too much. Consequently, establishing the soundness of a
  25. !!{derivation} system is of the utmost importance.
  26. \end{explain}
  27. \begin{thm}[Soundness]
  28. \ollabel{thm:soundness}
  29. If $!A$ is !!{derivable} from the !!{undischarged} assumptions
  30. $\Gamma$, then $\Gamma \Entails !A$.
  31. \end{thm}
  32. \begin{proof}
  33. Let $\delta$ be !!a{derivation} of $!A$. We proceed by
  34. induction on the number of inferences in~$\delta$.
  35. For the induction basis we show the claim if the number of inferences
  36. is~$0$. In this case, $\delta$ consists only of a single
  37. !!{sentence}~$!A$, i.e., an assumption. That assumption is
  38. !!{undischarged}, since assumptions can only be !!{discharged} by
  39. inferences, and there are no inferences. So, any
  40. \iftag{FOL}{!!{structure}~$\Struct{M}$}{!!{valuation}~$\pAssign{v}$}
  41. that satisfies all of the !!{undischarged} assumptions of the proof
  42. also satisfies~$!A$.
  43. Now for the inductive step. Suppose that $\delta$ contains~$n$
  44. inferences. The premise(s) of the lowermost inference are !!{derive}d
  45. using sub-!!{derivation}s, each of which contains fewer than~$n$
  46. inferences. We assume the induction hypothesis: The premises of the
  47. lowermost inference follow from the !!{undischarged} assumptions of
  48. the sub-!!{derivation}s ending in those premises. We have to show
  49. that the conclusion~$!A$ follows from the !!{undischarged} assumptions
  50. of the entire proof.
  51. We distinguish cases according to the type of the lowermost inference.
  52. First, we consider the possible inferences with only one premise.
  53. \begin{enumerate}
  54. \item Suppose that the last inference is \Intro{\lnot}: The
  55. !!{derivation} has the form
  56. \begin{prooftree}
  57. \AxiomC{$\Gamma, \Discharge{!A}{n}$}
  58. \RightLabel{$\delta_1$}
  59. \DeduceC{$\lfalse$}
  60. \DischargeRule{\Intro{\lnot}}{n}
  61. \UnaryInfC{$\lnot !A$}
  62. \end{prooftree}
  63. By inductive hypothesis, $\lfalse$ follows from the !!{undischarged}
  64. assumptions $\Gamma \cup \{!A\}$ of~$\delta_1$. Consider
  65. \iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}. We
  66. need to show that, if $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$, then
  67. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\lnot !A}$. Suppose for reductio
  68. that $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$, but
  69. $\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{\lnot !A}$, i.e.,
  70. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$. This would mean that
  71. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma \cup \{!A\}}$. This is
  72. contrary to our inductive hypothesis. So,
  73. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\lnot !A}$.
  74. \item The last inference is \Elim{\land}: There are two variants: $!A$
  75. or $!B$ may be inferred from the premise $!A \land !B$. Consider the
  76. first case. The !!{derivation}~$\delta$ looks like this:
  77. \begin{prooftree}
  78. \AxiomC{$\Gamma$}
  79. \RightLabel{$\delta_1$}
  80. \DeduceC{$!A \land !B$}
  81. \RightLabel{\Elim{\land}}
  82. \UnaryInfC{$!A$}
  83. \end{prooftree}
  84. By inductive hypothesis, $!A \land !B$ follows from the
  85. !!{undischarged} assumptions~$\Gamma$ of~$\delta_1$. Consider
  86. !!a{structure}~\iftag{FOL}{$\Struct{M}$}{$\pAssign{v}$}. We need to
  87. show that, if $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$, then
  88. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$. Suppose
  89. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$. By our inductive
  90. hypothesis ($\Gamma \Entails !A \land !B$), we know that
  91. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \land !B}$. By definition,
  92. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \land !B}$ iff
  93. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$ and
  94. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!B}$. (The case where $!B$ is
  95. inferred from $!A \land !B$ is handled similarly.)
  96. \item The last inference is \Intro{\lor}: There are two variants: $!A
  97. \lor !B$ may be inferred from the premise~$!A$ or the
  98. premise~$!B$. Consider the first case. The !!{derivation} has the form
  99. \begin{prooftree}
  100. \AxiomC{$\Gamma$}
  101. \RightLabel{$\delta_1$}
  102. \DeduceC{$!A$}
  103. \RightLabel{\Intro{\lor}}
  104. \UnaryInfC{$!A \lor !B$}
  105. \end{prooftree}
  106. By inductive hypothesis, $!A$ follows from the !!{undischarged}
  107. assumptions~$\Gamma$ of~$\delta_1$. Consider
  108. \iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}. We
  109. need to show that, if $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$, then
  110. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \lor !B}$. Suppose
  111. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$; then
  112. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$ since $\Gamma \Entails !A$ (the
  113. inductive hypothesis). So it must also be the case that
  114. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \lor !B}$. (The case where $!A
  115. \lor !B$ is inferred from~$!B$ is handled similarly.)
  116. \item The last inference is \Intro{\lif}: $!A \lif !B$ is inferred
  117. from a subproof with assumption~$!A$ and conclusion~$!B$, i.e.,
  118. \begin{prooftree}
  119. \AxiomC{$\Gamma, \Discharge{!A}{n}$}
  120. \RightLabel{$\delta_1$}
  121. \DeduceC{$!B$}
  122. \DischargeRule{\Intro{\lif}}{n}
  123. \UnaryInfC{$!A \lif !B$}
  124. \end{prooftree}
  125. By inductive hypothesis, $!B$ follows from the !!{undischarged}
  126. assumptions of~$\delta_1$, i.e., $\Gamma \cup \{!A\} \Entails
  127. !B$. Consider
  128. \iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}. The
  129. !!{undischarged} assumptions of~$\delta$ are just $\Gamma$, since
  130. $!A$ is discharged at the last inference. So we need to show that
  131. $\Gamma \Entails !A \lif !B$. For reductio, suppose that for some
  132. \iftag{FOL}{!!{structure}~$\Struct{M}$}{!!{valuation}~$\pAssign{v}$},
  133. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$ but
  134. $\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!A \lif !B}$. So,
  135. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$ and
  136. $\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!B}$. But by hypothesis, $!B$ is a
  137. consequence of $\Gamma \cup \{!A\}$, i.e.,
  138. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!B}$, which is a contradiction. So,
  139. $\Gamma \Entails !A \lif !B$.
  140. \item The last inference is \FalseInt: Here, $\delta$ ends in
  141. \begin{prooftree}
  142. \AxiomC{$\Gamma$}
  143. \RightLabel{$\delta_1$}
  144. \DeduceC{$\lfalse$}
  145. \RightLabel{\FalseInt}
  146. \UnaryInfC{$!A$}
  147. \end{prooftree}
  148. By induction hypothesis, $\Gamma \Entails \lfalse$. We have to show
  149. that $\Gamma \Entails !A$. Suppose not; then for
  150. some~$\iftag{FOL}{\Struct{M}}{\pAssign{v}}$ we have
  151. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$ and
  152. $\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!A}$. But we always have
  153. $\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{\lfalse}$, so this would mean
  154. that $\Gamma \Entails/ \lfalse$, contrary to the induction
  155. hypothesis.
  156. \item The last inference is \FalseCl: Exercise.
  157. \iftag{FOL}{
  158. \item The last inference is \Intro{\lforall}: Then $\delta$ has the form
  159. \begin{prooftree}
  160. \AxiomC{$\Gamma$}
  161. \RightLabel{$\delta_1$}
  162. \DeduceC{$!A(a)$}
  163. \RightLabel{\Intro{\lforall}}
  164. \UnaryInfC{$\lforall[x][!A(x)]$}
  165. \end{prooftree}
  166. The premise $!A(a)$ is a consequence of the !!{undischarged}
  167. assumptions $\Gamma$ by induction hypothesis. Consider some
  168. structure, $\Struct{M}$, such that $\Sat{M}{\Gamma}$. We need to
  169. show that $\Sat{M}{\lforall[x][!A(x)]}$. Since $\lforall[x][!A(x)]$
  170. is !!a{sentence}, this means we have to show that for every variable
  171. assignment~$s$, $\Sat{M}{!A(x)}[s]$
  172. (\olref[syn][ass]{prop:sat-quant}). Since $\Gamma$ consists entirely
  173. of sentences, $\Sat{M}{!B}[s]$ for all $!B \in \Gamma$ by
  174. \olref[syn][sat]{defn:satisfaction}. Let $\Struct{M'}$ be like
  175. $\Struct{M}$ except that $\Assign{a}{M'} = s(x)$. Since $a$ does
  176. not occur in~$\Gamma$, $\Sat{M'}{\Gamma}$ by
  177. \olref[syn][ext]{cor:extensionality-sent}. Since $\Gamma \Entails
  178. !A(a)$, $\Sat{M'}{!A(a)}$. Since $!A(a)$ is !!a{sentence},
  179. $\Sat{M'}{!A(a)}[s]$ by
  180. \olref[syn][ass]{prop:sentence-sat-true}. $\Sat{M'}{!A(x)}[s]$ iff
  181. $\Sat{M'}{!A(a)}$ by \olref[syn][ext]{prop:ext-formulas} (recall
  182. that $!A(a)$ is just $\Subst{!A(x)}{a}{x}$). So,
  183. $\Sat{M'}{!A(x)}[s]$. Since $a$ does not occur in~$!A(x)$, by
  184. \olref[syn][ext]{prop:extensionality}, $\Sat{M}{!A(x)}[s]$. But $s$
  185. was an arbitrary variable assignment, so
  186. $\Sat{M}{\lforall[x][!A(x)]}$.
  187. \item The last inference is \Intro{\lexists}: Exercise.
  188. \item The last inference is \Elim{\forall}: Exercise.
  189. }{}
  190. \end{enumerate}
  191. Now let's consider the possible inferences with several premises:
  192. \Elim{\lor}, \Intro{\land}, \iftag{FOL}{\Elim{\lif}, and
  193. \Elim{\lexists}}{and \Elim{\lif}}.
  194. \begin{enumerate}
  195. \item The last inference is \Intro{\land}. $!A \land !B$ is inferred
  196. from the premises $!A$ and $!B$ and $\delta$ has the form
  197. \begin{prooftree}
  198. \AxiomC{$\Gamma_1$}
  199. \RightLabel{$\delta_1$}
  200. \DeduceC{$!A$}
  201. \AxiomC{$\Gamma_2$}
  202. \RightLabel{$\delta_2$}
  203. \DeduceC{$!B$}
  204. \RightLabel{\Intro{\land}}
  205. \BinaryInfC{$!A \land !B$}
  206. \end{prooftree}
  207. By induction hypothesis, $!A$ follows from the !!{undischarged}
  208. assumptions~$\Gamma_1$ of~$\delta_1$ and $!B$ follows from the
  209. !!{undischarged} assumptions~$\Gamma_2$ of~$\delta_2$. The
  210. !!{undischarged} assumptions of~$\delta$ are $\Gamma_1 \cup
  211. \Gamma_2$, so we have to show that $\Gamma_1 \cup \Gamma_2 \Entails
  212. !A \land !B$. Consider
  213. \iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}
  214. with $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma_1 \cup \Gamma_2}$. Since
  215. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma_1}$, it must be the case that
  216. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$ as $\Gamma_1 \Entails !A$, and
  217. since $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma_2}$,
  218. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!B}$ since $\Gamma_2 \Entails
  219. !B$. Together, $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \land !B}$.
  220. \item The last inference is \Elim{\lor}: Exercise.
  221. \item The last inference is \Elim{\lif}. $!B$ is inferred from the
  222. premises $!A \lif !B$ and~$!A$. The !!{derivation}~$\delta$ looks like this:
  223. \begin{prooftree}
  224. \AxiomC{$\Gamma_1$}
  225. \RightLabel{$\delta_1$}
  226. \DeduceC{$!A \lif !B$}
  227. \AxiomC{$\Gamma_2$}
  228. \RightLabel{$\delta_2$}
  229. \DeduceC{$!A$}
  230. \RightLabel{\Elim{\lif}}
  231. \BinaryInfC{$!B$}
  232. \end{prooftree}
  233. By induction hypothesis, $!A \lif !B$ follows from the
  234. !!{undischarged} assumptions~$\Gamma_1$ of~$\delta_1$ and $!A$
  235. follows from the !!{undischarged} assumptions~$\Gamma_2$
  236. of~$\delta_2$. Consider
  237. \iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}. We
  238. need to show that, if $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma_1 \cup
  239. \Gamma_2}$, then $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!B}$. Suppose
  240. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma_1 \cup \Gamma_2}$. Since
  241. $\Gamma_1 \Entails !A \lif !B$, $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A
  242. \lif !B}$. Since $\Gamma_2 \Entails !A$, we have
  243. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$. This means that
  244. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!B}$ (For if
  245. $\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!B}$, since
  246. $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$, we'd have
  247. $\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!A \lif !B}$,
  248. contradicting~$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \lif !B}$).
  249. \item The last inference is \Elim{\lnot}: Exercise.
  250. \tagitem{FOL}{The last inference is \Elim{\lexists}: Exercise.}{}
  251. \end{enumerate}
  252. \end{proof}
  253. \tagprob{FOL}
  254. \begin{prob}
  255. Complete the proof of \olref[fol][ntd][sou]{thm:soundness}.
  256. \end{prob}
  257. \tagendprob
  258. \tagprob{notFOL}
  259. \begin{prob}
  260. Complete the proof of \olref[pl][ntd][sou]{thm:soundness}.
  261. \end{prob}
  262. \tagendprob
  263. \begin{cor}
  264. \ollabel{cor:weak-soundness}
  265. If $\Proves !A$, then $!A$ is \iftag{FOL}{valid}{a tautology}.
  266. \end{cor}
  267. \begin{cor}
  268. \ollabel{cor:consistency-soundness}
  269. If $\Gamma$ is satisfiable, then it is consistent.
  270. \end{cor}
  271. \begin{proof}
  272. We prove the contrapositive. Suppose that $\Gamma$ is not consistent.
  273. Then $\Gamma \Proves \lfalse$, i.e., there is !!a{derivation} of
  274. $\lfalse$ from !!{undischarged} assumptions in~$\Gamma$. By
  275. \olref{thm:soundness}, any
  276. \iftag{FOL}{!!{structure}~$\Struct{M}$}{!!{valuation}~$\pAssign{v}$}
  277. that satisfies $\Gamma$ must satisfy $\lfalse$. Since
  278. $\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{\lfalse}$ for every
  279. \iftag{FOL}{!!{structure}~$\Struct{M}$}{!!{valuation}~$\pAssign{v}$},
  280. no \iftag{FOL}{$\Struct{M}$}{$\pAssign{v}$} can satisfy $\Gamma$,
  281. i.e., $\Gamma$ is not satisfiable.
  282. \end{proof}
  283. \end{document}

content/first-order-logic/natural-deduction/identity.tex

124 lines; SHA-256 d5df1d1bb3818a275e2439a584a3851036870182afde592fa6e8f80b55c00add. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: identity
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{ntd}{ide}
  7. \olsection{\usetoken{P}{derivation} with \usetoken{S}{identity}}
  8. !!^{derivation}s with !!{identity} require additional inference rules.
  9. \begin{defish}
  10. \AxiomC{}
  11. \RightLabel{\Intro{\eq}}
  12. \UnaryInfC{$\eq[t][t]$}
  13. \DisplayProof
  14. \hfill
  15. \begin{tabular}{r}
  16. \AxiomC{$\eq[t_1][t_2]$}
  17. \AxiomC{$!A(t_1)$}
  18. \RightLabel{\Elim{\eq}}
  19. \BinaryInfC{$!A(t_2)$}
  20. \DisplayProof
  21. \\[3ex]
  22. \AxiomC{$\eq[t_1][t_2]$}
  23. \AxiomC{$!A(t_2)$}
  24. \RightLabel{\Elim{\eq}}
  25. \BinaryInfC{$!A(t_1)$}
  26. \DisplayProof
  27. \end{tabular}
  28. \end{defish}
  29. In the above rules, $t$, $t_1$, and $t_2$ are closed terms. The
  30. \Intro{\eq} rule allows us to !!{derive} any identity statement of the
  31. form $\eq[t][t]$ outright, from no assumptions.
  32. \begin{ex}
  33. If $s$ and $t$ are closed terms, then $!A(s), \eq[s][t] \Proves !A(t)$:
  34. \begin{prooftree}
  35. \AxiomC{$\eq[s][t]$}
  36. \AxiomC{$!A(s)$}
  37. \RightLabel{$\Elim{\eq}$}
  38. \BinaryInfC{$!A(t)$}
  39. \end{prooftree}
  40. This may be familiar as the ``principle of substitutability of
  41. identicals,'' or Leibniz' Law.
  42. \end{ex}
  43. \begin{prob}
  44. Prove that $=$ is both symmetric and transitive, i.e., give
  45. !!{derivation}s of $\lforall[x][\lforall[y][(\eq[x][y] \lif
  46. \eq[y][x])]]$ and $\lforall[x][\lforall[y][\lforall[z]((\eq[x][y]
  47. \land \eq[y][z]) \lif \eq[x][z])]]$
  48. \end{prob}
  49. \begin{ex}
  50. We !!{derive} the !!{sentence}
  51. \begin{align*}
  52. & \lforall[x][\lforall[y][((!A(x) \land !A(y)) \lif \eq[x][y])]]
  53. \intertext{from the !!{sentence}}
  54. & \lexists[x][\lforall[y][(!A(y) \lif \eq[y][x])]]
  55. \end{align*}
  56. We develop the !!{derivation} backwards:
  57. \begin{prooftree}
  58. \AxiomC{$\lexists[x][\lforall[y][(!A(y) \lif \eq[y][x])]]
  59. \quad \Discharge{!A(a) \land !A(b)}{1}$}
  60. \DeduceC{$\eq[a][b]$}
  61. \DischargeRule{\Intro{\lif}}{1}
  62. \UnaryInfC{$((!A(a) \land !A(b)) \lif \eq[a][b])$}
  63. \RightLabel{\Intro{\lforall}}
  64. \UnaryInfC{$\lforall[y][((!A(a) \land !A(y)) \lif \eq[a][y])]$}
  65. \RightLabel{\Intro{\lforall}}
  66. \UnaryInfC{$\lforall[x][\lforall[y][((!A(x) \land !A(y)) \lif \eq[x][y])]]$}
  67. \end{prooftree}
  68. We'll now have to use the main assumption: since it is an existential
  69. !!{formula}, we use \Elim{\lexists} to !!{derive} the intermediary
  70. conclusion $\eq[a][b]$.
  71. \begin{prooftree}
  72. \AxiomC{$\lexists[x][\lforall[y][(!A(y) \lif \eq[y][x])]]$}
  73. \AxiomC{$\Discharge{\lforall[y][(!A(y) \lif \eq[y][c]])}{2}$}
  74. \noLine
  75. \UnaryInfC{$\Discharge{!A(a) \land !A(b)}{1}$}
  76. \DeduceC{$\eq[a][b]$}
  77. \DischargeRule{\Elim{\lexists}}{2}
  78. \BinaryInfC{$\eq[a][b]$}
  79. \DischargeRule{\Intro{\lif}}{1}
  80. \UnaryInfC{$((!A(a) \land !A(b)) \lif \eq[a][b])$}
  81. \RightLabel{\Intro{\lforall}}
  82. \UnaryInfC{$\lforall[y][((!A(a) \land !A(y)) \lif \eq[a][y])]$}
  83. \RightLabel{\Intro{\lforall}}
  84. \UnaryInfC{$\lforall[x][\lforall[y][((!A(x) \land !A(y)) \lif \eq[x][y])]]$}
  85. \end{prooftree}
  86. The sub-!!{derivation} on the top right is completed by using its
  87. assumptions to show that $\eq[a][c]$ and $\eq[b][c]$. This requires two
  88. separate !!{derivation}s. The !!{derivation} for $\eq[a][c]$ is as
  89. follows:
  90. \begin{prooftree}
  91. \AxiomC{$\Discharge{\lforall[y][(!A(y) \lif \eq[y][c]])}{2}$}
  92. \RightLabel{\Elim{\lforall}}
  93. \UnaryInfC{$!A(a) \lif \eq[a][c]$}
  94. \AxiomC{$\Discharge{!A(a) \land !A(b)}{1}$}
  95. \RightLabel{\Elim{\land}}
  96. \UnaryInfC{$!A(a)$}
  97. \RightLabel{\Elim{\lif}}
  98. \BinaryInfC{$\eq[a][c]$}
  99. \end{prooftree}
  100. From $\eq[a][c]$ and $\eq[b][c]$ we !!{derive} $\eq[a][b]$ by
  101. \Elim{\eq}.
  102. \end{ex}
  103. \begin{prob}
  104. Give !!{derivation}s of the following !!{formula}s:
  105. \begin{enumerate}
  106. \item $\lforall[x][\lforall[y][((\eq[x][y] \land !A(x)) \lif !A(y))]]$
  107. \item $\lexists[x][!A(x)] \land \lforall[y][\lforall[z][((!A(y) \land
  108. !A(z)) \lif \eq[y][z])]] \lif \lexists[x][(!A(x) \land
  109. \lforall[y][(!A(y) \lif \eq[y][x])])]$
  110. \end{enumerate}
  111. \end{prob}
  112. \end{document}

content/first-order-logic/natural-deduction/soundness-identity.tex

47 lines; SHA-256 2544f37fa6d7a3d81b12c7e7309e1416680df9ee0d8d4e033084299370da0bc8. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: natural-deduction
  3. % Section: soundness-identity
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{ntd}{sid}
  7. \olsection{Soundness with \usetoken{S}{identity}}
  8. \begin{prop}
  9. Natural deduction with rules for $\eq$ is sound.
  10. \end{prop}
  11. \begin{proof}
  12. Any !!{formula} of the form $\eq[t][t]$ is valid, since
  13. for every !!{structure}~$\Struct M$, $\Sat{M}{\eq[t][t]}$. (Note that
  14. we assume the term $t$ to be closed, i.e., it contains no variables,
  15. so variable assignments are irrelevant).
  16. Suppose the last inference in !!a{derivation} is \Elim{\eq}, i.e., the
  17. !!{derivation} has the following form:
  18. \begin{prooftree}
  19. \AxiomC{$\Gamma_1$}
  20. \RightLabel{$\delta_1$}
  21. \DeduceC{$\eq[t_1][t_2]$}
  22. \AxiomC{$\Gamma_2$}
  23. \RightLabel{$\delta_2$}
  24. \DeduceC{$!A(t_1)$}
  25. \RightLabel{\Elim{\eq}}
  26. \BinaryInfC{$!A(t_2)$}
  27. \end{prooftree}
  28. The premises $\eq[t_1][t_2]$ and $!A(t_1)$ are !!{derive}d from
  29. !!{undischarged} assumptions~$\Gamma_1$ and $\Gamma_2$, respectively.
  30. We want to show that $!A(t_2)$ follows from $\Gamma_1 \cup \Gamma_2$.
  31. Consider !!a{structure}~$\Struct{M}$ with $\Sat{M}{\Gamma_1 \cup
  32. \Gamma_2}$. By induction hypothesis, $\Sat{M}{!A(t_1)}$ and
  33. $\Sat{M}{\eq[t_1][t_2]}$. Therefore, $\Value{t_1}{M} = \Value{t_2}{M}$. Let
  34. $s$ be any variable assignment, and $m = \Value{t_1}{M} = \Value{t_2}{M}$. By
  35. \olref[fol][syn][ext]{prop:ext-formulas}, $\Sat{M}{!A(t_1)}[s]$ iff
  36. $\Sat{M}{!A(x)}[\Subst{s}{m}{x}]$ iff $\Sat{M}{!A(t_2)}[s]$. Since
  37. $\Sat{M}{!A(t_1)}$, we have $\Sat{M}{!A(t_2)}$.
  38. \end{proof}
  39. \end{document}