Source and provenance

All 8 authority files and all 1,322 lines are shown exactly and copied byte-for-byte. Seven reader corrections, four bounded normalization decisions, and fifty-three exact normalization applications are disclosures only; the accepted projected text and authority source below are not altered. Open the exact accepted projected chapter transcript (SHA-256 1c6e2b5bc74625edc7496b795b1950956ee28f3d03a148e65624e592340a5299).

content/first-order-logic/syntax-and-semantics/semantics.tex

26 lines; SHA-256 d863c375746602be962b1b45545d8a51e72f9d0d9dca516f434152131b4107ec. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: semantics
  3. \documentclass[../../../include/open-logic-chapter]{subfiles}
  4. \begin{document}
  5. \olchapter{fol}{sem}{Semantics of First-Order Logic}
  6. \olimport{intro-semantics}
  7. \olimport{structures}
  8. \olimport{covered-structures}
  9. \olimport{satisfaction}
  10. \olimport{assignments}
  11. \olimport{extensionality}
  12. \olimport{semantic-notions}
  13. \OLEndChapterHook
  14. \end{document}

content/first-order-logic/syntax-and-semantics/intro-semantics.tex

47 lines; SHA-256 0bcf5a399c46716183aba26ed6d331abae45bdb63ed5bb26b3a7085b840e86e4. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: semantics
  3. % Section: intro-semantics
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{syn}{its}
  7. \olsection{Introduction}
  8. Giving the meaning of expressions is the domain of semantics. The
  9. central concept in semantics is that of satisfaction in
  10. !!a{structure}. !!^a{structure} gives meaning to the building blocks
  11. of the language: !!a{domain} is a non-empty set of objects. The
  12. quantifiers are interpreted as ranging over this domain, !!{constant}s
  13. are assigned elements in the domain, !!{function}s are assigned
  14. functions from the !!{domain} to itself, and !!{predicate}s are
  15. assigned relations on the !!{domain}. The !!{domain} together with
  16. assignments to the basic vocabulary constitutes !!a{structure}.
  17. !!^{variable}s may appear in !!{formula}s, and in order to give a
  18. semantics, we also have to assign !!{element}s of the !!{domain} to
  19. them---this is a variable assignment. The satisfaction relation,
  20. finally, brings these together. !!^a{formula} may be satisfied in
  21. !!a{structure}~$\Struct{M}$ relative to !!a{variable} assignment~$s$,
  22. written as $\Sat{M}{!A}[s]$. This relation is also defined by
  23. induction on the structure of~$!A$, using the truth tables for the
  24. logical connectives to define, say, satisfaction of $(!A \land !B)$ in
  25. terms of satisfaction (or not) of $!A$ and ~$!B$. It then turns out
  26. that the !!{variable} assignment is irrelevant if the !!{formula}~$!A$
  27. is !!a{sentence}, i.e., has no free variables, and so we can talk of
  28. !!{sentence}s being simply satisfied (or not) in !!{structure}s.
  29. On the basis of the satisfaction relation $\Sat{M}{!A}$ for !!{sentence}s
  30. we can then define the basic semantic notions of validity, entailment,
  31. and satisfiability. !!^a{sentence} is valid, $\Entails !A$, if every
  32. !!{structure} satisfies it. It is entailed by a set of !!{sentence}s,
  33. $\Gamma \Entails !A$, if every !!{structure} that satisfies all the
  34. !!{sentence}s in~$\Gamma$ also satisfies~$!A$. And a set of !!{sentence}s
  35. is satisfiable if some !!{structure} satisfies all !!{sentence}s in it
  36. at the same time. Because !!{formula}s are inductively defined, and
  37. satisfaction is in turn defined by induction on the structure of
  38. !!{formula}s, we can use induction to prove properties of our
  39. semantics and to relate the semantic notions defined.
  40. \end{document}

content/first-order-logic/syntax-and-semantics/structures.tex

109 lines; SHA-256 653be0fbc8ef1d61d9f39e7515bd1b1b1911f42147e0131a3235670e677cc241. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: syntax-and-semantics
  3. % Section: Structures
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{syn}{str}
  7. \olsection{\printtoken{P}{structure} for First-order Languages}
  8. \begin{explain}
  9. First-order languages are, by themselves, \emph{uninterpreted:} the
  10. !!{constant}s, !!{function}s, and !!{predicate}s have no specific
  11. meaning attached to them. Meanings are given by specifying
  12. \article{structure} \emph{!!{structure}}. It specifies the
  13. \emph{domain}, i.e., the objects which the !!{constant}s pick out, the
  14. !!{function}s operate on, and the quantifiers range over. In addition,
  15. it specifies which !!{constant}s pick out which objects, how
  16. !!a{function} maps objects to objects, and which objects the
  17. !!{predicate}s apply to. !!^{structure}s are the basis for
  18. \emph{semantic} notions in logic, e.g., the notion of consequence,
  19. validity, satisfiability. They are variously called ``structures,''
  20. ``interpretations,'' or ``models'' in the literature.
  21. \end{explain}
  22. \begin{defn}[!!^{structure}s]
  23. \Article{structure} \emph{!!{structure}}~$\Struct M$, for a language
  24. $\Lang{L}$ of first-order logic consists of the following elements:
  25. \begin{enumerate}
  26. \item \emph{Domain:} a non-empty set, $\Domain M$
  27. \item \emph{Interpretation of !!{constant}s:} for each !!{constant}~$c$ of
  28. $\Lang{L}$, !!a{element} $\Assign{c}{M} \in \Domain M$
  29. \item \emph{Interpretation of !!{predicate}s:} for each $n$-place
  30. !!{predicate}~$R$ of $\Lang{L}$ (other than $\eq$), an $n$-place
  31. relation $\Assign{R}{M} \subseteq \Domain{M}^n$
  32. \item \emph{Interpretation of !!{function}s:} for each $n$-place
  33. !!{function}~$f$ of $\Lang{L}$, an $n$-place function $\Assign{f}{M}
  34. \colon \Domain{M}^n \to \Domain{M}$
  35. \end{enumerate}
  36. \end{defn}
  37. \begin{ex}
  38. !!^a{structure}~$\Struct M$ for the language of arithmetic consists of a
  39. set, an element of $\Domain M$, $\Assign{\Obj 0}{M}$, as
  40. interpretation of the !!{constant}~$\Obj 0$, a one-place function
  41. $\Assign{\Obj \prime}{M} \colon \Domain{M} \to \Domain M$, two
  42. two-place functions $\Assign{\Obj +}{M}$ and $\Assign{\Obj
  43. \times}{M}$, both $\Domain M^2 \to \Domain M$, and a two-place
  44. relation $\Assign{\Obj <}{M} \subseteq \Domain{M}^2$.
  45. An obvious example of such a structure is the following:
  46. \begin{enumerate}
  47. \item $\Domain N = \Nat$
  48. \item $\Assign{\Obj 0}{N} = 0$
  49. \item $\Assign{\Obj \prime}{N}(n) = n + 1$ for all $n \in \Nat$
  50. \item $\Assign{\Obj +}{N}(n, m) = n + m$ for all $n, m \in \Nat$
  51. \item $\Assign{\Obj \times}{N}(n, m) = n\cdot m$ for all $n, m \in \Nat$
  52. \item $\Assign{\Obj <}{N} = \Setabs{\tuple{n, m}}{n \in \Nat, m \in
  53. \Nat, n < m}$
  54. \end{enumerate}
  55. The structure~$\Struct N$ for $\Lang L_A$ so defined is called the
  56. \emph{standard model of arithmetic}, because it interprets the
  57. non-logical constants of~$\Lang L_A$ exactly how you would expect.
  58. However, there are many other possible !!{structure}s for~$\Lang
  59. L_A$. For instance, we might take as the domain the set~$\Int$ of
  60. integers instead of~$\Nat$, and define the interpretations of $\Obj
  61. 0$, $\Obj \prime$, $\Obj +$, $\Obj \times$, $\Obj <$ accordingly. But
  62. we can also define structures for~$\Lang L_A$ which have nothing even
  63. remotely to do with numbers.
  64. \end{ex}
  65. \begin{ex}
  66. A structure~$\Struct M$ for the language~$\Lang L_Z$ of set theory requires
  67. just a set and a single-two place relation. So technically, e.g., the
  68. set of people plus the relation ``$x$ is older than $y$'' could be
  69. used as !!a{structure} for $\Lang L_Z$, as well as $\Nat$ together
  70. with $n \ge m$ for $n, m \in \Nat$.
  71. A particularly interesting !!{structure} for $\Lang L_Z$ in which the
  72. !!{element}s of the domain are actually sets, and the interpretation
  73. of $\Obj \in$ actually is the relation ``$x$ is !!a{element} of~$y$''
  74. is the !!{structure}~$\Struct{{HF}}$ of \emph{hereditarily finite sets}:
  75. \begin{enumerate}
  76. \item $\Domain{{{HF}}} = \emptyset \cup \Pow{\emptyset} \cup
  77. \Pow{\Pow{\emptyset}} \cup \Pow{\Pow{\Pow{\emptyset}}} \cup \dots$;
  78. \item $\Assign{\Obj \in}{{{HF}}} = \Setabs{\tuple{x, y}}{x, y \in
  79. \Domain{{{HF}}}, x \in y}$.
  80. \end{enumerate}
  81. \end{ex}
  82. \begin{digress}
  83. The stipulations we make as to what counts as !!a{structure} impact
  84. our logic. For example, the choice to prevent empty domains ensures,
  85. given the usual account of satisfaction (or truth) for quantified
  86. sentences, that $\lexists[x][(!A(x) \lor \lnot !A(x))]$ is
  87. valid---that is, a logical truth. And the stipulation that all
  88. !!{constant}s must refer to an object in the domain ensures that the
  89. existential generalization is a sound pattern of inference: $!A(a)$,
  90. therefore $\lexists[x][!A(x)]$. If we allowed names to refer outside
  91. the domain, or to not refer, then we would be on our way to a
  92. \emph{free logic}, in which existential generalization requires an
  93. additional premise: $!A(a)$ and $\lexists[x][\eq[x][a]]$, therefore
  94. $\lexists[x][!A(x)]$.
  95. \end{digress}
  96. \end{document}

content/first-order-logic/syntax-and-semantics/covered-structures.tex

72 lines; SHA-256 47b8c3e2f2455d6fdefbf11157cae904e95c858545997fd9b22e7a2a8a1948d7. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: syntax-and-semantics
  3. % Section: covered-structures
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{syn}{cov}
  7. \olsection{Covered \printtoken{P}{structure} for First-order Languages}
  8. \begin{explain}
  9. Recall that a term is \emph{closed} if it contains no !!{variable}s.
  10. \end{explain}
  11. \begin{defn}[!!^{value} of closed terms]
  12. If $t$ is a closed term of the language~$\Lang L$ and $\Struct M$ is a
  13. !!{structure} for~$\Lang L$, the \emph{!!{value}}~$\Value{t}{M}$ is
  14. defined as follows:
  15. \begin{enumerate}
  16. \item If $t$ is just the !!{constant}~$c$, then $\Value{c}{M} = \Assign{c}{M}$.
  17. \item If $t$ is of the form $\Atom{f}{t_1, \ldots, t_n}$, then
  18. \[
  19. \Value{t}{M} = \Assign{f}{M}(\Value{t_1}{M}, \ldots,
  20. \Value{t_n}{M}).
  21. \]
  22. \end{enumerate}
  23. \end{defn}
  24. \begin{defn}[Covered !!{structure}]
  25. A !!{structure} is \emph{covered} if every element of the domain is the
  26. !!{value} of some closed term.
  27. \end{defn}
  28. \begin{ex}
  29. Let ~$\Lang L$ be the language with !!{constant}s $\Obj{zero}$,
  30. $\Obj{one}$, $\Obj{two}$, \dots, the binary !!{predicate}~$<$, and the
  31. binary !!{function}s $+$ and $\times$. Then !!a{structure}~$\Struct
  32. M$ for~$\Lang L$ is the one with domain $\Domain M = \{0, 1, 2, \ldots
  33. \}$ and assignments $\Assign{\Obj{zero}}{M} = 0$,
  34. $\Assign{\Obj{one}}{M} = 1$, $\Assign{\Obj{two}}{M} = 2$, and so
  35. forth. For the binary relation symbol $<$, the set $\Assign{<}{M}$ is
  36. the set of all pairs $\tuple{c_1, c_2} \in \Domain{M}^2$ such that
  37. $c_1$ is less than~$c_2$: for example, $\tuple{1, 3} \in
  38. \Assign{<}{M}$ but $\tuple{2, 2} \notin \Assign{<}{M}$. For the binary
  39. !!{function} $+$, define $\Assign{+}{M}$ in the usual way---for
  40. example, $\Assign{+}{M}(2,3)$ maps to~$5$, and similarly for the
  41. binary !!{function}~$\times$. Hence, the !!{value} of $\Obj{four}$ is
  42. just~$4$, and the !!{value} of $\times(\Obj{two},
  43. +(\Obj{three},\Obj{zero}))$ (or in infix notation, $\Obj{two} \times
  44. (\Obj{three} + \Obj{zero})$) is
  45. \begin{multline*}
  46. \Value{\times(\Obj{two}, +(\Obj{three},\Obj{zero}))}{M} =\\
  47. \begin{aligned}
  48. & =\Assign{\times}{M}(\Value{\Obj{two}}{M}, \Value{+(\Obj{three}, \Obj{zero})}{M})\\
  49. & = \Assign{\times}{M}(\Value{\Obj{two}}{M}, \Assign{+}{M}(\Value{\Obj{three}}{M},
  50. \Value{\Obj{zero}}{M})) \\
  51. & = \Assign{\times}{M}(\Assign{\Obj{two}}{M}, \Assign{+}{M}(\Assign{\Obj{three}}{M},
  52. \Assign{\Obj{zero}}{M})) \\
  53. & = \Assign{\times}{M}(2, \Assign{+}{M}(3, 0)) \\
  54. & = \Assign{\times}{M}(2, 3) \\
  55. & = 6
  56. \end{aligned}
  57. \end{multline*}
  58. \end{ex}
  59. \begin{prob}
  60. Is $\Struct N$, the standard model of arithmetic, covered? Explain.
  61. \end{prob}
  62. \end{document}

content/first-order-logic/syntax-and-semantics/satisfaction.tex

421 lines; SHA-256 e44b0bea8c5d130077516bc8d757f46d4b337517aab77049841581313820fd32. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: syntax-and-semantics
  3. % Section: satisfaction
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{syn}{sat}
  7. \olsection{Satisfaction of \article{formula} \printtoken{S}{formula}
  8. in \article{structure} \printtoken{S}{structure}}
  9. \begin{explain}
  10. The basic notion that relates expressions such as terms and
  11. !!{formula}s, on the one hand, and !!{structure}s on the other, are
  12. those of \emph{!!{value}} of a term and \emph{satisfaction} of
  13. !!a{formula}. Informally, the !!{value} of a term is an !!{element} of
  14. !!a{structure}---if the term is just a constant, its !!{value} is the
  15. object assigned to the constant by the !!{structure}, and if it is
  16. built up using !!{function}s, the !!{value} is computed from the
  17. !!{value}s of constants and the functions assigned to the functions in
  18. the term. !!^a{formula} is \emph{satisfied} in !!a{structure} if the
  19. interpretation given to the predicates makes the !!{formula} true in
  20. the domain of the !!{structure}. This notion of satisfaction is
  21. specified inductively: the specification of the !!{structure} directly
  22. states when atomic !!{formula}s are satisfied, and we define when a
  23. complex !!{formula} is satisfied depending on the main connective or
  24. quantifier and whether or not the immediate !!{subformula}s are
  25. satisfied.
  26. The case of the quantifiers here is a bit tricky, as the
  27. immediate !!{subformula} of a quantified !!{formula} has a free
  28. !!{variable}, and !!{structure}s don't specify the !!{value}s of
  29. !!{variable}s. In order to deal with this difficulty, we also
  30. introduce \emph{variable assignments} and define satisfaction not with
  31. respect to !!a{structure} alone, but with respect to !!a{structure}
  32. plus !!a{variable} assignment.
  33. \end{explain}
  34. \begin{defn}[Variable Assignment]
  35. A \emph{variable assignment}~$s$ for !!a{structure}~$\Struct{M}$ is a
  36. function which maps each !!{variable} to !!a{element} of~$\Domain M$,
  37. i.e., $s\colon \Var \to \Domain M$.
  38. \end{defn}
  39. \begin{explain}
  40. !!^a{structure} assigns !!a{value} to each !!{constant}, and a
  41. variable assignment to each variable. But we want to use terms built
  42. up from them to also name !!{element}s of the !!{domain}. For this we
  43. define the !!{value} of terms inductively. For !!{constant}s and
  44. variables the value is just as the !!{structure} or the variable
  45. assignment specifies it; for more complex terms it is computed
  46. recursively using the functions the !!{structure} assigns to the
  47. !!{function}s.
  48. \end{explain}
  49. \begin{defn}[!!^{value} of Terms]
  50. If $t$ is a term of the language~$\Lang L$, $\Struct M$ is a
  51. !!{structure} for~$\Lang L$, and $s$ is !!a{variable} assignment
  52. for~$\Struct M$, the \emph{!!{value}}~$\Value{t}{M}[s]$ is defined as
  53. follows:
  54. \begin{enumerate}
  55. \item \indcase{t}{c}{$\Value{\indfrm}{M}[s] = \Assign{\indcomplex}{M}$.}
  56. \item \indcase{t}{x}{$\Value{\indfrm}{M}[s] = s(\indcomplex)$.}
  57. \item \indcase{t}{\Atom{f}{t_1, \ldots, t_n}}{
  58. \[
  59. \Value{\indfrm}{M}[s] = \Assign{f}{M}(\Value{t_1}{M}[s], \ldots,
  60. \Value{t_n}{M}[s]).
  61. \]}
  62. \end{enumerate}
  63. \end{defn}
  64. \begin{defn}[$x$-Variant]
  65. If $s$ is !!a{variable} assignment for !!a{structure}~$\Struct M$, then any
  66. !!{variable} assignment~$s'$ for~$\Struct M$ which differs from~$s$ at most
  67. in what it assigns to~$x$ is called an \emph{$x$-variant} of~$s$. If
  68. $s'$ is an $x$-variant of~$s$ we write $\varAssign{s'}{s}{x}$.
  69. \end{defn}
  70. \begin{explain}
  71. Note that an $x$-variant of an assignment~$s$ does not \emph{have} to
  72. assign something different to~$x$. In fact, every assignment counts
  73. as an $x$-variant of itself.
  74. \end{explain}
  75. \begin{defn}
  76. If $s$ is !!a{variable} assignment for !!a{structure}~$\Struct M$
  77. and $m \in \Domain{M}$, then the assignment~$\Subst{s}{m}{x}$ is the
  78. variable assignment defined by
  79. \[\Subst{s}{m}{x}(y) = \begin{cases}
  80. m & \text{if } y \ident x\\
  81. s(y) & \text{otherwise}.
  82. \end{cases}\]
  83. \end{defn}
  84. In other words, $\Subst{s}{m}{x}$ is the particular $x$-variant of~$s$
  85. which assigns the domain !!{element}~$m$ to~$x$, and assigns the same
  86. things to !!{variable}s other than~$x$ that $s$ does.
  87. \begin{defn}[Satisfaction]
  88. \ollabel{defn:satisfaction}
  89. Satisfaction of !!a{formula}~$!A$ in !!a{structure}~$\Struct M$
  90. relative to !!a{variable} assignment~$s$, in symbols:
  91. $\Sat{M}{!A}[s]$, is defined recursively as follows. (We write
  92. $\Sat/{M}{!A}[s]$ to mean ``not $\Sat{M}{!A}[s]$.'')
  93. \begin{enumerate}
  94. \tagitem{prvFalse}{%
  95. \indcase{!A}{\lfalse}{$\Sat/{M}{\indfrm}[s]$.}}{}
  96. \tagitem{prvTrue}{%
  97. \indcase{!A}{\ltrue}{$\Sat{M}{\indfrm}[s]$.}}{}
  98. \item \indcase{!A}{\Atom{R}{t_1, \dots, t_n}}{$\Sat{M}{\indfrm}[s]$
  99. iff $\langle \Value{t_1}{M}[s], \dots, \Value{t_n}{M}[s] \rangle \in
  100. \Assign{R}{M}$.}
  101. \item \indcase{!A}{\eq[t_1][t_2]}{$\Sat{M}{\indfrm}[s]$ iff
  102. $\Value{t_1}{M}[s] = \Value{t_2}{M}[s]$.}
  103. \tagitem{prvNot}{%
  104. \indcase{!A}{\lnot !B}{$\Sat{M}{\indfrm}[s]$ iff
  105. $\Sat/{M}{!B}[s]$.}}{}
  106. \tagitem{prvAnd}{%
  107. \indcase{!A}{(!B \land !C)}{$\Sat{M}{\indfrm}[s]$ iff $\Sat{M}{!B}[s]$
  108. and $\Sat{M}{!C}[s]$.}}{}
  109. \tagitem{prvOr}{%
  110. \indcase{!A}{(!B \lor !C)}{$\Sat{M}{\indfrm}[s]$ iff
  111. $\Sat{M}{!B}[s]$ or $\Sat{M}{!C}[s]$ (or both).}}{}
  112. \tagitem{prvIf}{%
  113. \indcase{!A}{(!B \lif !C)}{$\Sat{M}{\indfrm}[s]$ iff $\Sat/{M}{!B}[s]$
  114. or $\Sat{M}{!C}[s]$ (or both).}}{}
  115. \tagitem{prvIff}{%
  116. \indcase{!A}{(!B \liff !C)}{$\Sat{M}{\indfrm}[s]$ iff either both
  117. $\Sat{M}{!B}[s]$ and $\Sat{M}{!C}[s]$, or neither $\Sat{M}{!B}[s]$
  118. nor $\Sat{M}{!C}[s]$.}}{}
  119. \tagitem{prvAll}{%
  120. \indcase{!A}{\lforall[x][!B]}{$\Sat{M}{\indfrm}[s]$ iff for every
  121. !!{element}~$m \in \Domain M$, $\Sat{M}{!B}[\Subst{s}{m}{x}]$.}}{}
  122. \tagitem{prvEx}{%
  123. \indcase{!A}{\lexists[x][!B]}{$\Sat{M}{\indfrm}[s]$ iff for at least
  124. one !!{element}~$m \in \Domain M$, $\Sat{M}{!B}[\Subst{s}{m}{x}]$.}}{}
  125. \end{enumerate}
  126. \end{defn}
  127. \begin{explain}
  128. The variable assignments are important in the last
  129. \iftag{notprvEx,notprvAll}{clause}{two clauses}.\iftag{prvAll}{ We
  130. cannot define satisfaction of $\lforall[x][!B(x)]$ by ``for all $m \in
  131. \Domain{M}$, $\Sat{M}{!B(m)}$.''}{}\iftag{prvEx}{ We cannot define
  132. satisfaction of $\lexists[x][!B(x)]$ by ``for at least one $m \in
  133. \Domain{M}$, $\Sat{M}{!B(m)}$.''}{} The reason is that if $m \in
  134. \Domain M$, it is not a symbol of the language, and so $!B(m)$~is not
  135. !!a{formula} (that is, $\Subst{!B}{m}{x}$ is undefined). We also
  136. cannot assume that we have !!{constant}s or terms available that name
  137. every !!{element} of~$\Struct{M}$, since there is nothing in the
  138. definition of !!{structure}s that requires it. In the standard
  139. language, the set of !!{constant}s is !!{denumerable}, so if
  140. $\Domain{M}$ is not !!{enumerable} there aren't even enough
  141. !!{constant}s to name every object.
  142. We solve this problem by introducing !!{variable} assignments, which
  143. allow us to link variables directly with !!{element}s of the domain.
  144. Then instead of saying that, e.g.,
  145. \iftag{prvEx}{$\lexists[x][!B(x)]$}{$\lforall[x][!B(x)]$} is satisfied
  146. in~$\Struct M$ iff \iftag{prvEx}{for at least one $m \in
  147. \Domain{M}$}{for all $m \in \Domain{M}$, $\Sat{M}{!B(m)}$}, we say it
  148. is satisfied in~$\Struct M$ \emph{relative to}~$s$ iff $!B(x)$ is
  149. satisfied relative to~$\Subst{s}{m}{x}$ \iftag{prvEx}{for at least
  150. one}{for every} $m \in \Domain M$.
  151. \end{explain}
  152. \begin{ex}
  153. Let $\Lang{L} = \{a, b, f, R\}$ where $a$ and $b$ are !!{constant}s,
  154. $f$~is a two-place !!{function}, and $R$~is a two-place !!{predicate}.
  155. Consider the !!{structure}~$\Struct{M}$ defined by:
  156. \begin{enumerate}
  157. \item $\Domain M = \{1, 2, 3, 4\}$
  158. \item $\Assign{a}{M} = 1$
  159. \item $\Assign{b}{M} = 2$
  160. \item $\Assign{f}{M}(x, y) = x+y$ if $x+y \le 3$ and $= 3$ otherwise.
  161. \item $\Assign{R}{M} = \{\tuple{1, 1}, \tuple{1, 2}, \tuple{2, 3}, \tuple{2, 4}\}$
  162. \end{enumerate}
  163. The function $s(x) = 1$ that assigns $1 \in \Domain{M}$ to every
  164. !!{variable} is a variable assignment for~$\Struct{M}$.
  165. Then
  166. \begin{align*}
  167. \Value{f(a,b)}{M}[s] & = \Assign{f}{M}(\Value{a}{M}[s], \Value{b}{M}[s]).
  168. \intertext{Since $a$ and $b$ are !!{constant}s, $\Value{a}{M}[s]
  169. = \Assign{a}{M} = 1$ and $\Value{b}{M}[s] = \Assign{b}{M} = 2$. So}
  170. \Value{f(a,b)}{M}[s] & = \Assign{f}{M}(1, 2) = 1+2 = 3.
  171. \intertext{To compute the value of $f(f(a,b),a)$ we have to consider}
  172. \Value{f(f(a,b),a)}{M}[s] & = \Assign{f}{M}(\Value{f(a, b)}{M}[s],
  173. \Value{a}{M}[s]) = \Assign{f}{M}(3, 1) = 3,
  174. \intertext{since $3+1 > 3$. Since $s(x) = 1$ and $\Value{x}{M}[s] =
  175. s(x)$, we also have}
  176. \Value{f(f(a,b),x)}{M}[s] & = \Assign{f}{M}(\Value{f(a, b)}{M}[s],
  177. \Value{x}{M}[s]) = \Assign{f}{M}(3, 1) = 3,
  178. \end{align*}
  179. An atomic !!{formula}~$R(t_1, t_2)$ is satisfied if the tuple of
  180. values of its arguments, i.e., $\tuple{\Value{t_1}{M}[s],
  181. \Value{t_2}{M}[s]}$, is !!a{element} of~$\Assign{R}{M}$. So, e.g., we
  182. have $\Sat{M}{R(b,f(a,b))}[s]$ since $\tuple{\Value{b}{M},
  183. \Value{f(a,b)}{M}} = \tuple{2, 3} \in \Assign{R}{M}$, but
  184. $\Sat/{M}{R(x, f(a,b))}[s]$ since $\tuple{1, 3} \notin \Assign{R}{M}[s]$.
  185. To determine if a non-atomic formula~$!A$ is satisfied, you apply the
  186. clauses in the inductive definition that applies to the main
  187. connective. For instance, the main connective in $R(a, a) \lif (R(b,
  188. x) \lor R(x, b))$ is the~$\lif$, and
  189. \begin{align*}
  190. & \Sat{M}{R(a, a) \lif (R(b, x) \lor R(x, b))}[s] \text{ iff }\\
  191. & \qquad
  192. \Sat/{M}{R(a,a)}[s] \text{ or } \Sat{M}{R(b, x) \lor R(x, b)}[s]
  193. \intertext{Since $\Sat{M}{R(a,a)}[s]$ (because $\tuple{1,1} \in
  194. \Assign{R}{M}$) we can't yet determine the answer and must first
  195. figure out if $\Sat{M}{R(b, x) \lor R(x, b)}[s]$:}
  196. & \Sat{M}{R(b, x) \lor R(x, b)}[s] \text{ iff }\\
  197. & \qquad \Sat{M}{R(b,x)}[s] \text{ or } \Sat{M}{R(x, b)}[s]
  198. \intertext{And this is the case, since $\Sat{M}{R(x, b)}[s]$
  199. (because $\tuple{1,2} \in \Assign{R}{M}$).}
  200. \end{align*}
  201. Recall that an $x$-variant of~$s$ is a variable assignment that
  202. differs from $s$ at most in what it assigns to~$x$. For every
  203. !!{element} of~$\Domain{M}$, there is an $x$-variant of~$s$:
  204. \begin{align*}
  205. s_1 & = \Subst{s}{1}{x}, &
  206. s_2 & = \Subst{s}{2}{x},\\
  207. s_3 & = \Subst{s}{3}{x}, &
  208. s_4 & = \Subst{s}{4}{x}.
  209. \end{align*}
  210. So, e.g., $s_2(x) = 2$ and $s_2(y) = s(y) = 1$ for all variables~$y$
  211. other than~$x$. These are all the $x$-variants of~$s$ for the
  212. structure~$\Struct{M}$, since $\Domain{M} = \{1, 2, 3, 4\}$. Note, in
  213. particular, that $s_1 = s$ ($s$~is always an $x$-variant of itself).
  214. \iftag{prvEx}{To determine if an existentially quantified
  215. !!{formula}~$\lexists[x][!A(x)]$ is satisfied, we have to determine
  216. if $\Sat{M}{!A(x)}[\Subst{s}{m}{x}]$ for at least one $m \in \Domain
  217. M$. So,
  218. \[
  219. \Sat{M}{\lexists[x][(R(b,x) \lor R(x,b))]}[s],
  220. \]
  221. since $\Sat{M}{R(b,x) \lor R(x, b)}[\Subst{s}{1}{x}]$
  222. ($\Subst{s}{3}{x}$ would also fit the bill). But,
  223. \[
  224. \Sat/{M}{\lexists[x][(R(b,x) \land R(x,b))]}[s]
  225. \]
  226. since, whichever $m \in \Domain{M}$ we pick, $\Sat/{M}{R(b,x) \land R(x,b)}[\Subst{s}{m}{x}]$.}{}
  227. \iftag{prvAll}{To determine if a universally quantified
  228. !!{formula}~$\lforall[x][!A(x)]$ is satisfied, we have to determine
  229. if $\Sat{M}{!A(x)}[\Subst{s}{m}{x}]$ for all $m \in \Domain M$. So,
  230. \[
  231. \Sat{M}{\lforall[x][(R(x,a) \lif R(a,x))]}[s],
  232. \]
  233. since $\Sat{M}{R(x,a) \lif R(a,x)}[\Subst{s}{m}{x}]$ for all $m \in
  234. \Domain M$. For $m = 1$, we have $\Sat{M}{R(a,x)}[\Subst{s}{1}{x}]$
  235. so the consequent is true; for $m = 2$, $3$, and~$4$, we have
  236. $\Sat/{M}{R(x,a)}[\Subst{s}{m}{x}]$, so the antecedent is false.
  237. But,
  238. \[
  239. \Sat/{M}{\lforall[x][(R(a,x) \lif R(x,a))]}[s]
  240. \]
  241. since $\Sat/{M}{R(a,x) \lif R(x,a)}[\Subst{s}{2}{x}]$ (because
  242. $\Sat{M}{R(a, x)}[\Subst{s}{2}{x}]$ and $\Sat/{M}{R(x,
  243. a)}[\Subst{s}{2}{x}]$).}{}
  244. \iftag{defEx}{To determine if an existentially quantified
  245. !!{formula}~$\lexists[x][!A(x)]$ is satisfied, we have to determine
  246. if $\Sat{M}{\lnot \lforall[x][\lnot !A(x)]}[s]$. For instance, we
  247. have
  248. \[
  249. \Sat{M}{\lexists[x][(R(b,x) \lor R(x,b))]}[s].
  250. \]
  251. First, $\Sat{M}{R(b,x) \lor R(x, b)}[\Subst{s}{1}{x}]$
  252. ($\Subst{s}{3}{x}$ would also fit the bill). So,
  253. $\Sat/{M}{\lnot(R(b,x) \lor R(x,b))}[\Subst{s}{1}{x}]$, thus
  254. $\Sat/{M}{\lforall[x][\lnot((R(b,x) \lor R(x,b))]}[s]$, and
  255. therefore $\Sat{M}{\lnot\lforall[x][\lnot((R(b,x) \lor
  256. R(x,b))]}[s]$. On the other hand,
  257. \[
  258. \Sat/{M}{\lexists[x][(R(b,x) \land R(x,b))],}[s].
  259. \]
  260. That's because $\Sat{M}{\lforall[x][\lnot(R(b,x) \land
  261. R(x,b))]}[s]$, since for no $m \in \Domain M$, $\Sat{M}{R(b,x) \land
  262. R(x,b)}[\Subst{s}{m}{x}]$. As you can probably guess from these
  263. examples, $\Sat{M}{\lexists[x][!A(x)]}[s]$ iff
  264. $\Sat{M}{!A(x)}[\Subst{s}{m}{x}]$ for at least one $m \in \Domain
  265. M$.}{}
  266. \iftag{defAll}{To determine if a universally quantified
  267. !!{formula}~$\lforall[x][!A(x)]$ is satisfied, we have to determine
  268. if $\Sat{M}{\lnot\lexists[x][\lnot !A(x)]}[s]$. For instance,
  269. \[
  270. \Sat{M}{\lforall[x][(R(x,a) \lif R(a,x))]}[s],
  271. \]
  272. First, $\Sat{M}{R(x,a) \lif R(a,x)}[\Subst{s}{m}{x}]$ for all $m \in
  273. \Domain M$ ($\Sat{M}{R(a,x)}[\Subst{s}{1}{x}]$ and
  274. $\Sat/{M}{R(a,x)}[\Subst{s}{m}{x}]$ for $m = 2$, $3$, or~$4$).
  275. Thus, there is no $m \in \Domain M$ such that
  276. $\Sat{M}{\lnot(R(x,a) \lif R(a,x))}[\Subst{s}{m}{x}]$ and hence
  277. $\Sat/{M}{\lexists[x][\lnot(R(x,a) \lif R(a,x))]}[s]$. Therefore,
  278. $\Sat{M}{\lnot\lexists[x][\lnot(R(x,a) \lif R(a,x))]}[s]$. On the
  279. other hand,
  280. \[
  281. \Sat/{M}{\lforall[x][(R(a,x) \lif R(x,a))]}[s],
  282. \]
  283. since $\Sat/{M}{R(a,x) \lif R(x,a)}[\Subst{s}{2}{x}]$, and so
  284. $\Sat{M}{\lexists[x][\lnot(R(a,x) \lif R(x,a))]}[s]$. As you can
  285. probably guess from these examples, $\Sat{M}{\lforall[x][!A(x)]}[s]$
  286. iff $\Sat{M}{!A(x)}[\Subst{s}{m}{x}]$ for every $m \in \Domain
  287. M$.}{}
  288. For a more complicated case, consider
  289. \[
  290. \lforall[x][(R(a,x) \lif \lexists[y][R(x,y)])].
  291. \]
  292. Since $\Sat/{M}{R(a,x)}[\Subst{s}{3}{x}]$ and
  293. $\Sat/{M}{R(a,x)}[\Subst{s}{4}{x}]$, the interesting cases where we
  294. have to worry about the consequent of the conditional are only $m = 1$
  295. and $ = 2$. Does $\Sat{M}{\lexists[y][R(x,y)]}[\Subst{s}{1}{x}]$
  296. hold? It does if there is at least one $n \in \Domain M$ so that
  297. $\Sat{M}{R(x,y)}[\Subst{\Subst{s}{1}{x}}{n}{y}]$. In fact, if we take
  298. $n = 1$, we have $\Subst{\Subst{s}{1}{x}}{n}{y} = \Subst{s}{1}{y} =
  299. s$. Since $s(x) = 1$, $s(y) = 1$, and $\tuple{1,1} \in \Assign{R}{M}$,
  300. the answer is yes.
  301. To determine if $\Sat{M}{\lexists[y][R(x,y)]}[\Subst{s}{2}{x}]$, we
  302. have to look at the !!{variable} assignments
  303. $\Subst{\Subst{s}{2}{x}}{n}{y}$. Here, for $n = 1$, this assignment
  304. is~$s_2 = \Subst{s}{2}{x}$, which does not satisfy $R(x,y)$ ($s_2(x) =
  305. 2$, $s_2(y) = 1$, and $\tuple{2,1}\notin \Assign{R}{M}$). However,
  306. consider $\Subst{\Subst{s}{2}{x}}{3}{y} = \Subst{s_2}{3}{y}$.
  307. $\Sat{M}{R(x,y)}[\Subst{s_2}{3}{y}]$ since $\tuple{2,3} \in
  308. \Assign{R}{M}$, and so $\Sat{M}{\lexists[y][R(x,y)]}[s_2]$.
  309. So, for all $n \in \Domain M$, either
  310. $\Sat/{M}{R(a,x)}[\Subst{s}{m}{x}]$ (if $m = 3$, $4$) or
  311. $\Sat{M}{\lexists[y][R(x,y)]}[\Subst{s}{m}{x}]$ (if $m = 1$, $2$), and so
  312. \[
  313. \Sat{M}{\lforall[x][(R(a,x) \lif \lexists[y][R(x,y)])]}[s].
  314. \]
  315. On the other hand,
  316. \[
  317. \Sat/{M}{\lexists[x][(R(a,x) \land \lforall[y][R(x,y)])]}[s].
  318. \]
  319. We have $\Sat{M}{R(a,x)}[\Subst{s}{m}{x}]$ only for $m = 1$ and $m =
  320. 2$. But for both of these values of~$m$, there is in turn an $n \in
  321. \Domain M$, namely $n = 4$, so that
  322. $\Sat/{M}{R(x,y)}[\Subst{\Subst{s}{m}{x}}{n}{y}]$ and so
  323. $\Sat/{M}{\lforall[y][R(x,y)]}[\Subst{s}{m}{x}]$ for $m = 1$ and $m =
  324. 2$. In sum, there is no $m \in \Domain M$ such that $\Sat{M}{R(a,x)
  325. \land \lforall[y][R(x,y)]}[\Subst{s}{m}{x}]$.
  326. \end{ex}
  327. \iftag{defEx}{%
  328. \begin{prop}\ollabel{prop:sat-ex}
  329. $\Sat{M}{\lexists[x][!B(x)]}[s]$ iff there is an $x$-variant $s'$ of $s$
  330. so that $\Sat{M}{!B(x)}[s']$.
  331. \end{prop}
  332. \begin{proof}
  333. Exercise.
  334. \end{proof}
  335. }{}
  336. \tagprob{defEx}
  337. \begin{prob}
  338. Prove \olref[fol][syn][sat]{prop:sat-ex}
  339. \end{prob}
  340. \tagendprob
  341. \iftag{defAll}{%
  342. \begin{prop}\ollabel{prop:sat-all}
  343. $\Sat{M}{\lforall[x][!B(x)]}[s]$ iff for every $x$-variant~$s'$ of $s$,
  344. $\Sat{M}{!B(x)}[s']$
  345. \end{prop}
  346. \begin{proof}
  347. Exercise.
  348. \end{proof}
  349. }{}
  350. \tagprob{defAll}
  351. \begin{prob}
  352. Prove \olref[fol][syn][sat]{prop:sat-all}
  353. \end{prob}
  354. \tagendprob
  355. \begin{prob}
  356. Let $\Lang L = \{c, f, A\}$ with one !!{constant}, one one-place
  357. !!{function} and one two-place !!{predicate}, and let the
  358. !!{structure}~$\Struct{M}$ be given by
  359. \begin{enumerate}
  360. \item $\Domain M = \{1, 2, 3\}$
  361. \item $\Assign{c}{M} = 3$
  362. \item $\Assign{f}{M}(1) = 2, \Assign{f}{M}(2) = 3, \Assign{f}{M}(3) = 2$
  363. \item $\Assign{A}{M} = \{\tuple{1, 2}, \tuple{2, 3}, \tuple{3, 3}\}$
  364. \end{enumerate}
  365. (a) Let $s(v) = 1$ for all !!{variable}s~$v$. Find out whether
  366. \[
  367. \Sat{M}{\lexists[x][(A(f(z), c) \lif \lforall[y][(A(y, x) \lor A(f(y),
  368. x))])]}[s]
  369. \]
  370. Explain why or why not.
  371. (b) Give a different structure and !!{variable} assignment in which the
  372. !!{formula} is not satisfied.
  373. \end{prob}
  374. \end{document}

content/first-order-logic/syntax-and-semantics/assignments.tex

353 lines; SHA-256 158d852e2ead50b060a48332cac8c72c475cfc206d3dab7aac24a01be3ff1771. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: syntax-and-semantics
  3. % Section: assignments
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{syn}{ass}
  7. \olsection{Variable Assignments}
  8. \begin{explain}
  9. A !!{variable} assignment~$s$ provides a value for \emph{every}
  10. variable---and there are infinitely many of them. This is of course
  11. not necessary. We require !!{variable} assignments to assign values to
  12. all !!{variable}s simply because it makes things a lot easier. The
  13. value of a term~$t$, and whether or not !!a{formula}~$!A$ is
  14. satisfied in !!a{structure} with respect to~$s$, only depend on the
  15. assignments~$s$ makes to the !!{variable}s in~$t$ and the free
  16. !!{variable}s of~$!A$. This is the content of the next two
  17. propositions. To make the idea of ``depends on'' precise, we show
  18. that any two variable assignments that agree on all the variables
  19. in~$t$ give the same value, and that $!A$ is satisfied relative to one
  20. iff it is satisfied relative to the other if two variable assignments
  21. agree on all free variables of~$!A$.
  22. \end{explain}
  23. \begin{prop}\ollabel{prop:valindep}
  24. If the !!{variable}s in a term~$t$ are among $x_1$, \dots,~$x_n$, and
  25. $s_1(x_i) = s_2(x_i)$ for $i = 1$, \dots,~$n$, then $\Value{t}{M}[s_1]
  26. = \Value{t}{M}[s_2]$.
  27. \end{prop}
  28. \begin{proof}
  29. By induction on the complexity of~$t$. For the base case, $t$ can be
  30. !!a{constant} or one of the variables~$x_1$, \dots,~$x_n$. If $t
  31. = c$, then $\Value{t}{M}[s_1] = \Assign{c}{M} = \Value{t}{M}[s_2]$. If
  32. $t = x_i$, $s_1(x_i) = s_2(x_i)$ by the hypothesis of the proposition,
  33. and so $\Value{t}{M}[s_1] = s_1(x_i) = s_2(x_i) = \Value{t}{M}[s_2]$.
  34. For the inductive step, assume that $t = \Atom{f}{t_1, \dots, t_k}$
  35. and that the claim holds for $t_1$, \dots, $t_k$. Then
  36. \begin{align*}
  37. \Value{t}{M}[s_1] & = \Value{\Atom{f}{t_1, \dots, t_k}}{M}[s_1] \\
  38. & = \Assign{f}{M}(\Value{t_1}{M}[s_1], \dots, \Value{t_k}{M}[s_1]).
  39. \intertext{For $j = 1$, \dots,~$k$, the !!{variable}s of~$t_j$ are
  40. among $x_1$, \dots,~$x_n$. By the induction hypothesis,
  41. $\Value{t_j}{M}[s_1] = \Value{t_j}{M}[s_2]$. So,}
  42. \Value{t}{M}[s_1] & = \Value{\Atom{f}{t_1, \dots, t_k}}{M}[s_1] \\
  43. & = \Assign{f}{M}(\Value{t_1}{M}[s_1], \dots, \Value{t_k}{M}[s_1]) \\
  44. & = \Assign{f}{M}(\Value{t_1}{M}[s_2], \dots, \Value{t_k}{M}[s_2]) \\
  45. & = \Value{\Atom{f}{t_1, \dots, t_k}}{M}[s_2] = \Value{t}{M}[s_2].
  46. \end{align*}
  47. \end{proof}
  48. \begin{prop}\ollabel{prop:satindep}
  49. If the free !!{variable}s in $!A$ are among $x_1$, \dots,~$x_n$, and
  50. $s_1(x_i) = s_2(x_i)$ for $i = 1$, \dots,~$n$, then $\Sat{M}{!A}[s_1]$
  51. iff $\Sat{M}{!A}[s_2]$.
  52. \end{prop}
  53. \begin{proof}
  54. We use induction on the complexity of $!A$. For the base case, where
  55. $!A$ is atomic, $!A$ can be:
  56. \iftag{prvTrue}{$\ltrue$,}{}
  57. \iftag{prvFalse}{$\lfalse$,}{}
  58. $\Atom{R}{t_1, \dots, t_k}$ for a $k$-place predicate $R$ and terms
  59. $t_1$, \dots,~$t_k$, or $\eq[t_1][t_2]$ for terms $t_1$ and~$t_2$.
  60. In the latter two cases, we only demonstrate the forward direction of
  61. the !!{biconditional}, since the proof of the reverse is symmetrical.
  62. \begin{enumerate}
  63. \tagitem{prvTrue}{%
  64. \indcase{!A}{\ltrue}{both $\Sat{M}{\indfrm}[s_1]$ and
  65. $\Sat{M}{\indfrm}[s_2]$.}}{}
  66. \tagitem{prvFalse}{%
  67. \indcase{!A}{\lfalse}{both $\Sat/{M}{!A}[s_1]$ and
  68. $\Sat/{M}{!A}[s_2]$.}}{}
  69. \item
  70. \indcase{!A}{\Atom{R}{t_1, \ldots, t_k}}{let
  71. $\Sat{M}{\indfrm}[s_1]$. Then
  72. \[
  73. \langle \Value{t_1}{M}[s_1], \ldots, \Value{t_k}{M}[s_1] \rangle
  74. \in \Assign{R}{M}.
  75. \]
  76. For $i = 1$, \dots,~$k$, $\Value{t_i}{M}[s_1] =
  77. \Value{t_i}{M}[s_2]$ by \olref{prop:valindep}. So we also have
  78. $\langle \Value{t_i}{M}[s_2], \ldots, \Value{t_k}{M}[s_2] \rangle
  79. \in \Assign{R}{M}$, and hence $\Sat{M}{\indfrm}[s_2]$.}
  80. \item
  81. \indcase{!A}{\eq[t_1][t_2]}{suppose $\Sat{M}{\indfrm}[s_1]$.
  82. Then $\Value{t_1}{M}[s_1] = \Value{t_2}{M}[s_1]$. So,
  83. \begin{align*}
  84. \Value{t_1}{M}[s_2] & = \Value{t_1}{M}[s_1]
  85. & \text{(by \olref{prop:valindep})} \\
  86. & = \Value{t_2}{M}[s_1]
  87. & \text{(since $\Sat{M}{\eq[t_1][t_2]}[s_1]$)}\\
  88. &= \Value{t_2}{M}[s_2]
  89. & \text{(by \olref{prop:valindep}),}
  90. \end{align*}
  91. so $\Sat{M}{\eq[t_1][t_2]}[s_2]$.}
  92. \end{enumerate}
  93. Now assume $\Sat{M}{!B}[s_1]$ iff $\Sat{M}{!B}[s_2]$ for all
  94. !!{formula}s $!B$ less complex than~$!A$. The induction step proceeds
  95. by cases determined by the main operator of~$!A$. In each case, we
  96. only demonstrate the forward direction of the !!{biconditional}; the
  97. proof of the reverse direction is symmetrical. In all cases except
  98. those for the quantifiers, we apply the induction hypothesis to
  99. sub-!!{formula}s~$!B$ of~$!A$. The free variables of~$!B$ are among
  100. those of~$!A$. Thus, if $s_1$ and $s_2$ agree on the free variables
  101. of~$!A$, they also agree on those of~$!B$, and the induction
  102. hypothesis applies to~$!B$.
  103. \begin{enumerate}
  104. \tagitem{defNot}{}{%
  105. \iftag{probNot}{%
  106. \indcase!{!A}{\lnot !B}{}}{%
  107. \indcase{!A}{\lnot !B}{if $\Sat{M}{\indfrm}[s_1]$, then
  108. $\Sat/{M}{!B}[s_1]$, so by the induction hypothesis,
  109. $\Sat/{M}{!B}[s_2]$, hence $\Sat{M}{\indfrm}[s_2]$.}}}
  110. \tagitem{defAnd}{}{%
  111. \iftag{probAnd}{%
  112. \indcase!{!A}{!B \land !C}{}}{%
  113. \indcase{!A}{!B \land !C}{if $\Sat{M}{\indfrm}[s_1]$, then
  114. $\Sat{M}{!B}[s_1]$ and $\Sat{M}{!C}[s_1]$, so by induction
  115. hypothesis, $\Sat{M}{!B}[s_2]$ and $\Sat{M}{!C}[s_2]$. Hence,
  116. $\Sat{M}{\indfrm}[s_2]$.}}}
  117. \tagitem{defOr}{}{%
  118. \iftag{probOr}{%
  119. \indcase!{!A}{!B \lor !C}{}}{%
  120. \indcase{!A}{!B \lor !C}{if $\Sat{M}{\indfrm}[s_1]$, then
  121. $\Sat{M}{!B}[s_1]$ or $\Sat{M}{!C}[s_1]$. By induction hypothesis,
  122. $\Sat{M}{!B}[s_2]$ or $\Sat{M}{!C}[s_2]$, so $\Sat{M}{\indfrm}[s_2]$.}}}
  123. \tagitem{defIf}{}{%
  124. \iftag{probIf}{%
  125. \indcase!{!A}{!B \lif !C}{}}{%
  126. \indcase{!A}{!B \lif !C}{if $\Sat{M}{\indfrm}[s_1]$, then
  127. $\Sat/{M}{!B}[s_1]$ or $\Sat{M}{!C}[s_1]$. By the induction hypothesis,
  128. $\Sat/{M}{!B}[s_2]$ or $\Sat{M}{!C}[s_2]$, so $\Sat{M}{\indfrm}[s_2]$.}}}
  129. \tagitem{defIff}{}{%
  130. \iftag{probIff}{%
  131. \indcase!{!A}{!B \liff !C}{}}{%
  132. \indcase{!A}{!B \liff !C}{if $\Sat{M}{\indfrm}[s_1]$, then either
  133. $\Sat{M}{!B}[s_1]$ and $\Sat{M}{!C}[s_1]$, or $\Sat/{M}{!B}[s_1]$ and
  134. $\Sat/{M}{!C}[s_1]$. By the induction hypothesis, either
  135. $\Sat{M}{!B}[s_2]$ and $\Sat{M}{!C}[s_2]$ or $\Sat/{M}{!B}[s_2]$
  136. and $\Sat/{M}{!C}[s_2]$. In either case, $\Sat{M}{\indfrm}[s_2]$.}}}
  137. \tagitem{defEx}{}{%
  138. \iftag{probEx}{%
  139. \indcase!{!A}{\lexists[x][!B]}{}}{%
  140. \indcase{!A}{\lexists[x][!B]}{if $\Sat{M}{\indfrm}[s_1]$, there is
  141. an $m \in \Domain{M}$ so that $\Sat{M}{!B}[\Subst{s_1}{m}{x}]$.
  142. Let $s_1' = \Subst{s_1}{m}{x}$ and $s_2' =
  143. \Subst{s_2}{m}{x}$. The free variables of~$!B$ are among $x_1$,
  144. \dots, $x_n$, and $x$. $s_1'(x_i) = s_2'(x_i)$, since $s_1'$ and
  145. $s_2'$ are $x$-variants of $s_1$ and~$s_2$, respectively, and by
  146. hypothesis $s_1(x_i) = s_2(x_i)$. $s_1'(x) = s_2'(x) = m$ by the
  147. way we have defined $s_1'$ and~$s_2'$. Then the induction
  148. hypothesis applies to $!B$ and $s_1'$, $s_2'$, so
  149. $\Sat{M}{!B}[s_2']$. Hence, since $s_2' = \Subst{s_2}{m}{x}$,
  150. there is an $m \in \Domain{M}$ such that
  151. $\Sat{M}{!B}[\Subst{s_2}{m}{x}]$, and so
  152. $\Sat{M}{\indfrm}[s_2]$.}}}
  153. \tagitem{defAll}{}{%
  154. \iftag{probAll}{%
  155. \indcase!{!A}{\lforall[x][!B]}{}}{%
  156. \indcase{!A}{\lforall[x][!B]}{if $\Sat{M}{\indfrm}[s_1]$, then for
  157. every $m \in \Domain{M}$, $\Sat{M}{!B}[\Subst{s_1}{m}{x}]$. We
  158. want to show that also, for every $m \in \Domain{M}$,
  159. $\Sat{M}{!B}[\Subst{s_2}{m}{x}]$. So let $m \in \Domain{M}$ be
  160. arbitrary, and consider $s_1' = \Subst{s}{m}{x}$ and $s_2' =
  161. \Subst{s}{m}{x}$. We have that $\Sat{M}{!B}[s_1']$. The free
  162. variables of~$!B$ are among $x_1$, \dots, $x_n$, and $x$.
  163. $s_1'(x_i) = s_2'(x_i)$, since $s_1'$ and $s_2'$ are
  164. $x$-variants of $s_1$ and~$s_2$, respectively, and by hypothesis
  165. $s_1(x_i) = s_2(x_i)$. $s_1'(x) = s_2'(x) = m$ by the way we
  166. have defined $s_1'$ and~$s_2'$. Then the induction hypothesis
  167. applies to~$!B$ and~$s_1'$, $s_2'$, and we have
  168. $\Sat{M}{!B}[s_2']$. This applies to every $m \in \Domain{M}$,
  169. i.e., $\Sat{M}{!B}[\Subst{s_2}{m}{x}]$ for all~$m \in
  170. \Domain{M}$, so $\Sat{M}{\indfrm}[s_2]$.}}}
  171. \end{enumerate}
  172. By induction, we get that $\Sat{M}{!A}[s_1]$ iff $\Sat{M}{!A}[s_2]$
  173. whenever the free !!{variable}s in $!A$ are among $x_1$, \dots, $x_n$
  174. and $s_1(x_i)=s_2(x_i)$ for $i = 1$, \dots,~$n$.
  175. \end{proof}
  176. \begin{probtag}{probNot,probOr,probAnd,probIf,probIff,probEx,probAll}
  177. Complete the proof of \olref[fol][syn][ass]{prop:satindep}.
  178. \end{probtag}
  179. \begin{explain}
  180. !!^{sentence}s have no free variables, so any two variable assignments
  181. assign the same things to all the (zero) free variables of any
  182. sentence. The proposition just proved then means that whether or not
  183. !!a{sentence} is satisfied in a structure relative to a variable
  184. assignment is completely independent of the assignment. We'll record
  185. this fact. It justifies the definition of satisfaction of
  186. !!a{sentence} in !!a{structure} (without mentioning a variable
  187. assignment) that follows.
  188. \end{explain}
  189. \begin{cor}
  190. \ollabel{cor:sat-sentence}
  191. If $!A$ is !!a{sentence} and $s$ a variable assignment, then
  192. $\Sat{M}{!A}[s]$ iff $\Sat{M}{!A}[s']$ for every variable
  193. assignment~$s'$.
  194. \end{cor}
  195. \begin{proof}
  196. Let $s'$ be any variable assignment. Since $!A$ is !!a{sentence}, it
  197. has no free variables, and so every variable assignment~$s'$
  198. trivially assigns the same things to all free variables of~$!A$ as
  199. does~$s$. So the condition of \olref{prop:satindep} is satisfied,
  200. and we have $\Sat{M}{!A}[s]$ iff $\Sat{M}{!A}[s']$.
  201. \end{proof}
  202. \begin{defn}
  203. \ollabel{defn:satisfaction}
  204. If $!A$ is !!a{sentence}, we say that !!a{structure}~$\Struct M$
  205. \emph{satisfies}~$!A$, $\Sat{M}{!A}$, iff $\Sat{M}{!A}[s]$ for all
  206. variable assignments~$s$.
  207. \end{defn}
  208. If $\Sat{M}{!A}$, we also simply say that \emph{$!A$ is true
  209. in~$\Struct{M}$.} The notion of satisfaction naturally extends
  210. from individual !!{sentence}s to sets of !!{sentence}s.
  211. \begin{defn}
  212. \ollabel{defn:sat}
  213. If $\Gamma$ is a set of !!{sentence}s~$\Gamma$, we say that
  214. !!a{structure}~$\Struct M$ \emph{satisfies}~$\Gamma$,
  215. $\Sat{M}{\Gamma}$, iff $\Sat{M}{!A}$ for all $!A \in \Gamma$.
  216. \end{defn}
  217. \begin{prop}\ollabel{prop:sentence-sat-true}
  218. Let $\Struct{M}$ be !!a{structure}, $!A$ be !!a{sentence}, and $s$ a
  219. variable assignment. $\Sat{M}{!A}$ iff $\Sat{M}{!A}[s]$.
  220. \end{prop}
  221. \begin{proof}
  222. Exercise.
  223. \end{proof}
  224. \begin{prob}
  225. Prove \olref[fol][syn][ass]{prop:sentence-sat-true}
  226. \end{prob}
  227. \begin{prop}\ollabel{prop:sat-quant}
  228. Suppose $!A(x)$ only contains $x$ free, and $\Struct M$ is
  229. !!a{structure}. Then:
  230. \begin{tagenumerate}{prvEx,prvAll}
  231. \tagitem{prvEx}{$\Sat{M}{\lexists[x][!A(x)]}$ iff $\Sat{M}{!A(x)}[s]$
  232. for at least one variable assignment~$s$.}{}
  233. \tagitem{prvAll}{$\Sat{M}{\lforall[x][!A(x)]}$ iff $\Sat{M}{!A(x)}[s]$
  234. for all variable assignments~$s$.}{}
  235. \end{tagenumerate}
  236. \end{prop}
  237. \begin{proof}
  238. Exercise.
  239. \end{proof}
  240. \begin{prob}
  241. Prove \olref[fol][syn][ass]{prop:sat-quant}.
  242. \end{prob}
  243. \begin{prob}
  244. \DeclareRobustCommand{\VDash}{\mathrel{||}\joinrel\Relbar}
  245. Suppose $\Lang L$ is a language without !!{function}s. Given a
  246. !!{structure}~$\Struct M$, $c$ !!a{constant} and $a \in \Domain M$,
  247. define $\Struct M[a/c]$ to be the !!{structure} that is just
  248. like~$\Struct M$, except that $\Assign{c}{M[a/c]} = a$. Define
  249. $\Struct M \VDash !A$ for !!{sentence}s~$!A$ by:
  250. \begin{enumerate}
  251. \tagitem{prvFalse}{%
  252. \indcase{!A}{\lfalse}{not $\Struct{M} \VDash \indfrm$.}}{}
  253. \tagitem{prvTrue}{%
  254. \indcase{!A}{\ltrue}{$\Struct{M} \VDash \indfrm$.}}{}
  255. \item \indcase{!A}{\Atom{R}{d_1, \dots, d_n}}{$\Struct M \VDash \indfrm$
  256. iff $\langle \Assign{d_1}{M}, \dots, \Assign{d_n}{M} \rangle \in
  257. \Assign{R}{M}$.}
  258. \item \indcase{!A}{\eq[d_1][d_2]}{$\Struct M \VDash \indfrm$ iff
  259. $\Assign{d_1}{M} = \Assign{d_2}{M}$.}
  260. \tagitem{prvNot}{%
  261. \indcase{!A}{\lnot !B}{$\Struct{M} \VDash \indfrm$ iff
  262. not $\Struct{M} \VDash {!B}$.}}{}
  263. \tagitem{prvAnd}{%
  264. \indcase{!A}{(!B \land !C)}{$\Struct{M} \VDash
  265. \indfrm$ iff $\Struct{M} \VDash!B$ and $\Struct{M} \VDash !C$.}}{}
  266. \tagitem{prvOr}{%
  267. \indcase{!A}{(!B \lor !C)}{$\Struct{M} \VDash \indfrm$ iff
  268. $\Struct{M} \VDash !B$ or $\Struct{M} \VDash !C$ (or both).}}{}
  269. \tagitem{prvIf}{%
  270. \indcase{!A}{(!B \lif !C)}{$\Struct{M} \VDash \indfrm$ iff
  271. not $\Struct {M} \VDash !B$ or $\Struct M \VDash !C$ (or both).}}{}
  272. \tagitem{prvIff}{%
  273. \indcase{!A}{(!B \liff !C)}{$\Struct{M} \VDash {\indfrm}$ iff either
  274. both $\Struct{M} \VDash {!B}$ and $\Struct{M} \VDash {!C}$, or
  275. neither $\Struct{M} \VDash {!B}$ nor $\Struct{M} \VDash {!C}$.}}{}
  276. \tagitem{prvAll}{%
  277. \indcase{!A}{\lforall[x][!B]}{$\Struct{M} \VDash {\indfrm}$ iff for
  278. all $a \in \Domain{M}$, $\Struct{M[a/c]} \VDash \Subst{!B}{c}{x}$,
  279. if $c$ does not occur in~$!B$.}}{}
  280. \tagitem{prvEx}{%
  281. \indcase{!A}{\lexists[x][!B]}{$\Struct{M} \VDash
  282. {\indfrm}$ iff there is an $a \in \Domain M$ such that
  283. $\Struct{M[a/c]} \VDash \Subst{!B}{c}{x}$, if $c$ does not occur
  284. in~$!B$.}}{}
  285. \end{enumerate}
  286. Let $x_1$, \dots, $x_n$ be all free !!{variable}s in~$!A$,
  287. $c_1$, \dots, $c_n$ constant symbols not in~$!A$,
  288. $a_1$, \dots, $a_n \in \Domain M$, and $s(x_i) = a_i$.
  289. Show that $\Sat{M}{!A}[s]$ iff $\Struct M[a_1/c_1,\dots,a_n/c_n]
  290. \VDash \Subst{\Subst{!A}{c_1}{x_1}\dots}{c_n}{x_n}$.
  291. (This problem shows that it is possible to give a semantics for
  292. first-order logic that makes do without variable assignments.)
  293. \end{prob}
  294. \begin{prob}
  295. Suppose that $f$ is a function symbol not in~$!A(x,y)$. Show that
  296. there is !!a{structure}~$\Struct{M}$ such that
  297. $\Sat{M}{\lforall[x][\lexists[y][!A(x,y)]]}$ iff there is an~$\Struct
  298. M'$ such that $\Sat{M'}{\lforall[x][!A(x,f(x))]}$.
  299. (This problem is a special case of what's known as Skolem's Theorem;
  300. $\lforall[x][!A(x,f(x))]$ is called a \emph{Skolem normal form} of
  301. $\lforall[x][\lexists[y][!A(x,y)]]$.)
  302. \end{prob}
  303. \end{document}

content/first-order-logic/syntax-and-semantics/extensionality.tex

137 lines; SHA-256 b96be00c844c1a06be3dc8c18e237fdb595ed60b18462b01bca43e6886d1da4d. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: syntax-and-semantics
  3. % Section: substitution
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{syn}{ext}
  7. \olsection{Extensionality}
  8. \begin{explain}
  9. Extensionality, sometimes called relevance, can be expressed
  10. informally as follows: the only factors that bear upon the
  11. satisfaction of !!{formula}~$!A$ in !!a{structure}~$\Struct M$
  12. relative to !!a{variable} assignment~$s$, are the size of the
  13. !!{domain} and the assignments made by~$\Struct M$ and~$s$ to the
  14. elements of the language that actually appear in~$!A$.
  15. One immediate consequence of extensionality is that where two
  16. !!{structure}s~$\Struct M$ and~$\Struct M'$ agree on all the elements
  17. of the language appearing in a sentence~$!A$ and have the same
  18. domain,~$\Struct M$ and~$\Struct M'$ must also agree on whether or not
  19. $!A$ itself is true.
  20. \end{explain}
  21. \begin{prop}[Extensionality]
  22. \ollabel{prop:extensionality}
  23. Let $!A$ be !!a{formula}, and $\Struct M_1$ and $\Struct M_2$ be
  24. !!{structure}s with $\Domain{M_1} = \Domain{M_2}$, and $s$ a
  25. variable assignment on $\Domain{M_1} = \Domain{M_2}$. If
  26. $\Assign{c}{M_1} = \Assign{c}{M_2}$, $\Assign{R}{M_1}=\Assign{R}{M_2}$,
  27. and $\Assign{f}{M_1} = \Assign{f}{M_2}$ for every !!{constant}~$c$,
  28. relation symbol~$R$, and !!{function} $f$ occurring in~$!A$, then
  29. $\Sat{M_1}{!A}[s]$ iff $\Sat{M_2}{!A}[s]$.
  30. \end{prop}
  31. \begin{proof}
  32. First prove (by induction on~$t$) that for every term,
  33. $\Value{t}{M_1}[s] = \Value{t}{M_2}[s]$. Then prove the proposition
  34. by induction on~$!A$, making use of the claim just proved for the
  35. induction basis (where $!A$ is atomic).
  36. \end{proof}
  37. \begin{prob}
  38. Carry out the proof of \olref[fol][syn][ext]{prop:extensionality} in
  39. detail.
  40. \end{prob}
  41. \begin{cor}[Extensionality for !!^{sentence}s]
  42. \ollabel{cor:extensionality-sent}
  43. Let $!A$ be !!a{sentence} and $\Struct{M_1}$, $\Struct{M_2}$ as in
  44. \olref{prop:extensionality}. Then $\Sat{M_1}{!A}$ iff $\Sat{M_2}{!A}$.
  45. \end{cor}
  46. \begin{proof}
  47. Follows from \olref{prop:extensionality} by \olref[ass]{cor:sat-sentence}.
  48. \end{proof}
  49. Moreover, the value of a term, and whether or not !!a{structure}
  50. satisfies !!a{formula}, only depend on the values of its subterms.
  51. \begin{prop}\ollabel{prop:ext-terms}
  52. Let $\Struct M$ be !!a{structure}, $t$ and $t'$ terms, and $s$ a
  53. variable assignment. Then $\Value{\Subst{t}{t'}{x}}{M}[s] =
  54. \Value{t}{M}[\Subst{s}{\Value{t'}{M}[s]}{x}]$.
  55. \end{prop}
  56. \begin{proof}
  57. By induction on~$t$.
  58. \begin{enumerate}
  59. \item If $t$ is a constant, say, $t\ident c$, then $\Subst{t}{t'}{x} =
  60. c$, and $\Value{c}{M}[s] = \Assign{c}{M} =
  61. \Value{c}{M}[\Subst{s}{\Value{t'}{M}[s]}{x}]$.
  62. \item If $t$ is a variable other than~$x$, say, $t \ident y$, then
  63. $\Subst{t}{t'}{x} = y$, and $\Value{y}{M}[s] =
  64. \Value{y}{M}[\Subst{s}{\Value{t'}{M}[s]}{x}]$ since
  65. $\varAssign{s}{\Subst{s}{\Value{t'}{M}[s]}{x}}{x}$.
  66. \item If $t \ident x$, then $\Subst{t}{t'}{x} = t'$. But
  67. $\Value{x}{M}[\Subst{s}{\Value{t'}{M}[s]}{x}] = \Value{t'}{M}[s]$ by
  68. definition of~$\Subst{s}{\Value{t'}{M}[s]}{x}$.
  69. \item If $t \ident \Atom{f}{t_1,\dots,t_n}$ then we have:
  70. \begin{multline*}
  71. \Value{\Subst{t}{t'}{x}}{M}[s] = \\
  72. \begin{aligned}[b]
  73. & = \Value{\Atom{f}{\Subst{t_1}{t'}{x}, \dots, \Subst{t_n}{t'}{x}}}{M}[s]\\
  74. & \qquad \text{ by definition of $\Subst{t}{t'}{x}$}\\
  75. & = \Assign{f}{M}(\Value{\Subst{t_1}{t'}{x}}{M}[s], \dots,
  76. \Value{\Subst{t_n}{t'}{x}}{M}[s])\\
  77. & \qquad \text{ by definition of $\Value{\Atom{f}{\dots}}{M}[s]$}\\
  78. & = \Assign{f}{M}(\Value{t_1}{M}[\Subst{s}{\Value{t'}{M}[s]}{x}], \dots,
  79. \Value{t_n}{M}[\Subst{s}{\Value{t'}{M}[s]}{x}])\\
  80. & \qquad \text{ by induction hypothesis}\\
  81. & = \Value{t}{M}[\Subst{s}{\Value{t'}{M}[s]}{x}]
  82. \text{ by definition of $\Value{\Atom{f}{\dots}}{M}[\Subst{s}{\Value{t'}{M}[s]}{x}]$}
  83. \end{aligned}
  84. \end{multline*}
  85. \end{enumerate}
  86. \end{proof}
  87. \begin{prop}\ollabel{prop:ext-formulas} Let $\Struct M$ be
  88. !!a{structure}, $!A$ !!a{formula}, $t'$~a term, and $s$~a variable
  89. assignment. Then $\Sat{M}{\Subst{!A}{t'}{x}}[s]$ iff
  90. $\Sat{M}{!A}[\Subst{s}{\Value{t'}{M}[s]}{x}]$.
  91. \end{prop}
  92. \begin{proof}
  93. Exercise.
  94. \end{proof}
  95. \begin{prob}
  96. Prove \olref[fol][syn][ext]{prop:ext-formulas}
  97. \end{prob}
  98. \begin{explain}
  99. The point of
  100. \cref{fol:syn:ext:prop:ext-terms,fol:syn:ext:prop:ext-formulas} is
  101. the following. Suppose we have a term $t$ or !!a{formula}~$!A$ and
  102. some term~$t'$, and we want to know the value of $\Subst{t}{t'}{x}$
  103. or whether or not $\Subst{!A}{t'}{x}$ is satisfied in
  104. !!a{structure}~$\Struct M$ relative to !!a{variable} assignment~$s$.
  105. Then we can either perform the substitution first and then consider
  106. the value or satisfaction relative to $\Struct{M}$ and~$s$, or we
  107. can first determine the value~$m = \Value{t'}{M}[s]$ of $t'$ in
  108. $\Struct{M}$ relative to~$s$, change the !!{variable} assignment
  109. to~$\Subst{s}{m}{x}$ and then consider the value of~$t$ in
  110. $\Struct{M}$ and~$\Subst{s}{m}{x}$, or whether
  111. $\Sat{M}{!A}[\Subst{s}{m}{x}]$.
  112. \Cref{fol:syn:ext:prop:ext-terms,fol:syn:ext:prop:ext-formulas}
  113. guarantee that the answer will be the same, whichever way we do it.
  114. \end{explain}
  115. \end{document}

content/first-order-logic/syntax-and-semantics/semantic-notions.tex

157 lines; SHA-256 8b8740c064a3a876ff0cdf5dacd51bb8d3bbba87256fe49180de5f7c80fe08dd. Open the byte-exact preserved source file.

  1. % Part: first-order-logic
  2. % Chapter: syntax-and-semantics
  3. % Section: Semantic Notions
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{fol}{syn}{sem}
  7. \olsection{Semantic Notions}
  8. \begin{explain}
  9. Given the definition of !!{structure}s for first-order languages, we can
  10. define some basic semantic properties of and relationships between
  11. sentences. The simplest of these is the notion of \emph{validity} of
  12. a sentence. A sentence is valid if it is satisfied in every
  13. !!{structure}. Valid sentences are those that are satisfied regardless of
  14. how the non-logical symbols in it are interpreted. Valid sentences
  15. are therefore also called \emph{logical truths}---they are true, i.e.,
  16. satisfied, in any !!{structure} and hence their truth depends only on the
  17. logical symbols occurring in them and their syntactic !!{structure}, but not
  18. on the non-logical symbols or their interpretation.
  19. \end{explain}
  20. \begin{defn}[Validity]
  21. A sentence $!A$ is \emph{valid}, $\Entails !A$, iff $\Sat{M}{!A}$ for every
  22. !!{structure}~$\Struct M$.
  23. \end{defn}
  24. \begin{defn}[Entailment]
  25. A set of sentences~$\Gamma$ \emph{entails} a sentence~$!A$, $\Gamma
  26. \Entails !A$, iff for every !!{structure}~$\Struct M$ with
  27. $\Sat{M}{\Gamma}$, $\Sat{M}{!A}$.
  28. \end{defn}
  29. \begin{defn}[Satisfiability]
  30. A set of sentences~$\Gamma$ is \emph{satisfiable} if $\Sat{M}{\Gamma}$
  31. for some !!{structure}~$\Struct M$. If $\Gamma$ is not satisfiable it is
  32. called \emph{unsatisfiable}.
  33. \end{defn}
  34. \begin{prop}
  35. A sentence $!A$ is valid iff $\Gamma \Entails !A$ for every set of
  36. sentences~$\Gamma$.
  37. \end{prop}
  38. \begin{proof}
  39. For the forward direction, let $!A$ be valid, and let $\Gamma$ be a
  40. set of sentences. Let $\Struct M$ be !!a{structure} so that
  41. $\Sat{M}{\Gamma}$. Since $!A$ is valid, $\Sat{M}{!A}$, hence $\Gamma
  42. \Entails !A$.
  43. For the contrapositive of the reverse direction, let $!A$ be invalid,
  44. so there is !!a{structure}~$\Struct M$ with $\Sat/{M}{!A}$. When $\Gamma
  45. = \{ \ltrue \}$, since $\ltrue$ is valid, $\Sat{M}{\Gamma}$. Hence,
  46. there is !!a{structure}~$\Struct M$ so that $\Sat{M}{\Gamma}$ but
  47. $\Sat/{M}{!A}$, hence $\Gamma$ does not entail $!A$.
  48. \end{proof}
  49. \begin{prop}
  50. \ollabel{prop:entails-unsat}
  51. $\Gamma \Entails !A$ iff $\Gamma \cup \{\lnot !A\}$ is unsatisfiable.
  52. \end{prop}
  53. \begin{proof}
  54. For the forward direction, suppose $\Gamma \Entails !A$ and suppose to the
  55. contrary that there is !!a{structure}~$\Struct M$ so that $\Sat{M}{\Gamma
  56. \cup \{ \lnot !A \}}$. Since $\Sat{M}{\Gamma}$ and $\Gamma \Entails
  57. !A$, $\Sat{M}{!A}$. Also, since $\Sat{M}{\Gamma\cup \{ \lnot !A \}}$,
  58. $\Sat{M}{\lnot !A}$, so we have both $\Sat{M}{!A}$ and $\Sat/{M}{!A}$,
  59. a contradiction. Hence, there can be no such !!{structure}~$\Struct M$, so
  60. $\Gamma \cup \{ \lnot !A \}$ is unsatisfiable.
  61. For the reverse direction, suppose $\Gamma \cup \{ \lnot !A \}$ is
  62. unsatisfiable. So for every !!{structure}~$\Struct M$, either
  63. $\Sat/{M}{\Gamma}$ or $\Sat{M}{!A}$. Hence, for every !!{structure}
  64. $\Struct M$ with $\Sat{M}{\Gamma}$, $\Sat{M}{!A}$, so $\Gamma \Entails
  65. !A$.
  66. \end{proof}
  67. \begin{prob}
  68. \begin{enumerate}
  69. \item Show that $\Gamma \Entails \bot$ iff $\Gamma$ is unsatisfiable.
  70. \item Show that $\Gamma \cup \{!A\} \Entails \bot$ iff $\Gamma \Entails \lnot !A$.
  71. \item Suppose $c$ does not occur in $!A$ or $\Gamma$. Show that
  72. $\Gamma \Entails \lforall[x][!A]$ iff $\Gamma \Entails
  73. \Subst{!A}{c}{x}$.
  74. \end{enumerate}
  75. \end{prob}
  76. \begin{prop}
  77. If $\Gamma \subseteq \Gamma'$ and $\Gamma \Entails !A$, then $\Gamma'
  78. \Entails !A$.
  79. \end{prop}
  80. \begin{proof}
  81. Suppose that $\Gamma \subseteq \Gamma'$ and $\Gamma \Entails !A$. Let
  82. $\Struct M$ be a structure such that $\Sat{M}{\Gamma'}$; then $\Sat{M}{\Gamma}$,
  83. and since $\Gamma \Entails !A$, we get that $\Sat{M}{!A}$. Hence,
  84. whenever $\Sat{M}{\Gamma'}$, $\Sat{M}{!A}$, so $\Gamma' \Entails !A$.
  85. \end{proof}
  86. \begin{thm}[Semantic Deduction Theorem]
  87. \ollabel{thm:sem-deduction}
  88. $\Gamma \cup \{!A\} \Entails !B$ iff $\Gamma \Entails !A \lif !B$.
  89. \end{thm}
  90. \begin{proof}
  91. For the forward direction, let $\Gamma \cup \{ !A \} \Entails !B$ and
  92. let $\Struct M$ be !!a{structure} so that $\Sat{M}{\Gamma}$. If
  93. $\Sat{M}{!A}$, then $\Sat{M}{\Gamma \cup \{ !A \} }$, so since $\Gamma
  94. \cup \{ !A \}$ entails $!B$, we get $\Sat{M}{!B}$. Therefore,
  95. $\Sat{M}{!A \lif !B}$, so $\Gamma \Entails !A \lif !B$.
  96. For the reverse direction, let $\Gamma \Entails !A \lif !B$ and
  97. $\Struct M$ be !!a{structure} so that $\Sat{M}{\Gamma \cup \{ !A
  98. \}}$. Then $\Sat{M}{\Gamma}$, so $\Sat{M}{!A \lif !B}$, and since
  99. $\Sat{M}{!A}$, $\Sat{M}{!B}$. Hence, whenever $\Sat{M}{\Gamma \cup \{
  100. !A \} }$, $\Sat{M}{!B}$, so $\Gamma \cup \{ !A \} \Entails !B$.
  101. \end{proof}
  102. \begin{prop}\ollabel{prop:quant-terms}
  103. Let $\Struct{M}$ be !!a{structure}, and $!A(x)$ !!a{formula} with
  104. one free variable~$x$, and $t$~a closed term. Then:
  105. \begin{tagenumerate}{prvEx,prvAll}
  106. \tagitem{prvEx}{$!A(t) \Entails \lexists[x][!A(x)]$}{}
  107. \tagitem{prvAll}{$\lforall[x][!A(x)] \Entails !A(t)$}{}
  108. \end{tagenumerate}
  109. \end{prop}
  110. \begin{proof}
  111. \begin{tagenumerate}{prvEx,prvAll}
  112. \tagitem{prvEx}{%
  113. \iftag{probEx}{Exercise.}{Suppose $\Sat{M}{!A(t)}$. Let $s$ be a
  114. variable assignment with $s(x) = \Value{t}{M}$. Then
  115. $\Sat{M}{!A(t)}[s]$ since $!A(t)$ is !!a{sentence}. By
  116. \olref[ext]{prop:ext-formulas}, $\Sat{M}{!A(x)}[s]$. By
  117. \olref[ass]{prop:sat-quant},
  118. $\Sat{M}{\lexists[x][!A(x)]}$.}}{}
  119. \tagitem{prvAll}{%
  120. \iftag{probAll}{Exercise.}{Suppose
  121. $\Sat{M}{\lforall[x][!A(x)]}$. Let $s$ be a variable
  122. assignment with $s(x) = \Value{t}{M}$. By
  123. \olref[ass]{prop:sat-quant}, $\Sat{M}{!A(x)}[s]$. By
  124. \olref[ext]{prop:ext-formulas}, $\Sat{M}{!A(t)}[s]$. By
  125. \olref[ass]{prop:sentence-sat-true}, $\Sat{M}{!A(t)}$ since
  126. $!A(t)$ is !!a{sentence}.}}{}
  127. \end{tagenumerate}
  128. \end{proof}
  129. \begin{probtag}{probEx,probAll}
  130. Complete the proof of \olref[fol][syn][sem]{prop:quant-terms}.
  131. \end{probtag}
  132. \end{document}