Search topics and sections

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 pp and qq stand for statements, and each statement is either true or false, never both.[4]

The usual connectives are:[4]

  • not (¬\neg)
  • and (∧\land)
  • or (∨\lor)
  • if ... then (→\to)

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]

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

The statement p→qp \to q is false only when pp is true and qq is false.[4]

A formula with three letters has 23=82^3 = 8 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, ∀\forall ("for every") and ∃\exists ("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 ε\varepsilon there exists a δ\delta" means something different from "there exists a δ\delta such that for every ε\varepsilon". 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 Γ⊢φ\Gamma \vdash \varphi when the formula φ\varphi can be derived from the set of formulas Γ\Gamma.[7] A set Γ\Gamma is consistent if there is no formula φ\varphi with both Γ⊢φ\Gamma \vdash \varphi and Γ⊢¬φ\Gamma \vdash \neg\varphi.[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 SS is true in a structure II, then II is called a model of SS, written I⊨SI \models S.[9]

The same sentence can be true in one structure and false in another. Take the sentence ∀x ∃y (y<x)\forall x\, \exists y\, (y < x), "every number has a smaller number". It is true in the integers, since x−1x - 1 is always smaller than xx, but false in the natural numbers 0,1,2,…0, 1, 2, \ldots, since nothing is smaller than 00.

One sentence, true in the integers and false in the natural numbers∀x ∃y (y < x)every number has a smaller numberIntegers ℤ−3−2−10123y = x − 1 always worksTRUENatural numbers ℕ012345x = 0: no smaller numberFALSE
The sentence ∀x ∃y (y<x)\forall x\, \exists y\, (y < x) is true in the integers Z\mathbb{Z}, where y=x−1y = x - 1 is always a smaller number, and false in the natural numbers N\mathbb{N}, where x=0x = 0 has no smaller number.

A set of sentences TT picks out the class of all its models, and mathematicians then call TT 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 Γ⊨φ\Gamma \models \varphi means that φ\varphi is true in every model of Γ\Gamma.

Soundness and completeness

For first-order logic, provability and truth in every model are the same:

Γ⊢φ⟺Γ⊨φ\Gamma \vdash \varphi \quad \Longleftrightarrow \quad \Gamma \models \varphi

where Γ\Gamma is a set of sentences, φ\varphi is a sentence, ⊢\vdash means "can be derived from", and ⊨\models 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.

Syntax and semantics in mathematical logic Syntax: proof Axioms Rules of inference Theorems Γ ⊢ φ φ can be derived from Γ Semantics: truth Structures (models) Γ ⊨ φ φ is true in every model of Γ Soundness: provable ⇒ true in all models Completeness (Gödel, 1929): true in all models ⇒ provable Both directions hold for first-order logic
Syntax derives theorems from axioms by rules of inference, written Γ⊢φ\Gamma \vdash \varphi. Semantics asks whether a formula is true in every model, written Γ⊨φ\Gamma \models \varphi. Soundness and Gödel's completeness theorem (1929) show that the two notions agree for first-order logic.

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]

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 ε0\varepsilon_0, and otherwise only finitary methods, which reason only about finite objects such as strings of symbols.[14][15] Here ε0\varepsilon_0 is the least ordinal α\alpha with

ωα=α\omega^{\alpha} = \alpha

where ω\omega 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]

  1. 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.
  2. 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]

Gödel's first incompleteness theorem for Peano arithmeticAll sentences of arithmeticTrue in the natural numbersProvable fromthe Peano axiomsG (a Gödel sentence)true but not provableFalse sentences
Gödel's first incompleteness theorem for Peano arithmetic. Every provable sentence is true, but a Gödel sentence GG is true in the natural numbers and cannot be proved from the Peano axioms.

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 (N;0,1,+,⋅,<)(\mathbb{N}; 0, 1, +, \cdot, <) are true.[1]

Independence in set theory

The natural numbers have size ℵ0\aleph_0, the smallest infinite size. Cantor's continuum hypothesis (CH) says that the size of the set of real numbers, 2ℵ02^{\aleph_0}, equals ℵ1\aleph_1, the next infinite size after ℵ0\aleph_0.[12]

  1. 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]
  2. 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]

Timeline of mathematical logic, 1847 to 1971 1847 Boole: MathematicalAnalysis of Logic 1879 Frege:Begriffsschrift 1889 Peano's axioms c. 1901 Russell's paradox 1908 Zermelo'sset axioms 1910 to 1913 PrincipiaMathematica 1921 Hilbert's program 1929 Gödel:completeness 1931 Gödel:incompleteness 1936 Church, Turing:Entscheidungsproblemunsolvable 1938 Gödel: CH consistentwith ZFC 1963 Cohen: forcing,CH independent 1971 Cook: SAT isNP-complete
Timeline of key results in mathematical logic, from Boole's 1847 book to Cook's 1971 proof that the Boolean satisfiability problem (SAT) is NP-complete, meaning every problem whose answers can be checked quickly can be converted to it. Ticks are in order but not to scale, 19th-century events are brown, 20th-century events are blue, and the bar marks the publication of Principia Mathematica from 1910 to 1913.

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

  1. Mathematical Logic (Math 570) Lecture Notes, Lou van den Dries, University of Illinois.
  2. Formal logic, Encyclopaedia Britannica.
  3. Gödel's Incompleteness Theorems, Stanford Encyclopedia of Philosophy.
  4. Formal logic: The propositional calculus, Encyclopaedia Britannica.
  5. Propositional calculus, Encyclopaedia Britannica.
  6. The Emergence of First-Order Logic, Stanford Encyclopedia of Philosophy.
  7. Classical Logic, Stanford Encyclopedia of Philosophy.
  8. Provability Logic, Stanford Encyclopedia of Philosophy.
  9. Model Theory, Stanford Encyclopedia of Philosophy.
  10. Kurt Gödel, Stanford Encyclopedia of Philosophy.
  11. Set Theory, Stanford Encyclopedia of Philosophy.
  12. The Continuum Hypothesis, Stanford Encyclopedia of Philosophy.
  13. Computability and Complexity, Stanford Encyclopedia of Philosophy.
  14. Proof Theory, Stanford Encyclopedia of Philosophy.
  15. Hilbert's Program, Stanford Encyclopedia of Philosophy.
  16. Reverse Mathematics, Stanford Encyclopedia of Philosophy.
  17. George Boole, Stanford Encyclopedia of Philosophy.
  18. Giuseppe Peano and the Peano Postulates, University of Washington.
  19. Russell's Paradox, Stanford Encyclopedia of Philosophy.
  20. Formal Proof: The Four-Color Theorem, Georges Gonthier, Notices of the American Mathematical Society, 2008.
  21. The Lean mathematical library, The mathlib Community, arXiv, 2019.

Figure

Subtopics

Abraham RobinsonAbstract logicAlan Cobham (mathematician)Algebra i LogikaAlgebraic logicAlgorithmic logicAndrej BauerAnnals of Pure and Applied LogicArchive for Mathematical LogicArithmetices principia, nova methodo expositaAssociation for Logic, Language and InformationAssociation for Symbolic LogicAugustus De MorganAxioms (journal)Boolean algebraBoolean differential calculusBoolean domainBüchi–Elgot–Trakhtenbrot theoremCartesian monoidCategorical logicCheryl's BirthdayClassical logicCombinatory logicComputability theoryContinuous predicateConvergence (logic)Cooper Harold LangfordCounterexampleCourcelle's theoremDana ScottEdith Hirsch LuchinsEric SchechterExistential graphExpressive power (computer science)FinitaryFirst-order logicFormal logicFormulario mathematicoFoundations of mathematicsFragment (logic)Gabbay's separation theoremGeorge LogemannGiuseppe PeanoGödel LectureGödel, Escher, BachGottlob FregeGround expressionHaskell CurryHeinrich ScholzHenk BarendregtHigher-order logicHypostatic abstractionInduction puzzlesInfinitary logicIntuitionistic logicJens Erik FenstadJohn VennJohn W. Dawson Jr.Journal of Mathematical LogicJournal of Symbolic LogicJulius Richard BüchiKazimierz AjdukiewiczKurt Gödel SocietyLambda calculusLaws of FormLiar paradoxLingua generalisLogic ColloquiumLogic in computer scienceLogical matrixMathematical proofMathematical rigourMathlibMetalogicMetamathematicsMichael M. RichterMinimal axioms for Boolean algebraModel theoryMoritz Wilhelm DrobischMoses SchönfinkelMultiple-conclusion logicNon-classical logicNonstandard analysisOrdinal analysisOverlap (term rewriting)Peano–Russell notationPenrose-Lucas argumentPrinciple of distributivityProof theoryPropositional logicPure inductive logicRegular numerical predicateReverse mathematicsRudolf CarnapScattered orderSemilinear setSergey YablonskySet constraintSet theorySpecial caseStone dualitySubstitution (logic)Susanna S. EppTarski LecturesTarski's high school algebra problemType theoryVictor W. MarekWarren GoldfarbWas sind und was sollen die Zahlen?Well-ordering principleWilliam Stanley Jevons