Logic
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:
- All tigers are mammals.
- No mammals are creatures with scales.
- 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.
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:
Here , , and 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 are ; is ; therefore is ."[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]
One approach skips the sorting problem and checks every argument in a fixed order.[7]
- Check whether the argument is valid.
- If it is valid, check whether its premises are actually true. If they are, it is sound.
- If it is invalid, check whether true premises would make the conclusion probable. If so, it is strong.
- 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 then " and "", concluding "". It is often mistaken for modus ponens, a valid form described below.[11]
- Denying the antecedent: from "if then " and "not ", concluding "not ".[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 and 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 | not | is false | |
| Conjunction | and | both and are true | |
| Disjunction | or | at least one of , is true | |
| Conditional | if then | it is not the case that is true and false |
The conditional is false only when is true and is false. So it means the same as "either not , or ".[13] In , is called the antecedent and 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]
| 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 different letters needs rows, so three letters give .[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:
The premises sit above the line and the conclusion below it.
The truth table shows why the rule is valid. The only row where and are both true is the first, and there 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 is read "for every ".[1]
- The existential quantifier is read "there is an such that".[1]
The two are linked. "Something is " says the same as "not everything is not ":[16]
Here is any formula and means the two sides are equivalent.
An example
Let mean " envies ". The statement "someone envies everybody" becomes . The statement "everybody is envied by at least one person" becomes .[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]
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
where is the set of premises, is the conclusion, and 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
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]
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.
- 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]
- 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.
- Bivalence: every proposition is either true or false.[12]
- The law of noncontradiction: contradictory statements cannot both be true.[1]
- The law of excluded middle: for any proposition, either it or its negation is true.[1]
- The principle of explosion: from a contradiction, and , any conclusion follows.[20]
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
Modal logic studies how "it is necessary that" and "it is possible that" behave in reasoning.[21] It writes for "necessarily " and defines "possibly " from it:[21]
The familiar modal logics are built on a weak base system called K, named after Saul Kripke.[21]
In possible-worlds semantics, is true at a world when is true at every world accessible from .[21] The accessibility relation says which worlds count: a world is accessible from when is possible given the facts of .[21]
Changing what the relation means gives related logics.[21]
- In temporal logic, the relation means "earlier than", and can mean "it will always be the case that ".[21]
- In deontic logic, means "it is obligatory that ", 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 " or " means having a proof of or a proof of .[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]
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.
Branches and related fields
- Philosophical logic studies inferences based on knowing (epistemic logic), believing (doxastic logic), time (tense logic), and moral obligation (deontic logic).[1]
- Mathematical logic includes proof theory, model theory, and computability theory.
- Philosophy of logic asks what logical truth is. Not all philosophers agree that logical truths are truths in all possible scenarios; some see them as the most general truths about the actual world.[1]
- Inductive logic is the formal study of ampliative inferences.[1]
- Informal logic and argumentation theory study real-world arguments.[9]
- Logical reasoning and logic puzzles apply these ideas in everyday problem solving.
References
- Logic, Encyclopaedia Britannica.
- History of logic, Encyclopaedia Britannica.
- Logic in Classical Indian Philosophy, Stanford Encyclopedia of Philosophy.
- George Boole, Stanford Encyclopedia of Philosophy.
- Validity and Soundness, Internet Encyclopedia of Philosophy.
- Pangolins, Zoological Society of London.
- Deductive and Inductive Arguments, Internet Encyclopedia of Philosophy.
- Abduction, Stanford Encyclopedia of Philosophy.
- Informal Logic, Stanford Encyclopedia of Philosophy.
- Fallacies, Stanford Encyclopedia of Philosophy.
- Fallacies, Internet Encyclopedia of Philosophy.
- Truth table, Encyclopaedia Britannica.
- Formal logic: The propositional calculus, Encyclopaedia Britannica.
- The Church-Turing Thesis, Stanford Encyclopedia of Philosophy.
- Ancient Logic, Stanford Encyclopedia of Philosophy.
- Gottlob Frege, Stanford Encyclopedia of Philosophy.
- Classical Logic, Stanford Encyclopedia of Philosophy.
- Kurt Gödel, Stanford Encyclopedia of Philosophy.
- Gödel's Incompleteness Theorems, Stanford Encyclopedia of Philosophy.
- Paraconsistent Logic, Stanford Encyclopedia of Philosophy.
- Modal Logic, Stanford Encyclopedia of Philosophy.
- Intuitionistic Logic, Stanford Encyclopedia of Philosophy.
- Many-Valued Logic, Stanford Encyclopedia of Philosophy.
- Jan Łukasiewicz, Stanford Encyclopedia of Philosophy, Fall 2018 edition.
- Aristotle's Logic, Stanford Encyclopedia of Philosophy.
- Shannon's "Symbolic Analysis of Relay and Switching Circuits", HistoryofInformation.com.
