Source and provenance
All 7 files in the exact Syntax and Semantics source boundary appear line by line and are copied byte-for-byte for download. All 374 formulas link to exact source coordinates.
content/propositional-logic/syntax-and-semantics/formation-sequences.tex
153 lines; SHA-256 4057bf6b85c70ad9ee56dc5365b21a1daa0a99550079bdafb1ab16f36b943356. Open the preserved source file.
% Part: first-order-logic% Chapter: syntax-and-semantics% Section: formation-sequences\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{pl}{syn}{fseq}\olsection{Formation Sequences}Defining !!{formula}s via an inductive definition, and thecomplementary technique of proving properties of !!{formula}s viainduction, is an elegant and efficient approach. However, it canalso be useful to consider a more bottom-up, step-by-step approachto the construction of !!{formula}s, which we do here using thenotion of a \emph{formation sequence}.\begin{defn}[Formation sequences for formulas]\ollabel{defn:fseq-frm}A finite sequence $\tuple{!A_0,\dotsc,!A_n}$ of strings ofsymbols from the language~$\Lang L_0$ is a \emph{formationsequence} for $!A$ if $!A \ident !A_n$ and for all $i \leq n$,either $!A_i$ is an atomic formula or there exist $j,k < i$such that one of the following holds:\begin{enumerate}\tagitem{prvNot}{$!A_i \ident \lnot !A_j$.}{}%\tagitem{prvAnd}{$!A_i \ident (!A_j \land !A_k)$.}{}%\tagitem{prvOr}{$!A_i \ident (!A_j \lor !A_k)$.}{}%\tagitem{prvIf}{$!A_i \ident (!A_j \lif !A_k)$.}{}%\tagitem{prvIff}{$!A_i \ident (!A_j \liff !A_k)$.}{}%\end{enumerate}\end{defn}\begin{ex}\[\tuple{\Obj p_0,\Obj p_1,(\Obj p_1 \land \Obj p_0),\lnot (\Obj p_1 \land \Obj p_0)}\]is a formation sequence of$\lnot (\Obj p_1 \land \Obj p_0)$, as is\[\tuple{\Obj p_0,\Obj p_1,\Obj p_0,(\Obj p_1 \land \Obj p_0),(\Obj p_0 \lif \Obj p_1),\lnot (\Obj p_1 \land \Obj p_0)}.\]%As can be seen from the second example, formation sequencesmay contain `junk': formulas which are redundant or do notcontribute to the construction.\end{ex}\begin{prop}\ollabel{prop:formed}Every !!{formula}~$!A$ in~$\Frm[L_0]$ has a formation sequence.\end{prop}\begin{proof}Suppose $!A$ is atomic. Then the sequence~$\tuple{!A}$ is aformation sequence for~$!A$.%Now suppose that $!B$ and~$!C$ have formation sequences$\tuple{!B_0,\dotsc,!B_n}$ and $\tuple{!C_0,\dotsc,!C_m}$respectively.%\begin{enumerate}\tagitem{prvNot}{If $!A \ident \lnot !B$,then $\tuple{!B_0,\dotsc,!B_n,\lnot !B_n}$is a formation sequence for~$!A$.}{}\tagitem{prvAnd}{If $!A \ident (!B \land !C)$,then $\tuple{!B_0,\dotsc,!B_n,!C_0,\dotsc,!C_m,(!B_n \land !C_m)}$is a formation sequence for~$!A$.}{}\tagitem{prvOr}{If $!A \ident (!B \lor !C)$,then $\tuple{!B_0,\dotsc,!B_n,!C_0,\dotsc,!C_m,(!B_n \lor !C_m)}$is a formation sequence for~$!A$.}{}\tagitem{prvIf}{If $!A \ident (!B \lif !C)$,then $\tuple{!B_0,\dotsc,!B_n,!C_0,\dotsc,!C_m,(!B_n \lif !C_m)}$is a formation sequence for~$!A$.}{}\tagitem{prvIff}{If $!A \ident (!B \liff !C)$,then $\tuple{!B_0,\dotsc,!B_n,!C_0,\dotsc,!C_m,(!B_n \liff !C_m)}$is a formation sequence for~$!A$.}{}\end{enumerate}By the principle of induction on !!{formula}s,every !!{formula} has a formation sequence.\end{proof}We can also prove the converse. This is important because it showsthat our two ways of defining formulas are equivalent: they givethe same results. It also means that we can prove theorems aboutformulas by using ordinary induction on the length of formationsequences.\begin{lem}\ollabel{lem:fseq-init}Suppose that $\tuple{!A_0,\dotsc,!A_n}$ is a formation sequencefor~$!A_n$, and that $k \leq n$. Then $\tuple{!A_0,\dotsc,!A_k}$is a formation sequence for~$!A_k$.\end{lem}\begin{proof}Exercise.\end{proof}\begin{thm}\ollabel{thm:fseq-frm-equiv}$\Frm[L_0]$ is the set of all strings of symbolsin the language~$\Lang L_0$ with a formation sequence.\end{thm}\begin{proof}Let $F$ be the set of all strings of symbols in thelanguage~$\Lang L_0$ that have a formation sequence.We have seen in \olref[pl][syn][fseq]{prop:formed} that$\Frm[L_0] \subseteq F$, so now we prove the converse.Suppose $!A$ has a formation sequence $\tuple{!A_0,\dotsc,!A_n}$.We prove that $!A \in \Frm[L_0]$ by strong induction on~$n$.Our induction hypothesis is that every string of symbols with aformation sequence of length $m < n$ is in~$\Frm[L_0]$.By the definition of a formation sequence, either $!A_n$ isatomic or there must exist $j,k < n$ such that one of thefollowing is the case:\begin{enumerate}\tagitem{prvNot}{$!A_n \ident \lnot !A_j$.}{}%\tagitem{prvAnd}{$!A_n \ident (!A_j \land !A_k)$.}{}%\tagitem{prvOr}{$!A_n \ident (!A_j \lor !A_k)$.}{}%\tagitem{prvIf}{$!A_n \ident (!A_j \lif !A_k)$.}{}%\tagitem{prvIff}{$!A_n \ident (!A_j \liff !A_k)$.}{}%\end{enumerate}Now we reason by cases. If $!A_n$ is atomic then$!A_n \in \Frm[L_0]$. Suppose instead that $!A \equiv(!A_j \land !A_k)$. By \olref[pl][syn][fseq]{lem:fseq-init},$\tuple{!A_0,\dotsc,!A_j}$ and $\tuple{!A_0,\dotsc,!A_k}$ areformation sequences for $!A_j$ and~$!A_k$ respectively. Sincethese are proper initial subsequences of the formation sequencefor~$!A$, they both have length less than~$n$. Therefore bythe induction hypothesis, $!A_j$ and~$!A_k$ are in~$\Frm[L_0]$,and so by the definition of !!a{formula}, so is$(!A_j \land !A_k)$. The other cases follow by parallelreasoning.\end{proof}\end{document}
content/propositional-logic/syntax-and-semantics/formulas.tex
182 lines; SHA-256 8777d77e48e3a41a527b1b737c67e00cb7850f4fa0902ce24846000b40724756. Open the preserved source file.
% Part: propositional-logic% Chapter: syntax-and-semantics% Section: formulas\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{pl}{syn}{fml}\olsection{Propositional \usetoken{P}{formula}}!!^{formula}s of propositional logic are built up from\emph{!!{propositionalvariable}s}\iftag{prvFalse}{\iftag{prvTrue}{,}{ and} thepropositional constant~$\lfalse$}{}\iftag{prvTrue}{\iftag{prvFalse}{and}{} the propositional constant~$\ltrue$}{} using \emph{logicalconnectives}.\begin{enumerate}\item !!^a{denumerable} set~$\PVar$ of !!{propositional variable}s $\Obj p_0$,$\Obj p_1$, \dots\tagitem{prvFalse}{The propositional constant for !!{falsity}~$\lfalse$.}{}\tagitem{prvTrue}{The propositional constant for !!{truth}~$\ltrue$.}{}\item The logical connectives:\startycommalist\iftag{prvNot}{\ycomma $\lnot$ (negation)}{}%\iftag{prvAnd}{\ycomma $\land$ (conjunction)}{}%\iftag{prvOr}{\ycomma $\lor$ (disjunction)}{}%\iftag{prvIf}{\ycomma $\lif$ (!!{conditional})}{}%\iftag{prvIff}{\ycomma $\liff$ (!!{biconditional})}{}%\item Punctuation marks: (, ), and the comma.\end{enumerate}We denote this language of propositional logic by $\Lang L_0$.\iftag{defNot,defOr,defAnd,defIf,defIff,defTrue,defFalse,defEx,defAll}{%In addition to the primitive connectives introducedabove, we also use the following \emph{defined} symbols:\startycommalist\iftag{defNot}{\ycomma $\lnot$ (negation)}{}%\iftag{defAnd}{\ycomma $\land$ (conjunction)}{}%\iftag{defOr}{\ycomma $\lor$ (disjunction)}{}%\iftag{defIf}{\ycomma $\lif$ (!!{conditional})}{}%\iftag{defIff}{\ycomma $\liff$ (!!{biconditional})}{}%\iftag{defFalse}{\ycomma $\lfalse$ (!!{falsity})}{}%\iftag{defTrue}{\ycomma $\ltrue$ (!!{truth})}}{}.\begin{tagblock}{defNot,defOr,defAnd,defIf,defIff,defTrue,defFalse,defEx,defAll}\begin{explain}A defined symbol is not officially part of the language, but isintroduced as an informal abbreviation: it allows us to abbreviateformulas which would, if we only used primitive symbols, get quitelong. This is obviously an advantage. The bigger advantage, however,is that proofs become shorter. If a symbol is primitive, it has to betreated separately in proofs. The more primitive symbols, therefore,the longer our proofs.\end{explain}\end{tagblock}% Alternate symbols\begin{intro}You may be familiar with different terminology and symbols than theones we use above. Logic texts (and teachers) commonly use either$\sim$, $\neg$, and~!\ for ``negation'', $\wedge$, $\cdot$, and $\&$for ``conjunction''. Commonly used symbols for the ``conditional'' or``implication'' are $\rightarrow$, $\Rightarrow$, and $\supset$.\iftag{prvIff,defIff}{Symbols for ``biconditional,'' ``bi-implication,''or ``(material) equivalence'' are $\leftrightarrow$,$\Leftrightarrow$, and $\equiv$.}{}\iftag{prvFalse,defFalse}{The $\lfalse$ symbol is variously called``falsity,'' ``falsum,'' ``absurdity,'' or ``bottom.''}{}\iftag{prvTrue,defTrue}{The $\ltrue$ symbol is variously called``truth,'' ``verum,'' or ``top.''}{}\end{intro}\begin{defn}[Formula]\ollabel{defn:formulas}The set~$\Frm[L_0]$ of \emph{!!{formula}s} of propositional logicis defined inductively as follows:\begin{enumerate}\tagitem{prvFalse}{$\lfalse$ is an atomic !!{formula}.}{}\tagitem{prvTrue}{$\ltrue$ is an atomic !!{formula}.}{}\item Every !!{propositional variable}~$\Obj p_i$ is an atomic!!{formula}.\tagitem{prvNot}{If $!A$ is !!a{formula}, then $\lnot !A$ is!!a{formula}.}{}\tagitem{prvAnd}{If $!A$ and $!B$ are !!{formula}s, then $(!A \land!B)$ is !!a{formula}.}{}\tagitem{prvOr}{If $!A$ and $!B$ are !!{formula}s, then $(!A \lor !B)$is !!a{formula}.}{}\tagitem{prvIf}{If $!A$ and $!B$ are !!{formula}s, then $(!A \lif !B)$is !!a{formula}.}{}\tagitem{prvIff}{If $!A$ and $!B$ are !!{formula}s, then $(!A \liff !B)$is !!a{formula}.}{}\tagitem{limitClause}{Nothing else is !!a{formula}.}{}\end{enumerate}\end{defn}\begin{explain}The definition of !!{formula}s is an\emph{inductive definition}. Essentially, we construct the set of!!{formula}s in infinitely many stages. In the initial stage, wepronounce all atomic formulas to be formulas; this corresponds to thefirst few cases of the definition, i.e., the cases for\iftag{prvTrue}{$\ltrue$, }{}%\iftag{prvFalse}{$\lfalse$, }{}%$\Obj p_i$. ``Atomic !!{formula}''thus means any !!{formula} of this form.The other cases of the definition give rules for constructing new!!{formula}s out of !!{formula}s already constructed. At the secondstage, we can use them to construct !!{formula}s out of atomic!!{formula}s. At the third stage, we construct new formulas from theatomic formulas and those obtained in the second stage, and so on. A!!{formula} is anything that is eventually constructed at such astage, and nothing else.\end{explain}When writing a formula $(!B \ast !C)$ constructed from $!B$, $!C$using a two-place connective~$\ast$, we will often leave out theoutermost pair of parentheses and write simply~$!B \ast !C$.\begin{tagblock}{defNot,defOr,defAnd,defIf,defIff,defTrue,defFalse,defEx,defAll}\begin{defn}Formulas constructed using the defined operators are to be understoodas follows:\begin{tagenumerate}{defTrue,defFalse,defNot,defOr,defAnd,defIf,defIff,defEx,defAll}\tagitem{defTrue}{$\ltrue$ abbreviates\iftag{prvFalse}{$\lnot\lfalse$}{$(!A \lor \lnot !A)$ for somefixed atomic !!{formula}~$!A$}.}{}\tagitem{defFalse}{$\lfalse$ abbreviates\iftag{prvTrue}{$\lnot\ltrue$}{$(!A \land \lnot !A)$ for somefixed atomic !!{formula}~$!A$}.}{}\tagitem{defNot}{$\lnot !A$ abbreviates $!A \lif \lfalse$.}{}\tagitem{defOr}{$!A \lor !B$ abbreviates\iftag{prvAnd}{$\lnot(\lnot !A \land \lnot !B)$}{$\lnot !A \lif!B$}.}{}\tagitem{defAnd}{$!A \land !B$ abbreviates\iftag{prvOr}{$\lnot(\lnot !A \lor \lnot !B)$}{$\lnot (!A \lif\lnot !B)$}.}{}\tagitem{defIf}{$!A \lif !B$ abbreviates\iftag{prvOr}{$\lnot !A \lor !B)$}{$\lnot (!A \land \lnot !B)$}.}{}\tagitem{defIff}{$!A \liff !B$ abbreviates $(!A \lif !B) \land (!B\lif !A)$.}{}\end{tagenumerate}\end{defn}\end{tagblock}\begin{defn}[Syntactic identity]The symbol $\ident$ expresses syntactic identity between strings ofsymbols, i.e., $!A \ident !B$ iff $!A$ and $!B$ are strings of symbolsof the same length and which contain the same symbol in each place.\end{defn}The $\ident$ symbol may be flanked by strings obtained byconcatenation, e.g., $!A \ident (!B \lor !C)$ means: the string ofsymbols~$!A$ is the same string as the one obtained by concatenatingan opening parenthesis, the string $!B$, the $\lor$ symbol, thestring~$!C$, and a closing parenthesis, in this order. If this is thecase, then we know that the first symbol of $!A$ is an openingparenthesis, $!A$ contains $!B$ as a substring (starting at the secondsymbol), that substring is followed by $\lor$, etc.\end{document}
content/propositional-logic/syntax-and-semantics/introduction.tex
79 lines; SHA-256 2ad06497283fa1399d56862c75caf1a418bb753fbb0195658af9f0c57183a441. Open the preserved source file.
% Part: propositional-logic% Chapter: syntax-and-semantics% Section: introduction\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{pl}{syn}{int}\olsection{Introduction}Propositional logic deals with !!{formula}s that are built from!!{propositional variable}s using the propositional connectives$\lnot$, $\land$, $\lor$, $\lif$, and $\liff$. Intuitively,!!a{propositional variable}~$p$ stands for a sentence or propositionthat is true or false. Whenever the ``truth value'' of the!!{propositional variable} in !!a{formula} is determined, so is thetruth value of any !!{formula}s formed from them using propositionalconnectives. We say that propositional logic is \emph{truthfunctional}, because its semantics is given by functions of truthvalues. In particular, in propositional logic we leave out ofconsideration any further determination of truth and falsity, e.g.,whether something is necessarily true rather than just contingentlytrue, or whether something is known to be true, or whether somethingis true now rather than was true or will be true. We only considertwo truth values true ($\True$) and false ($\False$), and so excludefrom discussion the possibility that a statement may be neither truenor false, or only half true. We also concentrate only on connectives wherethe truth value of !!a{formula} built from them is completelydetermined by the truth values of its parts (and not, say, on itsmeaning). In particular, whether the truth value of conditionals inEnglish is truth functional in this sense is contentious. The materialconditional~$\lif$ is; other logics deal with conditionals that arenot truth functional.In order to develop the theory and metatheory of truth-functionalpropositional logic, we must first define the syntax and semantics ofits expressions. We will describe one way of constructing!!{formula}s from !!{propositional variable}s using the connectives.Alternative definitions are possible. Other systems will choosedifferent symbols, will select different sets of connectives asprimitive, and will use parentheses differently (or even not at all,as in the case of so-called Polish notation). What all approacheshave in common, though, is that the formation rules define the set of!!{formula}s \emph{inductively}. If done properly, every expressioncan result essentially in only one way according to the formationrules. The inductive definition resulting in expressions that are\emph{uniquely readable} means we can give meanings to theseexpressions using the same method---inductive definition.Giving the meaning of expressions is the domain of semantics. Thecentral concept in semantics for propositional logic is that ofsatisfaction in !!a{valuation}. !!^a{valuation}~$\pAssign{v}$ assignstruth values $\True$, $\False$ to the !!{propositional variable}s. Any!!{valuation} determines a truth value $\pValue{v}(!A)$ for any!!{formula}~$!A$. !!^a{formula} is satisfied in!!a{valuation}~$\pAssign{v}$ iff $\pValue{v}(!A) = \True$---we writethis as $\pSat{v}{!A}$. This relation can also be defined by induction onthe structure of~$!A$, using the truth functions for the logicalconnectives to define, say, satisfaction of $!A \land !B$ in terms ofsatisfaction (or not) of $!A$ and~$!B$.On the basis of the satisfaction relation $\pSat{v}{!A}$ for sentenceswe can then define the basic semantic notions of tautology,entailment, and satisfiability. !!^a{formula} is a tautology,$\Entails !A$, if every !!{valuation} satisfies it, i.e.,$\pValue{v}(!A) = \True$ for any~$\pAssign{v}$. It is entailed by aset of !!{formula}s, $\Gamma \Entails !A$, if every !!{valuation} thatsatisfies all the !!{formula}s in~$\Gamma$ also satisfies~$!A$. And aset of !!{formula}s is satisfiable if some !!{valuation} satisfies all!!{formula}s in it at the same time. Because !!{formula}s areinductively defined, and satisfaction is in turn defined by inductionon the structure of !!{formula}s, we can use induction to proveproperties of our semantics and to relate the semantic notionsdefined.\end{document}
content/propositional-logic/syntax-and-semantics/preliminaries.tex
120 lines; SHA-256 78673f8419aa1f936f1ecc5629c0fa92c74fd4ee3102badf5f389e3d775f48d6. Open the preserved source file.
% Part: propositional-logic% Chapter: propositional-logic% Section: preliminaries\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{pl}{syn}{pre}\olsection{Preliminaries}\begin{thm}[\emph{Principle of induction on !!{formula}s}]\ollabel{thm:induction}If some property~$P$ holds for all the atomic !!{formula}s and issuch that\begin{enumerate}\tagitem{prvNot}{it holds for $\lnot !A$ whenever it holdsfor~$!A$;}{}\tagitem{prvAnd}{it holds for $(!A \land !B)$whenever it holds for $!A$ and~$!B$;}{}\tagitem{prvOr}{it holds for $(!A \lor !B)$whenever it holds for $!A$ and~$!B$;}{}\tagitem{prvIf}{it holds for $(!A \lif !B)$whenever it holds for $!A$ and~$!B$;}{}\tagitem{prvIff}{it holds for $(!A \liff !B)$whenever it holds for $!A$ and~$!B$;}{}\end{enumerate}then $P$ holds for all !!{formula}s.\end{thm}\begin{proof}Let $S$ be the collection of all !!{formula}s withproperty~$P$. Clearly $S \subseteq \Frm[L_0]$. $S$~satisfies all theconditions of \olref[fml]{defn:formulas}: it contains all atomic!!{formula}s and is closed under the !!{operator}s. $\Frm[L_0]$ isthe smallest such class, so $\Frm[L_0] \subseteq S$. So $\Frm[L_0] = S$, andevery formula has property~$P$.\end{proof}\begin{prop}\ollabel{prop:balanced}Any !!{formula} in~$\Frm[L_0]$ is \emph{balanced}, in that it hasas many left parentheses as right ones.\end{prop}\begin{prob}Prove \olref[pl][syn][pre]{prop:balanced}\end{prob}\begin{prop} \ollabel{prop:noinit}No proper initial segment of !!a{formula} is !!a{formula}.\end{prop}\begin{prob}Prove \olref[pl][syn][pre]{prop:noinit}\end{prob}\begin{prop}[Unique Readability]Any !!{formula}~$!A$ in $ \Frm[L_0]$ has exactly one parsing as one ofthe following\begin{enumerate}\tagitem{prvFalse}{$\lfalse$.}{}\tagitem{prvTrue}{$\ltrue$.}{}\item $\Obj p_n$ for some $\Obj p_n \in \PVar$.\tagitem{prvNot}{$\lnot !B$ for some !!{formula}~$!B$.}{}\tagitem{prvAnd}{$(!B \land !C)$ for some !!{formula}s $!B$ and~$!C$.}{}\tagitem{prvOr}{$(!B \lor !C)$ for some !!{formula}s $!B$ and~$!C$.}{}\tagitem{prvIf}{$(!B \lif !C)$ for some !!{formula}s $!B$ and~$!C$.}{}\tagitem{prvIff}{$(!B \liff !C)$ for some !!{formula}s $!B$ and~$!C$.}{}\end{enumerate}Moreover, this parsing is \emph{unique}.\end{prop}\begin{proof}By induction on $!A$. For instance, suppose that $!A$ has two distinctreadings as $(!B \lif !C)$ and $(!B' \lif !C')$. Then $!B$ and $!B'$must be the same (or else one would be a proper initial segment of theother); so if the two readings of $!A$ are distinct it must be because$!C$ and $!C'$ are distinct readings of the same sequence of symbols,which is impossible by the inductive hypothesis.\end{proof}\begin{defn}[Uniform Substitution]If $!A$ and $!B$ are !!{formula}s, and $\Obj p_i$ is a !!{propositionalvariable}, then $\Subst{!A}{!B}{\Obj p_i}$ denotes the result ofreplacing each occurrence of $\Obj p_i$ by an occurrence of $!B$ in $!A$;similarly, the simultaneous substitution of $\Obj p_1$, \dots,~$\Obj p_n$ by!!{formula}s $!B_1$, \dots,~$!B_n$ is denoted by$\SSubst{!A}{\subst{!B_1}{\Obj p_1},\dots,\subst{!B_n}{\Obj p_n}}$.\end{defn}\begin{prob} For each of the five !!{formula}s below determine whether the!!{formula} can be expressed as a substitution \( \Subst{!A}{!B}{\Obj p_i} \)where \( !A \) is (i) \( \Obj p_0 \); (ii) \( ( \lnot \Obj p_0 \land \Objp_1) \); and (iii) \( ( ( \lnot \Obj p_0 \lif \Obj p_1 ) \land \Objp_2 ) \). In each case specify the relevant substitution.\begin{enumerate}\item \( \Obj p_1 \)\item \( ( \lnot \Obj p_0 \land \Obj p_0 ) \)\item \( ( ( \Obj p_0 \lor \Obj p_1 ) \land \Obj p_2 ) \)\item \( \lnot ( ( \Obj p_0 \lif \Obj p_1 ) \land \Obj p_2 ) \)\item \( (( \lnot ( \Obj p_0 \lif \Obj p_1 ) \lif ( \Obj p_0 \lor \Obj p_1 )) \land \lnot ( \Obj p_0 \land \Obj p_1 )) \)\end{enumerate}\end{prob}\begin{prob}Give a mathematically rigorous definition of $\Subst{!A}{!B}{p}$ byinduction.\end{prob}\end{document}
content/propositional-logic/syntax-and-semantics/semantic-notions.tex
96 lines; SHA-256 0167b2bab0dc2a75d011556643190a246d29831244a60bde5515b1b2f431406a. Open the preserved source file.
% Part: propositional-logic% Chapter: syntax-and-semantics% Section: semantic-notions\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{pl}{syn}{sem}\olsection{Semantic Notions}We define the following semantic notions:\begin{defn}\begin{enumerate}\item !!^a{formula}~$!A$ is \emph{satisfiable} if forsome~$\pAssign{v}$, $\pSat{v}{!A}$; it is\emph{unsatisfiable} if for no $\pAssign{v}$, $\pSat{v}{!A}$;\item !!^a{formula}~$!A$ is a \emph{tautology} if $\pSat{v}{!A}$ forall !!{valuation}s~$\pAssign{v}$;\item !!^a{formula}~$!A$ is \emph{contingent} if it is satisfiable butnot a tautology;\item If $\Gamma$ is a set of !!{formula}s, $\Gamma \Entails !A$ (``$\Gamma$entails $!A$'') if and only if $\pSat{v}{!A}$ for every!!{valuation}~$\pAssign{v}$ for which $\pSat{v}{\Gamma}$.\item If $\Gamma$ is a set of !!{formula}s, $\Gamma$ is\emph{satisfiable} if there is !!a{valuation}~$\pAssign{v}$ for which$\pSat{v}{\Gamma}$, and $\Gamma$ is\emph{unsatisfiable} otherwise.\end{enumerate}\end{defn}\begin{prob}For each of the following four !!{formula}s determine whether itis (a)~satisfiable, (b)~tautology, and (c)~contingent.\begin{enumerate}\item \( ( \Obj p_0 \lif ( \lnot \Obj p_1 \lif \lnot \Obj p_0 ) ) \).\item \( ( ( \Obj p_0 \land \lnot \Obj p_1 ) \lif ( \lnot \Obj p_0 \land \Obj p_2 )) \liff ( ( \Obj p_2 \lif \Obj p_0 ) \lif ( \Obj p_0 \lif \Obj p_1 )) \).\item \( ( \Obj p_0 \liff \Obj p_1 ) \lif ( \Obj p_2 \liff \lnot \Obj p_1 ) \).\item \( (( \Obj p_0 \liff ( \lnot \Obj p_1 \land \Obj p_2 )) \lor ( \Obj p_2 \lif ( \Obj p_0 \liff \Obj p_1 ))) \).\end{enumerate}\end{prob}\begin{prop}\ollabel{prop:semanticalfacts}\begin{enumerate}\item $!A$ is a tautology if and only if$\emptyset \Entails !A$;\item If $\Gamma \Entails !A$ and $\Gamma \Entails !A \lif !B$ then$\Gamma \Entails !B$;\item If $\Gamma$ is satisfiable then every finite subset of $\Gamma$is also satisfiable;\item \ollabel{def:monotonicity} Monotonicity: if $\Gamma \subseteq \Delta$and $\Gamma \Entails !A$ then also $\Delta \Entails !A$;\item \ollabel{def:Cut} Transitivity: if $\Gamma \Entails !A$ and$\Delta \cup \{ !A\} \Entails !B$ then $\Gamma \cup \Delta \Entails!B$.\end{enumerate}\end{prop}\begin{proof}Exercise.\end{proof}\begin{prob}Prove \olref[pl][syn][sem]{prop:semanticalfacts}\end{prob}\begin{prop}\ollabel{prop:entails-unsat}$\Gamma \Entails !A$ if and only if $\Gamma \cup \{\lnot !A\}$is unsatisfiable.\end{prop}\begin{proof}Exercise.\end{proof}\begin{prob}Prove \olref[pl][syn][sem]{prop:entails-unsat}\end{prob}\begin{thm}[Semantic Deduction Theorem]\ollabel{thm:sem-deduction} $\Gamma \Entails !A \lif !B$ if and onlyif $\Gamma \cup \{!A\} \Entails !B$.\end{thm}\begin{proof}Exercise.\end{proof}\begin{prob}Prove \olref[pl][syn][sem]{thm:sem-deduction}\end{prob}\end{document}
content/propositional-logic/syntax-and-semantics/syntax-and-semantics.tex
30 lines; SHA-256 799d1dab63cda19a28c1dbf7097052fb790bbce609aecd5367d2e368decdb18b. Open the preserved source file.
% Part: propositional-logic% Chapter: syntax-and-semantics\documentclass[../../../include/open-logic-chapter]{subfiles}\begin{document}\olchapter{pl}{syn}{Syntax and Semantics}\begin{editorial}This is a very quick summary of definitions only. It should beexpanded to provide a gentle intro to proofs by induction onformulas, with lots more examples.\end{editorial}\olimport{introduction}\olimport{formulas}\olimport{preliminaries}\olimport{formation-sequences}\olimport{valuations-sat}\olimport{semantic-notions}\OLEndChapterHook\end{document}
content/propositional-logic/syntax-and-semantics/valuations-sat.tex
198 lines; SHA-256 d1454e8c2366f3a204a371523f41feacbdc72402f7a3a7ae6635b60b17c90481. Open the preserved source file.
% Part: propositional-logic% Chapter: syntax-and-semantics% Section: valuations-sat\documentclass[../../../include/open-logic-section]{subfiles}\begin{document}\olfileid{pl}{syn}{val}\olsection{\usetoken{P}{valuation} and Satisfaction}\begin{defn}[!!^{valuation}s]Let $\{\True, \False\}$ be the set of the two truth values, ``true''and ``false.'' A \emph{!!{valuation}} for $\Lang{L_0}$ is afunction~$\pAssign{v}$ assigning either $\True$ or $\False$ to the!!{propositional variable}s of the language, i.e., $\pAssign{v} \colon\PVar \to \{\True, \False \}$.\end{defn}\begin{defn}Given !!a{valuation}~$\pAssign{v}$, define the evaluation function$\pValue{v} \colon \Frm[L_0] \to \{\True, \False \}$ inductively by:\begin{align*}\iftag{prvFalse}{\pValue{v}(\lfalse) & = \False; \\}{}\iftag{prvTrue}{\pValue{v}(\ltrue) & = \True; \\}{}\pValue{v}(\Obj p_n) & = \pAssign{v}(\Obj p_n); \\\iftag{prvNot}{\pValue{v}(\lnot !A) & = \begin{cases}\True & \text{if } \pValue{v}(!A) = \False;\\\False & \text{otherwise.}\end{cases} \\ }{}\iftag{prvAnd}{\pValue{v}(!A \land !B) & = \begin{cases}\True &\text{if $\pValue{v}(!A) = \True$ and $\pValue{v}(!B) = \True$;}\\\False &\text{if $\pValue{v}(!A) = \False$ or $\pValue{v}(!B) = \False$}.\end{cases}\\}{}\iftag{prvOr}{\pValue{v}(!A \lor !B) & = \begin{cases}\True &\text{if $\pValue{v}(!A) = \True$ or $\pValue{v}(!B) = \True$;}\\\False &\text{if $\pValue{v}(!A) = \False$ and $\pValue{v}(!B) = \False$}.\end{cases}\\}{}\iftag{prvIf}{\pValue{v}(!A \lif !B) & = \begin{cases}\True &\text{if $\pValue{v}(!A) = \False$ or $\pValue{v}(!B) = \True$;}\\\False &\text{if $\pValue{v}(!A) = \True$ and $\pValue{v}(!B) = \False$}.\end{cases}\\}{}\iftag{prvIff}{\pValue{v}(!A \liff !B) & = \begin{cases}\True &\text{if $\pValue{v}(!A) = \pValue{v}(!B)$;}\\\False &\text{if $\pValue{v}(!A) \neq \pValue{v}(!B)$}.\end{cases}}{}\end{align*}\end{defn}\begin{explain}The clauses correspond to the following truth tables:\begin{center}\iftag{prvNot}{\begin{tabular}{|c||c|} \hline$!A$ & $ \lnot !A$ \\\hline \hline$\True$ & $\False$ \\$\False$ & $\True$ \\\hline\end{tabular}}{}\iftag{prvAnd}{\begin{tabular}{|cc||c|} \hline$!A$ & $!B$ & $!A \land !B$ \\\hline \hline$\True$ & $\True$ & $\True$ \\$\True$ & $\False$ & $\False$ \\$\False$ & $\True$ & $\False$ \\$\False$ & $\False$ & $\False$ \\\hline\end{tabular}}{}\iftag{prvOr}{\begin{tabular}{|cc||c|} \hline$!A$ & $!B$ & $!A \lor !B$ \\\hline \hline$\True$ & $\True$ & $\True$ \\$\True$ & $\False$ & $\True$ \\$\False$ & $\True$ & $\True$ \\$\False$ & $\False$ & $\False$ \\\hline\end{tabular}}{}%\iftag{notprvNot,notprvAnd,notprvOr,notprvIf}{}{\\[1em]}\iftag{prvIf}{\begin{tabular}{|cc||c|} \hline$!A$ & $!B$ & $!A \lif !B$ \\\hline \hline$\True$ & $\True$ & $\True$ \\$\True$ & $\False$ & $\False$ \\$\False$ & $\True$ & $\True$ \\$\False$ & $\False$ & $\True$ \\\hline\end{tabular}}{}\iftag{prvIff}{\begin{tabular}{|cc||c|} \hline$!A$ & $!B$ & $!A \liff !B$ \\\hline \hline$\True$ & $\True$ & $\True$ \\$\True$ & $\False$ & $\False$ \\$\False$ & $\True$ & $\False$ \\$\False$ & $\False$ & $\True$ \\\hline\end{tabular}}{}\end{center}\end{explain}\begin{prob}Consider adding to $\Lang{L_0}$ a ternary connective $\diamondsuit$with evaluation given by\begin{gather*}\pValue{v}(\diamondsuit( !A , !B , !C ) ) = \begin{cases}\pValue{v}( !B ) &\text{if $\pValue{v}(!A) = \True$;}\\\pValue{v}( !C ) &\text{if $\pValue{v}(!A) = \False $}.\end{cases}\end{gather*}Write down the truth table for this connective.\end{prob}\begin{thm}[Local Determination]\ollabel{thm:LocalDetermination} Suppose that $\pAssign{v_1}$ and$\pAssign{v_2}$ are !!{valuation}s that agree on the !!{propositionalvariable}s occurring in $!A$, i.e., $\pAssign{v_1}(\Obj p_n) =\pAssign{v_2}(\Obj p_n)$ whenever $\Obj p_n$ occurs in some!!{formula}~$!A$. Then $\pValue{v_1}$ and $\pValue{v_2}$ also agreeon~$!A$, i.e., $\pValue{v_1}(!A) = \pValue{v_2}(!A)$.\end{thm}\begin{proof}By induction on $!A$.\end{proof}\begin{defn}[Satisfaction]\ollabel{defn:satisfaction} We can inductively define the notion of\emph{satisfaction of !!a{formula}~$!A$ by!!a{valuation}~$\pAssign{v}$}, $\pSat{v}{!A}$, as follows.(We write $\pSat/{v}{!A}$ to mean ``not $\pSat{v}{!A}$.'')\begin{enumerate}\tagitem{prvFalse}{%\indcase{!A}{\lfalse}{$\pSat/{v}{\indfrm}$.}}{}\tagitem{prvTrue}{%\indcase{!A}{\ltrue}{$\pSat{v}{\indfrm}$.}}{}\item \indcase{!A}{\Obj p_i}{$\pSat{v}{\indfrm}$iff $\pAssign{v}(\Obj p_i) = \True$.}\tagitem{prvNot}{%\indcase{!A}{\lnot !B}{$\pSat{v}{\indfrm}$ iff$\pSat/{v}{!B}$.}}{}\tagitem{prvAnd}{%\indcase{!A}{(!B \land !C)}{$\pSat{v}{\indfrm}$ iff $\pSat{v}{!B}$and $\pSat{v}{!C}$.}}{}\tagitem{prvOr}{%\indcase{!A}{(!B \lor !C)}{$\pSat{v}{\indfrm}$ iff$\pSat{v}{!B}$ or $\pSat{v}{!C}$ (or both).}}{}\tagitem{prvIf}{%\indcase{!A}{(!B \lif !C)}{$\pSat{v}{\indfrm}$ iff $\pSat/{v}{!B}$or $\pSat{v}{!C}$ (or both).}}{}\tagitem{prvIff}{%\indcase{!A}{(!B \liff !C)}{$\pSat{v}{\indfrm}$ iff either both$\pSat{v}{!B}$ and $\pSat{v}{!C}$, or neither $\pSat{v}{!B}$nor $\pSat{v}{!C}$.}}{}\end{enumerate}If $\Gamma$ is a set of !!{formula}s, $\pSat{v}{\Gamma}$ iff$\pSat{v}{!A}$ for every~$!A \in \Gamma$.\end{defn}\begin{prop}\ollabel{prop:sat-value}$\pSat{v}{!A}$ iff $\pValue{v}(!A) = \True$.\end{prop}\begin{proof}By induction on~$!A$.\end{proof}\begin{prob}Prove \olref[pl][syn][val]{prop:sat-value}\end{prob}\end{document}
Propositional Logic: introduction to this part
Verbatim source for the part wrapper; imports and tags are source scaffolding, not omitted book prose.
content/propositional-logic/propositional-logic.tex
% Part: propositional-logic
\documentclass[../../include/open-logic-part]{subfiles}
\begin{document}
\olpart{pl}{Propositional Logic}
\begin{editorial}
This part contains material on classical propositional logic. The
first chapter is relatively rudimentary and just lists definitions
and results, many proofs are not carried out but are left as
exercises. The material on proof systems and the completeness
theorem is included from the part on first-order logic, with the
``FOL'' tag set to false. This leaves out everything related to
predicates, terms, and quantifiers, and replaces talk of
!!{structure}s~$\Struct{M}$ with talk about
!!{valuation}s~$\pAssign{v}$.
It is planned to expand this part to include
more detail, and to add further topics and results, such as
truth-functional completeness.
\end{editorial}
\olimport[syntax-and-semantics]{syntax-and-semantics}
\tagfalse{FOL}
\olimport[../first-order-logic/proof-systems]{proof-systems}
\iftag{prfSC}{%
\olimport[../first-order-logic/sequent-calculus]{sequent-calculus}
}{}
\iftag{prfND}{%
\olimport[../first-order-logic/natural-deduction]{natural-deduction}
}{}
\iftag{prfTab}{%
\olimport[../first-order-logic/tableaux]{tableaux}
}{}
\iftag{prfAX}{%
\olimport[../first-order-logic/axiomatic-deduction]{axiomatic-deduction}
}{}
\olimport[../first-order-logic/completeness]{completeness}
\tagtrue{FOL}
\OLEndPartHook
\end{document}