Symbolic Logic

This chapter provides notes on first-order logic.

First-order logic (FOL) is the field of logic most people are familiar with. It's the kind of logic we'd encounter in a "Logic 101" course, and it's the logic most heavily used in mathematics. We begin first with propositional logic.

Primitives

Before we study logic formally, let's set some ground rules. Because of how low-level logic is, there's a tendency to plunge down an all too familiar sequence:

What is x{x}? x{x} is y.{y.}

What is y?{y?} y{y} is z.{z.}

What is z?{z?} z{z} is z.{z'.}

{\vdots}

While such questions are important and interesting, we need this sequence to converge as a sanity check. In logic and mathematics, we avoid infinite regression by using primitive notions — a concept that is not defined in terms of previously-defined concepts. We have to start somewhere, and if we aren't starting at the same place, well, we'll just have to go our separate ways.

Our first primitive notion is a symbol:

symbol. A symbol is a drawing or mark perceptible by sight.

For example, all of the following are symbols:

  9       P   Q        Σ  ¬  {  +    !  ?  0  x   (  <  π    ZA  f      ÷ y   ] \iff~~9~~\land~~~\lor~~\in \\ P~~~Q~~~\nc~~~\infty~~\Sigma~~ \\ \neg~~\{~~+~~-~~!~~?~~0~~ \\ x~~~(~~<~~\pi~~\sqrt{}~~\uint\\ {\bf A}~~f~~\lxor~~\div~y~~~] \\

From the primitive notion of a symbol, we can construct our first definition.

alphabet. A finite set of symbols is called an alphabet, which we may arbitrarily denote as Σ{\Sigma}.

For example, the set:

{0,1} \set{0,1}

is an alphabet of two symbols, 0{0} and 1.{1.} The alphabet:

{0,1,2,3,4,5,6,7,8,9} \set{0,1,2,3,4,5,6,7,8,9}

is an alphabet of 10 symbols. This particular alphabet is called the Hindu-Arabic numerals, and each element of the set is called a digit. Having defined what an alphabet is, here is our next definition:

string. A string σ{\sigma} of length n{n} is an n{n}-tuple:

(ai:(ini+1)(1)) (a_i : {(i \neq n \nc i + 1) \land (1)})

where each ai{a_i} is a member of some alphabet Σ.{\Sigma.} That is, aiΣ.{a_i \in \Sigma.} There exists a unique string where n=0,{n=0,} which we call the empty string, denoted λ.{\lambda.} We say that the first symbol a0{a_0} in σ{\sigma} is the first letter and the last symbol an{a_n} is the last letter. The set of all strings on the alphabet Σ{\Sigma} is the disjoint union:

Σ=nAn. \Sigma^* = \bigsqcup\limits_{n} A^n.

When we want to explicitly refer to a string divorced of all connotations, we will use question marks. For example, to denote the string "cookie", we write:

“cookie” \string{\text{cookie}}

to denote the string 2518 we write:

“2518” \string{2518}

Next, we define a method for combining strings.

concatenation. Given the strings a=(a1,,an){a = (a_1,\ldots,a_n)} and b=(b1,,bm){b=(b_1,\ldots,b_m)} on an alphabet Σ,{\Sigma,} the concatenation abΣ{ab \in \Sigma^*} is defined as:

ab=a1,,amb1,,bn ab = a_1, \ldots, a_mb_1, \ldots, b_n

Thus, we say that ab{ab} is a string on Σ{\Sigma} of length m+n.{m + n.} We define concatenation to be associative: (ab)c=a(bc){(ab)c = a(bc)} for all a,b,cΣ.{a,b,c \in \Sigma^*.} We define the empty string λ{\lambda} to be the identity element: λa=a=aλ.{\lambda a = a = a \lambda.} And we define concatenation to have two-sided cancellation: If ab=ac,{ab=ac,} then b=c,{b=c,} and if ac=bc,{ac = bc,} then a=b.{a=b.}

Propositional Alphabet

We begin by stating the first few symbols of our alphabet:

{      ¬         0   1} \set{\top~~~\bot~~~\neg~~~\lor~~~\land~~~0~~~1}

These symbols are given the following meanings.

SymbolMeaning
{\top}constant 1
{\bot}constant 0
¬{\neg}not
{\lor}or
{\land}and

These first few symbols are called propositional connectives. Next, we have a set, denoted ּת,{ּ\tav,} where each member of ת{\tav} is a symbol for a propositional atom. For now, ת{\tav} comprises the Hindu-Arabic numerals, and the Latin and Greek letters, lower and uppercase. For example, two common symbols we'll use from ת{\tav} are p{p} and q.{q.} Informally, we can think of these as just symbols where we'd "plug in" statements: 1+1=2,{1+1=2,} 2  5,{2 \dv 5,} 3!=6,{3!=6,} etc. The symbol ת{\tav} is the Hebrew letter tav.

Definition of a Proposition

With the basic constructions, we define a proposition as follows.

proposition. Let Σ{\Sigma} be the alphabet ת{, , ¬, , }.{\tav \sqcup \set{\top,~\bot,~\neg,~\lor,~\land}.} A proposition is a string w{w} on Σ,{\Sigma,} for which there exists a sequence [s1,,sn],{\ix{s_1,\ldots,s_n},} where n1,{n \geq 1,} such that w=sn.{w = s_n.} For each k{1,,n},{k \in \set{1,\ldots,n},} either wkΣ{w_k \in \Sigma} or there are i,j{i,,k1}{i,j \in \set{i,\ldots,k-1}} such that wk{w_k} is a member of the set of concatenations {¬wi,wiwj,wi,wj}.{\set{\neg w_i, \lor w_i w_j, \land w_i, w_j}.} We denote the set of propositions on Σ{\Sigma} as Prop(Σ).{\text{Prop}(\Sigma).}

This definition seems awfully rigid, but it can't be helped (we're defining something that underlies all of mathematics). Fortunately, outside of the definition box, we can take a breather and look at things informally. In short, the definition says, a proposition is a string consisting only of symbols from our alphabet Σ,{\Sigma,} which we defined as:

ת{, , ¬, , }. \tav \sqcup \set{\top,~\bot,~\neg,~\lor,~\land}.

That is, the disjoint union of the set of propositional atoms and the set of propositional connectives. That string, however, isn't just any string. It's a string ρ{\rho} with at least one of the following properties:

  1. ρ{\rho} is an atom.
  2. ρ{\rho} is .{\top.}
  3. ρ{\rho} is .{\bot.}
  4. Where p,qProp(Σ),{p,q \in \text{Prop}(\Sigma),} ρ{\rho} is one of the propositions ¬p,{\neg p,} pq,{\lor pq,} or pq.{\land pq.}

Note that we've defined our propositions in prefix notation — pq{\land pq} and pq.{\lor pq.} The benefit to prefix notation is that it follows naturally from our definitions. The cost, however, is readability. As such, we adopt the following convention without apology or compromise: Given a string ab,{\land ab,} we may also write ab,{a \land b,} and given a string ab,{\lor ab,} we may also write ab.{a \lor b.}