Intuitionistic Logic Explorer - Derives mathematics from a constructive point of view, starting from axioms of intuitionistic logic.

New Foundations Explorer - Constructs mathematics from scratch, starting from Quine's NF set theory axioms.

Higher-Order Logic Explorer - Starts with HOL (also called simple type theory) and derives equivalents to ZFC axioms, connecting the two approaches.

Older pages:

Hilbert Space Explorer - Extends ZFC set theory into Hilbert space, which is the foundation for quantum mechanics. Includes over 1,000 complete formal proofs.

Quantum Logic Explorer - Starts from the orthomodular lattice properties proved in the Hilbert Space Explorer and takes you into quantum logic with around 1,000 proofs.

Metamath Solitaire - A Java applet that demonstrates simple proofs. Built-in axiom systems include ZFC; modal, intuitionistic, and quantum logics; and Tarski's plane geometry.

Metamath Music Page - Strictly for fun. You can listen to what mathematical proofs "sound" like!

Mini FAQ

Q: What is Metamath?

Q: How can I ask questions or discuss Metamath-related topics?

A: The Metamath Google Group [retrieved 22-Sep-2020] mailing list is being used for discussion about Metamath. If you have questions, that is a good place to ask them. (The AsteroidMeta [retrieved 22-Sep-2020] wiki was used for many older Metamath discussions, but is no longer available. Archived discussions such as this one can be found on archive.org.)

Q: Where do I start?

A: Read Sections 1, 2, and 3 of the Metamath Proof Explorer. Then look at a few proofs in Section 4 to make sure you understand how they work.

Knowledge of mathematics can be helpful, although it isn't strictly necessary to be able to mechanically follow the proofs on this site. If you want to start acquiring a higher-level understanding, a nice independent introduction to logic is Hirst and Hirst's A Primer for Logic and Proof [retrieved 27-Sep-2017] (PDF, 0.5MB); compare its axioms to ours. Wikipedia has an overview of set theory [retrieved 4-Aug-2016]. The video series "Introduction to Higher Mathematics" by Bill Shillito [retrieved 27-Sep-2017] may also be helpful.

You can experiment with simple proofs in the Metamath Solitaire applet. To actually create real metamath proofs, you'll want to download a tool. A common tool is mmj2. David A. Wheeler produced an introductory video, "Introduction to Metamath & mmj2" [retrieved 4-Aug-2016].

Q: Will Metamath help me learn abstract mathematics?

A: Yes, but probably not by itself. In order to follow a proof in an advanced math textbook, you may need to know prerequisites that could take years to learn. Some people find this frustrating. In contrast, Metamath uses a single, simple substitution rule that allows you to follow any proof mechanically. You can actually jump in anywhere and be convinced that the symbol string you see in a proof step is a consequence of the symbol strings in the earlier steps that it references, even if you don't understand what the symbols mean. But this is quite different from understanding the meaning of the math that results. Metamath alone probably will not give you an intuitive feel for abstract math, in the same way it can be hard to grasp a large computer program just by reading its source code, even though you may understand each individual instruction. However, the Bibliographic Cross-Reference lets you compare informal proofs in math textbooks and see all the implicit missing details "left to the reader."

Q: Who is the intended audience for Metamath?

A: Metamath is not for everyone, of course. A person with no interest in math may find it boring or, optimistically, might find a spark of inspiration. Professional mathematicians may view it as a curiosity more than a tool - they need to do things at a high level to work efficiently. On the other hand, Metamath can appeal to those who enjoy picking things apart to see how they work. Others may like the absolute rigor that Metamath offers. Someone new to logic and set theory, who is still developing the mathematical maturity needed to follow informal textbook proofs, may find some reassurance in Metamath's step-by-step breakdown. And anyone who appreciates the austere elegance of formal mathematics for its own sake might enjoy just casually browsing through the proofs for their aesthetic appeal.

Q: I already have an abstract mathematics background. How can I grasp the key ideas in a Metamath proof more quickly?

A: On the web page with the proof, look at the little colored numbers in the Ref column. The steps with the largest numbers are usually the ones you want to look at first. The steps with smaller numbers are typically logic "glue" to tie them together. The colors follow roughly the rainbow colors as the statement number increases, so that the largest numbers tend to stand out from the others. With a little practice, this feature, together with the gray indentation levels showing the tree structure, should help you figure out the "important" steps so that you could write down an informal version of the proof if you wanted to.

(By the way, it's best not to use the colored numbers to reference theorems in an archived discussion, since they change when new theorems are inserted at an earlier point in the database.)

Q: What does the Metamath language look like?

A: The precise technical specification of the language is given in Section 4.1 (p. 112) of the Metamath book and is about 4 pages long. A simple example is given in Section 2.2.2 (p. 40). Compare this source screenshot with the generated web page. But you don't have to know or even look at the language if you just want to follow the proofs on these web pages.

The metamath program and mmj2 are the main tools for working with the Metamath language. As an indication of the language's simplicity, Raph Levien independently wrote the remarkably small mmverify proof verifier in Python. He writes, "I find the whole thing a bit magical. Those 300 lines of code, plus a couple dozen axioms, effectively give you the building blocks for all of mathematics." Bob Solovay wrote a nicely commented presentation of Peano arithmetic in the Metamath language, peano.mm, that is worth reading as a stand-alone file.



Q: What other programs have been written for the Metamath language?

A: Over a dozen proof verifiers for the Metamath language have been written and are listed at Known Metamath proof verifiers. Also, several proof languages have been based on Metamath, and the software and other documentation for these can be found under Metamath-related programs.

Q: How confident can I be in the proofs?

A: You can be extremely confident that the proofs follow from their axioms. All reasoning is done directly in the proof itself rather than by algorithms embedded in the verification program. Computer verification programs never get tired and rigorously check every step. There is the risk that a verifier has a programming bug, but this is countered by the Metamath language's small size (this simplicity reduces the likelihood of such bugs) and by using multiple independently-implemented verifiers (since it is unlikely that all verifiers will have the same kind of bug). For example, the Metamath Proof Explorer is routinely checked by 4 independent verifiers: metamath (a C verifier by Norm Megill), mmj2 (a Java verifier by Mel O'Cat and Mario Carneiro), smetamath-rs (a high-speed Rust verifier by Stefan O'Rear), and checkmm (a C++ verifier by Eric Schmidt). In addition, the databases are public and can easily be inspected; the hypertext links in generated proofs make it especially easy to move from one theorem to the next. Metamath enables an extremely rigorous form of peer review.

Q: Why is it called "Metamath"?

A: It means "metavariable math." See A Note on the Axioms. Metamath shouldn't be confused with metamathematics (occasionally abbreviated metamath, metamaths, or meta math), which is a specialized branch of mathematics that studies mathematics itself, leading to results such as Gödel's incompleteness theorem. An expert in the latter is called a metamathematician, so to avoid confusion one might use "metamathician" for someone knowledgeable about Metamath.

Q: Are there other sites that formalize math from its foundations?

A: Another project that aims to rigorously formalize and verify math is Mizar [retrieved 4-Aug-2016]. It is intended to appeal to professional mathematicians and requires a certain mathematical maturity to be able to follow its proofs. It tries to mimic mathematical proofs they way they are normally published, whereas Metamath shows you every little detail.

Some other well-known interactive theorem provers are HOL Light [retrieved 4-Aug-2016], Isabelle [retrieved 4-Aug-2016], and Coq [retrieved 4-Aug-2016]. There are a few languages based on or derived from Metamath, e.g., Raph Levien has developed a related language called Ghilbert [retrieved 4-Aug-2016] that strives to improve upon Metamath by guaranteeing the soundness of definitions and providing features useful for collaborative work. Freek Wiedijk wrote an interesting collection of notes [retrieved 4-Aug-2016] comparing several mathematical proof languages. His book, The Seventeen Provers of the World [retrieved 4-Aug-2016] (PDF, 0.6MB), compares the proofs that the square root of 2 is irrational in 17 proof languages, including Metamath (theorem sqrt2irr). The Metamath 100 page shows metamath's progress in Formalizing 100 Theorems (a challenge set of theorems for math formalization systems).

Unlike most other systems, Metamath attempts to use the minimum possible framework needed to express mathematics and its proofs. Other systems do not consider that aspect necessarily important, and their underlying computer programs can be large and complex in order to perform mathematical reasoning at a higher level. Metamath's proofs are often quite long compared to those of other systems, but they are completely transparent with nothing hidden from the user. All reasoning is done directly in the proof itself rather than by algorithms embedded in the verification program. Metamath is unique in this sense, offering an alternative approach for those attracted to its philosophy of simplicity.

Q: How can I contribute to Metamath?

A: We'd be delighted to get your contributions! The Metamath community has a large set of inter-related projects, so you first need to determine which specific project you want to contribute to. Here are some common cases:

If you're contributing to "set.mm" (the set of proofs which starts from ZFC set theory axioms and shown in the "Metamath Proof Explorer"), the recommended approach is to use its GitHub repository at https://github.com/metamath/set.mm (at least as a starting point). For detailed instructions on using GitHub for this project, read Getting started with contributing and CONTRIBUTING.md. As an alternative to submitting GitHub pull requests (if you don't want to go through that learning curve in the beginning), you can email patch files (differences) to Norm Megill or Mario Carneiro or even post to the Metamath mailing list. If you want to patch the mmj2 program (the editor/GUI proof assistant written in Java by Mel O'Cat and enhanced by Mario Carneiro), email Mario Carneiro and/or get yourself added to https://github.com/digama0/mmj2. If you want to patch the metamath.exe program (the original tool implementation written in C), send your patch as a "unified diff" ("diff -u") via email to Norm Megill. If you want to modify a web page, send email to Norm Megill.

Downloads

Download and Extraction Help

Downloading Some browsers may have problems downloading large binary files. The free wget [retrieved 4-Aug-2016] program downloads correctly and is available for all platforms including Windows. Here are the instructions for Windows:

Go to http://www.filewatcher.com/m/wget-1.8.2b.zip.278487-0.html [retrieved 4-Aug-2016] (or another mirror site) and download wget-1.8.2b.zip (272kB).

Extract the file called WGET.EXE into the folder you will be using for your downloads. The other files are not needed for a minimal installation.

From the Start menu, choose Programs -> Accessories -> Command Prompt. If Command Prompt is missing, then from the Start menu, choose Run..., type CMD (or COMMAND in Windows 95/98), and click OK.

In the DOS or command window, type

drive-letter :

and press Enter, where drive-letter (C, D, E,...) is the disk you will be using for your downloads. Then type

cd folder

and press Enter, where folder is the folder (without the drive letter and colon) you will be using for your downloads.

Type

wget " url "

(include the quotes around url ) and press Enter, where url is the URL (internet address, which begins with "http://" or "ftp://") of the .tar.bz2 or other file you want to download. Most browsers can copy a URL from a web page display, for example by right-clicking on the link and selecting "Copy Shortcut" or "Copy Link Location", which you can then paste into the wget argument. To paste, right-click on the top of the command window and select Edit -> Paste.

If you have trouble retrieving FTP files because you are behind a network firewall, try typing

wget --passive-ftp "url"

Extracting To extract .tar.bz2 files in Linux/MacOSX/Unix, use the command "tar -xjf xxx.tar.bz2", where xxx corresponds to the file name. To preview what will be extracted, use the command "tar -tjf xxx.tar.bz2 | more"; press the space bar to show the next page and "q" to quit the preview. (On MacOSX, select the Terminal application from Applications/Utilities to get to the command line.)

To extract .tar.gz files in Linux/MacOSX/Unix, use "tar -xzf xxx.tar.gz". To preview them, use "tar -tzf xxx.tar.gz | more".

To extract .zip files in Linux/MacOSX/Unix, use "unzip xxx.zip". To preview them, use "unzip -l xxx.zip | more".

To extract .tar.gz and .zip files in Windows, you can use WinZip, WinAce, or WinRAR, among others. Of these, I have been told that only WinRAR can extract .tar.bz2 files. Recent Windows versions will open .zip files automatically. If you have the free Cygwin [retrieved 4-Aug-2016] installed, you can use the Unix commands above for .tar.bz2, .tar.gz, and .zip files.

Text files The ASCII (text) files in the downloads are in Unix format, which uses a bare line-feed character at the end of each line. This may cause them to display improperly in some Windows text editors such as Notepad, which requires a carriage-return/line-feed combination. The better text editors don't have this problem, but if you need to convert the format, a free program that has been recommended for Windows is ToX [retrieved 4-Aug-2016]. (For Linux/MacOSX/Unix, use the command: sed -e 's/$/\r/' unixfile > windowsfile. To go back, use the command: tr -d '\015' < windowsfile > unixfile.)

On Windows, the "write source" command in the Metamath program will automatically convert .mm database text files from Unix format to Windows format (and vice-versa on Linux/MacOSX/Unix).

Directories Wikipedia Drexel University's Math Forum Internet Mathematics Library (another mention) Government of Australia Education Portal Encyclopædia Britannica "approved iGuide site" (Oct. 11, 2006) (free set theory full text article) Awards The Golden House Sparrow Award: Site of the Day (Jul. 20, 2000) (check out their eclectic current page) Scout Report for Science and Engineering Selection (Jul. 19, 2000) Knot a Braid of Links "Cool math site of the week" (Jul. 7-13, 1998) Rated by JARS (Apr. 26, 1998)