Search topics and sections

Logic is the study of correct reasoning, especially of inferences. An inference is a step from one or more statements taken as given to a new statement. Logic asks when a conclusion really follows from the reasons given for it, so that valid arguments can be told apart from invalid ones.[1]

Logic was first studied in ancient Greece and developed separately in India. Later philosophers writing in Arabic and Latin took it further.[2][3] Since the 19th century, logic has used symbols and the methods of mathematics, and George Boole's algebra of logic, which writes reasoning with algebraic symbols and rules, led to the Boolean algebra behind digital computer circuits.[2][4]

Arguments and validity

In logic, an argument is a set of statements, called premises, offered in support of another statement, called the conclusion.[1] Here is an example:

  1. All tigers are mammals.
  2. No mammals are creatures with scales.
  3. Therefore, no tigers are creatures with scales.

The first two lines are the premises and the third is the conclusion.[5] The second premise is in fact false, because pangolins are mammals covered in scales.[6] The argument is still valid, which shows that validity and truth are separate questions.

Structure and form of a syllogism Argument Form All tigers are mammals. No mammals are creatures with scales. No tigers are creatures with scales. All A are B No B are C No A are C Premise 1 Premise 2 Conclusion therefore A = tigers B = mammals C = creatures with scales
A syllogism set out as two premises above a rule and a conclusion below it, next to its form "All AA are BB; No BB are CC; therefore No AA are CC". The argument is valid because of this form. Any terms put in place of AA, BB and CC give another valid argument.

Validity

An argument is valid when the truth of its premises guarantees the truth of its conclusion. If the premises were true, the conclusion would have to be true as well.[1][5] Validity concerns the link between premises and conclusion, not whether the premises are actually true.[5]

For example, "All toasters are made of gold; everything made of gold is a time-travel device; so all toasters are time-travel devices" is valid. Its premises are false, but if they were true, the conclusion would have to be true.[5]

Soundness

A sound argument is a valid argument whose premises are actually true. Because its premises are true and its form guarantees the conclusion, a sound argument always has a true conclusion.[5] An argument that fails either test may still have a true conclusion, but the argument does not establish it.[5]

Argument Valid? Premises true? Sound?
In some states, no felons are eligible voters; in those states, some professional athletes are felons; so in some states, some professional athletes are not eligible voters. Yes Yes Yes
All tigers are mammals; no mammals have scales; so no tigers have scales. Yes No No
All basketballs are round; the Earth is round; so the Earth is a basketball. No Yes No

The first and third rows follow the Internet Encyclopedia of Philosophy.[5] The tiger argument is unsound because pangolins are scaly mammals.[6]

Logical form

Whether an argument is valid depends on its form, not on its subject matter.[1] The tiger argument has the same form as "All spider monkeys are elephants; no elephants are animals; so no spider monkeys are animals."[5] Both fit this pattern:

All A are B.No B are C.Therefore, no A are C.\text{All } A \text{ are } B. \quad \text{No } B \text{ are } C. \quad \text{Therefore, no } A \text{ are } C.

Here AA, BB, and CC stand for any groups of things. Every argument with this form is valid, so both examples are valid.[5] Neither is sound, because each has a false premise.[5][6]

Logical constants

The words that fix an argument's form are called logical constants. The most important are these:[1]

  • quantifiers, such as "all" and "some";
  • connectives, such as "not", "and", "or", and "if ... then";
  • identity, as in "is the same as".

The logical form of a statement is the way its logical constants are arranged. It can be seen by replacing every other word with a letter, as in the pattern above.[1]

An invalid form

The basketball argument has the form "All AA are BB; cc is BB; therefore cc is AA."[5] This form is not valid.

The argument "All popes live in the Vatican; John Paul II lives in the Vatican; so John Paul II is a pope" has the same form.[5] Its conclusion happens to be true, but the form does not guarantee it, as the basketball case shows.

Kinds of reasoning

Logicians usually sort arguments into a few kinds by how strongly the premises support the conclusion.[7]

  • Deductive reasoning aims at conclusions that must be true if the premises are. Its conclusions contain no information that is not already in the premises.[1][7]
  • Inductive reasoning gives premises that make the conclusion likely but do not guarantee it. Such inferences can add new information and are called ampliative.[1][7]
  • Abductive reasoning, often called inference to the best explanation, accepts the hypothesis that would best explain the evidence.[8]
Kind How the premises support the conclusion Words for a good argument Example
Deductive They guarantee it Valid; called sound if the premises are also true The tiger argument above
Inductive They make it likely Strong; called cogent if the premises are also true Every swan seen so far is white, so the next swan will be white
Abductive It would best explain them The best of the available explanations Two friends who had a terrible row are seen jogging together, so they are friends again

The terms in the third column follow the Internet Encyclopedia of Philosophy.[7] The jogging example comes from the Stanford Encyclopedia of Philosophy, which notes that its conclusion does not follow logically from the premises.[8]

Philosophers still debate how best to draw the line between deductive and inductive arguments, and whether a sharp line exists at all.[7]

Flowchart for evaluating an argument Argument Valid? Premisesactually true? Strong? Premisesprobably true? Sound:conclusion is true Unsound Cogent: conclusionworth believing Not cogent Gives no goodsupport yes yes yes yes no no no no (true premises wouldguarantee theconclusion) (true premises wouldmake the conclusionprobable)
A flowchart for judging an argument. A valid argument with true premises is sound, and a strong argument with probably true premises is cogent.

One approach skips the sorting problem and checks every argument in a fixed order.[7]

  1. Check whether the argument is valid.
  2. If it is valid, check whether its premises are actually true. If they are, it is sound.
  3. If it is invalid, check whether true premises would make the conclusion probable. If so, it is strong.
  4. If it is strong, check whether the premises are probably true. If so, it is cogent.

Formal and informal logic

Logic studies arguments in two main ways.

  • Formal logic works with languages built for logic, which have strictly defined grammar, meaning, and rules of proof.[9] Its two main branches are propositional logic, which treats whole statements as units, and predicate logic, which also handles things, their properties, and "all" and "some".[1][2]
  • Informal logic studies reasoning as it happens in public debate, education, law, medicine, and daily life, in ordinary language.[9] It aims to give tools for judging real arguments, starting by picking out their premises, conclusions, and inferences.[9]

Fallacies

A fallacy is, as a working definition, an argument that seems better than it really is.[10] Modern studies divide fallacies into formal and informal ones.[10]

Formal fallacies are invalid forms that look like valid ones, such as these two.[10]

  • Affirming the consequent: from "if AA then BB" and "BB", concluding "AA". It is often mistaken for modus ponens, a valid form described below.[11]
  • Denying the antecedent: from "if AA then BB" and "not AA", concluding "not BB".[11]

Aristotle gave an early example of the first kind: a man who is hot need not have a fever just because a man with a fever is hot.[10]

Informal fallacies go wrong in other ways, often through their content.[1][10]

  • Ad hominem attacks the person making an argument instead of the argument itself.[1]
  • The fallacy of composition assumes that what is true of the parts must be true of the whole.[1]

Irving Copi's 1961 textbook Introduction to Logic listed eighteen informal fallacies in two groups.[10]

  • Fallacies of relevance, such as ad hominem.[10]
  • Fallacies of ambiguity, such as equivocation, which switches the meaning of a word that occurs twice in the reasoning.[10][11]

Propositional logic

Propositional logic treats whole statements, or propositions, as its smallest units. It builds longer statements from them with logical connectives.[2] Letters such as pp and qq stand for propositions, and each proposition is either true (T) or false (F).[12]

Connectives

Each connective fixes the truth of a compound statement from the truth of its parts.[13] Different books use different symbols; this page uses the ones below.

Connective Symbol Read as True exactly when
Negation ¬p\neg p not pp pp is false
Conjunction p∧qp \land q pp and qq both pp and qq are true
Disjunction p∨qp \lor q pp or qq at least one of pp, qq is true
Conditional p→qp \to q if pp then qq it is not the case that pp is true and qq false

The conditional is false only when pp is true and qq is false. So it means the same as "either not pp, or qq".[13] In p→qp \to q, pp is called the antecedent and qq the consequent.[13]

Truth tables

A truth table lists the truth value of a compound statement for every combination of values of its parts.[12] With two letters there are four combinations, so four rows:[12]

pp qq ¬p\neg p p∧qp \land q p∨qp \lor q p→qp \to q
T T F T T T
T F F F T F
F T T F T T
F F T F F T

A formula with nn different letters needs 2n2^n rows, so three letters give 23=82^3 = 8.[13]

A formula that comes out true on every row is valid. One that is false on every row is never satisfied, and one with both values is contingent.[13]

Because a table can be built for any formula, truth tables give a mechanical test of validity in propositional logic.[13][14]

Rules of inference

A rule of inference is a pattern for stepping from premises to a conclusion. A rule is valid if it is necessarily truth-preserving: whenever the premises are true, the conclusion is too.[1] The best known is modus ponens:

p→qpq\frac{p \to q \qquad p}{q}

The premises sit above the line and the conclusion below it.

The truth table shows why the rule is valid. The only row where p→qp \to q and pp are both true is the first, and there qq is true as well.

The Stoic logicians listed this rule first among their five basic argument forms.[15]

Predicate logic

Predicate logic, also called first-order logic, looks inside propositions. It treats predicates, which express properties of things or relations between them (such as "envies"), and names of things as basic units.[2] It adds quantifiers for "everything" and "something".[2]

  • The universal quantifier ∀x\forall x is read "for every xx".[1]
  • The existential quantifier ∃x\exists x is read "there is an xx such that".[1]

The two are linked. "Something is φ\varphi" says the same as "not everything is not φ\varphi":[16]

∃x φ  ≡  ¬∀x ¬φ\exists x\, \varphi \;\equiv\; \neg \forall x\, \neg \varphi

Here φ\varphi is any formula and ≡\equiv means the two sides are equivalent.

An example

Let E(x,y)E(x, y) mean "xx envies yy". The statement "someone envies everybody" becomes ∃x ∀y E(x,y)\exists x\, \forall y\, E(x, y). The statement "everybody is envied by at least one person" becomes ∀y ∃x E(x,y)\forall y\, \exists x\, E(x, y).[1]

The second statement follows validly from the first: every situation in which someone envies everybody is also one in which everybody is envied by someone.[1]

Order of quantifiers: someone envies everybody versus everybody is envied by someoneleft implies rightSomeone envies everybody∃x ∀y E(x,y)Everybody is envied by someone∀y ∃x E(x,y)abcdabcd
On the left, one person envies everyone, including themselves, so ∃x ∀y E(x,y)\exists x\, \forall y\, E(x,y) holds. On the right, everyone is envied by someone but no single person envies all, so only ∀y ∃x E(x,y)\forall y\, \exists x\, E(x,y) holds, which shows that the first statement implies the second but not the other way round.

Propositional logic cannot show this inference, because it treats each statement as a whole, without looking at its parts.[2]

Gottlob Frege built the first predicate calculus in his 1879 book *Begriffsschrift*, including an analysis of quantified statements and a precise notion of proof.[16]

Proof and truth

Modern logic gives two exact versions of "the conclusion follows from the premises", one about proofs and one about meaning.[17] The standard case is classical first-order logic. This is the predicate logic described above, in which every statement is either true or false.[12][17]

Proofs

A formal language is a set of strings of symbols, called formulas, built by fixed rules from a fixed alphabet.[17] A deductive system adds rules for writing proofs in that language.[17]

An argument is derivable if there is a proof from some or all of its premises to its conclusion.[17] This is written

Γ⊢φ\Gamma \vdash \varphi

where Γ\Gamma is the set of premises, φ\varphi is the conclusion, and ⊢\vdash means "there is a proof from".[17]

A set of sentences is consistent if it does not prove both some sentence and its negation.[17]

Interpretations

An interpretation gives the language a meaning. It has a domain, which is a set of at least one thing that the variables range over, and a function that assigns the names and predicates their meanings in that domain.[17]

An argument is valid if there is no interpretation in which all its premises are true and its conclusion false.[17] This is written

Γ⊨φ\Gamma \vDash \varphi

This definition makes precise the old idea that a valid argument preserves truth.[17]

Soundness and completeness

For classical first-order logic the two ideas match.[17]

  • Soundness: an argument is derivable only if it is valid. Proofs never lead from true premises to a false conclusion.[17]
  • Completeness: an argument is valid only if it is derivable. Every valid argument has a proof.[17]
Soundness and completeness Provable syntax Γ ⊢ φ there is a formal proof from the premises Valid semantics Γ ⊨ φ true in every interpretation where the premises are true Soundness Completeness (Gödel, 1929) Both hold for classical first-order logic
Soundness says anything provable is valid (if Γ⊢φ\Gamma \vdash \varphi then Γ⊨φ\Gamma \models \varphi), and completeness, proved by Gödel in 1929, says the converse; both hold for classical first-order logic. The proof-based side is called syntax and the meaning-based side is called semantics.

Kurt Gödel proved the completeness theorem for first-order logic in his 1929 doctoral thesis and published it in 1930.[18] The 1930 paper also contained the compactness theorem. It says that an infinite set of formulas that can be listed one by one can all be true together if and only if every finite part of it can.[18]

Limits

Two results from the 1930s show what formal logic cannot do.

  1. Gödel's first incompleteness theorem (1931) concerns formal systems, which are sets of symbols and rules for making proofs. It says that any consistent formal system in which a certain amount of elementary arithmetic can be carried out contains statements that it can neither prove nor disprove.[18][19]
  2. In 1936 Alonzo Church and Alan Turing, working independently, showed that there is no general method for deciding whether any given formula of first-order logic is provable.[14] This answered the Entscheidungsproblem, which David Hilbert and Wilhelm Ackermann had called in 1928 the main problem of mathematical logic.[14]

Smaller systems were already known to be decidable before 1936, including propositional logic and the part of first-order logic that uses only one-place predicates.[14]

The completeness theorem and the incompleteness theorem do not conflict. Completeness says every valid argument has a proof; incompleteness concerns particular theories, such as arithmetic, that leave some statements unsettled.[18][19]

Classical and non-classical logics

The logic described so far is called classical logic. It became the standard account in the late 19th and early 20th centuries through the work of Boole, Frege, Russell, and Hilbert.[20] It rests on several principles.

Non-classical logics add to this system or drop one of these principles. The table summarizes four major families.

Family What changes Main motivation
Modal logic Adds "necessarily" and "possibly" Reasoning about necessity, time, duty, belief
Intuitionistic logic Drops the law of excluded middle Truth as having a construction or proof
Many-valued and fuzzy logic Allows more than two truth values Vagueness, paradoxes, statements that lack a value
Paraconsistent logic Drops the principle of explosion Reasoning with inconsistent information

Modal logic studies how "it is necessary that" and "it is possible that" behave in reasoning.[21] It writes □A\Box A for "necessarily AA" and defines "possibly AA" from it:[21]

◊A=¬□¬A\Diamond A = \neg \Box \neg A

The familiar modal logics are built on a weak base system called K, named after Saul Kripke.[21]

In possible-worlds semantics, □A\Box A is true at a world ww when AA is true at every world accessible from ww.[21] The accessibility relation says which worlds count: a world w′w' is accessible from ww when w′w' is possible given the facts of ww.[21]

Possible-worlds model for modal logic w □A true w1 A true w2 A true w3 A false R R □A is true at w because A is true at every world w can access (w1, w2). w3 is not accessible from w, so it does not count.
In a possible-worlds model, □A\Box A is true at world ww because AA is true at every world ww can access through the relation RR, here w1w_1 and w2w_2. World w3w_3, where AA is false, is not accessible from ww, so it does not affect the truth of □A\Box A at ww.

Changing what the relation means gives related logics.[21]

  • In temporal logic, the relation means "earlier than", and □A\Box A can mean "it will always be the case that AA".[21]
  • In deontic logic, □A\Box A means "it is obligatory that AA", and the related worlds are morally acceptable versions of the current one.[21]

Modal logic also has important uses in computer science.[21]

Intuitionistic logic

Intuitionistic logic rejects the law of excluded middle as a general law.[22] It grew from the views of the mathematician L. E. J. Brouwer, and Arend Heyting set out formal systems for it in 1930.[22]

On this view, asserting "AA or BB" means having a proof of AA or a proof of BB.[22] Like classical logic, intuitionistic logic still accepts the principle of explosion.[20]

Many-valued and fuzzy logic

Many-valued logics give statements truth values beyond true and false. Jan Łukasiewicz published a three-valued logic in 1920.[23][24] One use is the liar paradox, the sentence that says of itself that it is false, which some accounts treat as neither true nor false.[23]

Fuzzy logics use every number from 0 to 1 as a degree of truth, to handle vague words such as "old".[23]

Paraconsistent logic

A logic is paraconsistent when the principle of explosion fails in it.[20] In such a logic a contradiction in the available information does not make every statement follow. Many paraconsistent logics still keep the law of noncontradiction.[20]

History

Logic was first studied in ancient Greece.[2] It was developed separately in India, then carried further by philosophers writing in Arabic and Latin, and from the 19th century it took a symbolic form.[2][3]

Timeline of the history of logic 384 to 322 BCEAristotleSyllogistic 3rd century BCEChrysippusStoic propositional logic About 2nd century CENyāya-sūtraIndia From about 9th centuryLogic in Arabic From about 12th centuryLatin scholasticlogic 1847 and 1854BooleAlgebra of logic 1879FregeBegriffsschrift 1920ŁukasiewiczThree-valued logic 1929GödelCompleteness theorem 1931GödelIncompleteness theorems 1936Church and TuringUndecidability 1937ShannonBoolean algebrafor circuits
Key events in the history of logic, from Aristotle's theory of syllogisms in the Prior Analytics to Shannon's use of Boolean algebra for circuits. The axis is not to scale, is broken between the 12th century and 1847, and uses brown markers for ancient and medieval events and blue markers for modern ones.

Aristotle and the syllogism

Aristotle (384 to 322 BCE) set out logic as a system in the West.[2] His *Prior Analytics* presents his best-known achievement, the theory of the syllogism.[2][25]

A syllogism in this sense has two premises that share one term, and a conclusion that links the two other terms.[25] Because it works with terms such as "tiger" and "mammal", this approach is called term logic.

Megarians and Stoics

A second tradition took whole propositions as its units. It was begun by Diodorus Cronus and his pupil Philo, who are associated with the Megarian school.[2][15]

The Stoic Chrysippus, in the 3rd century BCE, built from this start a propositional logic with a deductive system.[15] Many in antiquity thought him the greatest logician.[15]

India

In India, logic grew out of the study of debate and of how we come to know things.[3] The Nyāya-sūtra, attributed to Gautama (about the 2nd century CE), treats a syllogism as having five parts.[3] The Buddhist logician Dignāga later gave a shorter standard form, with a thesis, a reason, and two examples.[3]

Texts of this period include stock inferences such as inferring fire from smoke.[3] See Indian logic.

Arabic and Latin logic

From about the 9th century, philosophers writing in Arabic developed new concepts and systems of logic. Latin philosophers did the same from about the 12th century.[2] By the mid-14th century, the major developments of medieval logic were in place, and scholastic logic remained in use in Catholic universities long after.[2]

Boole's algebra of logic

George Boole applied the methods of algebra to logic in The Mathematical Analysis of Logic (1847) and The Laws of Thought (1854).[4] Traditional logic listed valid syllogisms one by one, but Boole's method gave general algorithms that applied to arguments of any complexity.[4]

In The Laws of Thought he tested arguments by letting the variables take only the values 0 and 1.[4] His algebra of logic led to what is now called Boolean algebra.[2] The two are not the same: Jevons criticized Boole's system in 1864 and replaced it with the first version of modern Boolean algebra.[4]

Frege and Russell's paradox

Frege's Begriffsschrift (1879) introduced the predicate calculus.[16] He then tried to derive arithmetic from logic. In 1902 Bertrand Russell wrote to him that a contradiction could be derived in his system, now known as Russell's paradox.[16]

The 20th century

The 20th century brought precise results about logic itself. Gödel's completeness theorem (1929) and incompleteness theorems (1931) were followed by the work of Church and Turing on undecidability (1936).[18][14] Systems that change classical logic, such as Łukasiewicz's three-valued logic and Heyting's intuitionistic logic, appeared in the same years.[22][24]

Logic in mathematics and computing

Logic and mathematics have shaped each other since the 19th century.[2]

  • Foundations of mathematics: Frege's project of reducing mathematics to logic failed, but his definitions of concepts such as natural number were a major advance.[16] Some mathematicians and philosophers count set theory as a branch of logic.[1]
  • Digital circuits: in his master's thesis, submitted to MIT on 10 August 1937, Claude Shannon showed that Boole's two-valued algebra could be used to design electrical circuits.[26] Boolean algebra is the foundation of digital computer circuits, built from logic gates.[2]
  • Computation: Turing's 1936 answer to the Entscheidungsproblem rested on his machine model of computation and his thesis that any effective method can be carried out by one of his machines.[14] This work helped found computability theory.
  • Computer science: modal and temporal logics have important uses there.[21] See logic in computer science.

References

  1. Logic, Encyclopaedia Britannica.
  2. History of logic, Encyclopaedia Britannica.
  3. Logic in Classical Indian Philosophy, Stanford Encyclopedia of Philosophy.
  4. George Boole, Stanford Encyclopedia of Philosophy.
  5. Validity and Soundness, Internet Encyclopedia of Philosophy.
  6. Pangolins, Zoological Society of London.
  7. Deductive and Inductive Arguments, Internet Encyclopedia of Philosophy.
  8. Abduction, Stanford Encyclopedia of Philosophy.
  9. Informal Logic, Stanford Encyclopedia of Philosophy.
  10. Fallacies, Stanford Encyclopedia of Philosophy.
  11. Fallacies, Internet Encyclopedia of Philosophy.
  12. Truth table, Encyclopaedia Britannica.
  13. Formal logic: The propositional calculus, Encyclopaedia Britannica.
  14. The Church-Turing Thesis, Stanford Encyclopedia of Philosophy.
  15. Ancient Logic, Stanford Encyclopedia of Philosophy.
  16. Gottlob Frege, Stanford Encyclopedia of Philosophy.
  17. Classical Logic, Stanford Encyclopedia of Philosophy.
  18. Kurt Gödel, Stanford Encyclopedia of Philosophy.
  19. Gödel's Incompleteness Theorems, Stanford Encyclopedia of Philosophy.
  20. Paraconsistent Logic, Stanford Encyclopedia of Philosophy.
  21. Modal Logic, Stanford Encyclopedia of Philosophy.
  22. Intuitionistic Logic, Stanford Encyclopedia of Philosophy.
  23. Many-Valued Logic, Stanford Encyclopedia of Philosophy.
  24. Jan Łukasiewicz, Stanford Encyclopedia of Philosophy, Fall 2018 edition.
  25. Aristotle's Logic, Stanford Encyclopedia of Philosophy.
  26. Shannon's "Symbolic Analysis of Relay and Switching Circuits", HistoryofInformation.com.

Figure