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.
% Part: first-order-logic% Chapter: natural-deduction\documentclass[../../../include/open-logic-chapter]{subfiles}\begin{document}\iftag{FOL}{\olchapter{fol}{ntd}{Natural Deduction}}{\olchapter{pl}{ntd}{Natural Deduction}}\begin{editorial}This chapter presents a natural deduction system in the style ofGentzen/Prawitz.To include or exclude material relevant to natural deduction as aproof system, use the ``prfND'' tag.\end{editorial}\olimport{rules-and-proofs}\olimport{propositional-rules}\iftag{FOL}{%\olimport{quantifier-rules}}{}\olimport{derivations}\olimport{proving-things}\iftag{FOL}{%\olimport{proving-things-quant}}{}\olimport{proof-theoretic-notions}\olimport{provability-consistency}\olimport{provability-propositional}\iftag{FOL}{%\olimport{provability-quantifiers}}{}\olimport{soundness}\iftag{FOL}{%\olimport{identity}\olimport{soundness-identity}}{}\OLEndChapterHook\end{document}
content/first-order-logic/natural-deduction/rules-and-proofs.tex
52 lines; SHA-256 0556326eefd6fbb957243d9f94969fd23adefb4af69f80419d4a2818d53088f0. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: rules-and-proofs\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\iftag{FOL}{\olfileid{fol}{ntd}{rul}}{\olfileid{pl}{ntd}{rul}}\olsection{Rules and \usetoken{P}{derivation}}\begin{explain}Natural deduction systems are meant to closely parallel the informalreasoning used in mathematical proof (hence it is somewhat``natural''). Natural deduction proofs begin with assumptions.Inference rules are then applied. Assumptions are ``!!{discharged}''by the \Intro{\lnot}, \Intro{\lif}, \iftag{FOL}{\Elim{\lor} and\Elim{\lexists}}{ and \Elim{\lor}} inference rules, and the label ofthe !!{discharged} assumption is placed beside the inference forclarity.\end{explain}\begin{defn}[Assumption]An \emph{assumption} is any !!{sentence}in the topmost position of any branch.\end{defn}!!^{derivation}s in natural deduction are certain trees of!!{sentence}s, where the topmost !!{sentence}s are assumptions, and if!!a{sentence} stands below one, two, or three other sequents, it mustfollow correctly by a rule of inference. The !!{sentence}s at the topof the inference are called the \emph{premises} and the !!{sentence}below the \emph{conclusion} of the inference. The rules come inpairs, an introduction and an elimination rule for each!!{operator}. They introduce !!a{operator} in the conclusion orremove !!a{operator} from a premise of the rule. Some of the rulesallow an assumption of a certain type to be \emph{!!{discharged}}. Toindicate which assumption is !!{discharged} by which inference, wealso assign labels to both the assumption and the inference. This isindicated by writing the assumption as ``$\Discharge{!A}{n}$.''% Only include this sentence is on of \land, lor, lif or lnot is defined.\iftag{notprvNot,notprvAnd,notprvOr,notprvIf}{}%{It is customary to consider rules for all the !!{operator}s $\land$, $\lor$, $\lif$, $\lnot$, and $\lfalse$, even if some of those are defined.}\end{document}
content/first-order-logic/natural-deduction/propositional-rules.tex
120 lines; SHA-256 c22d2603cc9c4a79d630a4bc00b817c57c07b000e5d4bc443815e13b4f4cb515. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: propositional-rules\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\iftag{FOL}{\olfileid{fol}{ntd}{prl}}{\olfileid{pl}{ntd}{prl}}\olsection{Propositional Rules}\subsection{Rules for $\land$}\begin{defish}\AxiomC{$!A$}\AxiomC{$!B$}\RightLabel{\Intro{\land}}\BinaryInfC{$!A \land !B$}\DisplayProof\hfill\begin{tabular}{r}\AxiomC{$!A \land !B$}\RightLabel{\Elim{\land}}\UnaryInfC{$!A$}\DisplayProof\\[3ex]\AxiomC{$!A \land !B$}\RightLabel{\Elim{\land}}\UnaryInfC{$!B$}\DisplayProof\end{tabular}\end{defish}\subsection{Rules for $\lor$}\begin{defish}\begin{tabular}{r}\AxiomC{$!A$}\RightLabel{\Intro{\lor}}\UnaryInfC{$!A \lor !B$}\DisplayProof\\[3ex]\AxiomC{$!B$}\RightLabel{\Intro{\lor}}\UnaryInfC{$!A \lor !B$}\DisplayProof\end{tabular}\hfill\AxiomC{$!A \lor !B$}\AxiomC{$\Discharge{!A}{n}$}\DeduceC{$!C$}\AxiomC{$\Discharge{!B}{n}$}\DeduceC{$!C$}\DischargeRule{\Elim{\lor}}{n}\TrinaryInfC{$!C$}\DisplayProof\end{defish}\subsection{Rules for $\lif$}\begin{defish}\AxiomC{$\Discharge{!A}{n}$}\DeduceC{$!B$}\DischargeRule{\Intro{\lif}}{n}\UnaryInfC{$!A \lif !B$}\DisplayProof\hfill\AxiomC{$!A \lif !B$}\AxiomC{$!A$}\RightLabel{\Elim{\lif}}\BinaryInfC{$!B$}\DisplayProof\end{defish}\subsection{Rules for $\lnot$}\begin{defish}\AxiomC{$\Discharge{!A}{n}$}\noLine\DeduceC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{n}\UnaryInfC{$\lnot !A$}\DisplayProof\hfill\AxiomC{$\lnot !A$}\AxiomC{$!A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DisplayProof\end{defish}\subsection{Rules for $\lfalse$}\begin{defish}\AxiomC{$\lfalse$}\RightLabel{\FalseInt}\UnaryInfC{$!A$}\DisplayProof\hfill\AxiomC{$\Discharge{\lnot !A}{n}$}\DeduceC{$\lfalse$}\DischargeRule{\FalseCl}{n}\UnaryInfC{$!A$}\DisplayProof\end{defish}Note that $\Intro{\lnot}$ and $\FalseCl$ are very similar: Thedifference is that $\Intro{\lnot}$ derives a negated!!{sentence}~$\lnot !A$ but $\FalseCl$ a positive !!{sentence}~$!A$.Whenever a rule indicates that some assumption may be discharged, wetake this to be a permission, but not a requirement. E.g., in the$\Intro{\lif}$ rule, we may discharge any number of assumptions of theform~$!A$ in the !!{derivation} of the premise~$!B$, including zero.\end{document}
content/first-order-logic/natural-deduction/quantifier-rules.tex
111 lines; SHA-256 5d9c3a507fe1b79e4d376963b5e3efca4a3352cc7cef7d18255c61e60592f71b. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: quantifier-rules\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{fol}{ntd}{qrl}\olsection{Quantifier Rules}\subsection{Rules for $\lforall$}\begin{defish}\AxiomC{$!A(a)$}\RightLabel{\Intro{\lforall}}\UnaryInfC{$\lforall[x][\Atom{!A}{x}]$}\DisplayProof\hfill\AxiomC{$\lforall[x][\Atom{!A}{x}]$}\RightLabel{\Elim{\lforall}}\UnaryInfC{$!A(t)$}\DisplayProof\end{defish}In the rules for~$\lforall$, $t$ is a closed term (a term that doesnot contain any variables), and $a$~is !!a{constant} which does notoccur in the conclusion~$\lforall[x][!A(x)]$, or in any assumptionwhich is !!{undischarged} in the !!{derivation} ending with thepremise~$!A(a)$. We call $a$ the \emph{eigenvariable} of the\Intro{\lforall} inference.\footnote{We use the term ``eigenvariable''even though $a$ in the above rule is a constant. This has historicalreasons.}\subsection{Rules for $\lexists$}\begin{defish}\AxiomC{$\Atom{!A}{t}$}\RightLabel{\Intro{\lexists}}\UnaryInfC{$\lexists[x][\Atom{!A}{x}]$}\DisplayProof\hfill\AxiomC{$\lexists[x][\Atom{!A}{x}]$}\AxiomC{[$\Atom{!A}{a}$]$^n$}\DeduceC{$!C$}\DischargeRule{\Elim{\lexists}}{n}\BinaryInfC{$!C$}\DisplayProof\end{defish}Again, $t$ is a closed term, and $a$ is !!a{constant} which does notoccur in the premise $\lexists[x][!A(x)]$, in the conclusion~$!C$, orany assumption which is !!{undischarged} in the !!{derivation}s endingwith the two premises (other than the assumptions $!A(a)$). We call$a$ the \emph{eigenvariable} of the \Elim{\lexists} inference.The condition that an eigenvariable neither occur in the premises norin any assumption that is !!{undischarged} in the !!{derivation}sleading to the premises for the \Intro{\lforall} or \Elim{\lexists}inference is called the \emph{eigenvariable condition}.\begin{explain}Recall the convention that when $!A$ is !!a{formula} with the!!{variable}~$x$ free, we indicate this by writing~$!A(x)$. In thesame context, $!A(t)$ then is short for~$\Subst{!A}{t}{x}$. So wecould also write the $\Intro\lexists$ rule as:\begin{prooftree}\AxiomC{$\Subst{!A}{t}{x}$}\RightLabel{\Intro{\lexists}}\UnaryInfC{$\lexists[x][!A]$}\end{prooftree}Note that $t$ may already occur in~$!A$, e.g., $!A$~mightbe~$\Atom{\Obj P}{t,x}$. Thus, inferring $\lexists[x][\Atom{\ObjP}{t,x}]$ from~$\Atom{\Obj P}{t,t}$ is a correct applicationof~$\Intro\lexists$---you may ``replace'' one or more, and notnecessarily all, occurrences of~$t$ in the premise by the bound!!{variable}~$x$. However, the eigenvariable conditions in$\Intro\lforall$ and~$\Elim\lexists$ require that the !!{constant}~$a$does not occur in~$!A$. So, you cannot correctly infer$\lforall[x][\Atom{\Obj P}{a,x}]$ from $\Atom{\Obj P}{a,a}$using~$\Intro\lforall$.\end{explain}\begin{explain}In \Intro{\lexists} and \Elim{\lforall} there are no restrictions, andthe term~$t$ can be anything, so we do not have to worry about anyconditions. On the other hand, in the \Elim{\lexists} and\Intro{\lforall} rules, the eigenvariable condition requires that the!!{constant}~$a$ does not occur anywhere in the conclusion or in an!!{undischarged} assumption. The condition is necessary to ensure thatthe system is sound, i.e., only !!{derive}s !!{sentence}s from!!{undischarged} assumptions from which they follow. Without thiscondition, the following would be allowed:\begin{prooftree}\AxiomC{$\lexists[x][!A(x)]$}\AxiomC{$\Discharge{!A(a)}{1}$}\RightLabel{*\Intro{\lforall}}\UnaryInfC{$\lforall[x][!A(x)]$}\RightLabel{\Elim{\lexists}}\BinaryInfC{$\lforall[x][!A(x)]$}\end{prooftree}However, $\lexists[x][!A(x)] \Entails/ \lforall[x][!A(x)]$.As the elimination rules for quantifiers only allow substitutingclosed terms for !!{variable}s, it follows that any !!{formula} thatcan be derived from a set of !!{sentence}s is itself !!a{sentence}.\end{explain}\end{document}
content/first-order-logic/natural-deduction/derivations.tex
110 lines; SHA-256 04cdbaa301a71243b78d880551ce2f8edbf6f059764eceacd5b8910f0459cb26. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: derivations\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\iftag{FOL}{\olfileid{fol}{ntd}{der}}{\olfileid{pl}{ntd}{der}}\olsection{\usetoken{P}{derivation}}\begin{explain}We've said what an assumption is, and we've given the rules ofinference. !!^{derivation}s in natural deduction are inductivelygenerated from these: each !!{derivation} either is an assumptionon its own, or consists of one, two, or three !!{derivation}s followedby a correct inference.\end{explain}\begin{defn}[!!^{derivation}]\Article{derivation} \emph{!!{derivation}} of !!a{sentence}~$!A$ fromassumptions~$\Gamma$ is a finite tree of !!{sentence}s satisfying thefollowing conditions:\begin{enumerate}\item The topmost !!{sentence}s of the tree are either in $\Gamma$ orare !!{discharged} by an inference in the tree.\item The bottommost !!{sentence} of the tree is~$!A$.\item Every !!{sentence} in the tree except the sentence~$!A$ atthe bottom is a premise of a correct application of an inferencerule whose conclusion stands directly below that !!{sentence} in thetree.\end{enumerate}We then say that $!A$ is the \emph{conclusion} of the !!{derivation}and $\Gamma$ its !!{undischarged} assumptions.If !!a{derivation} of $!A$ from~$\Gamma$ exists, we say that $!A$ is\emph{!!{derivable}} from~$\Gamma$, or in symbols: $\Gamma \Proves!A$. If there is !!a{derivation} of~$!A$ in which every assumption is!!{discharged}, we write~$\Proves !A$.\end{defn}\begin{ex}Every assumption on its own is !!a{derivation}. So, e.g., $!A$ byitself is !!a{derivation}, and so is $!B$ by itself. We can obtain anew !!{derivation} from these by applying, say, the $\Intro{\land}$rule,\begin{prooftree}\AxiomC{$!A$}\AxiomC{$!B$}\RightLabel{\Intro{\land}}\BinaryInfC{$!A \land !B$}\end{prooftree}These rules are meant to be general: we can replace the $!A$ and~$!B$in it with any !!{sentence}s, e.g., by $!C$ and~$!D$. Then theconclusion would be $!C \land !D$, and so\begin{prooftree}\AxiomC{$!C$}\AxiomC{$!D$}\RightLabel{\Intro{\land}}\BinaryInfC{$!C \land !D$}\end{prooftree}is a correct !!{derivation}. Of course, we can also switch theassumptions, so that $!D$ plays the role of~$!A$ and $!C$ thatof~$!B$. Thus,\begin{prooftree}\AxiomC{$!D$}\AxiomC{$!C$}\RightLabel{\Intro{\land}}\BinaryInfC{$!D \land !C$}\end{prooftree}is also a correct !!{derivation}.We can now apply another rule, say, $\Intro{\lif}$, which allows us toconclude a conditional and allows us to !!{discharge} any assumptionthat is identical to the antecedent of that conditional. So both ofthe following would be correct !!{derivation}s:\begin{prooftree}\AxiomC{$\Discharge{!C}{1}$}\AxiomC{$!D$}\RightLabel{\Intro{\land}}\BinaryInfC{$!C \land !D$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$!C \lif (!C \land !D)$}\DisplayProof\bottomAlignProof\AxiomC{$!C$}\AxiomC{$\Discharge{!D}{1}$}\RightLabel{\Intro{\land}}\BinaryInfC{$!C \land !D$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$!D \lif (!C \land !D)$}\end{prooftree}They show, respectively, that $!D \Proves !C \lif (!C \land !D)$ and$!C \Proves !D \lif (!C \land !D)$.Remember that discharging of assumptions is a permission, not arequirement: we don't have to discharge the assumptions. Inparticular, we can apply a rule even if the assumptions are notpresent in the !!{derivation}. For instance, the following is legal, eventhough there is no assumption~$!A$ to be !!{discharged}:\begin{prooftree}\AxiomC{$!B$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$!A \lif !B$}\end{prooftree}\end{ex}\end{document}
content/first-order-logic/natural-deduction/proving-things.tex
310 lines; SHA-256 ff58b86389a21dbc6f240f49e62d5fca0bdb4d3ba54e0d364792cdcddd34724f. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: proving-things\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\iftag{FOL}{\olfileid{fol}{ntd}{pro}}{\olfileid{pl}{ntd}{pro}}\olsection{Examples of \usetoken{P}{derivation}}\begin{ex}Let's give !!a{derivation} of the !!{sentence} $(!A \land !B) \lif !A$.We begin by writing the desired conclusion at the bottom of the!!{derivation}.\begin{prooftree}\AxiomC{}\UnaryInfC{$(!A\land !B) \lif !A$}\end{prooftree}Next, we need to figure out what kind of inference could result in!!a{sentence} of this form. The !!{main operator} of theconclusion is $\lif$, so we'll try to arrive at theconclusion using the \Intro{\lif} rule. It is best to write downthe assumptions involved and label the inference rules as youprogress, so it is easy to see whether all assumptions have been!!{discharged} at the end of the proof.\begin{prooftree}\AxiomC{$\Discharge{!A \land !B}{1}$}\DeduceC{$!A$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$(!A\land !B) \lif !A$}\end{prooftree}We now need to fill in the steps from the assumption $!A \land !B$ to $!A$.Since we only have one connective to deal with, $\land$, we mustuse the $\land$ elim rule. This gives us the following proof:\begin{prooftree}\AxiomC{$\Discharge{!A \land !B}{1}$}\RightLabel{\Elim{\land}}\UnaryInfC{$!A$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$(!A\land !B) \lif !A$}\end{prooftree}We now have a correct !!{derivation} of $(!A \land!B) \lif !A$.\end{ex}\begin{ex}Now let's give !!a{derivation} of $(\lnot !A \lor !B)\lif (!A \lif !B)$.We begin by writing the desired conclusion at the bottom of the!!{derivation}.\begin{prooftree}\AxiomC{}\UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}\end{prooftree}To find a logical rule that could give us this conclusion, welook at the logical connectives in the conclusion: $\lnot$,$\lor$, and $\lif$. We only care at the moment about the firstoccurrence of $\lif$ because it is the !!{main operator} of the!!{sentence} in the end-sequent, while $\lnot$, $\lor$ and the secondoccurrence of $\lif$ are inside the scope of another connective, so wewill take care of those later. We therefore start with the\Intro{\lif} rule. A correct application must look like this:\begin{prooftree}\AxiomC{$\Discharge{\lnot !A \lor !B}{1}$}\DeduceC{$!A \lif !B$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}\end{prooftree}This leaves us with two possibilities to continue. Either we cankeep working from the bottom up and look for another applicationof the \Intro{\lif} rule, or we can work from the top down and apply a\Elim{\lor} rule. Let us apply the latter. We will use the assumption$\lnot !A \lor !B$ as the leftmost premise of \Elim{\lor}. For a validapplication of \Elim{\lor}, the other two premises must be identicalto the conclusion $!A \lif !B$, but each may be derived in turn fromanother assumption, namely one of the two disjuncts of $\lnot !A \lor !B$.So our !!{derivation} will look like this:\begin{prooftree}\AxiomC{$\Discharge{\lnot !A \lor !B}{1}$}\AxiomC{$\Discharge{\lnot !A}{2}$}\DeduceC{$!A \lif !B$}\AxiomC{$\Discharge{!B}{2}$}\DeduceC{$!A \lif !B$}\DischargeRule{\Elim{\lor}}{2}\TrinaryInfC{$!A \lif !B$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}\end{prooftree}In each of the two branches on the right, we want to !!{derive} $!A\lif !B$, which is best done using \Intro{\lif}.\begin{prooftree}\AxiomC{$\Discharge{\lnot !A \lor !B}{1}$}\AxiomC{$\Discharge{\lnot !A}{2}, \Discharge{!A}{3}$}\DeduceC{$!B$}\DischargeRule{\Intro{\lif}}{3}\UnaryInfC{$!A \lif !B$}\AxiomC{$\Discharge{!B}{2}, \Discharge{!A}{4}$}\DeduceC{$!B$}\DischargeRule{\Intro{\lif}}{4}\UnaryInfC{$!A \lif !B$}\DischargeRule{\Elim{\lor}}{2}\TrinaryInfC{$!A \lif !B$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}\end{prooftree}For the two missing parts of the !!{derivation}, we need!!{derivation}s of $!B$ from $\lnot !A$ and $!A$ in the middle, andfrom $!A$ and $!B$ on the left. Let's take the former first. $\lnot!A$ and $!A$ are the two premises of \Elim{\lnot}:\begin{prooftree}\AxiomC{$\Discharge{\lnot !A}{2}$}\AxiomC{$\Discharge{!A}{3}$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DeduceC{$!B$}\end{prooftree}By using \FalseInt, we can obtain $!B$ as a conclusion andcomplete the branch.\begin{prooftree}\AxiomC{$\Discharge{\lnot !A \lor !B}{1}$}\AxiomC{$\Discharge{\lnot !A}{2}$}\AxiomC{$\Discharge{!A}{3}$}\RightLabel{\Intro{\lfalse}}\BinaryInfC{$\lfalse$}\RightLabel{\FalseInt}\UnaryInfC{$!B$}\DischargeRule{\Intro{\lif}}{3}\UnaryInfC{$!A \lif !B$}\AxiomC{$\Discharge{!B}{2}, \Discharge{!A}{4}$}\DeduceC{$!B$}\DischargeRule{\Intro{\lif}}{4}\UnaryInfC{$!A \lif !B$}\DischargeRule{\Elim{\lor}}{2}\TrinaryInfC{$!A \lif !B$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}\end{prooftree}Let's now look at the rightmost branch. Here it's important torealize that the definition of !!{derivation} \emph{allows assumptionsto be discharged} but \emph{does not require} them to be. In otherwords, if we can derive $!B$ from one of the assumptions $!A$ and $!B$without using the other, that's ok. And to !!{derive} $!B$ from~$!B$is trivial: $!B$ by itself is such !!a{derivation}, and no inferencesare needed. So we can simply delete the assumption~$!A$.\begin{prooftree}\AxiomC{$\Discharge{\lnot !A \lor !B}{1}$}\AxiomC{$\Discharge{\lnot !A}{2}$}\AxiomC{$\Discharge{!A}{3}$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\RightLabel{\FalseInt}\UnaryInfC{$!B$}\DischargeRule{\Intro{\lif}}{3}\UnaryInfC{$!A \lif !B$}\AxiomC{$\Discharge{!B}{2}$}\RightLabel{\Intro{\lif}}\UnaryInfC{$!A \lif !B$}\DischargeRule{\Elim{\lor}}{2}\TrinaryInfC{$!A \lif !B$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$(\lnot !A \lor !B) \lif (!A \lif !B)$}\end{prooftree}Note that in the finished !!{derivation}, the rightmost \Intro{\lif}inference does not actually discharge any assumptions.\end{ex}\begin{ex}So far we have not needed the \FalseCl{} rule. It is special in thatit allows us to discharge an assumption that isn't a sub-!!{formula} ofthe conclusion of the rule. It is closely related to the \FalseInt{}rule. In fact, the \FalseInt{} rule is a special case of the\FalseCl{} rule---there is a logic called ``intuitionistic logic'' inwhich only \FalseInt{} is allowed. The \FalseCl{} rule is a lastresort when nothing else works. For instance, suppose we want to!!{derive} $!A \lor \lnot !A$. Our usual strategy would be to attemptto !!{derive} $!A \lor \lnot !A$ using $\Intro{\lor}$. But this wouldrequire us to !!{derive} either $!A$ or $\lnot !A$ from noassumptions, and this can't be done. \FalseCl{} to the rescue!\begin{prooftree}\AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}\DeduceC{$\lfalse$}\DischargeRule{\FalseCl}{1}\UnaryInfC{$!A \lor \lnot !A$}\end{prooftree}Now we're looking for !!a{derivation} of $\lfalse$ from $\lnot(!A \lor\lnot !A)$. Since $\lfalse$ is the conclusion of $\Elim{\lnot}$ wemight try that:\begin{prooftree}\AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}\DeduceC{$\lnot !A$}\AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}\DeduceC{$!A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DischargeRule{\FalseCl}{1}\UnaryInfC{$!A \lor \lnot !A$}\end{prooftree}Our strategy for finding !!a{derivation} of~$\lnot !A$ calls for anapplication of~$\Intro{\lnot}$:\begin{prooftree}\AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}, \Discharge{!A}{2}$}\DeduceC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{2}\UnaryInfC{$\lnot !A$}\AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}\DeduceC{$!A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DischargeRule{\FalseCl}{1}\UnaryInfC{$!A \lor \lnot !A$}\end{prooftree}Here, we can get $\lfalse$ easily by applying $\Elim{\lnot}$ to theassumption $\lnot(!A \lor \lnot !A)$ and $!A \lor \lnot !A$ whichfollows from our new assumption $!A$ by~$\Intro{\lor}$:\begin{prooftree}\AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}\AxiomC{$\Discharge{!A}{2}$}\RightLabel{\Intro{\lor}}\UnaryInfC{$!A \lor \lnot !A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{2}\UnaryInfC{$\lnot !A$}\AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}\DeduceC{$!A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DischargeRule{\FalseCl}{1}\UnaryInfC{$!A \lor \lnot !A$}\end{prooftree}On the right side we use the same strategy, except we get $!A$ by~\FalseCl:\begin{prooftree}\AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}\AxiomC{$\Discharge{!A}{2}$}\RightLabel{\Intro{\lor}}\UnaryInfC{$!A \lor \lnot !A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{2}\UnaryInfC{$\lnot !A$}\AxiomC{$\Discharge{\lnot(!A \lor \lnot !A)}{1}$}\AxiomC{$\Discharge{\lnot !A}{3}$}\RightLabel{\Intro{\lor}}\UnaryInfC{$!A \lor \lnot !A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DischargeRule{\FalseCl}{3}\UnaryInfC{$!A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DischargeRule{\FalseCl}{1}\UnaryInfC{$!A \lor \lnot !A$}\end{prooftree}\end{ex}\begin{prob}Give !!{derivation}s that show the following:\begin{enumerate}\item $!A \land (!B \land !C) \Proves (!A \land !B) \land !C$.\item $!A \lor (!B \lor !C) \Proves (!A \lor !B) \lor !C$.\item $!A \lif (!B \lif !C) \Proves !B \lif (!A \lif !C)$.\item $!A \Proves \lnot\lnot !A$.\end{enumerate}\end{prob}\begin{prob}Give !!{derivation}s that show the following:\begin{enumerate}\item $(!A \lor !B) \lif !C \Proves !A \lif !C$.\item $(!A \lif !C) \land (!B \lif !C) \Proves (!A \lor !B) \lif !C$.\item $\Proves \lnot(!A \land \lnot !A)$.\item $!B \lif !A \Proves \lnot !A \lif \lnot !B$.\item $\Proves (!A \lif \lnot !A) \lif \lnot !A$.\item $\Proves \lnot(!A \lif !B) \lif \lnot !B$.\item $!A \lif !C \Proves \lnot (!A \land \lnot !C)$.\item $!A \land \lnot !C \Proves \lnot (!A \lif !C)$.\item $!A \lor !B, \lnot !B \Proves !A$.\item $\lnot !A \lor \lnot !B \Proves \lnot(!A \land !B)$.\item $\Proves (\lnot !A \land \lnot !B) \lif\lnot(!A \lor !B)$.\item $\Proves \lnot(!A \lor !B) \lif (\lnot !A \land \lnot !B)$.\end{enumerate}\end{prob}\begin{prob}Give !!{derivation}s that show the following:\begin{enumerate}\item $\lnot(!A \lif !B) \Proves !A$.\item $\lnot(!A \land !B) \Proves \lnot !A \lor \lnot !B$.\item $!A \lif !B \Proves \lnot !A \lor !B$.\item $\Proves \lnot \lnot !A \lif !A$.\item $!A \lif !B, \lnot !A \lif !B \Proves !B$.\item $(!A \land !B) \lif !C \Proves (!A \lif !C) \lor (!B \lif !C)$.\item $(!A \lif !B) \lif !A \Proves !A$.\item $\Proves (!A \lif !B) \lor (!B \lif !C)$.\end{enumerate}(These all require the $\FalseCl$~rule.)\end{prob}\end{document}
content/first-order-logic/natural-deduction/proving-things-quant.tex
255 lines; SHA-256 6f49b930a86f60a1cca318d70259378f7bc6b5ebb76f307665c4eb4363e8235f. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: proving-things-quant\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{fol}{ntd}{prq}\olsection{\usetoken{P}{derivation} with Quantifiers}\begin{ex}When dealing with quantifiers, we have to make sure not to violate theeigenvariable condition, and sometimes this requires us to play aroundwith the order of carrying out certain inferences. In general, ithelps to try and take care of rules subject to the eigenvariablecondition first (they will be lower down in the finished proof).Let's see how we'd give !!a{derivation} of the !!{formula}$\lexists[x][\lnot !A(x)] \lif \lnot \lforall[x][!A(x)]$.Starting as usual, we write\begin{prooftree}\AxiomC{}\UnaryInfC{$\lexists[x][\lnot !A(x)]\lif \lnot \lforall[x][!A(x)]$}\end{prooftree}We start by writing down what it would take to justify that last stepusing the \Intro{\lif} rule.\begin{prooftree}\AxiomC{$\Discharge{\lexists[x][\lnot !A(x)]}{1}$}\DeduceC{$\lnot \lforall[x][!A(x)]$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$\lexists[x][\lnot !A(x)]\lif \lnot \lforall[x][!A(x)]$}\end{prooftree}Since there is no obvious rule to apply to $\lnot \lforall[x][!A(x)]$,we will proceed by setting up the !!{derivation} so we can use the\Elim{\lexists} rule. Here we must pay attention to the eigenvariablecondition, and choose a constant that does not appear in$\lexists[x][!A(x)]$ or any assumptions that it depends on.(Since no !!{constant}s appear, however, any choice will do fine.)\begin{prooftree}\AxiomC{$\Discharge{\lexists[x][\lnot !A(x)]}{1}$}\AxiomC{$\Discharge{\lnot !A(a)}{2}$}\DeduceC{$\lnot \lforall[x][!A(x)]$}\DischargeRule{\Elim{\lexists}}{2}\BinaryInfC{$\lnot \lforall[x][!A(x)]$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$\lexists[x][\lnot !A(x)] \lif \lnot \lforall[x][!A(x)]$}\end{prooftree}In order to derive $\lnot \lforall[x][!A(x)]$, we will attempt to usethe \Intro{\lnot} rule: this requires that we derive a contradiction,possibly using $\lforall[x][!A(x)]$ as an additional assumption. Ofcourse, this contradiction may involve the assumption $\lnot !A(a)$which will be discharged by the \Elim{\lexists} inference. We can set itup as follows:\begin{prooftree}\AxiomC{$\Discharge{\lexists[x][\lnot !A(x)]}{1}$}\AxiomC{$\Discharge{\lnot !A(a)}{2}, \Discharge{\lforall[x][!A(x)]}{3}$}\DeduceC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{3}\UnaryInfC{$\lnot \lforall[x][!A(x)]$}\DischargeRule{\Elim{\lexists}}{2}\BinaryInfC{$\lnot \lforall[x][!A(x)]$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$\lexists[x][\lnot !A(x)]\lif \lnot \lforall[x][!A(x)]$}\end{prooftree}It looks like we are close to getting a contradiction. The easiestrule to apply is the \Elim{\lforall}, which has no eigenvariableconditions. Since we can use any term we want to replace theuniversally quantified~$x$, it makes the most sense to continueusing~$a$ so we can reach a contradiction.\begin{prooftree}\AxiomC{$\Discharge{\lexists[x][\lnot !A(x)]}{1}$}\AxiomC{$\Discharge{\lnot !A(a)}{2}$}\AxiomC{$\Discharge{\lforall[x][!A(x)]}{3}$}\RightLabel{\Elim{\lforall}}\UnaryInfC{$!A(a)$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{3}\UnaryInfC{$\lnot \lforall[x][!A(x)]$}\DischargeRule{\Elim{\lexists}}{2}\BinaryInfC{$\lnot \lforall[x][!A(x)]$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$\lexists[x][\lnot !A(x)]\lif \lnot \lforall[x][!A(x)]$}\end{prooftree}It is important, especially when dealing with quantifiers, to doublecheck at this point that the eigenvariable condition has not beenviolated. Since the only rule we applied that is subject to theeigenvariable condition was \Elim{\exists}, and the eigenvariable~$a$does not occur in any assumptions it depends on, this is acorrect !!{derivation}.\end{ex}\begin{ex}Sometimes we may derive !!a{formula} from other !!{formula}s.In these cases, we may have undischarged assumptions. It isimportant to keep track of our assumptions as wellas the end goal.Let's see how we'd give !!a{derivation} of the !!{formula}$\lexists[x][!C(x,b)]$ from the assumptions $\lexists[x][(!A(x)\land !B(x))]$ and $\lforall[x][(!B(x) \lif !C(x,b))]$.Starting as usual, we write the conclusion at thebottom.\begin{prooftree}\AxiomC{}\UnaryInfC{$\lexists[x][!C(x,b)]$}\end{prooftree}We have two premises to work with. To use the first, i.e., try to find!!a{derivation} of $\lexists[x][!C(x, b)]$ from $\lexists[x][(!A(x)\land !B(x))]$ we would use the \Elim{\lexists} rule. Since it hasan eigenvariable condition, we will apply that rule first. We get thefollowing:\begin{prooftree}\AxiomC{$\lexists[x][(!A(x) \land !B(x))]$}\AxiomC{$\Discharge{!A(a) \land !B(a)}{1}$}\DeduceC{$\lexists[x][!C(x,b)]$}\DischargeRule{\Elim{\lexists}}{1}\BinaryInfC{$\lexists[x][!C(x,b)]$}\end{prooftree}The two assumptions we are working with share~$!B$. It may be usefulat this point to apply \Elim{\land} to separate out~$!B(a)$.\begin{prooftree}\AxiomC{$\lexists[x][(!A(x) \land !B(x)])$}\AxiomC{$\Discharge{!A(a)\land !B(a)}{1}$}\RightLabel{\Elim{\land}}\UnaryInfC{$!B(a)$}\DeduceC{$\lexists[x][!C(x,b)]$}\DischargeRule{\Elim{\lexists}}{1}\BinaryInfC{$\lexists[x][!C(x,b)]$}\end{prooftree}The second assumption we have to work with is~$\lforall[x][(!B(x) \lif!C(x,b))]$. Since there is no eigenvariable condition we caninstantiate $x$ with the !!{constant}~$a$ using \Elim{\lforall} to get$!B(a) \lif !C(a, b)$. We now have both $!B(a) \lif !C(a,b)$ and$!B(a)$. Our next move should be a straightforward application of the\Elim{\lif} rule.\begin{prooftree}\AxiomC{$\lexists[x][(!A(x) \land !B(x))]$}\AxiomC{$\lforall[x][(!B(x) \lif !C(x,b))]$}\RightLabel{\Elim{\lforall}}\UnaryInfC{$!B(a) \lif !C(a,b)$}\AxiomC{$\Discharge{!A(a)\land !B(a)}{1}$}\RightLabel{\Elim{\land}}\UnaryInfC{$!B(a)$}\RightLabel{\Elim{\lif}}\BinaryInfC{$!C(a,b)$}\DeduceC{$\lexists[x][!C(x,b)]$}\DischargeRule{\Elim{\lexists}}{1}\insertBetweenHyps{\hspace{-5em}}\BinaryInfC{$\lexists[x][!C(x,b)]$}\end{prooftree}We are so close!{} One application of \Intro{\lexists} and wehave reached our goal.\begin{prooftree}\AxiomC{$\lexists[x][(!A(x) \land !B(x))]$}\AxiomC{$\lforall[x][(!B(x) \lif !C(x,b))]$}\RightLabel{\Elim{\lforall}}\UnaryInfC{$!B(a) \lif !C(a,b)$}\AxiomC{$\Discharge{!A(a)\land !B(a)}{1}$}\RightLabel{\Elim{\land}}\UnaryInfC{$!B(a)$}\RightLabel{\Elim{\lif}}\BinaryInfC{$!C(a,b)$}\RightLabel{\Intro{\lexists}}\UnaryInfC{$\lexists[x][!C(x,b)]$}\DischargeRule{\Elim{\lexists}}{1}\insertBetweenHyps{\hspace{-5em}}\BinaryInfC{$\lexists[x][!C(x,b)]$}\end{prooftree}Since we ensured at each step that the eigenvariableconditions were not violated, we can be confident that thisis a correct !!{derivation}.\end{ex}\begin{ex}Give !!a{derivation} of the !!{formula}$\lnot\lforall[x][!A(x)]$ from the assumptions $\lforall[x][!A(x)]\lif \lexists[y][!B(y)]$ and $\lnot\lexists[y][!B(y)]$.Starting as usual, we write the target !!{formula} at the bottom.\begin{prooftree}\AxiomC{}\UnaryInfC{$\lnot\lforall[x][!A(x)]$}\end{prooftree}The last line of the !!{derivation} is a negation, so let's try using\Intro{\lnot}. This will require that we figure out how to !!{derive}a contradiction.\begin{prooftree}\AxiomC{$\Discharge{\lforall[x][!A(x)]}{1}$}\DeduceC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{1}\UnaryInfC{$\lnot\lforall[x][!A(x)]$}\end{prooftree}So far so good. We can use \Elim{\lforall} but it's not obviousif that will help us get to our goal. Instead, let's use one of ourassumptions. $\lforall[x][!A(x)] \lif \lexists[y][!B(y)]$ togetherwith $\lforall[x][!A(x)]$ will allow us to use the \Elim{\lif} rule.\begin{prooftree}\AxiomC{$\lforall[x][!A(x)] \lif \lexists[y][!B(y)]$}\AxiomC{$\Discharge{\lforall[x][!A(x)]}{1}$}\RightLabel{\Elim{\lif}}\BinaryInfC{$\lexists[y][!B(y)]$}\DeduceC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{1}\UnaryInfC{$\lnot\lforall[x][!A(x)]$}\end{prooftree}We now have one final assumption to work with,and it looks like this will help us reach a contradictionby using \Elim{\lnot}.\begin{prooftree}\AxiomC{$\lnot\lexists[y][!B(y)]$}\AxiomC{$\lforall[x][!A(x)] \lif \lexists[y][!B(y)]$}\AxiomC{$\Discharge{\lforall[x][!A(x)]}{1}$}\RightLabel{\Elim{\lif}}\BinaryInfC{$\lexists[y][!B(y)]$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{1}\UnaryInfC{$\lnot\lforall[x][!A(x)]$}\end{prooftree}\end{ex}\begin{prob}Give !!{derivation}s that show the following:\begin{enumerate}\item $\Proves (\lforall[x][!A(x)] \land \lforall[y][!B(y)]) \lif\lforall[z][(!A(z) \land !B(z))]$.\item $\Proves (\lexists[x][!A(x)] \lor \lexists[y][!B(y)]) \lif\lexists[z][(!A(z) \lor !B(z))]$.\item $\lforall[x][(!A(x) \lif !B)] \Proves \lexists[y][!A(y)] \lif !B$.\item $\lforall[x][\lnot !A(x)] \Proves \lnot\lexists[x][!A(x)]$.\item $\Proves \lnot\lexists[x][!A(x)] \lif \lforall[x][\lnot !A(x)]$.\item $\Proves \lnot\lexists[x][\lforall[y][((!A(x,y) \lif \lnot!A(y,y)) \land (\lnot !A(y,y) \lif !A(x,y)))]]$.\end{enumerate}\end{prob}\begin{prob}Give !!{derivation}s that show the following:\begin{enumerate}\item $\Proves \lnot\lforall[x][!A(x)] \lif \lexists[x][\lnot!A(x)]$.\item $(\lforall[x][!A(x)] \lif !B) \Proves \lexists[y][(!A(y) \lif !B)]$.\item $\Proves \lexists[x][(!A(x) \lif \lforall[y][!A(y)])]$.\end{enumerate}(These all require the $\FalseCl$~rule.)\end{prob}\end{document}
content/first-order-logic/natural-deduction/proof-theoretic-notions.tex
159 lines; SHA-256 7e05743251dd0c5071685193a98c28baea1c77b06836f11e3f3e3aa6a6bd9198. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: proof-theoretic-notions\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\iftag{FOL}{\olfileid{fol}{ntd}{ptn}}{\olfileid{pl}{ntd}{ptn}}\olsection{Proof-Theoretic Notions}\begin{editorial}This section collects the definitions the provability relationand consistency for natural deduction.\end{editorial}\begin{explain}Just as we've defined a number of important semantic notions(validity, entailment, satisfiability), we now define corresponding\emph{proof-theoretic notions}. These are not defined by appeal tosatisfaction of !!{sentence}s in !!{structure}s, but by appeal to the!!{derivability} or !!{nonderivability} of certain !!{sentence}s fromothers. It was an important discovery that these notions coincide.That they do is the content of the \emph{soundness} and\emph{completeness theorems}.\end{explain}\begin{defn}[Theorems]A !!{sentence}~$!A$ is a \emph{theorem} if there is !!a{derivation}of~$!A$ in natural deduction in which all assumptions are!!{discharged}. We write $\Proves !A$ if $!A$ is a theorem and$\Proves/ !A$ if it is not.\end{defn}\begin{defn}[!!^{derivability}]!!^a{sentence} $!A$ is \emph{!!{derivable} from} a set of!!{sentence}s~$\Gamma$, $\Gamma \Proves !A$, if there is a!!{derivation} with conclusion~$!A$ and in which every assumptionis either !!{discharged} or is in~$\Gamma$. If $!A$ is not!!{derivable} from $\Gamma$ we write $\Gamma \Proves/ !A$.\end{defn}\begin{defn}[Consistency]A set of !!{sentence}s~$\Gamma$ is \emph{inconsistent} iff $\Gamma\Proves \lfalse$. If $\Gamma$ is not inconsistent, i.e., if$\Gamma \Proves/ \lfalse$, we say it is \emph{consistent}.\end{defn}\begin{prop}[Reflexivity]\ollabel{prop:reflexivity}If $!A \in \Gamma$, then $\Gamma \Proves !A$.\end{prop}\begin{proof}The assumption $!A$ by itself is !!a{derivation} of~$!A$ where every!!{undischarged} assumption (i.e., $!A$) is in~$\Gamma$.\end{proof}\begin{prop}[Monotonicity]\ollabel{prop:monotonicity}If $\Gamma \subseteq \Delta$ and $\Gamma \Proves !A$, then $\Delta\Proves !A$.\end{prop}\begin{proof}Any !!{derivation} of $!A$ from $\Gamma$ is also !!a{derivation} of$!A$ from~$\Delta$.\end{proof}\begin{prop}[Transitivity]\ollabel{prop:transitivity}If $\Gamma \Proves !A$ and $\{!A\} \cup \Delta \Proves!B$, then $\Gamma \cup \Delta \Proves !B$.\end{prop}\begin{proof}If $\Gamma \Proves !A$, there is !!a{derivation}~$\delta_0$ of~$!A$with all !!{undischarged} assumptions in~$\Gamma$. If $\{!A\} \cup\Delta \Proves !B$, then there is !!a{derivation}~$\delta_1$ of~$!B$with all !!{undischarged} assumptions in~$\{!A\} \cup \Delta$.Now consider:\begin{prooftree}\AxiomC{$\Delta, \Discharge{!A}{1}$}\RightLabel{$\delta_1$}\DeduceC{$!B$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$!A \lif !B$}\AxiomC{$\Gamma$}\RightLabel{$\delta_0$}\DeduceC{$!A$}\RightLabel{\Elim{\lif}}\BinaryInfC{$!B$}\end{prooftree}The !!{undischarged} assumptions are now all among $\Gamma \cup\Delta$, so this shows $\Gamma \cup \Delta \Proves !B$.\end{proof}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$.Note that if $\Gamma \Proves !A$ and $!A\Proves !B$, then $\Gamma \Proves !B$. It follows also that if $!A_1,\dots, !A_n \Proves !B$ and $\Gamma \Proves !A_i$ for each~$i$, then$\Gamma \Proves !B$.\begin{prop}\ollabel{prop:incons}The following are equivalent.\begin{enumerate}\item \( \Gamma \) is inconsistent.\item \( \Gamma \Proves {!A} \) for every !!{sentence}~\( {!A} \).\item \( \Gamma \Proves {!A} \) and \( \Gamma \Proves \lnot {!A} \) for some !!{sentence}~\( {!A} \).\end{enumerate}\end{prop}\begin{proof}Exercise.\end{proof}\tagprob{FOL}\begin{prob}Prove \olref[fol][ntd][ptn]{prop:incons}\end{prob}\tagendprob\tagprob{notFOL}\begin{prob}Prove \olref[pl][ntd][ptn]{prop:incons}\end{prob}\tagendprob\begin{prop}[Compactness]\ollabel{prop:proves-compact}\begin{enumerate}\item If $\Gamma \Proves !A$ then there is a finite subset $\Gamma_0\subseteq \Gamma$ such that $\Gamma_0 \Proves !A$.\item If every finite subset of~$\Gamma$ isconsistent, then $\Gamma$ is consistent.\end{enumerate}\end{prop}\begin{proof}\begin{enumerate}\item If $\Gamma \Proves !A$, then there is!!a{derivation}~$\delta$ of~$!A$ from~$\Gamma$. Let $\Gamma_0$be the set of !!{undischarged} assumptions of~$\delta$. Sinceany !!{derivation} is finite, $\Gamma_0$ can only containfinitely many !!{sentence}s. So, $\delta$ is !!a{derivation}of~$!A$ from a finite~$\Gamma_0 \subseteq \Gamma$.\item This is the contrapositive of (1) for the special case $!A\ident \lfalse$.\end{enumerate}\end{proof}\end{document}
content/first-order-logic/natural-deduction/provability-consistency.tex
131 lines; SHA-256 9d967013e14c7f911bf612ddab65b22a2e5f8d90f182926741c0bf7cab5076bc. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: provability-consistency\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\iftag{FOL}{\olfileid{fol}{ntd}{prv}}{\olfileid{pl}{ntd}{prv}}\olsection{\usetoken{S}{derivability} and Consistency}We will now establish a number of properties of the !!{derivability}relation. They are independently interesting, but each will play arole in the proof of the completeness theorem.\begin{prop}\ollabel{prop:provability-contr}If $\Gamma \Proves !A$ and $\Gamma \cup \{!A\}$ is inconsistent,then $\Gamma$ is inconsistent.\end{prop}\begin{proof}Let the !!{derivation} of~$!A$ from~$\Gamma$ be~$\delta_1$ and the!!{derivation} of~$\lfalse$ from $\Gamma \cup \{!A\}$be~$\delta_2$. We can then !!{derive}:\begin{prooftree}\AxiomC{$\Gamma, \Discharge{!A}{1}$}\RightLabel{$\delta_2$}\DeduceC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{1}\UnaryInfC{$\lnot !A$}\AxiomC{$\Gamma$}\RightLabel{$\delta_1$}\DeduceC{$!A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\end{prooftree}In the new !!{derivation}, the assumption~$!A$ is !!{discharged}, so it is!!a{derivation} from~$\Gamma$.\end{proof}\begin{prop}\ollabel{prop:prov-incons}$\Gamma \Proves !A$ iff $\Gamma \cup \{\lnot !A\}$ is inconsistent.\end{prop}\begin{proof}First suppose $\Gamma \Proves !A$, i.e., there is!!a{derivation}~$\delta_0$ of~$!A$ from !!{undischarged}assumptions~$\Gamma$. We obtain !!a{derivation} of $\lfalse$ from$\Gamma \cup \{\lnot !A\}$ as follows:\begin{prooftree}\AxiomC{$\lnot !A$}\AxiomC{$\Gamma$}\RightLabel{$\delta_0$}\DeduceC{$!A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\end{prooftree}Now assume $\Gamma \cup \{\lnot !A\}$ is inconsistent, and let$\delta_1$ be the corresponding !!{derivation} of~$\lfalse$ from!!{undischarged} assumptions in~$\Gamma \cup \{\lnot !A\}$. We obtain!!a{derivation} of~$!A$ from~$\Gamma$ alone by using~$\FalseCl$:\begin{prooftree}\AxiomC{$\Gamma, \Discharge{\lnot !A}{1}$}\RightLabel{$\delta_1$}\DeduceC{$\lfalse$}\RightLabel{\FalseCl}\DischargeRule{\FalseCl}{1}\UnaryInfC{$!A$}\end{prooftree}\end{proof}\begin{prob}Prove that $\Gamma \Proves \lnot !A$ iff $\Gamma \cup \{!A\}$ isinconsistent.\end{prob}\begin{prop}\ollabel{prop:explicit-inc}If $\Gamma \Proves !A$ and $\lnot !A \in \Gamma$, then $\Gamma$ isinconsistent.\end{prop}\begin{proof}Suppose $\Gamma \Proves !A$ and $\lnot !A \in \Gamma$. Then thereis !!a{derivation}~$\delta$ of~$!A$ from~$\Gamma$. Consider thissimple application of the $\Elim{\lnot}$ rule:\begin{prooftree}\AxiomC{$\lnot !A$}\AxiomC{$\Gamma$}\RightLabel{$\delta$}\DeduceC{$!A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\end{prooftree}Since $\lnot !A \in \Gamma$, all !!{undischarged} assumptions arein~$\Gamma$, this shows that $\Gamma \Proves \lfalse$.\end{proof}\begin{prop}\ollabel{prop:provability-exhaustive}If $\Gamma \cup \{!A\}$ and $\Gamma \cup \{\lnot !A\}$ are bothinconsistent, then $\Gamma$ is inconsistent.\end{prop}\begin{proof}There are !!{derivation}s $\delta_1$ and $\delta_2$ of~$\lfalse$ from$\Gamma \cup \{ !A \}$ and $\lfalse$ from $\Gamma \cup \{ \lnot !A\}$, respectively. We can then !!{derive}\begin{prooftree}\AxiomC{$\Gamma, \Discharge{\lnot !A}{2}$}\RightLabel{$\delta_2$}\DeduceC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{2}\UnaryInfC{$\lnot \lnot !A$}\AxiomC{$\Gamma, \Discharge{!A}{1}$}\RightLabel{$\delta_1$}\DeduceC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{1}\UnaryInfC{$\lnot !A$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\end{prooftree}Since the assumptions $!A$ and $\lnot !A$ are !!{discharged}, this is!!a{derivation} of~$\lfalse$ from~$\Gamma$ alone. Hence $\Gamma$ isinconsistent.\end{proof}\end{document}
content/first-order-logic/natural-deduction/provability-propositional.tex
133 lines; SHA-256 7be41cbf7877f1b7163f3cc9ad98867b4cf793b69f4a98e5734f731e3e802016. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: provability-propositional% verification of properties of provability needed for maximally% consistent sets in the completeness chapter.\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\iftag{FOL}{\olfileid{fol}{ntd}{ppr}}{\olfileid{pl}{ntd}{ppr}}\olsection{\usetoken{S}{derivability} and the Propositional Connectives}\begin{explain}We establish that the !!{derivability} relation~$\Proves$ of naturaldeduction is strong enough to establish some basic factsinvolving the propositional connectives, such as that $!A \land !B\Proves !A$ and $!A, !A \lif !B \Proves !B$ (modus ponens). Thesefacts are needed for the proof of the completeness theorem.\end{explain}\begin{prop}\ollabel{prop:provability-land}\begin{enumerate}\item \ollabel{prop:provability-land-left} Both $!A \land !B \Proves!A$ and $!A \land !B \Proves !B$\item \ollabel{prop:provability-land-right} $!A, !B \Proves !A \land !B$.\end{enumerate}\end{prop}\begin{proof}\begin{enumerate}\item We can !!{derive} both\begin{prooftree}\AxiomC{$!A \land !B$}\RightLabel{\Elim{\land}}\UnaryInfC{$!A$}\DisplayProof\qquad\bottomAlignProof\AxiomC{$!A \land !B$}\RightLabel{\Elim{\land}}\UnaryInfC{$!B$}\end{prooftree}\item We can !!{derive}:\begin{prooftree}\AxiomC{$!A$}\AxiomC{$!B$}\RightLabel{\Intro{\land}}\BinaryInfC{$!A \land !B$}\end{prooftree}\end{enumerate}\end{proof}\begin{prop}\ollabel{prop:provability-lor}\begin{enumerate}\item $!A \lor !B, \lnot !A, \lnot !B$ is inconsistent.\item Both $!A \Proves !A \lor !B$ and $!B \Proves !A \lor !B$.\end{enumerate}\end{prop}\begin{proof}\begin{enumerate}\item Consider the following !!{derivation}:\begin{prooftree}\AxiomC{$!A \lor !B$}\AxiomC{$\lnot !A$}\AxiomC{$\Discharge{!A}{1}$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\AxiomC{$\lnot !B$}\AxiomC{$\Discharge{!B}{1}$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\DischargeRule{\Elim{\lor}}{1}\TrinaryInfC{$\lfalse$}\end{prooftree}This is !!a{derivation} of~$\lfalse$ from !!{undischarged}assumptions $!A \lor !B$, $\lnot !A$, and $\lnot !B$.\item We can !!{derive} both\begin{prooftree}\AxiomC{$!A$}\RightLabel{\Intro{\lor}}\UnaryInfC{$!A \lor !B$}\DisplayProof\qquad\bottomAlignProof\AxiomC{$!B$}\RightLabel{\Intro{\lor}}\UnaryInfC{$!A \lor !B$}\end{prooftree}\end{enumerate}\end{proof}\begin{prop}\ollabel{prop:provability-lif}\begin{enumerate}\item \ollabel{prop:provability-lif-left} $!A, !A \lif !B \Proves !B$.\item \ollabel{prop:provability-lif-right}Both $\lnot !A \Proves !A \lif !B$ and $!B \Proves !A \lif !B$.\end{enumerate}\end{prop}\begin{proof}\begin{enumerate}\item We can !!{derive}:\begin{prooftree}\AxiomC{$!A \lif !B$}\AxiomC{$!A$}\RightLabel{\Elim{\lif}}\BinaryInfC{$!B$}\end{prooftree}\item This is shown by the following two !!{derivation}s:\begin{prooftree}\AxiomC{$\lnot !A$}\AxiomC{$\Discharge{!A}{1}$}\RightLabel{\Elim{\lnot}}\BinaryInfC{$\lfalse$}\RightLabel{\FalseInt}\UnaryInfC{$!B$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$!A \lif !B$}\DisplayProof\qquad\bottomAlignProof\AxiomC{$!B$}\RightLabel{\Intro{\lif}}\UnaryInfC{$!A \lif !B$}\end{prooftree}Note that $\Intro{\lif}$ may, but does not have to, !!{discharge} theassumption~$!A$.\end{enumerate}\end{proof}\end{document}
content/first-order-logic/natural-deduction/provability-quantifiers.tex
63 lines; SHA-256 c4a24bb64b2d02c75fcf5dcebe13d48c4684afd8f210da029ceefcb450990bf1. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: provability-quantifiers% verification of properties of provability needed for maximally% consistent sets in the completeness chapter.\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{fol}{ntd}{qpr}\olsection{\usetoken{S}{derivability} and the Quantifiers}\begin{explain}The completeness theorem also requires that the natural deductionrules yield the facts about~$\Proves$ established in this section.\end{explain}\begin{thm}\ollabel{thm:strong-generalization} If $c$ is a constant not occurringin $\Gamma$ or $!A(x)$ and $\Gamma \Proves !A(c)$, then $\Gamma\Proves \lforall[x][!A(x)]$.\end{thm}\begin{proof}Let $\delta$ be !!a{derivation} of $!A(c)$ from $\Gamma$. By adding a\Intro{\lforall} inference, we obtain !!a{derivation} of$\lforall[x][!A(x)]$. Since $c$ does not occur in $\Gamma$ or $!A(x)$,the eigenvariable condition is satisfied.\end{proof}\begin{prop}\ollabel{prop:provability-quantifiers}\begin{tagenumerate}{prvEx,prvAll}\tagitem{prvEx}{$!A(t) \Proves \lexists[x][!A(x)]$.}{}\tagitem{prvAll}{$\lforall[x][!A(x)] \Proves !A(t)$.}{}\end{tagenumerate}\end{prop}\begin{proof}\begin{tagenumerate}{prvEx,prvAll}\tagitem{prvEx}{The following is !!a{derivation}of~$\lexists[x][!A(x)]$ from~$!A(t)$:\begin{prooftree}\AxiomC{$!A(t)$}\RightLabel{\Intro{\lexists}}\UnaryInfC{$\lexists[x][!A(x)]$}\end{prooftree}}{}\tagitem{prvAll}{The following is !!a{derivation} of~$!A(t)$from~$\lforall[x][!A(x)]$:\begin{prooftree}\AxiomC{$\lforall[x][!A(x)]$}\RightLabel{\Elim{\lforall}}\UnaryInfC{$!A(t)$}\end{prooftree}}{}\end{tagenumerate}\end{proof}\end{document}
content/first-order-logic/natural-deduction/soundness.tex
314 lines; SHA-256 e470b5e3a94dd4445dcedc0bbb2d4bb9c5520a3f79ea754f37e4ae1501376e35. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: soundness\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\iftag{FOL}{\olfileid{fol}{ntd}{sou}}{\olfileid{pl}{ntd}{sou}}\olsection{Soundness}\begin{explain}!!^a{derivation} system, such as natural deduction, is \emph{sound}if it cannot !!{derive} things that do not actually follow. Soundness isthus a kind of guaranteed safety property for !!{derivation} systems.Depending on which proof theoretic property is in question, we wouldlike to know for instance, that\begin{enumerate}\item every !!{derivable} !!{sentence} is \iftag{FOL}{valid}{a tautology};\item if !!a{sentence} is !!{derivable} from some others, it is also aconsequence of them;\item if a set of !!{sentence}s is inconsistent, it is unsatisfiable.\end{enumerate}These are important properties of !!a{derivation} system. If any ofthem do not hold, the !!{derivation} system is deficient---it would!!{derive} too much. Consequently, establishing the soundness of a!!{derivation} system is of the utmost importance.\end{explain}\begin{thm}[Soundness]\ollabel{thm:soundness}If $!A$ is !!{derivable} from the !!{undischarged} assumptions$\Gamma$, then $\Gamma \Entails !A$.\end{thm}\begin{proof}Let $\delta$ be !!a{derivation} of $!A$. We proceed byinduction on the number of inferences in~$\delta$.For the induction basis we show the claim if the number of inferencesis~$0$. In this case, $\delta$ consists only of a single!!{sentence}~$!A$, i.e., an assumption. That assumption is!!{undischarged}, since assumptions can only be !!{discharged} byinferences, and there are no inferences. So, any\iftag{FOL}{!!{structure}~$\Struct{M}$}{!!{valuation}~$\pAssign{v}$}that satisfies all of the !!{undischarged} assumptions of the proofalso satisfies~$!A$.Now for the inductive step. Suppose that $\delta$ contains~$n$inferences. The premise(s) of the lowermost inference are !!{derive}dusing sub-!!{derivation}s, each of which contains fewer than~$n$inferences. We assume the induction hypothesis: The premises of thelowermost inference follow from the !!{undischarged} assumptions ofthe sub-!!{derivation}s ending in those premises. We have to showthat the conclusion~$!A$ follows from the !!{undischarged} assumptionsof the entire proof.We distinguish cases according to the type of the lowermost inference.First, we consider the possible inferences with only one premise.\begin{enumerate}\item Suppose that the last inference is \Intro{\lnot}: The!!{derivation} has the form\begin{prooftree}\AxiomC{$\Gamma, \Discharge{!A}{n}$}\RightLabel{$\delta_1$}\DeduceC{$\lfalse$}\DischargeRule{\Intro{\lnot}}{n}\UnaryInfC{$\lnot !A$}\end{prooftree}By inductive hypothesis, $\lfalse$ follows from the !!{undischarged}assumptions $\Gamma \cup \{!A\}$ of~$\delta_1$. Consider\iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}. Weneed to show that, if $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$, then$\iftag{FOL}{\Sat{M}}{\pSat{v}}{\lnot !A}$. Suppose for reductiothat $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$, but$\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{\lnot !A}$, i.e.,$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$. This would mean that$\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma \cup \{!A\}}$. This iscontrary to our inductive hypothesis. So,$\iftag{FOL}{\Sat{M}}{\pSat{v}}{\lnot !A}$.\item The last inference is \Elim{\land}: There are two variants: $!A$or $!B$ may be inferred from the premise $!A \land !B$. Consider thefirst case. The !!{derivation}~$\delta$ looks like this:\begin{prooftree}\AxiomC{$\Gamma$}\RightLabel{$\delta_1$}\DeduceC{$!A \land !B$}\RightLabel{\Elim{\land}}\UnaryInfC{$!A$}\end{prooftree}By inductive hypothesis, $!A \land !B$ follows from the!!{undischarged} assumptions~$\Gamma$ of~$\delta_1$. Consider!!a{structure}~\iftag{FOL}{$\Struct{M}$}{$\pAssign{v}$}. We need toshow that, if $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$, then$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$. Suppose$\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$. By our inductivehypothesis ($\Gamma \Entails !A \land !B$), we know that$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \land !B}$. By definition,$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \land !B}$ iff$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$ and$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!B}$. (The case where $!B$ isinferred from $!A \land !B$ is handled similarly.)\item The last inference is \Intro{\lor}: There are two variants: $!A\lor !B$ may be inferred from the premise~$!A$ or thepremise~$!B$. Consider the first case. The !!{derivation} has the form\begin{prooftree}\AxiomC{$\Gamma$}\RightLabel{$\delta_1$}\DeduceC{$!A$}\RightLabel{\Intro{\lor}}\UnaryInfC{$!A \lor !B$}\end{prooftree}By inductive hypothesis, $!A$ follows from the !!{undischarged}assumptions~$\Gamma$ of~$\delta_1$. Consider\iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}. Weneed to show that, if $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$, then$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \lor !B}$. Suppose$\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$; then$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$ since $\Gamma \Entails !A$ (theinductive hypothesis). So it must also be the case that$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \lor !B}$. (The case where $!A\lor !B$ is inferred from~$!B$ is handled similarly.)\item The last inference is \Intro{\lif}: $!A \lif !B$ is inferredfrom a subproof with assumption~$!A$ and conclusion~$!B$, i.e.,\begin{prooftree}\AxiomC{$\Gamma, \Discharge{!A}{n}$}\RightLabel{$\delta_1$}\DeduceC{$!B$}\DischargeRule{\Intro{\lif}}{n}\UnaryInfC{$!A \lif !B$}\end{prooftree}By inductive hypothesis, $!B$ follows from the !!{undischarged}assumptions of~$\delta_1$, i.e., $\Gamma \cup \{!A\} \Entails!B$. Consider\iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}. The!!{undischarged} assumptions of~$\delta$ are just $\Gamma$, since$!A$ is discharged at the last inference. So we need to show that$\Gamma \Entails !A \lif !B$. For reductio, suppose that for some\iftag{FOL}{!!{structure}~$\Struct{M}$}{!!{valuation}~$\pAssign{v}$},$\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$ but$\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!A \lif !B}$. So,$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$ and$\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!B}$. But by hypothesis, $!B$ is aconsequence of $\Gamma \cup \{!A\}$, i.e.,$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!B}$, which is a contradiction. So,$\Gamma \Entails !A \lif !B$.\item The last inference is \FalseInt: Here, $\delta$ ends in\begin{prooftree}\AxiomC{$\Gamma$}\RightLabel{$\delta_1$}\DeduceC{$\lfalse$}\RightLabel{\FalseInt}\UnaryInfC{$!A$}\end{prooftree}By induction hypothesis, $\Gamma \Entails \lfalse$. We have to showthat $\Gamma \Entails !A$. Suppose not; then forsome~$\iftag{FOL}{\Struct{M}}{\pAssign{v}}$ we have$\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma}$ and$\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!A}$. But we always have$\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{\lfalse}$, so this would meanthat $\Gamma \Entails/ \lfalse$, contrary to the inductionhypothesis.\item The last inference is \FalseCl: Exercise.\iftag{FOL}{\item The last inference is \Intro{\lforall}: Then $\delta$ has the form\begin{prooftree}\AxiomC{$\Gamma$}\RightLabel{$\delta_1$}\DeduceC{$!A(a)$}\RightLabel{\Intro{\lforall}}\UnaryInfC{$\lforall[x][!A(x)]$}\end{prooftree}The premise $!A(a)$ is a consequence of the !!{undischarged}assumptions $\Gamma$ by induction hypothesis. Consider somestructure, $\Struct{M}$, such that $\Sat{M}{\Gamma}$. We need toshow that $\Sat{M}{\lforall[x][!A(x)]}$. Since $\lforall[x][!A(x)]$is !!a{sentence}, this means we have to show that for every variableassignment~$s$, $\Sat{M}{!A(x)}[s]$(\olref[syn][ass]{prop:sat-quant}). Since $\Gamma$ consists entirelyof sentences, $\Sat{M}{!B}[s]$ for all $!B \in \Gamma$ by\olref[syn][sat]{defn:satisfaction}. Let $\Struct{M'}$ be like$\Struct{M}$ except that $\Assign{a}{M'} = s(x)$. Since $a$ doesnot occur in~$\Gamma$, $\Sat{M'}{\Gamma}$ by\olref[syn][ext]{cor:extensionality-sent}. Since $\Gamma \Entails!A(a)$, $\Sat{M'}{!A(a)}$. Since $!A(a)$ is !!a{sentence},$\Sat{M'}{!A(a)}[s]$ by\olref[syn][ass]{prop:sentence-sat-true}. $\Sat{M'}{!A(x)}[s]$ iff$\Sat{M'}{!A(a)}$ by \olref[syn][ext]{prop:ext-formulas} (recallthat $!A(a)$ is just $\Subst{!A(x)}{a}{x}$). So,$\Sat{M'}{!A(x)}[s]$. Since $a$ does not occur in~$!A(x)$, by\olref[syn][ext]{prop:extensionality}, $\Sat{M}{!A(x)}[s]$. But $s$was an arbitrary variable assignment, so$\Sat{M}{\lforall[x][!A(x)]}$.\item The last inference is \Intro{\lexists}: Exercise.\item The last inference is \Elim{\forall}: Exercise.}{}\end{enumerate}Now let's consider the possible inferences with several premises:\Elim{\lor}, \Intro{\land}, \iftag{FOL}{\Elim{\lif}, and\Elim{\lexists}}{and \Elim{\lif}}.\begin{enumerate}\item The last inference is \Intro{\land}. $!A \land !B$ is inferredfrom the premises $!A$ and $!B$ and $\delta$ has the form\begin{prooftree}\AxiomC{$\Gamma_1$}\RightLabel{$\delta_1$}\DeduceC{$!A$}\AxiomC{$\Gamma_2$}\RightLabel{$\delta_2$}\DeduceC{$!B$}\RightLabel{\Intro{\land}}\BinaryInfC{$!A \land !B$}\end{prooftree}By induction hypothesis, $!A$ follows from the !!{undischarged}assumptions~$\Gamma_1$ of~$\delta_1$ and $!B$ follows from the!!{undischarged} assumptions~$\Gamma_2$ of~$\delta_2$. The!!{undischarged} assumptions of~$\delta$ are $\Gamma_1 \cup\Gamma_2$, so we have to show that $\Gamma_1 \cup \Gamma_2 \Entails!A \land !B$. Consider\iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}with $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma_1 \cup \Gamma_2}$. Since$\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma_1}$, it must be the case that$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$ as $\Gamma_1 \Entails !A$, andsince $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma_2}$,$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!B}$ since $\Gamma_2 \Entails!B$. Together, $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \land !B}$.\item The last inference is \Elim{\lor}: Exercise.\item The last inference is \Elim{\lif}. $!B$ is inferred from thepremises $!A \lif !B$ and~$!A$. The !!{derivation}~$\delta$ looks like this:\begin{prooftree}\AxiomC{$\Gamma_1$}\RightLabel{$\delta_1$}\DeduceC{$!A \lif !B$}\AxiomC{$\Gamma_2$}\RightLabel{$\delta_2$}\DeduceC{$!A$}\RightLabel{\Elim{\lif}}\BinaryInfC{$!B$}\end{prooftree}By induction hypothesis, $!A \lif !B$ follows from the!!{undischarged} assumptions~$\Gamma_1$ of~$\delta_1$ and $!A$follows from the !!{undischarged} assumptions~$\Gamma_2$of~$\delta_2$. Consider\iftag{FOL}{!!a{structure}~$\Struct{M}$}{!!a{valuation}~$\pAssign{v}$}. Weneed to show that, if $\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma_1 \cup\Gamma_2}$, then $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!B}$. Suppose$\iftag{FOL}{\Sat{M}}{\pSat{v}}{\Gamma_1 \cup \Gamma_2}$. Since$\Gamma_1 \Entails !A \lif !B$, $\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A\lif !B}$. Since $\Gamma_2 \Entails !A$, we have$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$. This means that$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!B}$ (For if$\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!B}$, since$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A}$, we'd have$\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{!A \lif !B}$,contradicting~$\iftag{FOL}{\Sat{M}}{\pSat{v}}{!A \lif !B}$).\item The last inference is \Elim{\lnot}: Exercise.\tagitem{FOL}{The last inference is \Elim{\lexists}: Exercise.}{}\end{enumerate}\end{proof}\tagprob{FOL}\begin{prob}Complete the proof of \olref[fol][ntd][sou]{thm:soundness}.\end{prob}\tagendprob\tagprob{notFOL}\begin{prob}Complete the proof of \olref[pl][ntd][sou]{thm:soundness}.\end{prob}\tagendprob\begin{cor}\ollabel{cor:weak-soundness}If $\Proves !A$, then $!A$ is \iftag{FOL}{valid}{a tautology}.\end{cor}\begin{cor}\ollabel{cor:consistency-soundness}If $\Gamma$ is satisfiable, then it is consistent.\end{cor}\begin{proof}We prove the contrapositive. Suppose that $\Gamma$ is not consistent.Then $\Gamma \Proves \lfalse$, i.e., there is !!a{derivation} of$\lfalse$ from !!{undischarged} assumptions in~$\Gamma$. By\olref{thm:soundness}, any\iftag{FOL}{!!{structure}~$\Struct{M}$}{!!{valuation}~$\pAssign{v}$}that satisfies $\Gamma$ must satisfy $\lfalse$. Since$\iftag{FOL}{\Sat/{M}}{\pSat/{v}}{\lfalse}$ for every\iftag{FOL}{!!{structure}~$\Struct{M}$}{!!{valuation}~$\pAssign{v}$},no \iftag{FOL}{$\Struct{M}$}{$\pAssign{v}$} can satisfy $\Gamma$,i.e., $\Gamma$ is not satisfiable.\end{proof}\end{document}
content/first-order-logic/natural-deduction/identity.tex
124 lines; SHA-256 d5df1d1bb3818a275e2439a584a3851036870182afde592fa6e8f80b55c00add. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: identity\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{fol}{ntd}{ide}\olsection{\usetoken{P}{derivation} with \usetoken{S}{identity}}!!^{derivation}s with !!{identity} require additional inference rules.\begin{defish}\AxiomC{}\RightLabel{\Intro{\eq}}\UnaryInfC{$\eq[t][t]$}\DisplayProof\hfill\begin{tabular}{r}\AxiomC{$\eq[t_1][t_2]$}\AxiomC{$!A(t_1)$}\RightLabel{\Elim{\eq}}\BinaryInfC{$!A(t_2)$}\DisplayProof\\[3ex]\AxiomC{$\eq[t_1][t_2]$}\AxiomC{$!A(t_2)$}\RightLabel{\Elim{\eq}}\BinaryInfC{$!A(t_1)$}\DisplayProof\end{tabular}\end{defish}In the above rules, $t$, $t_1$, and $t_2$ are closed terms. The\Intro{\eq} rule allows us to !!{derive} any identity statement of theform $\eq[t][t]$ outright, from no assumptions.\begin{ex}If $s$ and $t$ are closed terms, then $!A(s), \eq[s][t] \Proves !A(t)$:\begin{prooftree}\AxiomC{$\eq[s][t]$}\AxiomC{$!A(s)$}\RightLabel{$\Elim{\eq}$}\BinaryInfC{$!A(t)$}\end{prooftree}This may be familiar as the ``principle of substitutability ofidenticals,'' or Leibniz' Law.\end{ex}\begin{prob}Prove that $=$ is both symmetric and transitive, i.e., give!!{derivation}s of $\lforall[x][\lforall[y][(\eq[x][y] \lif\eq[y][x])]]$ and $\lforall[x][\lforall[y][\lforall[z]((\eq[x][y]\land \eq[y][z]) \lif \eq[x][z])]]$\end{prob}\begin{ex}We !!{derive} the !!{sentence}\begin{align*}& \lforall[x][\lforall[y][((!A(x) \land !A(y)) \lif \eq[x][y])]]\intertext{from the !!{sentence}}& \lexists[x][\lforall[y][(!A(y) \lif \eq[y][x])]]\end{align*}We develop the !!{derivation} backwards:\begin{prooftree}\AxiomC{$\lexists[x][\lforall[y][(!A(y) \lif \eq[y][x])]]\quad \Discharge{!A(a) \land !A(b)}{1}$}\DeduceC{$\eq[a][b]$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$((!A(a) \land !A(b)) \lif \eq[a][b])$}\RightLabel{\Intro{\lforall}}\UnaryInfC{$\lforall[y][((!A(a) \land !A(y)) \lif \eq[a][y])]$}\RightLabel{\Intro{\lforall}}\UnaryInfC{$\lforall[x][\lforall[y][((!A(x) \land !A(y)) \lif \eq[x][y])]]$}\end{prooftree}We'll now have to use the main assumption: since it is an existential!!{formula}, we use \Elim{\lexists} to !!{derive} the intermediaryconclusion $\eq[a][b]$.\begin{prooftree}\AxiomC{$\lexists[x][\lforall[y][(!A(y) \lif \eq[y][x])]]$}\AxiomC{$\Discharge{\lforall[y][(!A(y) \lif \eq[y][c]])}{2}$}\noLine\UnaryInfC{$\Discharge{!A(a) \land !A(b)}{1}$}\DeduceC{$\eq[a][b]$}\DischargeRule{\Elim{\lexists}}{2}\BinaryInfC{$\eq[a][b]$}\DischargeRule{\Intro{\lif}}{1}\UnaryInfC{$((!A(a) \land !A(b)) \lif \eq[a][b])$}\RightLabel{\Intro{\lforall}}\UnaryInfC{$\lforall[y][((!A(a) \land !A(y)) \lif \eq[a][y])]$}\RightLabel{\Intro{\lforall}}\UnaryInfC{$\lforall[x][\lforall[y][((!A(x) \land !A(y)) \lif \eq[x][y])]]$}\end{prooftree}The sub-!!{derivation} on the top right is completed by using itsassumptions to show that $\eq[a][c]$ and $\eq[b][c]$. This requires twoseparate !!{derivation}s. The !!{derivation} for $\eq[a][c]$ is asfollows:\begin{prooftree}\AxiomC{$\Discharge{\lforall[y][(!A(y) \lif \eq[y][c]])}{2}$}\RightLabel{\Elim{\lforall}}\UnaryInfC{$!A(a) \lif \eq[a][c]$}\AxiomC{$\Discharge{!A(a) \land !A(b)}{1}$}\RightLabel{\Elim{\land}}\UnaryInfC{$!A(a)$}\RightLabel{\Elim{\lif}}\BinaryInfC{$\eq[a][c]$}\end{prooftree}From $\eq[a][c]$ and $\eq[b][c]$ we !!{derive} $\eq[a][b]$ by\Elim{\eq}.\end{ex}\begin{prob}Give !!{derivation}s of the following !!{formula}s:\begin{enumerate}\item $\lforall[x][\lforall[y][((\eq[x][y] \land !A(x)) \lif !A(y))]]$\item $\lexists[x][!A(x)] \land \lforall[y][\lforall[z][((!A(y) \land!A(z)) \lif \eq[y][z])]] \lif \lexists[x][(!A(x) \land\lforall[y][(!A(y) \lif \eq[y][x])])]$\end{enumerate}\end{prob}\end{document}
content/first-order-logic/natural-deduction/soundness-identity.tex
47 lines; SHA-256 2544f37fa6d7a3d81b12c7e7309e1416680df9ee0d8d4e033084299370da0bc8. Open the byte-exact preserved source file.
% Part: first-order-logic% Chapter: natural-deduction% Section: soundness-identity\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{fol}{ntd}{sid}\olsection{Soundness with \usetoken{S}{identity}}\begin{prop}Natural deduction with rules for $\eq$ is sound.\end{prop}\begin{proof}Any !!{formula} of the form $\eq[t][t]$ is valid, sincefor every !!{structure}~$\Struct M$, $\Sat{M}{\eq[t][t]}$. (Note thatwe assume the term $t$ to be closed, i.e., it contains no variables,so variable assignments are irrelevant).Suppose the last inference in !!a{derivation} is \Elim{\eq}, i.e., the!!{derivation} has the following form:\begin{prooftree}\AxiomC{$\Gamma_1$}\RightLabel{$\delta_1$}\DeduceC{$\eq[t_1][t_2]$}\AxiomC{$\Gamma_2$}\RightLabel{$\delta_2$}\DeduceC{$!A(t_1)$}\RightLabel{\Elim{\eq}}\BinaryInfC{$!A(t_2)$}\end{prooftree}The premises $\eq[t_1][t_2]$ and $!A(t_1)$ are !!{derive}d from!!{undischarged} assumptions~$\Gamma_1$ and $\Gamma_2$, respectively.We want to show that $!A(t_2)$ follows from $\Gamma_1 \cup \Gamma_2$.Consider !!a{structure}~$\Struct{M}$ with $\Sat{M}{\Gamma_1 \cup\Gamma_2}$. By induction hypothesis, $\Sat{M}{!A(t_1)}$ and$\Sat{M}{\eq[t_1][t_2]}$. Therefore, $\Value{t_1}{M} = \Value{t_2}{M}$. Let$s$ be any variable assignment, and $m = \Value{t_1}{M} = \Value{t_2}{M}$. By\olref[fol][syn][ext]{prop:ext-formulas}, $\Sat{M}{!A(t_1)}[s]$ iff$\Sat{M}{!A(x)}[\Subst{s}{m}{x}]$ iff $\Sat{M}{!A(t_2)}[s]$. Since$\Sat{M}{!A(t_1)}$, we have $\Sat{M}{!A(t_2)}$.\end{proof}\end{document}