<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Short introduction by example to Coq and formalising ZF ZF" in Coq</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jaime Gaspar</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>Short introduction by example to Coq1 Proof assistants are computer programs that help mathematicians to prove theorems and to formally verify the correctness of proofs. Proof assistants are nowadays one of the more exciting areas in the intersection of mathematical logic and computer science. For example, one particularly exciting achievement is the formal veri cation of the proof of the four colour theorem using the proof assistant Coq.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>y ^</p>
    </sec>
    <sec id="sec-2">
      <title>If &lt; is a strict partial order, then is a non-strict partial order. de ned by x</title>
      <p>y , x &lt; y _ x = y
We divide the talk into the following four parts.
Introduction to Coq We explain, by means of the theorems mentioned,
that to formalise a proof in Coq we need to tell Coq the following four
things.</p>
      <p>Language For example, to introduce a binary relation S on N by the
code Variable S : nat -&gt; nat -&gt; Prop and to introduce
another binary relation N on N de ned as N (x; y) , S(x; y)_x = y
by the code Definition N x y := S x y \/ x = y.</p>
      <p>Axioms For example, to introduce the irre exivity axiom 8x 2 N :S(x; x)
by the code Axiom irreflexivity : forall x : nat, ~S x x.
Theorem For example, to introduce the re exivity theorem 8x 2 N N (x; x)
by the code Theorem reflexivity : forall x : nat, N x x.
Proof For example, to introduce the proof \take x, unfold N (x; x)
into S(x; x) _ x = x, prove the right part x = x by the re exivity
of =" of the re exivity theorem by the codes \intro x, unfold N,
right, reflexivity".</p>
      <p>Achievements of Coq We discuss what is achieved with this kind of
formal veri cation.</p>
      <p>Applications of Coq to education We address the application of Coq
to education by mentioning how we can use Coq to learn the following
topics.</p>
    </sec>
    <sec id="sec-3">
      <title>Logic For example, propositional calculus.</title>
      <p>Arithmetic For example, Peano arithmetic.</p>
      <p>Algebra For example, group theory.</p>
      <p>Geometry For example, Euclidean geometry.</p>
      <p>Set theory For example, Zermelo-Fraenkel set theory.</p>
      <p>Practical aspects We address the following practical aspects of Coq.</p>
      <p>Using Coq How to use Coq online (no installation needed) and o ine
(installation needed).</p>
      <p>Tutorials Where to nd tutorials and manuals for Coq to learn more.</p>
    </sec>
    <sec id="sec-4">
      <title>We keep this talk short, simple and sweet. 2</title>
      <p>Formalising ZF</p>
      <p>
        ZF" in Coq2
Jean-Louis Krivine [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] introduced a variant ZF" of ZF (Zermelo-Fraenkel set
theory without the axiom of choice) with
two set memberships:
{ the old extensional set membership 2;
{ a new nonextensional set membership ";
axioms saying that 2 is the \extensional collapse" of ".
      </p>
    </sec>
    <sec id="sec-5">
      <title>Then he proved ZF</title>
      <p>ZF").</p>
      <p>ZF" (that is, every theorem of ZF is also a theorem of</p>
      <p>In this talk we present a little formalisation in Coq (a proof assistant) of
Krivine's proof of ZF ZF". Admittedly, we are hoping for comments from
Coq experts to help us to write a short article about the formalisation. The
talk is divided into the following four parts.</p>
      <p>Introduction to ZF" We brie y introduce ZF" along the lines above.
Introduction to Coq
example of a theory.</p>
      <p>We brie y introduce Coq by means of a very simple
Language The theory has a language with propositional variables P
and Q.</p>
      <p>Axioms The theory has the axioms P and P ) Q.</p>
      <p>Theorem The theory proves the theorem Q.</p>
      <p>Proof The theory proves Q by the proof \by the axiom P ) Q, to
prove Q su ces to prove P , which is an axiom".</p>
      <p>Formalisation of ZF ZF" in Coq We present our formalisation by
showing key bits of the Coq code.</p>
      <p>Language For example, the set membership " is introduced by the
code Parameter epsilon : Set -&gt; Set -&gt; Prop.</p>
      <p>Axioms For example, the axiom of pairing of ZF" is introduced by
the code Axiom Pair : forall a b : Set, exists c : Set,
a " c /\ b " c.
2Keywords: Coq; proof assistant; formal veri cation; ZF"; ZF; set theory.
Theorem For example, the theorem of paring of ZF is introduced
by the code Theorem Pair : forall a b : Set, exists c :</p>
      <p>Set, a 2 c /\ b 2 c.</p>
      <p>Proof For example, the theorem of pairing of ZF is proved by some
code Proof : : : Qed that is a bit complicated so we omit it here.
Contributions and problems We brie y discuss contributions to
education and technical problems of our formalisation.</p>
      <p>Contributions For example, the extremely detailed level of the
formalisation provides a good exercise in applying the axiom schema of
comprehension.</p>
      <p>Problems For example, we added new axioms to Coq, and this raises
the question of whether Coq with those new axioms is consistent.</p>
    </sec>
    <sec id="sec-6">
      <title>We keep this talk short, simple, and sweet.</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Jean-Louis Krivine</surname>
          </string-name>
          .
          <article-title>Realizability algebras II: new models of ZF + DC</article-title>
          . Logical Methods in Computer Science,
          <volume>8</volume>
          (
          <issue>1</issue>
          :10):
          <volume>1</volume>
          {
          <fpage>28</fpage>
          ,
          <year>2012</year>
          . http:// arxiv.org/abs/1007.0825.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>