Skip to content

Wang Hao and Automated Theorem Proving

Abstract

In the summer of 1958 the Chinese-born logician Wang Hao (王浩), then a Reader at Oxford, spent a few months at IBM’s research laboratory in Poughkeepsie with access to an IBM 704. His first program proved about 220 theorems of propositional logic from Principia Mathematica with less than 3 minutes of computing time. Two years earlier the Logic Theorist of Newell, Shaw, and Simon had proved 38 of 52 theorems from the same book. Wang published the results in 1960 as “Toward Mechanical Mathematics” and argued that systematic algorithms from logic did better than the heuristic search Newell and Simon favored. He also invented the tiling puzzles now called Wang tiles and became a principal source for the late thought of Kurt Gödel. In 1983 he received the first Milestone Award for Automated Theorem Proving.

IBM 704 Operations 1957
An IBM 704 installation at NACA’s Langley laboratory, 1957; Wang worked on the same model at IBM Poughkeepsie in 1958. Image: NASA Langley Research Center / NACA, Taub, public domain, via Wikimedia Commons.

From Jinan to Harvard

Wang Hao was born on 20 May 1921 in Jinan, Shandong. He studied mathematics at the National Southwestern Associated University in wartime China and graduated with a B.Sc. in 1943, then took an M.A. in philosophy at Tsinghua in 1945. In 1946 he went to Harvard to study logic with Willard Van Orman Quine and finished his Ph.D. in 1948, after two years. (In the West he published as Hao Wang, given name first.)

His early reputation came from pure logic. Quine’s set theory in the first edition of Mathematical Logic (1940) had been shown inconsistent by J. Barkley Rosser; Wang found a correct formulation of what Quine had intended, consistent if Quine’s system NF is consistent, and Quine adopted it in the 1951 second edition. After a Junior Fellowship at Harvard and much of 1950–51 in Zürich with Paul Bernays, he spent 1953–54 at the Burroughs Corporation. That year, he later wrote, was when he “first came into contact with calculating machines” and began to wonder whether they could do proofs as well as sums. In 1956 he became Reader in the Philosophy of Mathematics at Oxford.

A Summer at Poughkeepsie

Wang wrote three programs for the IBM 704 during the summer of 1958. He did not try to model how a person looks for a proof. He used the sequent calculus of Gerhard Gentzen and ideas from Jacques Herbrand, in which a formula is taken apart connective by connective until the question of whether it is a theorem becomes mechanical. Axioms and definitions played no role; the program simply took each formula and either printed a proof or reported that none existed.

The first program handled the propositional calculus. Wang fed it the first five chapters of Whitehead and Russell’s Principia Mathematica, rewriting the axioms and definitions as theorems, about 220 formulas in all. All were proved in about 37 minutes. Twelve thirteenths of that went into input and printing; the computing itself took less than 3 minutes. The published paper opens with a two-line epigraph: “The gallant tailor: seven (flies) in one blow. IBM 704: 220 theorems (in the propositional calculus) in three minutes.”

The second program generated propositions from basic symbols and tried to select the interesting theorems among them. It formed and tested about 14,000 propositions an hour and stored about 1,000 theorems on tape. Wang called the result “disappointing”: his rules for discarding trivial theorems were too crude, and almost everything survived.

The third program tackled the predicate calculus with equality, which fills the next five chapters of Principia (*9 to *13), 158 formulas after the same rewriting. As written that summer it proved about 85 percent of them in about an hour, 139 of the 158 by Wang’s count. In a note added in proof on 10 November 1959, he reported that improved methods now proved all 158 in about four minutes, with about 47 printed pages of output. The paper, “Toward Mechanical Mathematics”, appeared in the IBM Journal of Research and Development in January 1960. Its abstract put the total at “near 400” theorems, everything in Principia that belongs strictly to logic.

The Argument with Newell, Shaw, and Simon

Wang knew exactly whose results he was measuring himself against. The Logic Theorist of Allen Newell, Cliff Shaw, and Herbert Simon, running on RAND’s JOHNNIAC, had been given the first 52 theorems of Principia. In their own 1957 report: “Of the 52 theorems, proofs were found for a total 38.” They gave theorem *2.45 as an example, proved in 12 minutes, and *2.31 as a failure, given up after 23 minutes. Wang’s program proved *2.45 in about 3 seconds and *2.31 in about 6, and all 52 in less than 5 minutes including input and output.

He expected the objection that the comparison was unfair, “since the approaches are basically different”, and made it anyway. “There is no need to kill a chicken with a butcher’s knife,” he wrote. “Yet the net impression is that Newell-Shaw-Simon failed even to kill the chicken with their butcher’s knife.” They had dismissed algorithmic methods on the grounds that a naive procedure would need thousands of years for *2.45; Wang replied that choosing “a particularly inefficient algorithm” proved nothing about algorithms. He also objected to the word “heuristic”, which he thought often meant “a partial method which offers no guarantees”, and suggested the plainer “strategy”.

Wang continued the work in two papers titled “Proving Theorems by Pattern Recognition”, part I in Communications of the ACM (1960) and part II in the Bell System Technical Journal (1961).

Dominoes

Wang Tiles Example
Thirteen Wang tiles that cover the plane only aperiodically, after Karel Culik II (1996). Image: Anomie, public domain, via Wikimedia Commons.

In part II of the pattern-recognition paper Wang introduced a puzzle to study one fragment of the decision problem, the class of formulas of the form “for all, there exists, for all” (∀∃∀). Take a finite set of square tiles whose edges are colored. Copies may be placed side by side, without rotation, so that touching edges have the same color. Can they cover the whole plane? Wang showed that questions about ∀∃∀ formulas could be translated into questions about such tilings. He also conjectured that any set of tiles that covers the plane can cover it periodically, in a repeating pattern, which would have made the tiling question decidable.

In 1961 Wang, Andrew Kahr, and Edward F. Moore proved that the ∀∃∀ case of the decision problem is unsolvable, closing the last open case among prefix classes of formulas without identity, and published the result in 1962. The general tiling question remained. Wang’s student Robert Berger settled it in his 1964 Harvard thesis, published in 1966: the domino problem is undecidable, and there exist tile sets that cover the plane but never periodically. Berger’s published set had 20,426 tiles. The search for smaller sets ended in 2015, when Emmanuel Jeandel and Michael Rao found one of 11 tiles in 4 colors and proved that no aperiodic set with fewer tiles or fewer colors exists.

Rockefeller and Gödel

Wang returned to Harvard in 1961 as Gordon McKay Professor of Mathematical Logic and Applied Mathematics. Among his doctoral students there were Shimon Even, Berger, Joyce Friedman, Stål Aanderaa, and Stephen Cook, whose 1966 thesis was followed five years later by the paper that founded the theory of NP-completeness (see Cook and Levin). The title of that 1971 paper, “The Complexity of Theorem-Proving Procedures”, named a subject close to Wang’s own.

In 1967 Wang moved to the Rockefeller University in New York and built a logic group there, which became a center for research in set theory until the university broke it up in 1976. Wang stayed on, past his retirement in 1991.

The same year, 1967, he contacted Kurt Gödel with an inquiry connected to his introduction to the selected works of Thoralf Skolem. The correspondence led to a series of conversations that began in 1971. From Mathematics to Philosophy (1974) printed two letters in which Gödel stressed the role of his philosophical convictions in his logical discoveries. He followed it with Reflections on Kurt Gödel (1987) and A Logical Journey: From Gödel to Philosophy, finished a few months before his own death and published in 1996. They quote many of Gödel’s remarks from the conversations and remain a principal source for his thought in his later years.

From 1972 Wang visited China several times and became an honorary professor of Peking University in 1985 and of Tsinghua in 1986. His Popular Lectures on Mathematical Logic (1981) first appeared in Chinese. He died in New York on 13 May 1995, a week before his 74th birthday.

Limits of the Method

Wang’s abstract predicted that inferential analysis would lead “in the not too remote future” to machine proofs of difficult new theorems. The method that had cleared Principia in minutes did not scale that far. Principia’s logical chapters are easy by the standards of mathematics; the full predicate calculus is undecidable, and the search space for harder theorems grows explosively. In lectures reported by The Harvard Crimson in July 1960, Wang described the results as “slight so far, but better than I expected.” In 1965 J. Alan Robinson published the resolution principle, a single inference rule for first-order logic designed for machine use, and the field moved on to new methods. What Wang did see correctly was the second half of his abstract: the use of machines to formalize known proofs and to make “mechanical checks of new mathematical results comparable to the debugging of a program”, which is today the business of interactive proof assistants (see Computer-Assisted Proof).

The first Milestone Award for Automated Theorem Proving went to Wang in 1983, a quarter of a century after the summer at Poughkeepsie.

📚 Sources