Mathematical logic
Mathematical logic is the branch of mathematics that studies reasoning with mathematical tools. It defines exactly what a statement, a proof, and a computation are. Then it proves theorems about them, such as which statements follow from a given set of axioms and which problems a mechanical procedure can solve.[1][2]
The field grew out of 19th-century efforts to put mathematics on a firm footing. Those efforts led to the view that logic plus set theory can serve as a base for all of mathematics.[1]
Since the second half of the 20th century the field has had four main branches:[1]
Its best-known results, Gödel's incompleteness theorems, show that any set of axioms that is free of contradictions, can be checked by a computer, and covers basic arithmetic leaves some statements it can neither prove nor disprove.[3]
What the field studies
Logic studies the form of arguments, not their subject matter. An argument starts from premises (the statements it assumes) and draws a conclusion (the statement it claims follows). It is valid when its form guarantees that true premises give a true conclusion, whatever the premises are about.[2] Logicians write these forms in symbols so that they are clear and can be checked by rule.[2]
A system of logic has two separate parts.[2]
- Syntax: a set of symbols, rules for building formulas from them, and rules for turning formulas into new formulas. A formula is a string of symbols that the building rules allow.
- Interpretation: meanings given to the symbols and formulas.
In an axiomatic system, some formulas are taken as starting points (axioms), and theorems are derived from them by the rules. Whether a sequence of formulas counts as a proof depends only on the axioms and rules, not on what the formulas mean.[2]
Propositional logic
Propositional logic treats whole statements as units and combines them with connectives. Letters such as and stand for statements, and each statement is either true or false, never both.[4]
The usual connectives are:[4]
- not ()
- and ()
- or ()
- if ... then ()
The truth of a combined statement depends only on the truth of its parts, as this truth table shows (T is true, F is false).[4]
| T | T | F | T | T | T |
| T | F | F | F | T | F |
| F | T | T | F | T | T |
| F | F | T | F | F | T |
The statement is false only when is true and is false.[4]
A formula with three letters has rows to check, and a formula that comes out true on every row is called valid.[4] So validity in propositional logic can always be decided by a mechanical procedure.[5]
First-order logic
First-order logic looks inside statements. It adds three things to propositional logic:[6][7]
- variables that stand for objects
- symbols for relations between objects
- two quantifiers, ("for every") and ("there exists")
The quantifiers range over the objects of some domain, such as the numbers.[6]
Gottlob Frege gave the first full system with both relations and quantifiers in his Begriffsschrift of 1879.[6]
The order of quantifiers matters. In the definition of a limit, "for every there exists a " means something different from "there exists a such that for every ". Karl Weierstrass was already careful about this order in his analysis of limits.[6]
Higher-order logics also quantify over properties and relations. They can say more, but they lose some of the good properties of first-order logic described below.[6]
Proof and truth
Mathematical logic draws an important distinction between provability and truth.[8] A statement can be provable, which is a fact about symbols and rules. It can also be true in a given structure, which is a fact about meaning.
Formal proofs
A formal system is a set of axioms plus rules of inference. It must meet two requirements:[3]
- The axioms must be finite in number or at least decidable, meaning an algorithm can tell whether any given formula is an axiom.
- The rules must be mechanical, so it can always be decided whether a finite list of formulas is a proof.
Logicians write when the formula can be derived from the set of formulas .[7] A set is consistent if there is no formula with both and .[7] Only consistent systems are of interest, because an inconsistent system proves every statement.[3]
Structures and models
A formula with symbols such as or is neither true nor false until those symbols are given meanings. A structure supplies a domain of objects and a meaning for each symbol.[9] If a sentence is true in a structure , then is called a model of , written .[9]
The same sentence can be true in one structure and false in another. Take the sentence , "every number has a smaller number". It is true in the integers, since is always smaller than , but false in the natural numbers , since nothing is smaller than .
A set of sentences picks out the class of all its models, and mathematicians then call a theory, or a set of axioms for that class.[9] For example, the axioms for abelian groups pick out exactly the abelian groups, which is the ordinary algebraic definition put in a formal language.[9]
The notation means that is true in every model of .
Soundness and completeness
For first-order logic, provability and truth in every model are the same:
where is a set of sentences, is a sentence, means "can be derived from", and means "is true in every model of".[1]
- Soundness is the left-to-right direction. Anything derivable is true in every model, so proofs never lead from true premises to a false conclusion.[7]
- Completeness is the right-to-left direction. Anything true in every model has a proof, so the proof rules are strong enough.[7]
Kurt Gödel proved completeness for first-order logic in his 1929 doctoral thesis, published in 1930.[10] This is Gödel's completeness theorem.
Main branches
The field has four main branches.[1] In the table, ZFC stands for Zermelo-Fraenkel set theory with the axiom of choice, the standard axioms for sets.[11]
| Branch | Central question | Typical tools and results |
|---|---|---|
| Set theory | Which axioms describe sets, and what do they decide? | ZFC, forcing, the continuum hypothesis |
| Model theory | What structures satisfy a given set of sentences? | Compactness, Löwenheim-Skolem theorem |
| Computability theory | Which problems can an algorithm solve? | Turing machines, the halting problem |
| Proof theory | What can proofs in a given system show, and how strong is the system? | Sequent calculus, ordinal analysis |
The tools and results in the table mean the following, and most are treated more fully later on the page. One list item uses the word countable: a set is countable if it is finite or its members can be listed as first, second, third, and so on.
- Forcing: a method for building new models of set theory, used to prove that some statements are independent of ZFC.[11]
- Continuum hypothesis: the claim that the set of real numbers has the next infinite size after the size of the natural numbers.[12]
- Compactness: if every finite subset of a set of sentences has a model, the whole set has a model.[10]
- Löwenheim-Skolem theorem: if a countable set of sentences has a model, it also has a countable model.[1]
- Turing machines: abstract machines that follow fixed rules to carry out computations.[13]
- Halting problem: the question of whether a given machine will eventually stop on a given input.[13]
- Sequent calculus: a formal system for deriving conclusions from assumptions.[14]
- Ordinal analysis: measuring the strength of a proof system using ordinals, a kind of infinite counting number.[14]
Set theory
Set theory gives the standard foundation for mathematics. Every mathematical object can be viewed as a set, and every theorem can be derived in first-order logic from the axioms of ZFC or some extension of it.[11]
Ernst Zermelo gave the first axioms for sets in 1908. Later work by Thoralf Skolem, Abraham Fraenkel, and John von Neumann led to the standard system, Zermelo-Fraenkel set theory with the axiom of choice, or ZFC.[11] The same system without the axiom of choice is called ZF.[11]
Model theory
Model theory studies formal languages and their interpretations in structures.[9] Alfred Tarski's 1933 definition of truth is its standard example.[9]
In the 1940s Anatolii Mal'tsev, Tarski, and Abraham Robinson saw that general theorems about logic could prove new theorems in algebra.[9] Tarski proposed the name "theory of models" in 1954.[9]
Computability theory
Computability theory asks what an algorithm can and cannot do. In the 1930s several people gave exact definitions of "computable". Among them were:[13]
- Alonzo Church's lambda calculus
- Gödel's recursive functions
- the abstract machines of Emil Post and Alan Turing
All of these definitions pick out exactly the same functions as computable. The Church-Turing thesis states that they capture the intuitive idea of "computable in principle", and mathematicians accept it.[13]
Proof theory
Proof theory treats proofs themselves as mathematical objects. Gerhard Gentzen introduced two systems that became central to the branch: natural deduction and the sequent calculus.[14]
Ordinals are numbers that extend counting past the finite. Natural numbers count finitely many things, while ordinals can also measure the length of infinite well-ordered sequences, in which every nonempty part has a first element.[14]
Gentzen gave a consistency proof for Peano arithmetic (PA).[14][15]
His proof uses induction along the ordinals up to , and otherwise only finitary methods, which reason only about finite objects such as strings of symbols.[14][15] Here is the least ordinal with
where is the first infinite ordinal.[14]
Measuring theories by such ordinals is called ordinal analysis.[14]
Reverse mathematics is a newer program in this area. It asks which axioms are necessary, not just sufficient, to prove theorems of ordinary mathematics. Harvey Friedman launched it in a talk at the 1974 International Congress of Mathematicians.[16]
Landmark theorems
A handful of results from 1915 to 1963 shaped the field. They describe both the strengths of first-order logic and the limits of any formal method.
Compactness and Löwenheim-Skolem
Two theorems underlie model theory.[1]
- Compactness theorem: a set of sentences has a model if and only if each finite subset of it has a model. Gödel included it in his 1930 paper for countable sets of formulas, and Mal'tsev extended it in 1936 to languages with uncountably many symbols.[10]
- Löwenheim-Skolem theorem: if a countable set of sentences has a model, it has a countable model.[1] Leopold Löwenheim proved a first form in 1915, and Skolem sharpened it in 1920.[6]
Second-order logic has neither property. Per Lindström showed in 1969 that no logic with both compactness and the Löwenheim-Skolem property can express more than first-order logic.[6]
Incompleteness
Gödel announced his first incompleteness theorem in September 1930 and published both theorems in 1931.[15][10] In the form improved by J. Barkley Rosser in 1936, they say:[3]
- Any consistent formal system in which a certain amount of elementary arithmetic can be carried out is incomplete. Some statements in its language can be neither proved nor disproved in it.
- Any such system, if consistent, cannot prove its own consistency. This needs a little more arithmetic than the first theorem.
For Peano arithmetic, the first theorem means there is a sentence that is true in the natural numbers but not provable from the Peano axioms.[1]
The second theorem is generally taken to show that Hilbert's plan to prove the consistency of mathematics by finitary means cannot be carried out.[15]
Undecidability
The Entscheidungsproblem asked for a procedure that decides in finitely many steps whether any formula of first-order logic is valid. David Hilbert and Wilhelm Ackermann's textbook called it the main problem of mathematical logic.[13]
In 1936 Church and Turing independently proved that no such procedure exists.[13] Turing introduced his machines and proved that the halting problem is unsolvable, which means no machine can decide for every machine and input whether it will stop. He got the answer to the Entscheidungsproblem as a result.[13]
Arithmetic is undecidable too. No algorithm decides which sentences about are true.[1]
Independence in set theory
The natural numbers have size , the smallest infinite size. Cantor's continuum hypothesis (CH) says that the size of the set of real numbers, , equals , the next infinite size after .[12]
- In 1938 Gödel built a model of ZFC in which CH holds. This model, the constructible universe, is built in stages, each made of the sets definable from the earlier stages. So if ZF is consistent, CH cannot be disproved in ZFC.[11]
- In 1963 Paul Cohen invented forcing and used it to show that the negation of CH is also consistent with ZFC, assuming ZF is consistent.[11]
Together these show that CH is independent of ZFC: the standard axioms neither prove nor refute it.[11]
History
Logic as the study of reasoning is old, but as a branch of mathematics it is recent.[1]
- Aristotle found simple patterns in human reasoning.[1]
- Gottfried Wilhelm Leibniz hoped to reduce reasoning to calculation.[1]
The algebra of logic
George Boole applied methods from symbolic algebra to logic in The Mathematical Analysis of Logic (1847) and The Laws of Thought (1854).[17] His variables stand for classes, and he checked his laws by letting the variables take only the values 0 and 1.[17] This line of work led to Boolean algebra.[1]
Modern logic took two major steps beyond traditional logic: a logic of relations and a general treatment of quantifiers.[6] The algebraic tradition took these steps separately and decades apart, while Frege, working independently, took both at once.[6]
| Person | Year | Contribution |
|---|---|---|
| Augustus De Morgan | 1864 | Partly carried out the step to relations |
| Gottlob Frege | 1879 | Relations and quantifiers together |
| C. S. Peirce | 1885 | Quantifiers |
Giuseppe Peano published his axioms for the natural numbers in 1889, in the Latin pamphlet Arithmetices principia, nova methodo exposita.[18]
Russell's paradox
Bertrand Russell found Russell's paradox around 1901. It concerns the class of all classes that are not members of themselves: that class is a member of itself if and only if it is not.[19] Zermelo had noticed a similar contradiction independently, possibly some years earlier.[19]
Russell wrote to Frege about the paradox on June 16, 1902, just as the second volume of Frege's Grundgesetze der Arithmetik was in press.[19] The paradox showed that Frege's system was inconsistent.
The paradox led to Russell's theory of types and Zermelo's axioms for sets.[19][11] Alfred North Whitehead and Russell's Principia Mathematica appeared from 1910 to 1913.[13]
Intuitionism
Other critics, led by L. E. J. Brouwer and his intuitionism, rejected some forms of classical reasoning about infinite collections.[15] Hermann Weyl's 1921 paper called the situation "the new foundational crisis in mathematics".[15]
Hilbert's program and after
Hilbert answered in 1921 with what became known as Hilbert's program. It called for writing all of mathematics as an axiomatic system and proving that system consistent using only finitary methods.[15] Gödel's incompleteness theorems of 1931 are generally taken to show that the program cannot be carried out in its original form.[15]
The years from 1900 to 1950 produced the field's first deep theorems, with Gödel's having a dramatic impact.[1] After 1950 the field gradually split into its four main branches.[1]
Uses in computer science and mathematics
Mathematical logic is closely tied to computer science, a link covered in more depth under logic in computer science.
- Satisfiability. The Boolean satisfiability problem (SAT) asks whether a propositional formula can be made true. Stephen Cook proved in 1971 that SAT is NP-complete, meaning every problem in the class NP can be reduced to it, so it is among the hardest problems in that class.[13] Modern SAT solvers can often handle cases with millions of variables.[13]
- Formal proof. A proof assistant checks every logical step of a proof by computer. Georges Gonthier and colleagues used the Coq system to give a fully formal proof of the four color theorem, completed in 2005.[20]
- Libraries of mathematics. Mathlib is a community-built library of mathematics formalized in the Lean proof assistant, built on type theory.[21]
Related areas include automated theorem proving and formal verification of software and hardware.
Open questions
The continuum hypothesis is still a live question. Pluralists such as Cohen held that the independence results show CH has no answer, while others, such as Gödel, held that new axioms are needed to settle it.[12] Gödel proposed large cardinal axioms. These settle many questions once shown independent, but results of Azriel Levy, Robert Solovay, and others show they cannot settle CH itself.[12]
The P versus NP problem asks whether every problem whose solutions can be checked quickly can also be solved quickly. Because SAT is NP-complete, part of that question is how hard SAT is in theory and in practice.[13]
References
- Mathematical Logic (Math 570) Lecture Notes, Lou van den Dries, University of Illinois.
- Formal logic, Encyclopaedia Britannica.
- Gödel's Incompleteness Theorems, Stanford Encyclopedia of Philosophy.
- Formal logic: The propositional calculus, Encyclopaedia Britannica.
- Propositional calculus, Encyclopaedia Britannica.
- The Emergence of First-Order Logic, Stanford Encyclopedia of Philosophy.
- Classical Logic, Stanford Encyclopedia of Philosophy.
- Provability Logic, Stanford Encyclopedia of Philosophy.
- Model Theory, Stanford Encyclopedia of Philosophy.
- Kurt Gödel, Stanford Encyclopedia of Philosophy.
- Set Theory, Stanford Encyclopedia of Philosophy.
- The Continuum Hypothesis, Stanford Encyclopedia of Philosophy.
- Computability and Complexity, Stanford Encyclopedia of Philosophy.
- Proof Theory, Stanford Encyclopedia of Philosophy.
- Hilbert's Program, Stanford Encyclopedia of Philosophy.
- Reverse Mathematics, Stanford Encyclopedia of Philosophy.
- George Boole, Stanford Encyclopedia of Philosophy.
- Giuseppe Peano and the Peano Postulates, University of Washington.
- Russell's Paradox, Stanford Encyclopedia of Philosophy.
- Formal Proof: The Four-Color Theorem, Georges Gonthier, Notices of the American Mathematical Society, 2008.
- The Lean mathematical library, The mathlib Community, arXiv, 2019.
