
Logic is the study of reasoning. It deals primarily with inference, but also entailment, causality, consequence, induction, deduction, truth, falsity, belief, fallacies, paradoxes, probabilities, analysis, tense, modality, necessity, sufficiency, possibility, identity, vagueness, existence, description, justification, tolerance, obligation, permission, relevance, assertion, validity, contradiction, provability, and argumentation.
One of the central questions explored in the study of logic is:
Does the conclusion follow from the premises?
The phrase “follow from” can have different interpretations, including, but not limited to:
We know a general rule to be valid. We see an instance of this rule, so we apply the general rule to show, with complete certainty, the truth of the specific instance.
We have seen a bunch of cases to be true, so we infer that a new related case is also true. We can’t be sure of our conclusion, though, since a few special cases cannot necessarily prove a general rule.
The premises give really strong evidence for the truth of the conclusion.
Have some fun! Take this logic pre-test.
In order to understand the form of arguments and not get bogged down in long, confusing, and often ambiguous prose, we generally write statements in a very compact form, using common abbreviations such as the following. (As you read these descriptions, try not to let any preconceived notions of what you think is meant by “truth” color your interpretation.)
| Form | Meaning | Technical Term |
|---|---|---|
| $T$ | True | Truth |
| $F$ | False | Falsity |
| $\neg A$ | Not $A$ | Negation |
| $A \land B$ | $A$ and $B$ | Conjunction |
| $A \lor B$ | $A$ or $B$, or both | Disjunction |
| $A \supset B$ | It is not the case that $A$ is true and $B$ is false (i.e., whenever $A$ is true, $B$ is true) | Material Implication |
| $A \equiv B$ | $A$ and $B$ are either both true or both false | Material Equivalence |
| $A \rightarrow B$ | If $A$, then $B$ (non-truth-functional) | Conditional |
| $\forall x. A$ | For every $x$, $A$ | Universal quantification |
| $\exists x. A$ | There exists an $x$ such that $A$ | Existential quantification |
| $f\,x$ | The result of applying function $f$ to $x$ | Function application |
| $\iota x. A$ | The $x$ such that $A$ | Description |
| $x = y$ | $x$ and $y$ are the same object | Equality |
| $\Box A$ | In all possible worlds, $A$ | Necessity |
| $\lozenge A$ | In some possible world, $A$ | Possibility |
| $\mathbf{P} A$ | It was (at least once) the case that $A$ | Past |
| $\mathbf{F} A$ | It will (at least at some point) be the case that $A$ | Future |
| $\mathbf{H} A$ | It was always the case that $A$ | Always has been |
| $\mathbf{G} A$ | It will forever be the case that $A$ | Always going to be |
| $\mathscr{O} A$ | $A$ must (morally) be done | Obligation |
| $\mathscr{P} A$ | $A$ may (morally) be done | Permission |
| $\mathscr{K}_x A$ | Agent $x$ knows $A$ | Knowledge |
| $\mathscr{B}_x A$ | Agent $x$ believes $A$ | Belief |
| $|A|$ | Truth value of $A$ (in 0.0 ... 1.0) | Numerical Truth Value |
| $pr(A)$ | Probability of $A$ being true | Probability |
| $pr(A|B)$ | Probability of $A$ being true given that $B$ is true | Conditional Probability |
It takes quite a bit of practice to translate English (or other natural language) sentences into logical notation. In fact, the translation might not always be exact; natural language is pretty fluid (see, for example, The SEP article on Conditionals for the many readings of “if...then”). We’ll just give examples, rather than rules.
| English | Logic | Breakdown |
|---|---|---|
| Juliet is Italian | $\mathit{Italian(Juliet)}$ | — |
| $Ij$ | ||
| Romeo likes Juliet | $\mathit{Likes(Romeo,Juliet)}$ | |
| $Lrj$ | ||
| Romeo likes himself | $Lrr$ | Romeo likes Romeo |
| The sidewalk is wet when it rains | $R \supset Ws$ | If it is raining, then
the sidewalk is wet |
| Romeo likes the king’s daughter | $Lr(\iota x.Dkx)$ | Romeo likes
the person x such that
the daughter of the king is x |
| $Lr(dk)$ | Romeo likes the daughter of the king |
|
| Alice sees everybody | $\forall p. Sap$ | For every (person) p
Alice sees p |
| $\neg \exists p.\neg Sap$ | It is NOT the case that
there exists a (person) p such that
Alice does not see p |
|
| Alice sees somebody | $\exists p.Sap$ | There exists a (person) p such that
Alice sees p |
| $\neg \forall p. \neg Sap$ | It is NOT the case that
for every (person) p
Alice does not see p |
|
| Alice sees nobody | $\neg \exists p.Sap$ | It is NOT the case that
there exists a (person) p such that
Alice sees p |
| $\forall p. \neg Sap$ | For every (person) p
it is NOT the case that
Alice sees p |
|
| All apples are fruits | $\forall x.(Ax \supset Fx)$ | For every x
if x is an apple
x is a fruit |
| Some apples are green | $\exists x.(Ax \land Gx)$ | There exists an x such that
x is an apple AND x is green |
| All snakes are animals | $\forall x.(Sx \supset Ax)$ | For every thing x
if x is a snake
x is an animal |
| $\neg \exists x.(Sx \land \neg Ax)$ | It is NOT the case that
there exists an x such that
x is a snake AND x is not an animal |
|
| Some snakes are poisonous | $\exists x.(Sx \land Px)$ | There exists an x such that
x is a snake AND x is poisonous |
| $\neg \forall x.(Sx \supset \neg Px)$ | It is NOT the case that
for every x
if x is a snake
then x is non-poisonous |
|
| Juliet doesn’t like French people | $ \neg\exists p.(Fp \land Ljp)$ | It is NOT the case that
there exists a (person) p such that
p is French AND Juliet likes p |
| $\forall p.(Fp \supset \neg Ljp)$ | For every (person) p
if p is French
It is NOT the case that
Juliet likes p |
|
| Juliet likes all Italians | $\forall p.(Ip \supset Ljp)$ | For every (person) p
if p is Italian
Juliet likes p |
| Juliet likes all Italians except Romeo | $\forall p.(Ip \supset (Ljp \equiv \neg (p=r)))$ | For every (person) p
if p is Italian
Juliet likes p IF AND ONLY IF p is not Romeo |
| Every Italian likes someone | $\forall p. (Ip \supset \exists q.Lpq)$ | For every (person) p
if p is Italian
there exists (a person) q such that
p likes q |
| Everyone likes an Italian | $\forall p. \exists q.(Iq \land Lpq)$ | For every (person) p
there exists some q such that
q is Italian AND p likes q |
| Everyone likes this one particular Italian | $\exists q.(Iq \land \forall p.Lpq)$ | There exists a particular q such that
q is Italian
AND
for every (person) p
p likes this one particular q |
| Pablo shaves all and only those who do not shave themselves | $\forall q.(Spq \equiv \neg Sqq)$ | For every (person) q
Pablo shaves q
IF AND ONLY IF
it is not that case that
q shaves q |
| Not everyone is libertarian or progressive | $\neg \forall p.(Lp \lor Pp)$ | It is NOT the case that
there exists a (person) p such that
p is Libertarian OR p is progressive |
| $\exists p.(\neg Lp \land \neg Pp)$ | There exists a (person) p such that
p is NOT libertarian
AND
p is NOT progressive |
|
| Either the queen is rich or some pigs fly | $Rq \lor \exists p.(Pp \land Fp)$ | The queen is rich
OR
there exists a p such that
p is a pig AND p flies |
| Everything has a cause | $\forall x. \exists y.Cyx$ | For every (thing) x
there exists some y such that
y caused x |
| Everything has the same cause | $\exists y. \forall x.Cyx$ | There exists this one (uber thing) y such that
for every thing x
y caused x |
| Nothing caused itself | $\forall x. \neg Cxx$ | For every (thing) x
it is NOT the case that
x caused x |
| $\neg \exists x. Cxx$ | It is NOT the case that
there exists an x such that
x caused x |
|
| Everybody loves somebody, but someone is unloved | $(\forall x. \exists y.Lxy) \land (\exists x.\neg \exists y.Lyx)$ | For every (person) x
there is some (person) y such that
x loves y
AND ALSO
there exists some (person) x such that
it is NOT the case that
there exists some (person) y such that
y loves x |
| Some number less than 5 is a perfect square | $\exists x. (Lx5 \land \exists y.(x=qy))$ | There exists an x such that
x < 5
AND
the exists a y such that
x is y squared |
| $\exists x. (x<5 \land \exists y.(x=y^2))$ | ||
| Juliet might like Romeo | $\lozenge Ljr$ | It is possible that
Juliet likes Romeo |
| Two is necessarily equal to two | $\Box (2=2)$ | It is necessary that
2 equals 2 |
| The thunder god was worshiped by some Athenians | $\exists p.(Ap \land Wp(gt))$ | There exists a (person) p such that
p is an Athenian
AND
p worships
the god of thunder |
| It is possible that some day the sun-god will become forever awesome | $\lozenge \mathbf{FG}A(gs)$ | It is possible that
at some point in the future
it will always be the case that
that the god of the sun
is awesome |
| Juliet believes that Romeo doesn’t believe that Juliet likes him | $\mathscr{B}_j(\neg \mathscr{B}_r Ljr)$ | Juliet believes that
it is not the case that Romeo believes that
Juliet likes Romeo |
| There is a better than 50-50 chance that Juliet is hungry when it’s raining | $pr(Hj \mid R) > 0.5$ | The probability that
Juliet is hungry,
given that it’s raining
is bigger than 0.5 |
Most systems of logic distinguish between terms and formulas.
More complex terms and formulas are built using operators such as $\neg$, $\land$, $\lor$, $\supset$, $\equiv$, $\forall$, $\exists$, $\iota$, $=$, $\Box$, $\lozenge$, $\textbf{P}$, $\mathscr{B}$, $pr$, and so on—see above for examples.
ParenthesesBe sure to use parentheses when needed. For example, $Pfb$ is an application of the two-argument predicate $P$ to $f$ and $b$, for instance “Farah pressed the button”; but in $P(fb)$, $P$ is a one-argument predicate and $f$ is a function, as in “The friend of Billie is popular.”
When it comes to binary operators, $\neg$ has the highest precedence, then $\land$, then $\lor$ then $\supset$ then $\equiv$. The . has the lowest! So $\exists x. Px \land Q$ means $\exists x. (Px \land Q)$ and does NOT mean $(\exists x. Px) \land Q$. Parentheses are required in the latter.
Be careful not to confuse terms and formulas. For example, note $\iota x. Px$ is a term, but $\exists x. Px$ is a formula.
Notation conventionsNote how we’ve always used lowercase letters in the term world (objects and functions) and uppercase letters in the formula world (predicates and propositions). This is the way.
By the way, for anyone that likes minimalism:
A variable stands for something unspecified.
Every variable occurrence is either bound or free. It’s bound if it is within the scope of a $\forall$, $\exists$, or $\iota$ that binds it or is the binding occurrence itself, and free otherwise. This requires examples! In the following, the free variable occurrences are underlined:
A term or formula with a free variable is called an open term or open formula. A term or formula with no free variables is called closed. Open formulas are general statements and closed statements are specific statements. When useful to do so, we will indicate that a term or formula has certain free variables by writing $A[x]$ or $A[x,y]$.
To increase specificity, we substitute for the free variables in a term or formula. The notation for substituting $t$ for free occurrences of $x$ in formula $A$ such that no free variable in $t$ becomes bound (i.e., is captured) is $A[x \mapsto t]$ or $A[t/x]$.
Capturing is explicitly disallowed because a capture changes the meaning of the formula. For example, in the formula $\exists x. x \neq y$, the substitution $[y \mapsto x]$ mustn’t replace $y$ with $x$, since you’d end up with $\exists x. x \neq x$, which means something completely different!
If we can safely substitute $t$ for $x$ in $A$, we say $t$ is free for $x$ in $A$.
Formulas are purely syntactic objects—strings of symbols built according to precise rules. A formula on its own asserts nothing. To actually claim something, we need a different kind of statement: a judgment.
The first judgment we’ll see is that a formula is true. We write it
$$A\;\textsf{true}$$which is read “$A$ is true.” This looks trivial, but the distinction matters: $A$ is syntax; $A\;\textsf{true}$ is an assertion about that syntax, and conflating the two is a classic source of confusion in logic.
A hypothetical judgment is one that asserts something relative to assumptions, which we write
$$ J_1, J_2, \ldots, J_n \vdash J $$where each of the $J$s are simple judgments. We often use $\mathcal{H}$ for a list of hypotheses so
$$\mathcal{H} \vdash A\;\textsf{true}$$means “$A$ is true, given that every assertion in $\mathcal{H}$ holds.” The symbol $\vdash$ is called turnstile. Since $A\;\textsf{true}$ is (for now) our only judgment, people often shortcut the notation and abbreviate $A\;\textsf{true}$ as just $A$, yielding the shorthand:
$$\mathcal{H} \vdash A$$AMBIGUOUS NOTATION ALERTOnce we start dropping $\textsf{true}$, the symbol $A$ is doing double duty: sometimes it's the formula (pure syntax), and sometimes it's shorthand for the judgment $A\;\textsf{true}$ (an assertion).
If the context is such that you are dealing with judgments rather than formulas, you will have to mentally understand that the $\textsf{true}$ symbols are really present, just not visible. BE CAREFUL.
There is no shame at all, however, in being pedantic and never dropping the $\textsf{true}$s.
One judgment for nowLater—especially in type theory—you'll meet other judgment forms, like $e\!:t$ for “$e$ has type $t$.” But truth assertion is the only judgment we’ll see for a while.
A logical argument is a sequence of judgments, each of which is either a hypothesis or follows from earlier judgments in the sequence via an inference rule. The argument is valid if every judgment in it is justified this way. Arguments can also be given graphically, with premises above the line and conclusion below. Example:
The meaning of “follows from” depends on the particular system of logic you are working under.
So let’s look at different kinds of logic.
How can there be many different kinds of logic? Well, for one there could be different ways to understand “truth.” Sometimes we aren’t concerned with exact truth, but rather “degree of belief,” or whether something is “justified,” or “achievable,” or “knowable.”
Here are some kinds of logics. The list is incomplete. The kinds are also overlapping.
A bivalent system has exactly two truth values, usually called true and false. What kinds of systems are not bivalent? Those with a third value (sometimes called “unknown”), or perhaps four or five or six values,and those where a truth value is represented as a degree of certainty or belief (e.g. a value $\in 0.0\ldots 1.0$).
Technically, a proposition is a predicate with no arguments, such as “It‘s raining”. (We saw this in the example above, where we represented this with $R$.)
There is a type of logic where we simplify things so much that we ignore subjects, predicates, and objects, where all information is rolled up into single, atomic, nondecomposable sentences. Then propositions can be things like “Pigs fly”, “I am late”, “The moon is square”, and “The baby wants to sleep”. Propositional Logic is a system of reasoning about these things without decomposing them. The traditional operators are:
| Form | Meaning |
|---|---|
| $P \land Q$ | $P$ and $Q$ |
| $P \lor Q$ | $P$ or $Q$ (or both) |
| $\neg P$ | not $P$ |
| $P \supset Q$ | $P$ materially implies $Q$; e.g., $\neg(P \land \neg Q)$, or equivalently, $\neg P \lor Q$ |
| $P \equiv Q$ | $P$ and $Q$ have the same truth value |
Note: The $\land$ and $\lor$ operators are meant to be material, not causal. They cannot distinguish the sentence “I called her and found out about the problem” from “I found out about the problem and called her.”
Systems of logic featuring syllogisms were studied thousands of years ago; they include reasoning about “all” and “some”, but do not allow general propositions nor connectives like “and” and “or”. Traditionally, only the following eight kinds of statements were considered (capital letters are classes, small letters are instances):
| Form | Example |
|---|---|
| $x$ is $A$ | Socrates is human |
| $x$ is not $A$ | Fido is not human |
| $x$ is $y$ | Obama is the 44th U.S. President |
| $x$ is not $y$ | Italy is not the 2016 Olympic champion in Women’s Water Polo |
| All $A$ are $B$ | All dogs are mammals |
| No $A$ is $B$ | No dogs are fish |
| Some $A$ are $B$ | Some birds are flyers |
| Some $A$ are not $B$ | Some markers are not green |
For historical use onlySyllogistic logic has been completely superseded by first-order predicate logic.
A predicate logic adds objects, functions on objects, predicates, descriptions, and quantifiers (such as $\exists$ and $\forall$) to propositional logic. A first-order logic allows quantification over objects only; In a second-order logic you can quantify over first-order predicates. You can go on forever with these orders.
For each of the eight examples of syllogistic forms above, we will write the corresponding formula in first-order logic. Then we’ll try to come up with forumulae in first-order logic that cannot be expressed in syllogistic logic.
Here is an example of a second-order logic formula. Do you recognize it? It’s the “principle of mathematical induction,” where $s$ is the successor function (that is, $sn = n+1$):
$$\forall P.((P0 \land \forall n.(Pn \supset P(sn))) \supset \forall n.Pn)$$
Classical Logic is probably the most widely used logic. It is characterized by six properties (so say one of the authors of the Wikipedia article on the subject):
The term “classical” here does mean old or ancient. This was not the logic of the Ancient Greeks, the Ancient Chinese, or the Ancient anyone else. Classical Logic dates from the late 1800s. It’s relatively new.
In intuitionistic logic (often identified with constructive logic), we are not concerned with the truth of a statement as much as we are about its justification. Everything we assert in intuitionistic logic is something justifiable, constructively. So $A$ means “$A$ is provable” and $\neg A$ means “$A$ is refutable” (i.e., it is provable that no proof of $A$ exists—in other words, assuming $A$ allows you to derive falsity). Therefore:
Our familiar logical connectives are read quite differently:
Intuitionistic logic rejects the excluded middle as an axiom.
Constructive logic codifies the principles of mathematical reasoning as it is actually practiced. In mathematics a proposition may be judged to be true exactly when it has a proof, and may be judged to be false exactly when it has a refutation. Because there are, and always will be, unsolved problems, we cannot expect in general that a proposition is either true or false, for in most cases we have neither a proof nor a refutation of it. Constructive logic may be described as logic as if people matter, as distinct from classical logic, which may be described as the logic of the mind of god. From a constructive viewpoint the judgment “φ true” means that “there is a proof of φ.” —Robert Harper, Practical Foundations of Programming Languages, Chapter 30.
Intuitionistic logic turns out to be ideal for computer science.
Learn more at Wikipedia and the SEP. And if you prefer a video introduction, here’s Attic Philosophy’s:
Classical logic has the principle of explosion: false implies everything. Or in other words, “from a contradiction, everything follows.” The rationale is: if things are only true or false, and you assume false is true, then everything is true because true is already true and now you say that false is true also.
Let’s demonstrate with a proof of $(A \land \neg A) \supset B$:
This means the following statements are true in classical logic:
Relevance logic rejects explosion, and requires the antecedent and consequent to be related to each other. There must be some real causality. We say in classical logic that implication is material, but in relevance logic it is strict. There are many different ways to encode relevance.
Read about Relevance Logic in the SEP.
Descriptions can be tricky. What if no object satisfies the description?
Russell regarded $P(\iota x.Ax)$ as an abbreviation for $\exists x.((\forall y.(Ay \equiv y=x)) \land Px)$. But this means the statement is false unless there is a unique object satisfying the description $A$ and that has the property $P$.
A free logic allows the description of terms that do not denote anything. Read about Free Logic in the SEP.
A non-monotonic logic rejects the monotonicity of entailment. If a logic is monotonic, then adding new information can change the set of known facts, causing previously known truths to become falsehoods. These kind of logics are good for cases where you have to retract previous knowledge when new facts are known, as in:
See the SEP article on non-monotonic logic.
A paraconsistent logic is one that allows contradictions. These are actually quite useful when making sense of human beings you find yourself arguing with.
See the SEP article on Paraconsistent Logic.
A many-valued logic has, you got it, many truth-values. Many such systems exist. They certainly don’t have the exact same excluded middle and non-contradiction of classical bivalent logic, but they may, depending on their flavor, have similar kinds of properties, just scaled up a bit.
You might be interested in four-valued logics.
The Catuṣkoṭi is also known as the “Four Corners.” Propositions take on four values :
Find out more at Wikipedia and the SEP.
This 16-minute by Graham Priest is really good:
The Catuṣkoṭi is sometimes pictured as follows in logic, with the left column being True and the bottom row being False:
Here’s a modern take on the Catuṣkoṭi. Consider these four possible responses to a person asking you what they think is a yes-no question:
Here’s why it works:
A fuzzy logic is one in which facts have a degree of truth between 0 and 1. It is useful for statements like “$X$ is tall” or “$X$ is an adult” or “The bike is new.”
Do not confuse fuzzy logic with paraconsistent logic.
Do not confuse fuzzy logic with probability theory.
Read about Fuzzy Logic in the SEP.
Modal Logic deals with modalities, which qualify statements somehow. There are many different kinds of modalities, giving rise to different kinds of logics. Each can be based on classical or non-classical logics, and use numeric truth values, too.
See the SEP article on modal logic.
The basic alethic modal operators are defined as:
| Form | Meaning |
|---|---|
| $\Box A$ | It is necessary that $A$ |
| $\lozenge A$ | It is possible that $A$ |
In classical modal logic, the two operators are duals:
The basic deontic operators are defined as:
| Form | Meaning |
|---|---|
| $\mathscr{O}A$ | It is obligatory that $A$, or $A$ ought to be (MUST) |
| $\mathscr{P}A$ | It is permissible that $A$, or $A$ is allowed (MAY) |
In epistemic logic we have:
| Form | Meaning |
|---|---|
| $\mathscr{K}_x A$ | Agent $x$ knows $A$ |
| $\mathscr{K} A$ | $A$ is known (by all agents or by some agent whose identity we assume from context) |
In doxastic logic we have:
| Form | Meaning |
|---|---|
| $\mathscr{B}_x A$ | Agent $x$ believes $A$ |
| $\mathscr{B} A$ | $A$ is believed (by all agents or by some agent whose identity we assume from context) |
You may sometimes see the epistemic and the doxastic distinguished in the following context. Let $\Gamma = \exists g. G g$, i.e., there exists a $g$ such that $g$ is a god, or “(at least one) god exists.” Then:
Temporal logic deals with the modalities of time.
| Form | Meaning |
|---|---|
| $\mathbf{P}A$ | $A$ was true (at some point) in the Past |
| $\mathbf{F}A$ | $A$ will be true (at some point) in the Future |
| $\mathbf{H}A$ | $A$ Has always been true |
| $\mathbf{G}A$ | $A$ is always Going to be true |
Dynamic Logic brings events into the picture:
| Form | Meaning |
|---|---|
| $[e]A$ | “After event $e$, $A$ is necessarily true” |
| $\langle e \rangle A$ | “After event e, A is possibly true” |
Temporal vs. Dynamic Logic
Temporal logic [is] the modal logic of choice for reasoning about concurrent systems with its aspects of synchronization, interference, independence, deadlock, livelock, fairness, etc. These concerns of concurrency would appear to be less central to linguistics, philosophy, and artificial intelligence, the areas in which dynamic logic is most often encountered nowadays. — Wikipedia
In logic we are not so much concerned with the absolute truth or falsity of premises themselves, but rather with the form of arguments. We can deal with “forms” using a formal systems. Formal systems manipulate formulas.
A formal system is a mechanism for symbolically generating a set of formulas (called theorems) via inference rules.
A logistic system (a.k.a. a system of formal logic) is a formal system in which formulas are assigned truth values.
To define a logistic system we need three parts:
What the possible formulas are
What the formulas mean
How formulas can be derived from other formulas
In more detail: A syntax gives a rigorous, formal specification of exactly what is and what is not a formula. A semantics assigns truth values to each formula, usually via reference to a model of some sort. We need only describe the semantic functions—we don’t show how to compute them step-by-step. The inference rules are what we apply algorithmically (or mechanistically, typographically, symbolically) to generate formulas in such a way as to mimic a reasoning process.
We need examples.
We begin with the syntax:
This means that, for example:
p
(¬(p′′′ ∧ q) ∨ ¬¬p)
(r ⊃ p′)
are formulas, but
¬≡pp∧))′∧¬q∨(F′′
is not. Neither, by the way is
p ∧ q
since the syntax above requires parentheses around all formulae formed with binary operators. Look again, closely!
Wait, what? Parentheses are...required?In this formal syntax, yes they are. That said, you are free to write another formal syntax to capture operator precedence if you like, or you can allow for an informal representation of formulas in which precedence is assumed. That’s what we’ll do from now on.
A semantics assigns truth values to each formula. Because variables are permitted, any semantics would have to take into account the truth values of variables before computing the truth values of formulas. That is, while we may be able to assign a truth value of false to $p \land \neg p$, the truth value of $p \supset q$ depends on the previously assigned values of $p$ and $q$. We call a mapping of variables to truth values an interpretation and require semantic definitions to be relative to an interpretation. Here is a semantic definition for classical propositional logic:
Don’t mix syntax and semanticsIn particular, note that $T$ is a syntactic element, a formula, just a symbol; while true is from the world of semantics.
$(\neg p \land (r \supset \neg q)) \lor p)$
under an interpretation in which $p$ is mapped to true, $q$ to false, and $r$ to true.There are quite a few different ways to represent inference rules. The approach we’ll use here is to create formal arguments over judgments (which we’ve seen earlier) of the form
$A_1\;\textsf{true}, ..., A_n\;\textsf{true} \vdash B\;\textsf{true}$
but, as mentioned above, since the only kind of judgment we have is that a formula is true, we can drop the $\textsf{true}$ and just write:
$A_1, ..., A_n \vdash B$
and keep in mind that is really a judgment meaning “$B$ given assumptions $A_1, ..., A_n$.” One set of inference rules for classical propositional logic is:
Please note that these are not the only set of rules we can define. There are other rule sets which allow us to derive the same set of formulas!
If $\varnothing \vdash A$, we say $A$ is a theorem and write $\vdash A$. The sequence of inferences producing a theorem is a proof of that theorem.
Theoremhood is syntactic, not semanticTheorems are statements that can be derived using the rules of inference, regardless of their truth in any particular model. Proving a theorem is mechanical and syntactic. Truth comes from the semantics. Proof and truth are distinct concepts.
This will be an exercise for you. The syntax is the same, and the inference rules are almost the same—they have to be changed a bit in order to reject the excluded middle, double negation elimination, and indirect proof.
These notes provide a summary that might be sufficient for your studies.
Starting with the syntax:
Parentheses can be removed as long as precedence is respected.
The semantics and the inference rules are much more complicated to define for first-order logic than for propositional (0th-order logic). We'll leave the details of the syntax and inference rules for first-order logic to Wikipedia.
For the history of how first-order logic came to be the workhorse of mathematics and semantics, see this really cool SEP article.
There are many higher-order logics, each with different features and expressive power. In most of these systems, the core idea is that every term has a type. Here’s one syntax, pretty close to Alonzo Church's simple type theory.
Some vocabulary:
Here are some of the examples from very early in these notes, using types:
Some allowable sugar:
Some of the conventional logical operators seem to be missing from the syntax, but that’s only because they are really just abbreviations, or sugarings, for other terms. Here are a few (in which you will note that we’ve dropped a lot of type symbols, yet all types are perfectly inferable):
| Term | What it sugars | Description |
|---|---|---|
| $\neg A_o$ | $\textsf{not}_{o\to o} A$ | Not $A$ |
| $A_o \lor B_o$ | $\textsf{or}_{o\to (o\to o)} A\,B$ | $A$ or $B$ or both |
| $A_o \land B_o$ | $\neg(\neg A \lor \neg B)$ | $A$ and $B$ |
| $A_o \supset B_o$ | $\neg A \lor B$ | Material implication |
| $A_o \equiv B_o$ | $(A \supset B) \land (B \supset A)$ | Material equivalence |
| $\forall x_\alpha. A_o$ | $\textsf{all}_{(\alpha\to o)\to o} (\lambda x_\alpha. A)$ | For all $x_\alpha$, $A$ holds |
| $\exists x_\alpha. A_o$ | $\neg(\forall x_\alpha. \neg A)$ | There exists at least one $x_\alpha$ such that $A$ holds |
| $\textsf{Q}_{\alpha\to \alpha\to o}$ | $\lambda x_\alpha. \lambda y_\alpha. \forall f_{\alpha\to o}.\,(fx \supset fy)$ | Equality function |
| $A_\alpha = B_\alpha$ | $\textsf{Q}\,A\,B$ | Equality |
| $\exists_1 x_\alpha. A_o$ | $(\lambda p_{\alpha\to o}.\exists y_\alpha. p\;y \land \forall z_\alpha.\, p\;z \supset z=y)(\lambda x_\alpha.\,A)$ | There exists exactly one $x_\alpha$ such that $A$ holds |
| $\iota x_\alpha. A_o$ | $\textsf{the}_{(\alpha\to o)\to \alpha} (\lambda x_\alpha. A)$ | The unique element $x_\alpha$ such that $A$ holds, if it exists |
| $x_\alpha \in A_{\alpha\to o}$ | $A_{\alpha\to o}\,x$ | $x$ has property $A$. Think of functions from $a\to o$ (boolean functions) as describing the set of values $x$ for which $A\;\textsf{true}$ |
| $\{ x_\alpha \mid A_o \}$ | $\lambda x_\alpha. A_o$ | The set of all $x$ of type $\alpha$ such that property $A_o$ holds |
Did you notice the above is a classical logic? There do exist intuitionistic higher-order logics, but as these notes are introductory, we felt it best to just choose one.
The semantics and inference rules of type theory are a bit beyond the scope of these introductory notes, so we’ll cover them in our upcoming deep dive into Type Theory.
For alethic modal logic, which add the operators $\Box$ and $\lozenge$ to predicate logic, there are quite a few versions, based on the axioms and inference rules they add to the underlying logic. Here are some examples:
We’re interested ultimately in valid reasoning—what follows from what—so let’s define some terms:

By allowable interpretations we mean the interpretations that are permitted by the rules and constraints of the logical system we are working within.
In practice, you might hear people use the term “valid” rather loosely, but try to keep in mind the exact definition of this term.
The definition of truth in a system is generally just stated in precise natural language, or with semantic functions (as in our example above). The derivation of theorems, however, is a purely mechanical process. We would like to know how well, in a logistic system, theorem derivation (proof) correlates with truth (keeping in mind the notion of truth varies between systems).
The reasoning about logistic systems themselves is called metalogic.
Here are some questions useful for your spaced repetition learning. Many of the answers are not found on this page. Some will have popped up in lecture. Others will require you to do your own research.
null thing.We’ve covered: