=Paper= {{Paper |id=Vol-1195/long19 |storemode=property |title=The Representation of Boolean Algebras in the Spotlight of a Proof Checker |pdfUrl=https://ceur-ws.org/Vol-1195/long19.pdf |volume=Vol-1195 |dblpUrl=https://dblp.org/rec/conf/cilc/CeterchiOT14 }} ==The Representation of Boolean Algebras in the Spotlight of a Proof Checker== https://ceur-ws.org/Vol-1195/long19.pdf
    The representation of Boolean algebras in the
            spotlight of a proof checker?

            Rodica Ceterchi1 , Eugenio G. Omodeo2 , Alexandru I. Tomescu3
        1
            Facultatea de Matematică s, i Informatică, Universitatea din Bucures, ti
                                email: rceterchi@gmail.com
            2
              Dipartimento di Matematica e Geoscienze, Università di Trieste,
                         Via Valerio 12/1, I-34127 – Trieste, Italy
                                  email: eomodeo@units.it
                  3
                     Helsinki Institute for Information Technology HIIT,
                 Department of Computer Science, University of Helsinki,
            P.O. 68 (Gustaf Hällströmin katu 2b), FI-00014 – Helsinki, Finland
                              email: tomescu@cs.helsinki.fi


        Abstract. We report on a proof-checked version of Stone’s result on
        the representability of Boolean algebras via the clopen sets of a totally
        disconnected compact Hausdor↵ space. Our experiment is based on a
        proof verifier based on set theory, whose usability can in its turn benefit
        from fully formalized proofs of representation theorems akin to the one
        discussed in this note.
        Key words: Theory-based automated reasoning; proof checking; Referee
        aka ÆtnaNova; Boolean rings; Boolean algebras; Stone spaces.


     “Boolean algebras have an almost embarrassingly rich structure.” [7, p. 10]


Introduction
This paper reports on a formally verified proof of Stone’s celebrated results
[20,21,22] on the representability of Boolean algebras as fields of sets, carried
out along the lines found in [4, pp. 41–43] by means of Jacob T. Schwartz’s
proof-checker Referee, aka ÆtnaNova, to be simply called ‘Ref’ for brevity in the
ongoing. The proof of Zorn’s lemma, formalized much earlier (cf. [19, Chapter 7])
and previously exploited in the compactness proof for classical propositional logic
[16], played again a crucial role in our present scenario.
    A website reporting on our experiment is at http://www2.units.it/eomodeo/
StoneReprScenario.html. In its final form, the script-file supporting it and
leading from first principles to the topological version of Stone’s result, com-
prises 42 definitions and proves 210 theorems altogether, organized in 19 The-
ory s, including the background Theory Set theory. Its processing takes about
25 seconds.
?
    Work partially supported by the INdAM/GNCS 2013 project “Specifica e verifica di
    algoritmi tramite strumenti basati sulla teoria degli insiemi” and by the Academy
    of Finland under grant 250345 (CoECGR)



                                         287
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


    1      Boolean algebras and rings

    A ring is said to be Boolean when every one of its elements is self-inverse w.r.t.
    addition and idempotent w.r.t. multiplication:

                                              X +X = 0,
                                              X · X =X.

    The former of these laws makes it superfluous to postulate the commutativity
    of addition (for, it implies it); the latter implies the commutativity of multipli-
    cation. When endowed with multiplicative identity, 1, a Boolean ring is called a
    Boolean algebra.                   (To avoid trivialities, we will require that 06=1).
        An aspect of the richness of Boolean rings is that the relation

                                       X 6 Y $Def X · Y = X

    is a partial order, in which every pair X, Y of elements has greatest common
    lower bound X u Y = X · Y and least common upper bound X t Y = X · Y +
    X +Y . In this ordering 0 acts as the minimum and—when present—1 acts as the
    maximum. Historically, Boolean algebras were first studied as lattices endowed
    with peculiar properties (namely, distributivity and complementedness).4 The
    salient operations, from this viewpoint, were u, t, ; the algebraic kinship with
    the rings of numbers remained unnoticed for quite a while (cf.[9, p. 208]).
        From the ring-based point of view—the one which will prevail in these pages—
    the complementation operation turns out to be: X =Def 1 + X.




                    X 2 B ! X 2 B & X = X & 1B = 0 B & 0B = 1 B
              {X, Y } ✓ B ! X + X = 1B & Y · X + Y · X = Y & (Y · X) · (Y · X) = 0B
              {X, Y } ✓ B ! X + Y = X · Y + X · Y
                    X 2 B ! X 6= X & (X 2  / {0B , 1B } ! X 2 B \ {0B , 1B })
              {X, Y } ✓ B ! (X · Y = 1B ! X = 1B & Y = 1B )
         {U, V, X, Y } ✓ B ! U · X + V · Y = (U · X + V · Y ) · X · Y


                                Fig. 1. A few derived Boolean laws



     4
         From the lattice-based point of view, the simplest available characterization of the
         structure ‘Boolean algebra’ is the one proposed by Herbert Robbins, ca. 1933 (cfr.
         [12,10]). Ignoring the construct u, which can be introduced by way of shortening
         notation, the Robbins laws are:
                 X t Y = Y t X, X t (Y t Z) = (X t Y ) t Z, X t Y t X t Y = X.



                                                288
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


    2     Fields of sets
    Starting with a non-void set S, let us construct the following families of sets:5
      – P(S) =Def { x : x ✓ S } , the family of all subsets of S;
      – F(S) =Def { x ✓ S | |x| 2 N } , the family of all finite subsets of S;
      – B(S) =Def F(S) [ { S \ x : x 2 F(S) } , the family formed by those subsets
        of S each of which is either finite or has a finite complement (relative to S).
    If S is finite, P(S) = F(S) = B(S) holds; otherwise, we get three families.
         To get Boolean rings out of these, it suffices to define:

                    X · Y =Def X \ Y              (intersection),
                   X + Y =Def (X [ Y ) \ (X \ Y ) (symmetric di↵erence).

    One readily sees that P(S) and B(S) thus become Boolean algebras, whose
    additive identity, 0, and multiplicative identity, 1, are ; and S; as for F(S), it
    lacks 1 when S is infinite.
        By generalizing the case of P(S) and B(S), one calls field of sets any
    family B which
      – is closed
             S under the operations of intersection and symmetric di↵erence;
      – has B among its members, viz., owns a maximum w.r.t. set inclusion;
      – di↵ers from {;}.
       This clearly is an instance of a Boolean algebra. How general? A renowned
    theorem by Marshall H. Stone [20] gives us the answer:

                     Every Boolean algebra is isomorphic to a field of sets.

    This field is not always of the form P(S) (this holds only for particular Boolean
    algebras, among which the ones whose underlying domain is finite6 ): in fact it
    is trivial that the field B(N), whose cardinality equals the one of N, cannot be
    isomorphic to P(S) for any S.7


    3     Stone spaces
    We define a base of a topological space to be a pair (X , ) such that:
    (i) X =
          6 ;; (ii) S ✓ P(X ); (iii) enjoys, w.r.t. dyadic intersection, \, and to
    monadic union, , the following closure properties:
     5
       We designate by |X| the cardinality of a set X and by N the set {0, 1, 2, . . . } of all
       natural numbers (which is, in its turn, a cardinal number—the first infinite one).
     6
       More generally, the Boolean algebras which are isomorphic to P(S) for some S are
       the ones which are completely distributive; [2, pp. 221–222] credits this result to
       Alfred Tarski.
     7
       Indeed, |P(S)| 2 N (i.e., |P(S)| is smaller than the cardinal number N) when |S| 2 N;
       whereas |P(S)| exceeds N—because |P(S)| exceeds |S|—when S is infinite.



                                                289
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker
       S
    1)     = X,                S
    2) (A 2 & B 2 ) ! (A \ B) ✓ { c 2                       | c ✓ (A \ B) }.

        The topological space generated by such a base is, by definition, the pair
    (X , ⌧ ) where                  S
                              ⌧ = { a : a ✓ }.
    A topological space hence is a pair (X , ⌧ ) such that: (i) X 6= ;; (ii)S⌧ ✓ P(X ); (iii)
    ⌧ enjoys, w.r.t. dyadic intersection, \, and to monadic union, , the following
    closure properties:

      – X 2 ⌧,              S
      – A, B 2 ⌧ ! (A
                    S \ B) ✓ { c 2 ⌧ | c ✓ (A \ B) },
      – A 2 P(⌧ ) ! A 2 ⌧ ,

                T follows that A, B 2 ⌧ ! A \ B 2 ⌧ and, more
    whence it plainly                                          T generally, that
    A 2 F(⌧ ) ! A 2 ⌧ , under the proviso that the intersection ; equals X .
        The open and the closed sets of such a space are, respectively, the members
    of ⌧ and their complements X \ A (with A 2 ⌧ ). A subset of X which is open
    and closed is called a clopen set: examples are ; and X . It is apparent that
    clopen sets form a field of sets.
          A topological space is said to be

     a Hausdorff space if: for every pair of distinct members p, q 2 X , there exist
        disjoint open sets P, Q ✓ X such that p 2 P , q 2 Q;8
     compact if: every family of open sets whose union is X includes a finite sub-
        family whose union is X .

    One calls Stone space any topological space which, in addition to enjoying the
    two properties just stated, also

      – owns a base—namely a ✓ ⌧ such that every open set is the union of a
        subfamily of —entirely formed by clopen sets.

        By relying on these concepts, one enhances the claim of Stone’s theorem as
    follows (cf. [21,22]):

           Every Boolean algebra is isomorphic to a field of sets consisting of the
          clopen sets of a Stone space.

        In sight of the proof of this theorem, it is worthwhile to recall another way
    of stating the compactness property, dual to the one proposed above:

           A topological space (X , ⌧ ) is compact if and
                                                       T only if every (non-void)
          family C of closed sets whose intersection C is void has T  some finite
          subfamily whose intersection is void : F ✓ C, |F| 2 N \ {0}, F = ;.
     8
         This definition implies that in a Hausdor↵ space every singleton subset of X is closed.



                                                290
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


    4     Boolean ideals and their maximal enlargements
    The study of an abstract algebraic structure forcibly leads one to investigate
    the associated homomorphisms. In the Boolean case at hand, to move reso-
    lutely in the direction that best suits our purposes, we will just consider those
    homomorphisms which translate the operations of a Boolean algebra (the homo-
    morphism’s domain) into the set-operations \, 4 of intersection and symmetric
    di↵erence. The images of such a homomorphism will hence form a field of sets;
    particularly worth of consideration, among the homomorphisms of interest, are
    the ones whose values form the special field 2 = ;, {;} , \, 4, {;}, ; .
        Let us refer by B = (B, ·, +, 1B , 0B ) to a Boolean algebra which, tacitly, will
    act as domain of the homomorphisms that will enter into play. A homomorphism
    of B into 2 is fully characterized by either one of the two subsets of the underlying
    domain B which are counter-images, respectively, of 0 = ; and of 1 = {;}. Not all
    subsets of B can play the role of counter-images of the minimum via a Boolean
    homomorphism; let us hence figure out which conditions a set must meet in
    order to qualify for such a role. In investigations of this nature, algebraists tend
    to focus on the counter-images of the minimum, the so-called ideals, or ‘kernels’;
    logicians, on the opposite, tend to focus on the counter-images of the maximum,
    the so-called filters, or ‘shells’. We will conform to the algebraic habit; moreover,
    since we must concentrate mainly on homomorphisms into 2, we will tribute
    special attention to ideals which are maximal w.r.t. to set inclusion.
    Definition 1. An ideal is a subset of the underlying domain B which is closed
    with respect to addition, as well as to multiplication of its elements by elements
    of B, and which is not one of the (exceedingly trivial) sets ;, {0B }, B.
        Three theorems about ideals play a crucial role in the proof of Stone’s results:
    a) Every element x of B which is neither 1B nor 0B belongs to at least one
       ideal: the least such ideal, named a principal ideal, is simply formed by
       the multiples of x. It hence follows, save in the case when B = {0B , 1B }, that
       there is at least one ideal.
    b) To each ideal I and each x 6= 1B not belonging to I, there corresponds an
       ideal J ◆ I one of whose elements is x: this is {a · x + y : a 2 B, y 2 I}.
    c) Every ideal I is included in an ideal which is maximal w.r.t. ✓.
    Checking the first two of these is very plain; the third can be proved by means
    of Zorn’s lemma, after observing that every chain of ideals is closed w.r.t. union.

    5     1st Stone’s representation theorem
    Let us recall first the algebraic version of Stone’s theorem:
    Theorem 1 (Stone’s algebraic representation). Every Boolean algebra
                                          B = (B, ·, +, 1B , 0B )
    is isomorphic to a field H of sets whose underlying domain is included in P(H),
    where H is the set of all homomorphisms from B into 2.


                                                291
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


    Proof. Associate with each x 2 B the set x   e of those homomorphisms in H which
    send x to {;}; thus, clearly, 0f                 f
                                       B = ; and 1B = H. Moreover x         g·y = x e \ ye
    holds: in fact, when h is a homomorphism, h(x · y) = h(x) \ h(y) equals {;} if
    and only if h(x) = h(y) = {;}, i.e. i↵ h 2 x     e \ ye. By an analogous argument,
    h(x + y) = h(x) 4 h(y) and x]     +y = x e 4 ye. Take H to be the image-set of the
    function x 7! x e.
        In order to see the injectivity of this function, consider the di↵erence e0 =
    x0 + x0 · x1 between two elements x0 , x1 2 B such that x0 · x1 6= x0 (whence
    e0 6= 0B ). We will show that there is an h 2 H sending e0 to 1B ; accordingly,
    since 1B = h(e0 ) = h(x0 + x0 · x1 ) = h(x0 ) 4 h(x0 ) \ h(x1 ) , we will have
    h(x0 ) = {;}, h(x1 ) = ;, and therefore h 2 x  e0 \ x
                                                        e1 as desired. We readily get the
    sought h if B = {0B , 1B }; otherwise we pick a y0 2 B \ {0B , 1B }, choosing y0 = e0
    if e0 6= 1B . This y0 belongs to a principal ideal and hence to a maximal ideal M ,
    and it is plain that the opposite h = 1       M of the characteristic function of M ,
    manifestly a homomorphism from B to 2, does to our case.                            a


        Call set-representation of the algebra B the field of sets just built. We
    will see next that this H generates a very peculiar topology on H.


    6     2nd Stone’s representation theorem

    We are now ready for the topological version of Stone’s theorem:

    Theorem 2 (Stone’s topological representation). The field of sets by which
    we have represented a Boolean algebra B is the base—as well as the family of all
    clopen sets—of a topology on the set H of all homomorphisms from B into 2.
    Once endowed with such a topology, H turns out to be a Stone space.

    Proof. To see that H (constructed as in the preceding proof)   S is the base of a
    topology onT   H, we can  directly check  that H ✓  P(H)  and    H=H=    6 ; hold,
    and that F belongs to H for every finite non-void subset F of H. Indeed, H
    is the image-set of an injective function x 7! xe from B into
                                                               S P(H), where B is at
    least doubleton; hence, readily, H = 6 ;, H ✓ P(H), and H ✓ H hold. The last
    inclusion is in fact an equality, because H, which is 1fB , belongs to H. Then we
    get that H is closed under intersection through the remark, made above, that
    e \ ye = xg
    x          · y.
        Knowing, at this point, that H qualifies as the base for a topology on H,
    let us notice that all sets in H are clopen in the topology ⌧ generated by it: in
    fact, since H \ xe = H4x   e = 1fB 4x e = 1^B + x, the complement of a set in the
    base belongs to the base in its turn. This remark readily gives us that (H, ⌧ ) is
    a Hausdor↵ space. In fact, when f, g 2 H di↵er, there is an x 2 B such that
    f (x) = 1 $ g(x) 6= 1; thus, since H \ x     e we can find sets u, v 2 ⌧ such that
                                             e = x,
    f 2 u, g 2 v, and u \ v = ;, by also insisting that {u, v} = {x,e x
                                                                      e }.


                                                292
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


        It remains to be shown that the space is compact, which will also yield that
    every clopen set of ⌧ belongs to H.9 One easily sees that the closed sets in ⌧
    are: H and all intersections of non-void subsets of {ex : x 2 B}; compactness
    will
    T    hence readily follow if we manage to show   that whenever  ; 6= OT✓ H and
      O = ; hold, there is an F ✓ O such that |F|      T  2  N \ {0} and F = ;.
    Equivalently, assuming that ; 6= O ✓ H andTthat F =    6 ; holds for every finite
    non-void subset F of O, we will show that O =   6 ;.
        Notice that the subset
                         n                                 \ o
                B0 =Def x : F ✓ O | |F| 2 N \ {0} & x  e=     F [ {1B }

    of B meets the conditions:
    1) x · y 2 B0 for all x, y 2 B0 ,
    2) 0B 2/ B0 6✓ {1B },
    implying that { a · x : a 2 B , x 2 B0 } is an ideal of B. By enlarging this into a
    maximal ideal, we get the kernel of a homomorphism h sending all complements
                                                                             T
    of el’ts of B0 to ;, hence sending all elements of B0 to {;}. Thus, h 2 O. a


    7      Formalization of Stone’s representation theorems in Ref
    This section o↵ers glimpses of our formal development of Stone’s result on the
    representability of Boolean algebras via the clopen sets of a totally disconnected,
    compact Hausdor↵ space. In carrying out this task, we relied on a proof checker:
    Ref. Our experiment culminated in a rather elaborate series of mathematical
    claims, shown not in this section, but in the appendix.
        Organization and rationale of our automated proof assistant are extensively
    discussed in [19]; but so far, due to the short time elapsed from its implementa-
    tion, Ref is not widely known. Hence, putting aside our report on our experiment
    for a moment, we devote a quick subsection to introducing Ref itself.

    7.1      Brief presentation of the proof-checking framework
    Ref is a proof assistant for mathematics based on a variant of Zemelo-Fraenkel
    set theory, which is “hardwired” in Ref’s proof-checking abilities. From the user
    Ref receives script files, called scenarios, consisting of successive definitions, the-
    orems, and auxiliary commands, which it either certifies as constituting a valid
    sequence or rejects as defective. In the case of rejection, the verifier attempts
    to pinpoint the troublesome locations within a scenario, so that errors can be
     9                                       S                                 S
         To derive from compactness that O 2 H holds when O ✓ HSand O isSclosed,
          S argueTas follows. Assuming, w.l.o.g., that ; =
         we                                              6 O, since ; = ( O) \ (H \ O) =
         ( O) \ {H \ u : u 2 O} is the intersectionS    of a family
                                                                T of closed sets, we can pick
         an
         S   F  such
                 T    that ;  6
                              =  F ✓ O, |F | 2 N, and (   O)  \  {H \ u : u 2 F} = ;. Thus
           O = {H \ u : u 2 F } 2 H, because H is closed relative to complementation and
         to finite intersection.



                                                293
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


    located and repaired. Step timings are produced even for correct proofs, to help
    the user in spotting places where appropriate modifications could speed up proof
    processing.
        The bulk of the text normally submitted to the verifier consists of theorems
    and proofs. Some theorems (and their proofs) are enclosed within so-called The-
    orys, whose external conclusions are justified by these internal theorems. This
    lets scenarios be subdivided into modules, which increases the readability and
    supports proof reuse.
        Many theorems are not enclosed within a user-defined Theory; when this
    happens, they belong on their own right to the underlying “big” Theory identified
    by the name Set theory.
        Of all relationships treated within Set theory, the most fundamental is mem-
    bership, 2, which is supposed to be well founded in the sense that no infinite
    sequence x0 , x1 , x2 , . . . of sets can satisfy xi+1 2 xi for every i. The well founded-
    ness of 2 is witnessed by the built-in arbitrary selection operator, arb, meeting
    the conditions arb(x) 2 x and arb(x) \ x = ; for every set x other than the null
    set ; (about which the equality arb(;) = ; is assumed).
        At their simplest definitions are merely abbreviations which concentrate at-
    tention on interesting constructs by assigning them names which shorten their
    syntactic form (an example of this kind is the definition of finitude that we will
    soon meet). Beyond this simple level, Ref o↵ers a primitive scheme of 2-recursive
    definition legitimatized by the well foundedness of 2 and illustrated, e.g., by the
    following specification:

     Def : [Join singletons] filum(X) =Def {X} [ arb                filum(y) : y 2 X | X = {y}

    (This collects together into filum(X) all elements of the finitely many singletons
    “spreading”—in a quite definite sense—from {X}.)
        This example also shows the availability, in the formal language of Ref, of
    perspicuous set-formers such as filum(y) : y 2 X | X = {y} . Just in order to
    see a few other set-formers
                     S          at work, consider the following shorthand definitions:
                        Y =Def { z : x 2 Y , z 2 x} ,
              edges(V, E) =Def {x, y} : x 2SV, y S  2 V | x 6= y \ E ,
            Connected(E) $Def {b : b ✓ E | b \ (E \ b) = ;} ✓ {;, E} .
        A very small Ref scenario, consisting of one definition (involving yet another
    set-former) and two theorems with their proofs, is shown in Fig. 2. As one sees
    there, each inference step in a Ref proof has two components, separated by the
    ‘)’ sign: on the right of which a logical statement (sometimes hidden behind one
    of the keywords Auto, Qed) appears; while, on the left, there is a justification
    of the statement, namely an indication of which inference method enables its
    derivation from the preceding part of the proof.
        Last but not least, Ref supports proof reuse through a costruct named The-
    ory, essentially a second-order form of Skolemization. Fig. 3 shows the interface
    of a specific Theory, named finite image, which has two input parameters: s0 , a


                                                294
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker

   Def P: [Family of all subsets of a given set] PS =Def {x : x ✓ S}

   Thm pow0 : [No set equals its own powerset] (X ◆ Y $ Y 2 PX) & X 6= PX. Proof:
      Suppose not(x0 , y0 ) ) Auto
      Use def(Px0 ) ) Auto
      Suppose ) x0 = Px0
      ELEM ) Stat0 : x0 2     / {y : y ✓ x0 }
      hx0 i,!Stat0 ) false;          Discharge ) Auto
      EQUAL ) Stat1 : x0 ◆ y0 6= y0 2 {y : y ✓ x0 }
      Suppose ) Stat2 : y0 2 {y : y ✓ x0 }
      hy1 i,!Stat2(Stat1?) ) false;           Discharge ) Stat3 : y0 2
                                                                     / {y : y ✓ x0 }
      hy0 i,!Stat3(Stat1?) ) false;           Discharge ) Qed

   Thm pow1 : [Monotonicity of powerset] S ◆ X ! PX [ {;, X} ✓ PS. Proof:
      Suppose not(s0 , x0 ) ) Auto
      Set monot ) {x : x ✓ x0 } ✓ {x : x ✓ s0 }
      Use def(P) ) Stat1 : ; 2   / {x : x ✓ s0 } _ x0 2
                                                      / {x : x ✓ s0 }
      h;, x0 i,!Stat1 ) false;        Discharge ) Qed

   Thm pow2 : [Powerset of null set and of singletons] P; = {;} &
                                                  P {X} = {;, {X}} . Proof:
      Suppose not(x0 ) ) Auto
      Suppose ) P; 6= {;}
      h;, ;i,!T pow1 ) Stat0 : P; 6✓ {;}
      hy0 i,!Stat0(Stat0?) ) Stat1 : y0 2 P; & y0 2/ {;}
      h;, y0 i,!T pow0 (Stat1?) ) false;         Discharge ) P {x0 } =6 {;, {x0 }}
      h {x0 } , {x0 } i,!T pow1 ) Stat2 : P {x0 } 6✓ {;, {x0 }}
      hy1 i,!Stat2 ) Stat3 : y1 2 P {x0 } & y1 2/ {;, {x0 }}
      h {x0 } , y1 i,!T pow0 (Stat3?) ) false;       Discharge ) Qed

                               Fig. 2. Tiny sample of a Ref scenario


    finite set, and g, a global function. Inside finite image, from the assumed finite-
    ness of s0 the user has derived that { g(x) : x 2 s0 } is a finite set; moreover, (s)he
    has defined the output parameter f⇥ so as to insure that f⇥ be an ✓ -minimal
    subset of s0 such that f⇥ and s0 are sent by g to the same image.


                      Theory finite image (s0 , g(X))
                         Finite(s0 )
                      ) f⇥
                         Finite { g(x) : x 2 s0 }
                         f⇥ ✓ s0 & h 8 t ✓ f⇥ | g(t) = g(s0 ) $ t = f⇥ i
                      End finite image


              Fig. 3. Interface of a Theory specifying an induction principle



                                                295
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


    7.2     Excerpts from our proof scenario of Stone’s theorems
    As a warm-up exercise, we developed with the assistance of Ref the Theory
    pord displayed in Fig. 4, showing that every partially ordered set is isomorphic
    to a family of sets partially ordered by inclusion. The assumptions of pord state
    that Le must be a partial ordering of dd. By sending each element x of dd to the
    set consisting of those elements of dd which are smaller than or equal to x, we get
    an order monomorphism between (dd, Le) and (P(dd), ✓): whose name ‘poIso⇥ ’,
    as indicated by the subscript ⇥, is specified—along with its definition—inside
    the Theory.


                 Theory pord dd, Le(U, V)
                    h8x, y | {x, y} ✓ dd ! Le(x, y) & Le(y, x) $ x = y i
                    h8x, y, z | {x, y, z} ✓ dd ! Le(x, y) & Le(y, z) ! Le(x, z)i
                 ) (poIso⇥ )
                    poIso⇥ = {[x, {v 2 dd | Le(v, x)}] : x 2 dd}
                    h8x | x 2 dd ! Le(x, x) & poIso⇥ x = {v 2 dd | Le(v, x)} i
                    h8x, y | {x, y} ✓ dd ! Le(x, y) $ poIso⇥ x ✓ poIso⇥ y i
                    1–1(poIso⇥ ) & domain(poIso⇥ ) = dd
                 End pord


           Fig. 4. Interface of a representation Theory about partial orderings



          Our next step consisted in developing a theory of Boolean rings:


          Theory booleanRing(bb, ·, ÷)
             bb 6= ;
             h8x, y | {x, y} ✓ bb ! x · y 2 bb i
             h8x, y | {x, y} ✓ bb ! x ÷ y 2 bb i
             h8x, y, z | {x, y, z} ✓ bb ! x · (y · z) = (x · y) · z i
             h8x, y, z | {x, y, z} ✓ bb ! x ÷ (y ÷ z) = (x ÷ y) ÷ z i
             h8x, y, z | {x, y, z} ✓ bb ! (x ÷ y) · z = z · y ÷ z · x i
             h8x, y | {x, y} ✓ bb ! x ÷ x = y ÷ y i
             h8x, y | {x, y} ✓ bb ! x ÷ (y ÷ x) = y i
             h8x | x 2 bb ! x · x = x i
          ) (zz⇥ )
             zz⇥ = arb(bb) ÷ arb(bb)
             h8x | (x 2 bb ! x ÷ x = zz⇥ & x ÷ zz⇥ = x & zz⇥ ÷ x = x) & zz⇥ 2 bb i
             h8x, y | x, y 2 bb ! x ÷ y = y ÷ x i
             h8x, y | x, y 2 bb ! x · y = y · x i
             h8x | x 2 bb ! zz⇥ · x = zz⇥ i
             h8u, v | {u, v} ✓ bb & u · v = u & v · u = v ! u = v i
          End booleanRing



                                                296
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


    Here zz⇥ designates the additive identity. Notice, among the internally derived
    claims, the commutativity laws.
        Due to its entirely algebraic character, this Theory could have been de-
    veloped somewhat more easily with an autonomous theorem prover oriented to
    the treatment of equality: as announced in [6, Sec. 3], we plan to implement
    interfaces between Ref and outer automated proof assistants.

       Our next Theory, presupposing the definition of symmetric di↵erence, shows
    that rings of sets match the assumptions of the Theory booleanRing:

                    TheorySprotoBoolean(dd)
                       ; 6= dd
                       h8x, y | {x, y} ✓ dd ! x \ y 2 dd i
                       h8x, y | {x, y} ✓ dd ! x 4 y 2 dd i
                    )
                       dd 6= ;
                       h8x 2 dd, y 2 dd, z 2 dd | x \ (y \ z) = (x \ y) \ z i
                       h8x 2 dd, y 2 dd, z 2 dd | x 4 (y 4 z) = (x 4 y) 4 z i
                       h8x 2 dd, y 2 dd, z 2 dd | (x 4 y) \ z = z \ y 4 z \ x i
                       h8x 2 dd, y 2 dd | x 4 x = y 4 y i
                       h8x 2 dd, y 2 dd | x 4 (y 4 x) = y i
                       h8x 2 dd | x \ x = x i
                    End protoBoolean
    Two claims, proved inside the background Theory, namely Set theory, and pre-
    supposing the definition of P, show that the family of all subsets, and the
    one of all finite and cofinite subsets, of a non-void set constitute instances of
    protoBoolean:

                                                                  S
          Thm . W 6= ; & {X, Y} ✓ PW ! {X \ Y, X 4 Y} ✓ PW & (PW) 6= ; ,
          Thm . W 6= ; & D = {s ✓ W | Finite(s) _ Finite(W\s)} & {X, Y}S✓ D !
                                                 {X \ Y, X 4 Y} ✓ D & D 6= ;.

         Another Theory, akin to the preceding one, introduces a slightly more spe-
    cific algebraic variety than the one treated by protoBoolean:

                         TheorySarcheoBoolean(dd)
                            ; 6= dd
                            h8x, y, z | {x, y} ✓ dd & z ✓ x [ y ! z 2 dd i
                         )
                            h8x, y | {x, y} ✓ dd ! x \ y 2 dd i
                            h8x, y | {x, y} ✓ dd ! x 4 y 2 dd i
                            dd 6= ;
                         End archeoBoolean
       After switching back to the background Set theory level, one proves that
    there are fields of sets which are instances of protoBoolean but are not instances


                                                297
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


    of archeoBoolean. Indeed, the collection of all finite and cofinite subsets of an
    infinite set is not closed with respect to inclusion.

                 Thm . ¬Finite(W) & D = {s ✓ W | Finite(s) _ Finite(W\s)} !
                                              W 2 D & h9z ✓ W | z 2   / D i.


    Surprisingly enough, it is unnecessary to resort to a theory of cardinals of any
    sophistication in order to get the result just cited: the distinction between finite
    sets and sets which are not finite more than suffices for that purpose, where the
    following definition applies:


           Def : [Finitude] Finite(F) $Def h8g 2 P(PF)\ {;} , 9m | g \ Pm = {m} i



        Last but not least, we developed the Theory booleanAlgebra whose interface
    is shown in the Appendix.


    Conclusions and future work

    Proof-verification can highly benefit from representation theorems of the kind
    illustrated by Stone’s results on Boolean algebras. On the human side, such
    results disclose new insights by shedding light on a discipline from unusual angles;
    on the technological side, they enable the transfer of proof methods from one
    realm of mathematics to another.
        Examples of this can be found in various recent proofs concerning connected
    claw-free graphs:10 thanks to a convenient choice on how to represent those
    graphs, Milanič and Tomescu [13] proved with relative ease two classical propo-
    sitions, namely that any such graph owns a near-perfect matching and has a
    Hamiltonian cycle in its square; a proof of the somewhat deeper theorem [8]
    that all connected claw-free graphs have a vertex-pancyclic square was also at-
    tained cheaply through the same representation [23]. Specifically, the facilitation
    stems from transferring those results to the special class of the membership di-
    graphs, whose set of vertices is a hereditarily finite set and whose arcs precisely
    reflect the membership relation between vertices. Under this change of perspec-
    tive, a fully formal reconstruction of the first two results became a↵ordable and,
    once carried out, was certified correct with the Ref proof-checker [15,17,18].
        This motivated us in undertaking the formal development, with Ref, of proofs
    of various representation theorems (see also [1]). An envisaged continuation of
    the present work will be in the direction of MV-algebras (cf. [14,5,3,11]).

    10
         A graph is said to be claw-free if no induced subgraph of its is isomorphic to the
         graph, called the claw : K1,3 = {w, x, y, z}, {y, x}, {y, z}, {y, w} .



                                                298
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


    References
     1. P. Calligaris, E. G. Omodeo, and A. I. Tomescu. A proof-checking experiment on
        representing graphs as membership digraphs. In D. Cantone and M. Nicolosi As-
        mundo, editors, CILC 2013: Italian Conference on Computational Logic, volume
        1068 http://ceur-ws.org/Vol-1068/, ISSN 1613-0073, pages 227–233. CEUR
        Workshop Proceedings, Sept. 2013.
     2. Paul Moritz Cohn. Universal Algebra. Harper and Row, 1965.
     3. E. J. Dubuc and Y. A. Poveda. Representation theory of MV-algebras. Ann. Pure
        Appl. Logic, 161(8):1024–1046, 2010.
     4. Nelson Dunford and Jacob T. Schwartz. Linear Operators, Part I General Theory.
        Interscience Publishers, 1958.
     5. A. Dvurečenskij. Pseudo MV-algebras are intervals in `-groups. J. Austral. Math.
        Soc., 72:427–425, 2002.
     6. Andrea Formisano and Eugenio G. Omodeo. Theory-specific automated reasoning.
        In Agostino Dovier and Enrico Pontelli, editors, A 25-Year Perspective on Logic
        Programming: Achievements of the Italian Association for Logic Programming,
        GULP, volume 6125 of Lecture Notes in Computer Science, pages 37–63. Springer,
        2010.
     7. Paul R. Halmos. Algebraic Logic. AMS Chelsea Publishing, Providence, Rhode
        Island, 1962.
     8. George Hendry and Walter Vogler. The square of a connected S(K1,3 )-free graph
        is vertex pancyclic. Journal of Graph Theory, 9(4):535–537, 1985.
     9. Nathan Jacobson. Lectures in Abstract Algebra, Vol.1 – Basic Concepts. D. Van
        Nostrand, New York, 1951.
    10. G. Kolata. With major math proof, brute computers show flash of reasoning power.
        The New York Times, Dec. 10, 1996.
    11. M. Konig. Gödel Lukasiewicz logic. LP&S – Logic and Philosophy of Science,
        VIII(1):119–142, 2010.
    12. W. W. McCune. Solution of the Robbins problem. J. of Automated Reasoning,
        19(3):263–276, 1997.
    13. M. Milanič and A. I. Tomescu. Set graphs. I. Hereditarily finite sets and extensional
        acyclic orientations. Discrete Applied Mathematics, 161(4-5):677–690, 2013.
    14. D. Mundici. Interpretation of af c⇤ -algebras in Lukasiewicz sentential calculus. J.
        Funct. Anal., 65:15–63, 1986.
    15. E. G. Omodeo. The Ref proof-checker and its “common shared scenario”. In
        Martin Davis and Ed Schonberg, editors, From Linear Operators to Computational
        Biology: Essays in Memory of Jacob T. Schwartz, pages 121–131. Springer, 2012.
    16. E. G. Omodeo and A. I. Tomescu. Using Ætnanova to formally prove that the
        Davis-Putnam satisfiability test is correct. Le Matematiche, 63(1):85–105, 2008.
    17. E. G. Omodeo and A. I. Tomescu. Appendix: Claw-free graphs as sets. In Mar-
        tin Davis and Ed Schonberg, editors, From Linear Operators to Computational
        Biology: Essays in Memory of Jacob T. Schwartz, pages 131–167. Springer, 2012.
    18. E. G. Omodeo and A. I. Tomescu. Set graphs. III. Proof Pearl: Claw-free graphs
        mirrored into transitive hereditarily finite sets. J. Autom. Reason., 52(1):1–29,
        2014.
    19. J.T. Schwartz, D. Cantone, and E.G. Omodeo. Computational Logic and Set The-
        ory - Applying Formalized Logic to Analysis. Springer, 2011.
    20. Marshall H. Stone. The theory of representations for Boolean algebras. Transac-
        tions of the American Mathematical Society, 40:37–111, 1936.



                                                299
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


    21. Marshall H. Stone. Applications of the theory of Boolean rings to general topology.
        Transactions of the American Mathematical Society, 41:375–481, 1937.
    22. Marshall H. Stone. The representation of Boolean algebras. Bulletin of the Amer-
        ican Mathematical Society, 44(Part 1):807–816, 1938.
    23. Alexandru I. Tomescu. A simpler proof for vertex-pancyclicity of squares of con-
        nected claw-free graphs. Discrete Mathematics, 312(15):2388–2391, 2012.


    A      The main theory in our scenario on Boolean algebras

    Theory booleanAlgebra(B, ·, ÷, 1B )
       1B 2 B
       1B 6= 1B ÷ 1B
       h8x, y | {x, y} ✓ B ! x · y 2 Bi
       h8x, y | {x, y} ✓ B ! x ÷ y 2 Bi
       h8x, y, z | {x, y, z} ✓ B ! x · (y · z) = (x · y) · z i
       h8x, y, z | {x, y, z} ✓ B ! x ÷ (y ÷ z) = (x ÷ y) ÷ z i
       h8x, y, z | {x, y, z} ✓ B ! (x ÷ y) · z = z · y ÷ z · x i
       h8x, y | {x, y} ✓ B ! x ÷ x = y ÷ y i
       h8x, y | {x, y} ✓ B ! x ÷ (y ÷ x) = y i
       h8x | x 2 B ! x · x = x i
       h8x | x 2 B ! 1B · x = x i
    ) (0⇥ , ( )⇥ , Ideal⇥ , BooHom⇥ , H⇥ , '⇥ )
       0⇥ = arb(B) ÷ arb(B)
       h8x | (x 2 B ! x ÷ x = 0⇥ & x ÷ 0⇥ = x & 0⇥ ÷ x = x) & 0⇥ 2 Bi
       h8x, y | {x, y} ✓ B ! x ÷ y = y ÷ x i
       h8x, y | {x, y} ✓ B ! x · y = y · x i
       h8u, v | {u, v} ✓ B & u · v = u & v · u = v ! u = v i
       h8x | ⇣x 2 B ! (x)⇥ = 1B ÷ x⇣i ⌘             ⌘
         h8x | x 2 B ! (x)⇥ 2 B & (x)⇥ = x & 1B ⇥ = 0⇥ & 0⇥ ⇥ = 1B i
                                                ⇥
         h8x, y | {x, y} ✓ B ! (x)⇥ ÷ x = 1B & y · x ÷ y · (x)⇥ = y & y · x · y · (x)⇥ = 0⇥ i
         h8x, y | {x, y} ✓ B ! (x ÷ y)⇥ = x · y ÷ (x)⇥ · (y)⇥ i
         h8x | x 2 B ! (x)⇥ 6= x & x 2/ {0⇥ , 1B } ! (x)⇥ 2 B\ {0⇥ , 1B } i
         h8u, v | {u, v} ✓ B & u · v = 1B ! u = 1B & v = 1B i
         h8u, v, x, y | {u, v, x, y} ✓ B ! u · (x)⇥ ÷ v · (y)⇥ = u · (x)⇥ ÷ v · (y)⇥ · (x · y)⇥ i
         h8i | Ideal⇥ (i) $ {x ÷ y : x 2 i, y 2 i} ✓ i & {x · y : x 2 B, y 2 i} ✓ i & i ✓ B\ {1B } & i 6✓ {0⇥ } i
         h8i, x, y | Ideal⇥ (i) & {x, y} ✓ i ! x ÷ y 2 i i
         h8i | Ideal⇥ (i) ! 0⇥ 2 i & x 2 i & y 2 B ! x · y, y · x 2 i & (x)⇥ 2/ i & 1B 2/ i i
         h8i | Ideal⇥ (i) ! h9m | i ✓ m & h8j | Ideal⇥ (j) & m ✓ j $ j = m iii
         h8b | b ✓ B\ {0⇥ } & {x · y : x 2 b, y 2 b} ✓ b & b 6✓ {1B } ! Ideal⇥ {a · (x)⇥ : a 2 B, x 2 b}
         h8x | x 2 B\ {0⇥ , 1B } ! Ideal⇥ ({a · x : a 2 B}) & x 2 {a · x S: a 2 B} i
         h8h | BooHom⇥ (h) $ Svm(h) & domain(h) = B & h 1B = range(h) & h 1B 6= h 0⇥ &
                                     h8x 2 B, y 2 B | h (x · y) = h x \ h y & h (x ÷ y) = h x 4 h y ii




                                                300
R. Ceterchi et al. The representation of Boolean algebras in the spotlight of a proof checker


      H⇥ = {h ✓ B ⇥ 2 | BooHom⇥ (h)}
       h8h | h 2 H⇥ ! h 0⇥ = ; & h 1B = 1i
       h8h | h 2 H⇥ & {x, y} ✓ B & h (x ÷ x · y) = 1 & h y = ; ! h x = 1i
       h8i, x | Ideal⇥ (i) & x 2 B & (x)⇥ 2/ i ! h9j | Ideal⇥ (j) & i [ {x} ✓ jii
       h8x, m | x 2/ m & x 2 B & h8j | Ideal⇥ (j) & m ✓ j $ j = m i ! (x)⇥ 2 m i
       h8m | h8j | Ideal⇥ (j) & m ✓ j $ j = m i ! {[x, if x 2 m then ; else 1 fi] : x 2 B} 2 H⇥ i
       B ✓ {0⇥ , 1B } ! {[0⇥ , ;] , [1B , 1]} 2 H⇥
       h8x 2 B\ {0⇥ } | {h 2 H⇥ | h x = 1} =    6 ;i & H⇥ 6= ;
       '⇥ = {[b, {h 2 H⇥ | h b = 1}] : b 2 B}
       h8x 2 B | '⇥ x = {h 2 H⇥ | h x = 1} i
       h8x, y | {x, y} ✓ B ! '⇥ (x · y) = '⇥ x \ '⇥ y & '⇥ (x ÷ y) = '⇥ x 4 '⇥ y i
       h8x, y |S{x, y} ✓ B & x · y 6= x ! '⇥ x 6= '⇥ yi
       H⇥ = range('⇥ ) & '⇥ 0⇥ = ; & '⇥ 1B 6= '⇥ 0⇥ & '⇥ 1B = H⇥
       h8x 2 B | '⇥ (x)⇥ = H⇥ \'⇥ x i
       1–1('⇥ ) & domain('⇥ ) = B
       BooHom⇥ ('⇥ )
       range('⇥ ) ✓ {x : x ✓ H⇥ } & ; 2 range('⇥ ) & H⇥ 2 range('⇥ )
       h8u 2 range('⇥ ) | H⇥ \u 2 range('⇥ )i
       h8f, g | {f, g} ✓ H⇥ & f 6= g ! h9u 2 range('
                                                  T        ⇥ ), v 2 range('⇥ ) | f 2 u & g 2 v & u \ v = ;ii
       h8f ✓ range('⇥ ) | f 6= ; & Finite(f)
                                       T       !     f  2 range('   ⇥ )i           T
       h8k ✓ range('⇥ ) | k 6= ; & k = ; ! h9f ✓ k | f 6= ; & Finite(f) ! f = ;ii
    End booleanAlgebra




                                                301