<s>
Metamath	B-Application
is	O
a	O
formal	O
language	O
and	O
an	O
associated	O
computer	O
program	O
(	O
a	O
proof	O
checker	O
)	O
for	O
archiving	O
,	O
verifying	O
,	O
and	O
studying	O
mathematical	O
proofs	O
.	O
</s>
<s>
Several	O
databases	O
of	O
proved	O
theorems	O
have	O
been	O
developed	O
using	O
Metamath	B-Application
covering	O
standard	O
results	O
in	O
logic	O
,	O
set	O
theory	O
,	O
number	O
theory	O
,	O
algebra	O
,	O
topology	B-Architecture
and	O
analysis	O
,	O
among	O
others	O
.	O
</s>
<s>
,	O
the	O
set	O
of	O
proved	O
theorems	O
using	O
Metamath	B-Application
is	O
one	O
of	O
the	O
largest	O
bodies	O
of	O
formalized	O
mathematics	O
,	O
containing	O
in	O
particular	O
proofs	O
of	O
74	O
of	O
the	O
100	O
theorems	O
of	O
the	O
"	O
Formalizing	O
100	O
Theorems	O
"	O
challenge	O
,	O
making	O
it	O
fourth	O
after	O
HOL	B-Application
Light	I-Application
,	O
Isabelle	B-Application
,	O
and	O
Coq	B-Application
,	O
but	O
before	O
Mizar	B-Language
,	O
ProofPower	O
,	O
Lean	B-Language
,	O
Nqthm	B-Application
,	O
ACL2	B-Application
,	O
and	O
Nuprl	O
.	O
</s>
<s>
There	O
are	O
at	O
least	O
19	O
proof	O
verifiers	O
for	O
databases	O
that	O
use	O
the	O
Metamath	B-Application
format	O
.	O
</s>
<s>
The	O
Metamath	B-Application
language	O
is	O
a	O
metalanguage	O
,	O
suitable	O
for	O
developing	O
a	O
wide	O
variety	O
of	O
formal	O
systems	O
.	O
</s>
<s>
The	O
Metamath	B-Application
language	O
has	O
no	O
specific	O
logic	O
embedded	O
in	O
it	O
.	O
</s>
<s>
The	O
Metamath	B-Application
language	O
design	O
is	O
focused	O
on	O
simplicity	O
;	O
the	O
language	O
,	O
employed	O
to	O
state	O
the	O
definitions	O
,	O
axioms	O
,	O
inference	O
rules	O
and	O
theorems	O
is	O
only	O
composed	O
of	O
a	O
handful	O
of	O
keywords	O
,	O
and	O
all	O
the	O
proofs	O
are	O
checked	O
using	O
one	O
simple	O
algorithm	O
based	O
on	O
the	O
substitution	O
of	O
variables	O
(	O
with	O
optional	O
provisos	O
for	O
what	O
variables	O
must	O
remain	O
distinct	O
after	O
a	O
substitution	O
is	O
made	O
)	O
.	O
</s>
<s>
All	O
Metamath	B-Application
proof	O
steps	O
use	O
a	O
single	O
substitution	O
rule	O
,	O
which	O
is	O
just	O
the	O
simple	O
replacement	O
of	O
a	O
variable	O
with	O
an	O
expression	O
and	O
not	O
the	O
proper	O
substitution	O
described	O
in	O
works	O
on	O
predicate	B-Application
calculus	I-Application
.	O
</s>
<s>
Proper	O
substitution	O
,	O
in	O
Metamath	B-Application
databases	O
that	O
support	O
it	O
,	O
is	O
a	O
derived	O
construct	O
instead	O
of	O
one	O
built	O
into	O
the	O
Metamath	B-Application
language	O
itself	O
.	O
</s>
<s>
Steps	O
1	O
and	O
2	O
of	O
the	O
theorem	O
2p2e4	O
in	O
the	O
Metamath	B-Application
Proof	I-Application
Explorer	I-Application
(	O
set.mm	B-Application
)	O
are	O
depicted	O
left	O
.	O
</s>
<s>
Let	O
's	O
explain	O
how	O
Metamath	B-Application
uses	O
its	O
substitution	O
algorithm	O
to	O
check	O
that	O
step	O
2	O
is	O
the	O
logical	O
consequence	O
of	O
step	O
1	O
when	O
you	O
use	O
the	O
theorem	O
opreq2i	O
.	O
</s>
<s>
To	O
check	O
the	O
proof	O
Metamath	B-Application
attempts	O
to	O
unify	O
with	O
.	O
</s>
<s>
So	O
now	O
Metamath	B-Application
uses	O
the	O
premise	O
of	O
opreq2i	O
.	O
</s>
<s>
As	O
a	O
consequence	O
of	O
its	O
previous	O
computation	O
,	O
Metamath	B-Application
knows	O
that	O
should	O
be	O
substituted	O
by	O
and	O
by	O
.	O
</s>
<s>
When	O
Metamath	B-Application
unifies	O
with	O
it	O
has	O
to	O
check	O
that	O
the	O
syntactical	O
rules	O
are	O
respected	O
.	O
</s>
<s>
In	O
fact	O
has	O
the	O
type	O
class	O
thus	O
Metamath	B-Application
has	O
to	O
check	O
that	O
is	O
also	O
typed	O
class	O
.	O
</s>
<s>
The	O
Metamath	B-Application
program	I-Application
is	O
the	O
original	O
program	O
created	O
to	O
manipulate	O
databases	O
written	O
using	O
the	O
Metamath	B-Application
language	O
.	O
</s>
<s>
It	O
has	O
a	O
text	O
(	O
command	O
line	O
)	O
interface	O
and	O
is	O
written	O
in	O
C	O
.	O
It	O
can	O
read	O
a	O
Metamath	B-Application
database	O
into	O
memory	O
,	O
verify	O
the	O
proofs	O
of	O
a	O
database	O
,	O
modify	O
the	O
database	O
(	O
in	O
particular	O
by	O
adding	O
proofs	O
)	O
,	O
and	O
write	O
them	O
back	O
out	O
to	O
storage	O
.	O
</s>
<s>
The	O
Metamath	B-Application
program	I-Application
can	O
convert	O
statements	O
to	O
HTML	B-Language
or	O
TeX	B-Application
notation	O
;	O
</s>
<s>
for	O
example	O
,	O
it	O
can	O
output	O
the	O
modus	O
ponens	O
axiom	O
from	O
set.mm	B-Application
as	O
:	O
</s>
<s>
Many	O
other	O
programs	O
can	O
process	O
Metamath	B-Application
databases	O
,	O
in	O
particular	O
,	O
there	O
are	O
at	O
least	O
19	O
proof	O
verifiers	O
for	O
databases	O
that	O
use	O
the	O
Metamath	B-Application
format	O
.	O
</s>
<s>
The	O
Metamath	B-Application
website	O
hosts	O
several	O
databases	O
that	O
store	O
theorems	O
derived	O
from	O
various	O
axiomatic	O
systems	O
.	O
</s>
<s>
The	O
Metamath	B-Application
Proof	I-Application
Explorer	I-Application
(	O
recorded	O
in	O
set.mm	B-Application
)	O
is	O
the	O
main	O
and	O
by	O
far	O
the	O
largest	O
database	O
,	O
with	O
over	O
23,000	O
proofs	O
in	O
its	O
main	O
part	O
as	O
of	O
July	O
2019	O
.	O
</s>
<s>
The	O
database	O
has	O
been	O
maintained	O
for	O
over	O
twenty	O
years	O
(	O
the	O
first	O
proofs	O
in	O
set.mm	B-Application
are	O
dated	O
August	O
1993	O
)	O
.	O
</s>
<s>
The	O
database	O
contains	O
developments	O
,	O
among	O
other	O
fields	O
,	O
of	O
set	O
theory	O
(	O
ordinals	O
and	O
cardinals	O
,	O
recursion	O
,	O
equivalents	O
of	O
the	O
axiom	O
of	O
choice	O
,	O
the	O
continuum	O
hypothesis	O
...	O
)	O
,	O
the	O
construction	O
of	O
the	O
real	O
and	O
complex	O
number	O
systems	O
,	O
order	O
theory	O
,	O
graph	O
theory	O
,	O
abstract	O
algebra	O
,	O
linear	O
algebra	O
,	O
general	O
topology	B-Architecture
,	O
real	O
and	O
complex	O
analysis	O
,	O
Hilbert	O
spaces	O
,	O
number	O
theory	O
,	O
and	O
elementary	O
geometry	O
.	O
</s>
<s>
The	O
Metamath	B-Application
Proof	I-Application
Explorer	I-Application
references	O
many	O
text	O
books	O
that	O
can	O
be	O
used	O
in	O
conjunction	O
with	O
Metamath	B-Application
.	O
</s>
<s>
Thus	O
,	O
people	O
interested	O
in	O
studying	O
mathematics	O
can	O
use	O
Metamath	B-Application
in	O
connection	O
with	O
these	O
books	O
and	O
verify	O
that	O
the	O
proved	O
assertions	O
match	O
the	O
literature	O
.	O
</s>
<s>
This	O
database	O
starts	O
with	O
higher-order	B-Algorithm
logic	I-Algorithm
and	O
derives	O
equivalents	O
to	O
axioms	O
of	O
first-order	O
logic	O
and	O
of	O
ZFC	O
set	O
theory	O
.	O
</s>
<s>
The	O
Metamath	B-Application
website	O
hosts	O
a	O
few	O
other	O
databases	O
which	O
are	O
not	O
associated	O
with	O
explorers	O
but	O
are	O
nonetheless	O
noteworthy	O
.	O
</s>
<s>
The	O
Metamath	B-Application
website	O
also	O
hosts	O
a	O
few	O
older	O
databases	O
which	O
are	O
not	O
maintained	O
anymore	O
,	O
such	O
as	O
the	O
"	O
Hilbert	O
Space	O
Explorer	O
"	O
,	O
which	O
presents	O
theorems	O
pertaining	O
to	O
Hilbert	O
space	O
theory	O
which	O
have	O
now	O
been	O
merged	O
into	O
the	O
Metamath	B-Application
Proof	I-Application
Explorer	I-Application
,	O
and	O
the	O
"	O
Quantum	O
Logic	O
Explorer	O
"	O
,	O
which	O
develops	O
quantum	O
logic	O
starting	O
with	O
the	O
theory	O
of	O
orthomodular	O
lattices	O
.	O
</s>
<s>
Because	O
Metamath	B-Application
has	O
a	O
very	O
generic	O
concept	O
of	O
what	O
a	O
proof	O
is	O
(	O
namely	O
a	O
tree	O
of	O
formulas	O
connected	O
by	O
inference	O
rules	O
)	O
and	O
no	O
specific	O
logic	O
is	O
embedded	O
in	O
the	O
software	O
,	O
Metamath	B-Application
can	O
be	O
used	O
with	O
species	O
of	O
logic	O
as	O
different	O
as	O
Hilbert-style	O
logics	O
or	O
sequents-based	O
logics	O
or	O
even	O
with	O
lambda	B-Language
calculus	I-Language
.	O
</s>
<s>
However	O
,	O
Metamath	B-Application
provides	O
no	O
direct	O
support	O
for	O
natural	O
deduction	O
systems	O
.	O
</s>
<s>
The	O
Metamath	B-Application
Proof	I-Application
Explorer	I-Application
(	O
with	O
its	O
database	O
set.mm	B-Application
)	O
instead	O
uses	O
a	O
set	O
of	O
conventions	O
that	O
allow	O
the	O
use	O
of	O
natural	O
deduction	O
approaches	O
within	O
a	O
Hilbert-style	O
logic	O
.	O
</s>
<s>
Using	O
the	O
design	O
ideas	O
implemented	O
in	O
Metamath	B-Application
,	O
Raph	O
Levien	O
has	O
implemented	O
very	O
small	O
proof	O
checker	O
,	O
mmverify.py,	O
at	O
only	O
500	O
lines	O
of	O
Python	O
code	O
.	O
</s>
<s>
Using	O
Levien	O
seminal	O
works	O
,	O
many	O
other	O
implementations	O
of	O
the	O
Metamath	B-Application
design	O
principles	O
have	O
been	O
implemented	O
for	O
a	O
broad	O
variety	O
of	O
languages	O
.	O
</s>
<s>
Juha	O
Arpiainen	O
has	O
implemented	O
his	O
own	O
proof	O
checker	O
in	O
Common	B-Language
Lisp	I-Language
called	O
Bourbaki	O
and	O
Marnix	O
Klooster	O
has	O
coded	O
a	O
proof	O
checker	O
in	O
Haskell	B-Language
called	O
Hmm	O
.	O
</s>
<s>
Although	O
they	O
all	O
use	O
the	O
overall	O
Metamath	B-Application
approach	O
to	O
formal	O
system	O
checker	O
coding	O
,	O
they	O
also	O
implement	O
new	O
concepts	O
of	O
their	O
own	O
.	O
</s>
<s>
Mel	O
O'Cat	O
designed	O
a	O
system	O
called	O
Mmj2	O
,	O
which	O
provides	O
a	O
graphic	B-Application
user	I-Application
interface	I-Application
for	O
proof	O
entry	O
.	O
</s>
<s>
In	O
Metamath	B-Application
on	O
the	O
contrary	O
you	O
may	O
only	O
enter	O
the	O
theorems	O
names	O
.	O
</s>
<s>
Mmj2	O
has	O
also	O
the	O
possibility	O
to	O
enter	O
the	O
proof	O
forward	O
or	O
backward	O
(	O
Metamath	B-Application
only	O
allows	O
to	O
enter	O
proof	O
backward	O
)	O
.	O
</s>
<s>
Moreover	O
Mmj2	O
has	O
a	O
real	O
grammar	O
parser	O
(	O
unlike	O
Metamath	B-Application
)	O
.	O
</s>
<s>
In	O
particular	O
Metamath	B-Application
sometimes	O
hesitates	O
between	O
several	O
formulas	O
it	O
analyzes	O
(	O
most	O
of	O
them	O
being	O
meaningless	O
)	O
and	O
asks	O
the	O
user	O
to	O
choose	O
.	O
</s>
<s>
There	O
is	O
also	O
a	O
project	O
by	O
William	O
Hale	O
to	O
add	O
a	O
graphical	B-Application
user	I-Application
interface	I-Application
to	O
Metamath	B-Application
called	O
Mmide	O
.	O
</s>
<s>
Milpgame	O
is	O
a	O
proof	O
assistant	O
and	O
a	O
checker	O
(	O
it	O
shows	O
a	O
message	O
only	O
something	O
gone	O
wrong	O
)	O
with	O
a	O
graphic	B-Application
user	I-Application
interface	I-Application
for	O
the	O
Metamath	B-Application
language( 	O
set.mm	B-Application
)	O
,	O
written	O
by	O
Filip	O
Cernatescu	O
,	O
it	O
is	O
an	O
open	O
source(MIT License )	O
Java	O
application	O
(	O
cross-platform	O
application	O
:	O
Window	O
,	O
Linux	B-Application
,	O
Mac	B-Application
OS	I-Application
)	O
.	O
</s>
<s>
The	O
demonstration	O
is	O
shown	O
as	O
tree	O
,	O
the	O
statements	O
are	O
shown	O
using	O
html	B-Language
definitions	O
(	O
defined	O
in	O
typesetting	O
chapter	O
)	O
.	O
</s>
