• Nenhum resultado encontrado

A combinatorial study of soundness and normalization in n-graphs

N/A
N/A
Protected

Academic year: 2021

Share "A combinatorial study of soundness and normalization in n-graphs"

Copied!
93
0
0

Texto

(1)

A COMBINATORIAL STUDY OF SOUNDNESS AND

NORMALIZATION IN N-GRAPHS

M.Sc. Dissertation

Federal University of Pernambuco posgraduacao@cin.ufpe.br www.cin.ufpe.br/~posgraduacao

RECIFE 2015

(2)
(3)

A COMBINATORIAL STUDY OF SOUNDNESS AND

NORMALIZATION IN N-GRAPHS

A M.Sc. Dissertation presented to the Center for Informatics of Federal University of Pernambuco in partial fulfillment of the requirements for the degree of Master of Science in Computer Science.

Advisor: Anjolina Grisi de Oliveira Co-Advisor: Ruy José Guerra Barretto de Queiroz

RECIFE 2015

(4)

Catalogação na fonte

Bibliotecária Joana D’Arc Leão Salvador CRB 4-572

A553c Andrade, Lais Sousa de.

A combinatorial study of soundness and normalization in n-graphs / Lais Sousa de Andrade. – 2015.

85 f.: fig.

Orientadora: Anjolina Grisi de Oliveira.

Dissertação (Mestrado) – Universidade Federal de Pernambuco. CIN. Ciência da Computação, Recife, 2015.

Inclui referências e apêndices.

1. Computação – Teoria. 2. Teoria da prova. 3. Normalização I. Oliveira, Anjolina Grisi de (Orientadora). II. Titulo.

(5)

Pernambuco, sob o título “A combinatorial study of soundness and normalization in N-Graphs”, orientada pela Profa. Anjolina Grisi de Oliveira e aprovada pela Banca Examinadora formada pelos professores:

______________________________________________ Profa. Katia Silva Guimarães

Centro de Informática / UFPE

______________________________________________ Prof. Luiz Carlos Pinheiro Dias Pereira

Departamento de Filosofia/PUC-Rio

_______________________________________________ Profa. Anjolina Grisi de Oliveira

Centro de Informática / UFPE

Visto e permitida a impressão. Recife, 29 de julho de 2015

___________________________________________________

Profa. Edna Natividade da Silva Barros

Coordenadora da Pós-Graduação em Ciência da Computação do Centro de Informática da Universidade Federal de Pernambuco.

(6)
(7)
(8)
(9)

I would like to give special thanks to everyone who helped and supported me during the development of this work:

to my parents Amaury and Ziza, for all the emotional and material support they always gave me. It is because of them that I was able to dedicate so much of myself to my studies throughout my life and then to finally accomplish this new step in my formal education. They were very loving, supportive and understanding, giving me the strength and determination I needed to get here.

to my brother Felipe, one of my closest friends who is so helpful and is always rooting and believing in me.

to the professors Katia Guimarães and Luiz Carlos, for accepting my invitation to participate in my examining board. I want to thank Katia for being my professor for algorithms, showing me this interesting computer science field and motivating me to pursue this area, which lead me here. And also professor Luiz Carlos, that was always so attentive with our little research group, sending study material and even supporting our participation on a conference in Rio back in 2012, which helped me settle on logic and engage this masters program.

to my advisor Anjolina, who is a guide to me in all matters. She was not only patient and thoughtful, but also kind and caring at all times. She puts her heart in all the things she touches, in all the work she does, and I am so glad I had the chance to be within her reach and to work with her for all those years. I am happy to call her a friend, and humbly look at her as a model to me in every aspect of my life.

to my co-advisor Ruy, who have been very cooperative to all matters related to our work and study. He is always watching closely our developments, collaborating with the best he can and helping us to achieve everything we did during those years of study.

to all my friends, who have been by my side every step of the way, watching closely my work and progress even though sometimes they had no idea what I was doing. They are a strong pillar where I stand.

to Ruan, a friend and “partner in logic”. We have been through a lot during these years, studying new and challenging subjects, travelling to conferences, and we always had the support of each other to achieve the results we did in the papers we published, my graduation project, his masters dissertation and now mine. He is my unofficial co-advisor, who is available at any time to help me fit the deadlines and pushing me to never give up.

(10)
(11)

N-Grafos é uma dedução natural de múltiplas conclusões onde provas são representadas como grafos direcionados, motivado pela idéia de provas como objetos geométricos e com o objetivo de estudar a geometria de sistemas de Dedução Natural. Seguindo esta linha de pesquisa, este trabalho revisita o sistema sob uma perpectiva puramente combinatorial, determinando condições geométricas nos grafos de prova para explicar seu critério de corretude e crescimento da prova durante a normalização. Aplicando desenvolvimentos recentes nos campos de grafos de prova, proof-nets e dos próprios N-Grafos, propomos um algoritmo linear para verificação de provas para o sistema completo, um resultado que pode ser comparado com soluções para proof-nets desenvolvidas por Murawski (2000) e Guerrini (2011), e um procedimento de norma-lização baseado na noção de sub-N-Grafos, introduzidas por Carvalho, em 2014. Apresentamos primeiramente um novo critério de corretude para meta-arestas, juntamente com a extensão para todo o sistema da prova da sequentização desenvolvida por Carvalho. Para este critério definimos um algoritmo para verificação de provas que utiliza uma busca parecida com a DFS (Busca em Profundidade) para encontrar ciclos inválidos em um grafo de prova. Como o critério de corretude para grafos de provas é análogo ao procedimento para proof-nets, o algoritmo pode também ser estendido para validar provas em Lógica Linear multiplicativa sem units (MLL−) com complexidade de tempo linear. A nova normalização proposta aqui combina uma versão modificada das reduções beta e permutativas originais de Alves com uma adaptação da operação de duplicação proposta por Carbone para ser aplicada a sub-N-Grafos. O procedimento é mais simples do que o original e funciona como uma extensão da normalização definida por Prawitz e do estudo combinatorial desenvolvido por Carbone, i.e. provas em forma normal desfrutam das propriedades da separação e subformula e possuem uma estrutura que pode representar como padrões existentes em provas na forma normal poderiam ser recuperados a partir do grafo da prova original com cortes.

Palavras-chave: N-Grafos. Sub-N-Grafos. Dedução Natural. Normalização. Duplicação. Grafos direcionados. DFS. Proof-nets.

(12)
(13)

N-Graphs is a multiple conclusion natural deduction with proofs as directed graphs, motivated by the idea of proofs as geometric objects and aimed towards the study of the geometry of Natural Deduction systems. Following that line of research, this work revisits the system under a purely combinatorial perspective, determining geometrical conditions on the graphs of proofs to explain its soundness criterion and proof growth during normalization. Applying recent developments in the fields of proof graphs, proof-nets and N-Graphs itself, we propose a linear time algorithm for proof verification of the full system, a result that can be related to proof-nets solutions from Murawski (2000) and Guerrini (2011), and a normalization procedure based on the notion of sub-N-Graphs, introduced by Carvalho, in 2014. We first present a new soundness criterion for meta-edges, along with the extension of Carvalho’s sequentization proof for the full system. For this criterion we define an algorithm for proof verification that uses a DFS-like search to find invalid cycles in a proof-graph. Since the soundness criterion in proof graphs is analogous to the proof-nets procedure, the algorithm can also be extended to check proofs in the multiplicative linear logic without units (MLL−) with linear time complexity. The new normalization proposed here combines a modified version of Alves’ (2009) original beta and permutative reductions with an adaptation of Carbone’s duplication operation on sub-N-Graphs. The procedure is simpler than the original one and works as an extension of both the normalization defined by Prawitz and the combinatorial study developed by Carbone, i.e. normal proofs enjoy the separation and subformula properties and have a structure that can represent how patterns lying in normal proofs can be recovered from the graph of the original proof with cuts.

Keywords: N-Graphs. Sub-N-Graphs. Natural deduction. Normalization. Duplication. Directed graphs. DFS. Proof-nets.

(14)
(15)

2.1 N-Graphs links. . . 17

2.2 Example where the meta-condition fails. . . 19

2.3 Example of meta-switching . . . 19

2.4 Example of a sub-N-Graph with doors highlighted in red. . . 20

2.5 Example of north and south empires . . . 23

2.6 Example of north and south empires with meta-edge . . . 24

2.7 If we choose the edge(Xp1, Xc), we get a cycle. . . 26

2.8 Example of how to cut a proof using the maximal node. . . 28

3.1 Danos’ contractibility . . . 32

3.2 Proof structure links (GUERRINI, 1999). . . 32

3.3 Proof-nets multiplicative links (GUERRINI, 1999). . . 32

3.4 Proof structure contraction rules (GUERRINI, 1999). . . 33

3.5 Dominator tree example . . . 34

3.6 Cycles in a proof-graph. . . 36

3.7 Ordering induced by δ and ζ . . . 38

3.8 Example where the original algorithm fails. . . 39

3.9 Cycle from a combination of back edges . . . 41

3.10 Invalid cycle from a combination of cross edges. . . 42

3.11 How the cycle in Fig. 3.10 would be discovered by the algorithm . . . 42

3.12 Invalid cycle from a combination of cross and back edges. . . 43

4.1 Cellucci’s rules . . . 49

4.2 Example of a flow graph . . . 51

4.3 Duplication in an optical graph. (CARBONE, 1999) . . . 52

4.4 β reductions . . . 53

4.5 Permutative reductions . . . 54

4.6 Duplication . . . 55

4.7 Switchable reductions . . . 56

4.8 Cycle of cut formulas . . . 60

5.1 Example of cut with contraction in N-Graphs. . . 63

5.2 Structures to be eliminated by duplication . . . 64

5.3 Example of exponential growth with duplication. (CARBONE, 1999) . . . 65

5.4 Example of exponential growth with duplication in N-Graphs. . . 66

5.5 Example of linear growth with duplication. (CARBONE, 1999) . . . 67

5.6 Example of how infinite linear growth does not happen in N-Graphs. . . 67

5.7 Example of infinite growth with duplication. (CARBONE, 1999) . . . 68

5.8 Example of infinite duplication sequence on N-Graphs. . . 68

5.9 Blow operation . . . 69

5.10 Subgraph G03of G+3. . . 69

5.11 Decomposition of G into B0, . . . , Bn. . . 70

5.12 Positive resolution over graph decomposition. (CARBONE, 1999) . . . 70

5.13 Decomposition of N-Graphs . . . 71

(16)

B.1 Proof-structure. . . 80 B.2 Proof-structures . . . 80 B.3 D-R graphs . . . 80 B.4 IMLL rules. . . 81 D.1 Permutative reductions . . . 84 D.2 Permutative reductions . . . 84 D.3 Permutative reductions . . . 85 D.4 Permutative reductions . . . 85 D.5 Permutative reductions . . . 86 D.6 Switchable reductions . . . 86 D.7 Switchable reductions . . . 86

(17)

1 Introduction 12

1.1 Outline . . . 13

2 N-Graphs revised 15 2.1 Proof-graphs . . . 15

2.2 Meta-edge and the scope of the hypothesis . . . 18

2.3 N-Graphs . . . 18

2.4 Completeness . . . 19

2.5 Sequentization . . . 20

2.6 Conclusion . . . 30

3 Linear time proof verification 31 3.1 Solutions for proof-nets . . . 31

3.2 N-Graphs cycles . . . 35

3.2.1 Connectivity . . . 37

3.3 The algorithm . . . 37

3.4 Complexity . . . 43

3.5 Conclusion . . . 43

4 Normalization of N-Graphs via sub-N-Graphs 45 4.1 Normalization for Natural Deduction . . . 45

4.2 Normalization for Multiple Conclusion Calculi . . . 47

4.3 Flow graphs and duplication . . . 50

4.4 Normalization for N-Graphs . . . 52

4.4.1 β reductions . . . 52

4.4.2 Permutative weakening reductions . . . 53

4.4.3 Permutative switchable reductions . . . 54

4.4.4 Normalization . . . 56

4.5 Conclusion . . . 60

5 Towards a combinatorial model for N-Graphs normalization 62 5.1 Cut-elimination and proof evolution . . . 62

5.2 Properties of duplication . . . 63

5.3 Lower and Upper bounds to duplication . . . 64

5.4 Formal proofs and duplication . . . 68

5.5 Conclusion . . . 69

6 Conclusion 72

References 74

A Sequent calculus 77

(18)

9

B Proof-nets 79

B.1 Essential nets . . . 81

C Graph theory and algorithms 82

C.1 DFS . . . 82 C.2 Disjoint set union-find . . . 83

(19)

1

Introduction

Whenever one is concerned with the study of proofs from a geometric perspective one can hardly overestimate the pioneering work of Statman in his doctoral thesis Structural Complexity of Proofs (STATMAN, 1974). Drawing on Statman’s legacy, for the last three decades at least two research programmes have approached the study of structural properties of formal proofs from a geometric perspective: (i) the notion of proof-net, given by GIRARD (1987) in the context of linear logic; and (ii) the notion of logical flow graph given by BUSS (1991) and used as a tool for studying the exponential blow up of proof sizes caused by the cut-elimination process, in this case giving rise to a programme (1996–2000) proposed by Carbone in collaboration with Semmes (CARBONE, 1997). Statman’s geometric perspective has given an important legacy, namely the idea of extracting structural properties of proofs in natural deduction (ND) using appropriate geometric tools and intuitions. The lack of symmetry in ND presents a challenge for such a kind of study. Of course, the obvious alternative is to look at multiple-conclusion calculi. One can find in the literature different approaches involving such calculi, such as, for example, Kneale’s tables of development (KNEALE, 1957) (studied in depth by Shoesmith & Smiley (SHOESMITH; SMILEY, 1978)) and Ungar’s multiple-conclusion ND (UNGAR, 1992). But then a great challenge remained: normal forms and the normalization procedure. The system of N-Graphs, a multiple conclusion ND developed in the early 2000’s by OLIVEIRA (2001); OLIVEIRA; QUEIROZ (2003) out of a combination of the techniques developed in the two aforementioned research programmes, has revealed itself as a rather appropriate framework in which to formulate and explore techniques for normalizing ND proofs in the form of directed graphs.

Since first introduced in 2001, N-Graphs presented a suitable way to adopt geometrical properties from proof-nets and logical flow graphs and present those results for propositional classical logic and directly on the proof itself. First we have the global soundness criterion for the fragment with∧, ∨, ¬, that is defined with Danos & Regnier’s criterion for proof-nets (DANOS; REGNIER, 1989). In a later development, with the work of CARVALHO (2013), another important concept was adapted with a new and elegant proof of soundness for the same fragment of the system: sub-N-Graphs and empires, concepts that come also from proof-nets.

However, since the first presentation of the full N-Graphs system, the → connective received no further attention. The new sequentization proof does not cover the meta-condition, and the definition of intuitionistic N-Graphs makes use of such concepts by simply extending the original proofs (QUISPE-CRUZ et al., 2014). This work started with a deep study of those definitions, trying to extend the verification algorithm defined in (ANDRADE; CARVALHO et al., 2013) to validate the meta-condition. Some problems emerged with counter-examples found for both the original algorithm and also for the N-Graphs’ meta-condition. Soon after, we achieved our initial results: the definition of a new meta-condition for N-Graphs, along with the extension of Carvalho’s work with sub-N-Graphs and empires to define a new soundness (sequentization) proof for the full system with the new criterion.

(20)

1.1. OUTLINE 13

One big difference of our proposed criterion is that it no longer validates a subgraph of the proof as an adaptation of the semantics of the→rule from natural deduction. Now we have a global condition that delegates the semantic of the meta-edge (i.e. the discard of hypothesis) to the geometry of the link. We achieved this by converting the original link into one that better represents the dependencies this rule is carrying, thus leaving the symmetry of N-Graphs intact and creating a condition that is fully compatible with the geometrical one applied to the fragment with∧, ∨, ¬.

The verification algorithm was also fixed to cover the missing cases and also extended to verify all N-Graphs, validating the new meta-condition and still keeping its linear time complexity on the number of vertices. The relation with proof-nets’ solutions from MURAWSKI; ONG (2000) and GUERRINI (1999) relies on the algorithm complexity only, as our approach is completely different from the cited ones. We gain in simplicity, as our algorithm does not need nor constructs extra data structures and only validates the raw undirected graph underneath the directed and labeled proof-graph (as the criterion does itself), but we lose something both algorithm for proof-nets present: a sequentization procedure that can be built directly from the validation algorithm. We believe our algorithm can be combined to the sequentization procedure for N-Graphs presented here to generate a sequential validation, somewhat like Guerrini did later for his original algorithm in (GUERRINI, 2011) (originally, only Murawski’s procedure offered a sequentization), but we leave this investigation as future work.

Following our combinatorial take on N-Graphs, we revisited the normalization of the system presented by ALVES (2009). His approach was already graph-theoretical, with a set of reductions and an algorithm for cycle handling. We took his work under the lens of sub-N-Graphs, and present here a new normalization that uses a modified version of Alves’ original beta and permutative reductions (ALVES, 2009) combined with a “duplication” operation on sub-N-Graphs to handle switchable links. With this solution we found a deep connection with Carbone’s research project on the blow-up of proof-size after cut elimination in sequent calculus proofs. As we noticed, our duplication was actually an adaptation of a combinatorial operation she defined in (CARBONE, 1999) for optical graphs extracted from sequent calculus’ formula occurrences. Following that line of research, our normalization procedure defined as a set of operations on graphs can offer a framework for future combinatorial studies on the proof growth during normalization. The procedure we present here also works as an extension of the normalization defined by Prawitz, i.e. it enjoys the separation and subformula properties, but can also bring results from sequent calculus into a ND system.

1.1

Outline

In Chapter 2 we present the N-Graphs, with its original definitions along side the revision of the meta-condition, the new soundness criterion and its proof. The original completeness proof is presented and the sequentization proof given by CARVALHO; ANDRADE et al. (2014) is extended to cover the full system.

The next chapter covers the new proof verification algorithm, along with the counter-example found for the original one and elaboration on how the fixed version covers all cases. It is no longer presented as a solution for a fragment of the N-Graphs, but for the entire system as it was defined in Chapter 2.

Chapter 4 is about normalization, with a brief overview of normalization for natural deduction and multiple conclusion proof systems. Our new procedure is presented with some properties of normal N-Graphs like separation and subformula.

(21)

In chapter 5 we discuss how this new normalization procedure can be used to define a combinatorial model for the proof growth in N-Graphs, comparing the results from chapter 4 with the study developed by Carbone for the duplication operation on optical graphs, a generalization of logical flow graphs defined by BUSS (1991).

(22)

15 15 15

2

N-Graphs revised

N-Graphs are a multiple conclusion proof system for classical logic where proofs are built in the form of directed graphs (“digraphs”) (OLIVEIRA, 2001; OLIVEIRA; QUEIROZ, 2003). It is a symmetric natural deduction with the presence of some structural rules, in the style of sequent calculus. The system was inspired by the rules of Gentzen’s natural deduction and sequent calculus, but it also incorporates ideas from several developments on multiple conclusion proof systems. The derivations are based on symmetric natural deduction systems defined by KNEALE (1957) and UNGAR (1992). The implication connective (“→”) is handled by a special edge that captures the concept of the discharge of assumptions, similarly to Statman’s approach (STATMAN, 1974). Furthermore, it adopts the notion of optical graphs from CARBONE (1999) and embodies the geometrical techniques coming from the theory of proof nets (GIRARD, 1987) to define its soundness criterion.

Since it was proposed by de Oliveira in 2001, several studies have been developed on the subject. Alves’ work on the geometric perspective and cycle treatment towards the normalization of the system (ALVES, 2005) culminated with the first normalization theorem and algorithm for N-Graphs (ALVES; OLIVEIRA; QUEIROZ, 2011), along with the subformula and separation properties (ALVES, 2009). Quispe-Cruz presented a study on the definition of intuitionistic N-Graphs in her masters dissertation (QUISPE-CRUZ, 2009), and recently presented an intuitionistic version of the calculus in (QUISPE-CRUZ et al., 2014). More recently a revision of the sequentization proof presented originally in 2001 was designed by CARVALHO (2013); CARVALHO; ANDRADE et al. (2014), restricted to the fragment without the meta-egde. In his proof, the new concept of sub-N-Graphs were introduced, extending previous sequentization procedures defined for proof nets in order to handle switchable defocussing links (expansions).

With the development of a proof-checking algorithm for N-Graphs (ANDRADE; CAR-VALHO et al., 2013), some problems were found with the meta-edge and the soundness criterion defined for them (the condition). An incorrect proof-graph was found for which the meta-condition was still satisfied. This chapter aims to present a revised version of N-Graphs, with a different correctness criterion for the meta-condition. We propose an extension of Carvalho’s sequentization proof to handle meta-edges, including a few adaptations on the sequentization procedure. These extensions where submitted to the journal Information and Computation in (CARVALHO; ANDRADE et al., 2015).

2.1

Proof-graphs

Proofs are represented by digraphs. The vertices are labeled with formula-occurrences and some receive special names (OLIVEIRA, 2001):

(23)

1. A branch point in a digraph is a vertex with at least three edges attached to it.

2. A focussing (defocussing) branch point is a vertex in a digraph with two edges oriented towards (resp. away from) it.

Proof-graphsare constructed from a set of basic links, shown in Fig. 2.1:

Definition 2.2 (link classification).

1. A focussing link is a set {(u1, v), (u2, v)} in a digraph in which v is a focussing branch point. The vertices u1and u2are called premises of the link and v is the conclusion.

2. A defocussing link is a set {(u, v1), (u, v2)} in a digraph in which u is a defocussing branch point. The vertices v1and v2are called conclusions of the link and u is called premise.

3. A simple link is an edge (u, v) in a digraph which neither belongs to focussing nor to a defocussing link. Vertex u is called premise of the link and v is called conclusion.

Definition 2.3 (proof-graph(OLIVEIRA, 2001)). A proof-graph is a connected digraph defined as follows:

1. each vertex is labeled with a formula-occurrence;

2. there are two kinds of edges (“solid” and “meta”) and the second one are labeled with an “m”((u, v)m);

3. there are three kinds of links (simple, focussing and defocussing), divided into logic and structuralones; (Fig. 2.1)

4. each vertex is labeled with a conclusion of at most one link and is a premise of at most one link.

We define as N-Graphs the proof-graphs that represent valid proofs. The focussing and defocussing links may also be classified according to their semantic:

1. The links∧ − I,⊥ − link,→ −E,> − f ocussing weakand expansion are called con-junctive.

2. The links∨ − E,> − link,⊥ − de f ocussing weakand contraction are called disjunctive.

Other relevant concepts for a given proof-graph G:

1. the solid indegree (outdegree) of a vertex v is the number of solid edges oriented towards (away from) it. The meta indegree and outdegree are defined analogously;

2. the set of vertices with indegree equal to zero is the set of premises of G (PREMISS(G));

3. the set of vertices with outdegree equal to zero is the set of conclusions of G (CONC(G));

4. the set of vertices with solid indegree equal to zero and meta indegree equal to one is the set of canceled hypothesis of G (HY POT(G)).

(24)

2.1. PROOF-GRAPHS 17

Figure 2.1: N-Graphs links.

The rule of→ −I has a meta-edge that represents the discard of an hypothesis by the introduction of the→. A logical link represents the introduction and elimination of logical operators (> − link acts as the law of the excluded middle). A structural link expresses the application of a structural rule as it is done into sequent calculus: it enables weakening (> − f ocussing weak,⊥−de f ocussing weak,>−simple weakand⊥−simple weak), duplicating premises (expansion link) and grouping conclusions in equivalence classes (contraction link). The axioms are represented by proof-graphs with one vertex and no edges. Then, a single node labeled byA

is already a valid derivation: it represents an axiom in sequent calculus (A` A).

Following the methodology of proof-nets, a soundness criterion was defined in order to identify the N-Graphs among all possible proof-graphs. The soundness and completeness proofs given by de Oliveira represent a mapping between N-Graphs and sequent calculus for classical logic (LK, as defined by GENTZEN (1935)) and vice versa. Similar to Danos-Regnier criterion (DANOS; REGNIER, 1989), we define the following subgraphs associated to a proof-graph:

Definition 2.4 (Switching (OLIVEIRA, 2001)). Given a proof-graph G, a switching graph S(G) associated with G is a spanning subgraph1of G in which the following edges are removed: one of the two edges of every expansion link, one of the two edges of every contraction link and all meta-edges.

Definition 2.5 (Meta-condition (OLIVEIRA, 2001)). A switching expansion Se(G) associated with G is a spanning subgraph of G in which one of the two edges of every expansion link and all meta-edges are removed. We say that the meta-condition holds for G iff for every meta-edge (u, v)mof a defocussing link→ −I{(u, w), (u, v)m} in G, there is a path or semipath2from v to

1A spanning subgraph is a subgraph G

1of G containing all the vertices of G. 2A path v

(25)

uwithout passing through (u, w) in every switching expansion Se(G) and the solid indegree of v is equal to zero.

Definition 2.6 (N-Graph derivation (OLIVEIRA, 2001)). A proof-graph G is a N-Graph deriva-tion(or N-Graph for short) iff every switching graph associated with G is acyclic and connected and the meta-condition holds for G.

The focussing and defocussing links may also be classified according to their semantics. The links ∧ − I, ⊥ − link, → −E, > − f ocussing weak and expansion are conjunctive, and the disjunctivelinks are:∨ − E,> − link,⊥ − de f ocussing weakand contraction. Here the switchable links (the ones that have one of its edge removed in every switching) may be described as links where its geometry contradicts its semantics. The rule of contraction is both focussing and disjunctive, and the rule of expansion is conjunctive and also defocussing. This means the premisses (conclusion) the contraction (expansion) connects in a proof-graph must be already connected some other way in order to keep the proof sound.

2.2

Meta-edge and the scope of the hypothesis

The rule of→ −I is neither conjunctive nor disjunctive. This reveals something very important about the nature of this link: the semantic connection among its premise, conclusion and hypothesis (B, A→ B and A, respectively) is more delicate than what is represented by the geometry of the link. The connection between the nodes linked through the meta-edge is symbolic and serve as a shortcut from the hypothesis to the last point in the proof where it is needed. This means that there must be a deduction from the hypothesis to the premise, i.e., these two nodes must be connected some other way in the proof-graph. The semantic connection between the conclusion and the hypothesis, although not explicit in the graph geometry, is very important with regards to the link’s validity. The only way the conclusion may discharge the hypothesis is if the hypothesis is used in the premise’s deduction and no longer after the conclusion is drawn. In other words, the only way the conclusion may reach the hypothesis in the proof-graph is through the premise.

In the original work of de Oliveira, the correct application of a meta-edge was defined by the meta-condition. Some examples have been found that show that this condition is not strong enough to hold the soundness of a meta-edge with regards to contractions and other meta-edges that may appear in the proof. The original criterion considered the proof-graphs in Fig. 2.2 as an N-Graph, but there is no derivation for A∨ B ` D ∧ (C → A), (D → B) ∧ C. This happens because one meta-edge is affecting the connectivity between the vertices of the other in a way the meta-condition does not validate. The condition needs to be global, similarly to the one proposed to handle the cycles defined by contraction and expansion links. In order to achieve that, a new kind of switching is here presented along with a new soundness criterion to N-Graphs.

2.3

N-Graphs

Definition 2.7 (Meta-switching, virtual edge). Given a proof-graph G, a meta-switching graph S(G) associated with G is a switching of G in which every link with meta-edge {(u, w), (u, v)m} is replaced by one of the following edges: the one from u to w or an edge from w to v, which is defined as virtual edge.

edge for 1 ≤ i < n. A semipath in a digraph is a alternating sequence of distinct vertices and edges v0, e1, v1, . . . , en, vn

(26)

2.4. COMPLETENESS 19

Figure 2.2: Example where the meta-condition fails.

Definition 2.8 (N-Graph derivation revised). A proof-graph G is a N-Graph derivation (or N-Graphfor short) iff every meta-switching graph associated with G is acyclic and connected.

The soundness criterion validates the two semantic relations discussed before, in a global analysis of the proof. The first one, with regards to switchable links (that need to connect two already connected nodes), is checked in a straightforward way. The second one is about the→ −I

link, and this new criterion validates if the link’s premise and hypothesis are already connected in the proof and if they are both properly separated from its conclusion. Coming back to the unsound proof-graph from Fig. 2.2 we can see how it fails to comply to the new criterion in Fig. 2.3.

Figure 2.3: Example where the meta-switching finds the proof-graph from Fig. 2.2 unsound.

Following we present the modified proof sequentization to show this new criterion is correct.

2.4

Completeness

The completeness of N-Graphs was proved by de Oliveira with a mapping from sequents to N-Graphs.

Theorem 2.1 (Map to N-Graph (OLIVEIRA, 2001)). Given a derivation Π of A1, . . . , An ` B1, . . . , Bm in the classical sequent calculus, it is possible to build a corresponding N-Graph

(27)

NG(Π) whose elements of PREMIS(NG(Π)) and CONC(NG(Π)) are in one-to-one correspon-dence with the occurrences of formulae A1, . . . , Anand B1, . . . , Bmrespectively.

The proof is by induction over the structure of the derivation Π. The occurrences of vertices > as premises and ⊥ as conclusions are omitted from the sequent, without loss of generality. The base case is defined for axioms links as we did before, creating an N-Graph with one node only, and the induction step is defined for every sequent rule as described in Table 2.1.

2.5

Sequentization

Here we will present only the second sequentization proof given by CARVALHO (2013) in his masters. It was inspired by the ones developed by GIRARD (1987) and BELLIN; WIELE (1995), applying the concept of trips and subnets to N-Graphs. The so-called sub-N-Graphs were used to define a new sequentization procedure for N-Graphs with no implication. Here we extend the original proof to handle the full system with meta-edges, applying the revised soundness criterion.

Definition 2.9 (sub-N-Graph (CARVALHO, 2013)). We say thatH is a subproof-graph of a proof-graphGifH is a subgraph ofGandH is a proof-graph. If a vertexvlabeled by a formula occurrenceAis such thatv∈ PREMIS(H)(v∈ CONC(H)), thenAis an upper (lower) door ofH. IfH is also an N-Graph, then it is a sub-N-Graph.

Definition 2.10 (North, south and whole empires (CARVALHO, 2013)). LetAbe a formula occurrence in an N-GraphN. The north (south) empire ofA, represented byeA∧ (eA∨) is the largest sub-N-Graph ofN havingAas a lower (upper) door. The whole empire ofA(wA) is the union ofeA∧andeA∨.

Figure 2.4: Example of a sub-N-Graph with doors highlighted in red.

In Fig 2.4 we can see an example of a sub-N-Graph with its lower and upper doors highlighted in red. In Fig 2.5 we have an N-Graphs with the north and south empires for formula

A, and in Fig. 2.6 we have an example with meta-edges. LetN1andN2be sub-N-Graphs of an N-GraphN. Carvalho also proved the following lemmas for sub-N-Graphs:

(28)

2.5. SEQUENTIZATION 21

Rule Sequent calculus derivation N-Graph derivation

¬ − le f t Π1 Γ ` B, ∆ Γ, ¬B ` ∆ ¬ − right Π1 Γ, A ` ∆ Γ ` ¬A, ∆ ∧ − le f t Π1 Γ, A ` ∆ Γ, A ∧ B ` ∆ Π1 Γ, B ` ∆ Γ, A ∧ B ` ∆ ∧ − right Π1 Γ1` A, ∆1 Π2 Γ2` B, ∆2 Γ1, Γ2` A ∧ B, ∆1, ∆2 ∨ − le f t Π1 Γ1, A ` ∆1 Π2 Γ2, B ` ∆2 Γ1, Γ2, A ∨ B ` ∆1, ∆2 ∨ − right Π1 Γ ` A, ∆ Γ ` A ∨ B, ∆ Π1 Γ ` B, ∆ Γ ` A ∨ B, ∆

(29)

Rule Sequent calculus derivation N-Graph derivation → −le f t Π1 Γ1` A, ∆1 Π2 Γ2, B ` ∆2 Γ1, Γ2, A → B ` ∆1, ∆2 → −right Π1 Γ, A ` B, ∆ Γ ` A → B, ∆ le f t thinning Π1 Γ, Ai` ∆ Γ, Ai, A ` ∆ right thinning Π1 Γ ` Bi, ∆ Γ ` B, Bi, ∆

(30)

2.5. SEQUENTIZATION 23

Rule Sequent calculus derivation N-Graph derivation

le f t contraction Π1 Γ, A, A ` ∆ Γ, A ` ∆ right contraction Π1 Γ ` B, B, ∆ Γ ` B, ∆

Figure 2.5: Example of north (red and green) and south (red and yellow) empires of the formula A.

1. N1∪ N2 is an N-Graph iffN1∩ N26= /0.

2. IfN1∩ N26= /0, thenN1∩ N2is an N-Graph.

As we extended the empires to cover meta-edges, here we present the new proofs for construction and existence of such sub-N-Graphs.

Definition 2.11 (S∧(N, A)andS∨(N, A)). LetAbe a formula occurrence in an N-GraphN andS an associated meta-switching ofN. IfAis a premise of a link with a conclusionA0and the edge

(A, A0)belongs toS(N), then remove this edge andS∧(N, A)is the component that containsAand

S∧(N, A)is the other one (ifAis premise of a disjunctive defocussing link different from→ −I, thenS∧(N, A)has two components). IfAis not premise of any link inS(N), thenS∧(N, A)isS(N)

(S∧(N, A)is empty).S∨(N, A)is defined analogously: ifAis a conclusion of a link with a premise

A00and the edge(A00, A)belongs toS(N), then remove it andS∨(N, A)is the component which has

AandS∨(N, A)is the other one (ifAis conclusion of a conjunctive focussing link, thenS∨(N, A) has two components). IfAis not conclusion of any link inS(N), thenS∨(N, A)is equal toS(N) (S∨(N, A)is empty).

(31)

Figure 2.6: Example of north (red and green) and south (red and yellow) empires of the formula ⊥.

As the virtual edge added in some meta-switchings connects two conclusions of the

→ −I link, we consider the main conclusion of the link(A → B)as the conclusion of this virtual edge for the purpose of deciding if we must remove the edge to constructS∧(N, A)orS∨(N, A). Definition 2.12 (Principal meta-switching (GIRARD, 1987, 1990)). LetAbe a formula occur-rence. We say that a meta-switchingS∧p (S∨p) is principal foreA∧(eA∨) when it chooses the edges satisfying the following restrictions:

1. Ap1 Ap2

Ac is a contraction link and a premiseApi is the formula occurrenceA( Ap

Ac1 Ac2 is an expansion link and a conclusionAci is the formula occurrence A): the meta-switching chooses the edge withA.

2. Xp1 Xp2

Xc is a contraction link and only one premise Xpi 6= A belongs to eA

(eA∨): the

meta-switching links the conclusion with the premise which is not ineA∧ (eA∨). 3. Xp

Xc1 Xc2 is an expansion link and only one conclusionXci6= Abelongs toeA

(eA

∨):S∧p (S p ∨) selects the edge which has the conclusion that is not ineA∧(eA∨).

4. Y

X X→Y is a→ −I link and onlyX or onlyY belongs toeA∧(eA∨):S∧p (S

p

∨) selects the edge which connectsX → Y to the other formula that is not ineA∧(eA∨).

5. Y

X X→Y is a→ −Ilink andX orY is the formula occurrenceA: the meta-switching chooses

the edge withA.

Lemma 2.1. The north (south) empire ofAexists and is given by the two following equivalent conditions:

1. T

SS∧(N, A)(

T

SS∨(N, A)), whereSranges over all meta-switchings ofN;

2. the smallest set of formula occurrences ofNclosed under the following conditions: (a) A∈ eA∧ (A∈ eA∨);

(32)

2.5. SEQUENTIZATION 25

(b) if X

Y is a simple link andY ∈ eA

, then X ∈ eA(if Y 6= A and Y ∈ eA∨, then

X ∈ eA∨); (c) if X Y

Z is a conjunctive focussing link andZ∈ eA

, thenX,Y ∈ eA(ifZ6= Aand

Z∈ eA∨, thenX,Y ∈ eA∨);

(d) if X

Y Z is a disjunctive defocussing link different from → −I and Y ∈ eA

or

Z∈ eA∧, thenX∈ eA(ifY6= A 6= Z andY∈ eA

∨orZ∈ eA∨, thenX∈ eA∨);

(e) if Xp

Xc1 Xc2 is an expansion link andXc1, Xc2∈ eA

, thenX

p∈ eA∧ (ifXc1 6= A 6= Xc2 andXc1, Xc2 ∈ eA∨, thenXp∈ eA∨);

(f) if Xp1 Xp2

Xc is a contraction link andXc∈ eA

, thenX

p1, Xp2 ∈ eA

(ifX

c6= Aand

Xc∈ eA∨, thenXp1, Xp2∈ eA∨);

(g) if X X→YY is a→ −I link and X → Y ∈ eA∧, thenY, X ∈ eA(ifX → Y 6= Aand

X → Y ∈ eA∨, thenY, X ∈ eA∨); (h) if X

Y is a simple link,X6= AandX∈ eA

, thenY ∈ eA(ifX∈ eA∨, thenY∈ eA∨); (i) if X Y

Z is a conjunctive focussing link,X6= A 6= Y andX∈ eA

orY ∈ eA, then

Z∈ eA∧(ifX ∈ eA∨ orY ∈ eA∨, thenZ∈ eA∨);

(j) if X

Y Z is a disjunctive defocussing link different from→ −I,X6= AandX∈ eA ∧, thenY, Z ∈ eA∧ (ifX∈ eA∨, thenY, Z ∈ eA∨);

(k) if Xp

Xc1 Xc2 is an expansion link, Xp 6= A and Xp ∈ eA

, then X

c1, Xc2 ∈ eA

(if

Xp∈ eA∨, thenXc1, Xc2 ∈ eA∨); (l) if Xp1Xp2

Xc is a contraction link,Xp16= A 6= Xp2 andXp1, Xp2∈ eA

, thenX

c∈ eA∧(if

Xp1, Xp2∈ eA∨, thenXc∈ eA∨); (m) if Y

X X→Y is a→ −Ilink,Y 6= A 6= X andX,Y ∈ eA

, thenX→ Y ∈ eA(ifX,Y ∈

eA∨, thenX→ Y ∈ eA∨).

Proof. We will prove the case foreA∧according to BELLIN; WIELE (1995) (the case foreA∨ is similar)

1. 2 ⊆1: we show that 1 is closed under conditions defining 2. It is immediate thatA∈

T

SS∧(N, A)(S∧(N, A)containsAfor every meta-switchingS). IfB1∈

T

SS∧(N, A)and in all meta-switchings there is an edge(B1, B2), then we concludeB2∈TSS∧(N, A)(imperialistic lemma (GIRARD, 1990)). So the construction is also closed under conditions 2b, 2c, 2d, 2h, 2i and 2j. Conditions 2e, 2l and 2m are also simple. Now suppose that 1 does not respect 2f. Then there is a contraction link Xp1Xp2

Xc such that Xc∈

T

SS∧(N, A), but

Xpi6∈

T

SS∧(N, A), fori= 1ori= 2. Consider the first one:Xp16∈ S

(N, A)for someS. Since

Xc∈ S∧(N, A), then(Xp2, Xp) ∈ S(N, A)and soXp2∈ S

(N, A). OnceS(N, A)is not empty,A must be premise of a link whose one conclusion isA0andA0∈ S∧(N, A). Let

π be the path

betweenXp1 andA

0 inS(N, A). Since(X

p1, Xc) 6∈ S(N), this edge does not belong toπ (Fig. 2.7). Consider now a switchS0 likeS, except that(Xp1, Xc) ∈ S

0(N). Note that

π is inS0(N)

too andXc∈ S0∧(N, A)(becauseXc∈TSS∧(N, A)). Then we may extendπ and get a path betweenA0andAwithout the edge(A, A0)inS0(N): we obtain a cycle inS0(N), which is a contradiction. Therefore 1 is closed under 2f. For similar reason, we conclude that 1 is closed under 2k and 2g too.

2. 1⊆2: letS∧p be a principal meta-switching foreA∧. We will proveS∧p(N, A) ⊆2. S∧p(N, A)∩

26= /0, because both containA. But definition 2.12 ensures that it is impossible to leaveeA∧

once we are inS∧p(N, A). SinceT

SS∧(N, A) ⊆ S∧p(N, A), we conclude that

T

(33)

Figure 2.7: If we choose the edge (Xp1, Xc), we get a cycle.

Corollary 2.1. S∧p = eA∧andSp= eA∨.

Corollary 2.2. LetAbe a premise3andBa conclusion. TheneA∨= eB∧= N.

Lemma 2.2. eA∧andeA∨ are the largest sub-N-Graphs which containAas a lower and upper door, respectively.

Proof. The proof uses the same argument presented by BELLIN; WIELE (1995) (see Proposition 2).

Lemma 2.3 (Nesting of empires I (GIRARD, 1990)). LetAandBbe distinct formula occurrences in an N-Graph. IfA∈ eB∧andB6∈ eA, theneA

( eB∧.

Lemma 2.4 (Nesting of empires II (GIRARD, 1990)). LetAandBbe distinct formula occur-rences in an N-Graph. IfA6∈ eB∧andB6∈ eA∧, theneA∧∩ eB∧= /0.

Proof of lemmas 2.3 and 2.4. Construct a principal meta-switching S∧p for eB∧ with some additional details:

1. contraction link whose conclusion belongs toeB∧: if the conclusion is not ineA∧, then we proceed as we do for a principal meta-switching foreA∧(if only one premise is ineA∧, choose the other premise);

2. expansion link whose premise belongs toeB∧: if the premise is not ineA∧, then we proceed as we do for a principal meta-switching foreA∧ (if only one conclusion is ineA∧, choose the other conclusion);

3. → −I link whose main conclusion belongs toeB∧: if the main conclusion is not ineA∧, then we proceed as we do for a principal meta-switching foreA∧(if only the premise or only the canceled hypothesis is ineA∧, choose the formula which is not ineA∧);

4. ifAis a premise of a link whose conclusionA0is ineB∧: then we choose the edge(A, A0). 3Note that it is not valid ifAis a canceled hypothesis.

(34)

2.5. SEQUENTIZATION 27

First supposeA∈ eB∧. We try to go fromAtoBwithout passing through(A, A0). SinceS∧ p is principal foreB∧andA∈ eB∧, all formulas in the path fromAtoBbelong toeB∧. ButB6∈ eA∧

and sometime we leaveeA∧. By construction 2 of lemma 2.1, there are only three ways of leaving

eA∧without passing through(A, A0): passing through a contraction link whose only one premise belongs toeA∧, or passing through an expansion link whose only one conclusion belongs toeA∧, or passing through a→ −Ilink whose only the premise or the canceled hypothesis is ineA∧; but, steps 1, 2 and 3 avoid this cases, respectively.

Therefore it is impossible to leaveeA∧ inS∧p(N, B), unless(A, A0) ∈ S∧p(N, B). This implies

S∧p(N, A) ( S∧p(N, B). SinceeA∧⊂ S∧p(N, A)andeB∧= S∧p(N, B), we concludeeA∧( eB∧.

Now suppose A6∈ eB∧. 1, 2 and 3 ensure we do not have any edges between eA∧ and eA∧4 in eB∧, except perhaps for (A, A0). But nowA6∈ eB∧ and therefore A6∈ S∧p(N, B). So

(A, A0) 6∈ S∧p(N, B). Since eB∧= S∧p and B6∈ eA∧, no formula of eA∧ belongs to eB∧ and thus

eA∧∩ eB∧= /0.

From these two previous lemmas we have nesting lemmas 2.5 and 2.6 for south empires too (the proofs are similar to the previous ones) and from these four nesting lemmas, it is possible to prove nesting lemmas between north and south (2.7, 2.8 and 2.9).

Lemma 2.5 (Nesting of empires III (GIRARD, 1990)). LetAandBbe distinct formula occur-rences in an N-Graph. IfA∈ eB∨ andB6∈ eA∨, theneA∨( eB∨.

Lemma 2.6 (Nesting of empires IV (GIRARD, 1990)). LetAandBbe distinct formula occur-rences in an N-Graph. IfA6∈ eB∨ andB6∈ eA∨, theneA∨∩ eB∨= /0.

Lemma 2.7 (Nesting of empires V). LetAandBbe distinct formula occurrences in an N-Graph. IfA∈ eB∧andB6∈ eA∨, theneA

∨( eB∧.

Lemma 2.8 (Nesting of empires VI). LetAandBbe distinct formula occurrences in an N-Graph. IfA∈ eB∨andB6∈ eA∧, theneA∧( eB∨.

Lemma 2.9 (Nesting of empires VII). LetAandBbe distinct formula occurrences in an N-Graph. IfA6∈ eB∧andB6∈ eA∨, theneA

∨∩ eB∧= /0.

The whole empire ofAwas defined by Carvalho as the union of the north and the south empires ofA. All nesting properties were also extended and proved for the whole empires. This sub-N-Graph is fundamental for the sequentization proof, once it provides the following ordering on formula occurrences in a proof graph:

Definition 2.13 (). LetAandBbe formula occurrences ofN. We sayA BiffwA ( wB. It is immediate thatis a strict ordering of formula occurrences of N which are not premises neither conclusions, since we have for any domain setX and any subsetQof℘(X )5, (⊆, Q)is a poset. Maximal formulas with regard towill splitN. Given that the whole empires of premises and conclusions are always equal toN by Corollary 2.2, we are not interested in these formulas. So they are not in the domain of. One may easily verify that if there are no contraction, extension and→ −Ilinks, for all formulaAofN,wA= N and so any formula would be maximal. The next two following lemmas presented and proved by Carvalho show how

acts with regards to contraction and expansion links. We add here a third lemma to extend this property to→ −I.

4eArepresents the set of all formula occurrences which are not ineA∧ 5

(35)

Lemma 2.10. Letl=...X ......Y ... be a link different from→ −Isuch that there is a formula-occurrence

AwhichX∈ wAandY 6∈ wA. ThenA Y.

Lemma 2.11. Letl=...X ......Y ... be a link different from→ −Isuch that there is a formula-occurrence

AwhichX6∈ wAandY ∈ wA. ThenA X.

Lemma 2.12. Let l= X X→YY be a→ −I link such that there is a formula occurrenceA which

Y ∈ wAorX ∈ wA, but(X → Y ) 6∈ wA. ThenA (X → Y ).

Proof. Let us assume, without loss of generality, thatX ∈ eA∧∪ eA∨. We then have two cases. If X ∈ eA∧, then sinceX → Y 6∈ eA∧,Y does not belong to eA∧ (construction 2 in lemma 2.1). Therefore X ∈ eY∧ (by 2g in lemma 2.1). So eA∧∩ eY∧6= /0. If A6∈ eY∧, then we will have

eA∧∩ eY∧= /0 (by lemma 2.4): a contradiction. Thus A∈ eYand, by the nesting of whole empires, we concludewA ( wY. The case forX∈ eA∨is analogous, as it is forY ∈ eA∧∪ eA∨.

With all those concepts we are now able to present the sequentization theorem. This proof follows the one Carvalho developed, with the addition of the meta-switching for handling meta-egdes. Fig. 2.8 illustrates how the proof graph can be cut using the maximal node. Without loss of generality, we assume>asA∨ ¬Aand⊥asA∧ ¬A, where the formulaAbelongs to the premise or conclusion of the link.

Figure 2.8: Example of how to cut a proof using the maximal node.

Theorem 2.2 (Sequentization). Given an N-Graph derivation N, there is a sequent calculus derivationSC(N)ofA1, . . . , An` B1, . . . , Bmin the classical sequent calculus whose occurrences of formulas A1, . . . , An and B1, . . . , Bm are in one-to-one correspondence with the elements of

PREMIS(N)andCONC(N), respectively.

Proof. We proceed by induction on the number of links ofN.

1. Ndoes not have any link (it has only one vertexvlabelled withA): this case is immediate.

(36)

2.5. SEQUENTIZATION 29

2. Nhas only one link: sinceNis an N-Graph, then this link is not a contraction, an expansion, neither a→ −I. This case is simple, once there is a simple mapping between links and sequent calculus rules, which makes the construction ofSC(N)immediate (completeness proof (OLIVEIRA, 2001; OLIVEIRA; QUEIROZ, 2003)). For example, in case∧ − I:

A` A B` B A, B ` A ∧ B ∧ −R

3. Nhas an initial expansion link (the premise of the link is a premise ofN): the induction hypothesis has built a derivationΠending withA, A, . . . , An` B1, . . . , Bm. ThenSC(N)is achieved by left contraction:

Π

A, A, . . . , An` B1, . . . , Bm A, . . . , An` B1, . . . , Bm LC

4. N has a final contraction link (the conclusion of the link is a conclusion ofN): here the induction hypothesis has built a derivationΠending withA1, . . . , An` B, B, . . . , Bm. Hence

SC(N)is obtained by right contraction:

Π

A1, . . . , An` B, B, . . . , Bm A1, . . . , An` B, . . . , Bm

RC

5. N has a final → −I link (the main conclusion of the link is a conclusion of N): here the induction hypothesis has built a derivationΠending withA1, . . . , An, A ` B, B1, . . . , Bm. HenceSC(N)is obtained by→ −R:

Π

A1, . . . , An, A ` B, B1, . . . , Bm A1, . . . , An` A → B, B1, . . . , Bm

→ −R

6. Nhas more than one link, but no initial expansion link, no final contraction link and no final→ −Ilink: this case is more complicated and is similar to that one in MLL−in which all terminal links are⊗. Yet here we have an additional challenge: the split node is in the middle of the proof. Choose a formula occurrenceAwhich is maximal with respect to. We claim thatwA= eA∧∪ eA∨= N. That is,Alabels the split node.

Suppose not. Then letZbe a formula occurrence such thatZ∈ N − (eA∧∪ eA

∨)andS∧p be a principal meta-switching foreA∧. Given thatZ6∈ eA∧, the pathρ fromAtoZ inS∧p(N) passes through a conclusionA0ofA. LetA∨be the last node which belongs toeA∨inρand W the next one inρ (i.e.W6∈ eA∨). There are two cases for the edge incident toA∨ andW:

(a) (A∨,W )belongs to a contraction link whose other premise is not ineA∨: ac-cording to lemma 2.10 we have A W, contradicting the maximality of A

in.

(b) (W, A∨)belongs to an expansion link whose other conclusion is not ineA∨: we apply lemma 2.11 and conclude A W here too. We contradict our choice again.

(c) (A∨,W ) belongs to a → −I whose W is the main conclusion and the other formula is not ineA∨: we use lemma 2.12 and also getA W.

(37)

Thus wA= N. Let Γ1, Γ2, ∆1, ∆2 be sets of formula occurrences such that: Γ1∪ Γ2 =

{A1, . . . , An},∆1∪ ∆2= {B1, . . . , Bm}andΓ1∩ Γ2= ∆1∩ ∆2= /0. SinceeA∧is an N-Graph and

Ais a lower door, the induction hypothesis builtSC(eA∧)ending withΓ1` ∆1, A. OnceeA∨ is an N-Graph andAis an upper door, the induction hypothesis madeSC(eA∨)ending with

A, Γ2` ∆2. SoSC(N)is achieved by cut rule: SC(eA∧) Γ1` ∆1, A SC(eA∨) A, Γ2` ∆2 Γ1, Γ2` ∆1, ∆2

2.6

Conclusion

In this chapter we presented the N-Graphs system as it stands after the recent works developed by CARVALHO; ANDRADE et al. (2014) on the sequentization proof, together with an analysis of the soundness criterion. This analysis led to the discovery of a problem with the original meta-condition, and we present an example on how its local validation of meta-edges can fail in a global context where this edges can overlap and hide invalid applications of the hypothesis discard.

The additions this chapter presents are a new soundness criterion for the meta-edge, created as a purely geometrical one. We present a new kind of switchable link, created from a defocussing link with a meta-edge by replacing it by a virtual edge that can better represent the semantic dependency between the vertices of the link. This modification on the graph structure for proof validation kept the system symmetric, as it was intended from its conception, and also fitted the switching criterion applied to all other links quite nicely.

We present in a concise way the original completeness proof together with a new sound-ness proof for the entire calculi. We did it by extending the sequentization proof presented by CARVALHO; ANDRADE et al. (2014) for a fragment of the system, to be applied to our new meta-switching. The following chapters work over this formulation of N-Graphs.

(38)

31 31 31

3

Linear time proof verification

We presented in (ANDRADE; CARVALHO et al., 2013) a linear time algorithm to validate proof-graphs without the meta-edge. It uses a DFS-like search (Depth First Search) to check the validity of the cycles in a proof-graph, and some properties from trees to check the connectivity of every switching. Since the soundness criterion in proof-graphs is analogous to Danos-Regnier’s procedure (DANOS; REGNIER, 1989), the algorithm can also be extended to check proofs in the multiplicative linear logic without units (MLL−) with linear time complexity.

During the development of this work and the study of the correctness criterion of N-Graphs, which led to the definition and proof of the new soundness criterion for the meta-edge, a problem was found also with the original algorithm that caused it to accept invalid proof-graphs.

This problem was solved and here we present a full verification algorithm that validates proof-graphs for propositional logic. The correctness of a proof graph depends only on its topology, i.e. the combinatorial (graph-theoretical) structure underneath the proof. The algorithm works only with this structure and the meta-switching, thus being still fully compatible with proof-nets and able to being extended to validate proofs inMLL−. Linear-time algorithms already exist for proof nets (GUERRINI, 1999; MURAWSKI; ONG, 2000; GUERRINI, 2011), but our approach still seems to be simpler than both.

For more information about algorithms and data structures cited here see Appendix C.

3.1

Solutions for proof-nets

Danos took the first step towards an efficient proof-net validation algorithm when he presented his correctness criterion, a work he developed together with Regnier (DANOS; REG-NIER, 1989). A direct application of this criterion requiresO(n 2n) operations, once there can be at most2n D-R graphsin a proof-net with n links, and the verification of each D-R graph costs n operations.

One year later, Danos described in his PhD thesis what he called contractibility, that is a set of shrinking rules for proof-structures (DANOS, 1990). He proved that proof-nets could be characterized by associated proof-structures (see Fig. 3.1) that contracted to a single point. The procedure is simple, and resumes to finding an available link to shrink and then removing it from the graph (see contraction rules in Fig. 3.1). The search for an available link is linear on the size of the graph and, as one link is removed in each step, the overall complexity of the procedure is quadratic.

Definition 3.1 (link (DANOS, 1990)). A link is pair

(39)

Figure 3.1: Danos’ contractibility: abstract proof structures for axiom, ℘-link and ⊗-link above and contraction rules bellow. (NAUROIS; MOGBIL, 2007)

whereα , β are disjoint sets of vertices andα ∪ β 6= /0. The links are divided in the kinds illustrated

in Fig. 3.2.

Definition 3.2 (proof structure (DANOS, 1990)). A proof structure G is a set of links

G= α1. β1; α2. β2; . . . ; αn. βn,

where: (i) every vertex in G is the conclusion of one link only; (ii) every vertex in G is the conclusion of G or the premise of one link; (iii) the premise of a dummy link is the conclusion of a binary link; and (iv) the set of conclusions of G is not empty.

Figure 3.2: Proof structure links (GUERRINI, 1999).

Proof-net’s multiplicative links matches a series of patterns shown in Fig. 3.3. The reductions illustrated in Fig. 3.1 are then described with this link notation in Fig. 3.4, where in a switching S(G) the notationα

. β ∈ Gimplies there is a permutationu1, u2, . . . , un ofα , β such that there is an edge between{ui, ui+1}fori= 1, 2, . . . , nin S(G).

Figure 3.3: Proof-nets multiplicative links (GUERRINI, 1999).

Definition 3.3 (contractibility criterion). A structure of links G is correct when→creduces G to a structure formed by a star link only (i.e.α

. β). Furthermore, we say G is c-correct iff G is a proof-net.

(40)

3.1. SOLUTIONS FOR PROOF-NETS 33

Figure 3.4: Proof structure contraction rules (GUERRINI, 1999).

The first linear time algorithm for proof-nets was presented by GUERRINI (1999). He reformulated the contraction procedure as a sort of unification, working on the interpretation of Danos’ process as a parsing algorithm. The change he proposes is to label all vertices in the proof graph and unify the labels of vertices that would be removed by the rewrite. In terms of implementation, he reformulated the unification as a disjoint-set union-find problem, which has a known quasi-linear solution by TARJAN (1975). The linearity of his solution comes from some properties of the graphs of proofs that makes this problem fit a special case of the union-find problem that has a real linear time algorithm, presented by TARJAN; LEEUWEN (1984).

The rules for unification are the following (GUERRINI, 1999):

1. (start) assign fresh tokens to conclusions of unmarked axiom link (this maps reduc-tion.0);

2. (forward) assign token t to the conclusion of an unary link whose premises yield t (this maps reduction.1);

3. (unify) assign token s or t to the conclusion of a binary link whose premises yield two distinct tokens s and t (this maps reduction.2).

As we can see, the forward and unify rules need to know the index of the premise vertices of the link, and the unify rule needs to merge two disjoint sets of indices. This is how contraction rules were mapped into a disjoint-set union-find problem. The linearity of the algorithm implementation comes from a special case, to which this unification fits, where the order in which sets are united optimizes the size of the problem where the amortized function is applied (to see more details about this special case see (TARJAN; LEEUWEN, 1984)).

Guerrini points in his first paper that sequentization can be achieved for proof-nets from his algorithm also in linear time. He presents the sequential marking/parsing strategy and its correctness and complexity proofs in (GUERRINI, 2011). To achieve that, he establishes a partial ordering among the links of the corresponding proof-net for the application of the parsing algorithm.

Murawski and Ong presented in 2000 another solution for verification of proof-nets in lin-ear time (MURAWSKI; ONG, 2000). It was devised for Lamarche’s essential nets (LAMARCHE, 2008), a polarized version of proof-nets for intuitionistic multiplicative linear logic. The polariza-tion induces a orientapolariza-tion to the edges that creates a DAG (directed and acyclic graph) that allows the formulation of a direct criterion. The validation ofMLL− is indirectly done by applying a linear conversion algorithm, designed by BELLIN; WIELE (1995), to convert proof-nets to essential nets and vice versa.

A flowgraph is a directed graph where every node can be reached from a fixed initial node. MURAWSKI; ONG (2000) proves that essential nets are flowgraphs, and defines the dominatorrelation on them.

(41)

Definition 3.4 (dominator relation (MURAWSKI; ONG, 2000)). We say that node v dominates win a flowgraph just in case every path from the start node that reaches w passes through v. Definition 3.5 (dominator tree (MURAWSKI; ONG, 2000)). A dominator tree is a directed tree that can be extracted from a flowgraph and which nodes can be ordered by the dominator relation.

He constructs dominator trees from the input essential net, that can be used to both verify the soundness of the net and sequentialize it. The domination ordering plays a key role in the substructure analysis of an essential net, showing how to decompose sound essential nets. An example of dominator tree can be seen in Fig. 3.5. See more about essential nets and dominator tress in Appendix B.

Figure 3.5: Dominator tree example: in the top a IMLL formula, in the middle its essential net and its dominator tree at the bottom (MURAWSKI; ONG, 2000).

The dominator relation can be restated as a LCA (Lowest Common Ancestor) problem: during the construction of the dominator tree a vertex with two predecessors in the essential net

(42)

3.2. N-GRAPHS CYCLES 35

needs to be added as a successor of the infimum (i.e. least common ancestor) of both. To see this in the example in Fig. 3.5, note that each℘− vertex is a successor of the LCA of the two vertices

which are the respective sources of the dashed arrows pointing to the℘−vertices.

The linear time complexity is again achieved by applying the special case of the disjoint-set union-find algorithm by TARJAN; LEEUWEN (1984). He relies on a fast implementation of LCA by GABOW (1990).

3.2

N-Graphs cycles

Given a proof-graph, the goal of the verification algorithm is to check if every meta-switching graph associated with it is acyclic and connected1. The algorithm presented here is based on the types of cycles that may exist in a proof-graph.

We propose a validation mechanism over a given cycle that determines if there is a meta-switching where it appears. If no such cycle is found in a proof-graph, then every associated meta-switching is acyclic. On a second step, we use a relation between the number of edges and vertices in the meta-switching graphs to confirm its connectivity. This relationship was already found for D-R graphs (GUERRINI, 2011).

A valid cycle in a proof-graph is the one that is not present in any meta-switching graph associated with it. The only way a cycle may “disappear” from a graph is by removing one of its edges. The edges which may be not present in a given meta-switching are from contraction, expansion and links with meta-edges. They are the key for the identification of valid cycles. Definition 3.6 (switchable link). A link in a proof-graph is a switchable link if it is one of the following: (i) contraction; (ii) expansion; or (iii)→ −I link.

Definition 3.7 (volatile and solid edges). An edge in a meta-switching associated to a proof-graph is a volatile edge if it belongs to a switchable link. Note that the virtual edge is also a volatile edge. A solid edge is an edge in a meta-switching that is not volatile.

The volatile edges from the same link have a strong semantic connection while working with meta-switchings. If one of then is present in a given meta-switching graph S(G), the other one is not. Because of this connection, we define those edges as conjugated edges.

Definition 3.8 (conjugated edge). Let e1and e2be two edges from a switchable link in a meta-switching associated to a proof-graph G. The conjugated edge of e1denoted as ˆe1is e2, and vice versa. Furthermore, for all meta-switching S(G), e ∈ S(G) ⇐⇒ ˆe∈ S(G)./

Note that the concepts of volatile and conjugated edges rely indirectly on the semantic of the link, but to our purposes here they are defined only with regard to the link’s structure and behaviour on a meta-switching. By ignoring the proof information (edge direction, vertice and edge labels) and extracting its raw undirected graph structure we developed an algorithm that is independent from the N-Graphs system itself, and can be applied in any variation that extends the switching soundness criterion (Danos & Regnier’s, for example). As an evidence of this remark we could also extend this solution to work with intuitionistic N-Graphs, as presented by QUISPE-CRUZ et al. (2014) (an extra validation would be needed to check an extra condition for intuitionism, but the underlying soundness that comes from classical N-Graphs is still present and could be validated by our algorithm). They used the meta-edge concept to define a intuitionistic rule for¬ − I, defining a system with two links with meta-edges (i.e., a new switchable link).

(43)

Let c be a cycle in a proof-graph G. EV(c) is defined as the set of volatile edges of c. The cycles in a proof-graph may be classified into the following types (also illustrated in Fig. 3.6):

1. cycles with no volatile edge (the leftmost in Fig. 3.6);

2. cycles c with a non-empty set of volatile edges EV(c) = {e1, . . . , en}, n > 0, where ∀ei∈ EV(c) → ˆei∈ E/ V(c) (the middle one in Fig. 3.6);

3. cycles c with a non-empty set of volatile edges EV(c) = {e1, . . . , en}, n > 0, where ∃ei∈ EV(c) → ˆei∈ EV(c) (the rightmost in Fig. 3.6).

Figure 3.6: Cycles in a proof-graph.

Analysing each of these cases separately, it may be noticed that the cycles of type 1 are always invalid ones, since there is no volatile edge within it and so it is present in every meta-switching graph associated with G.

The cycles of type 2 may not be present in some meta-switchings of G. However, there will be at least one meta-switching where EV(c) ⊆ S(G), which means there will be meta-switchings where c appears. Therefore, the cycles of type 2 are always invalid in proof-graphs with no meta-edge.

The last type of cycles is the most interesting, because it represents only valid cycles. More than that, it defines all valid cycles in a proof-graph. When a cycle c contains at least one pair of conjugated edges, there is no meta-switching where c may be present, because one edge from the pair must be out of the meta-switching S(G), for every meta-switching of G. Thus we give the following lemma:

Lemma 3.1. Let G be a proof-graph, and G0a spanning subgraph of G. A cycle c in G0has at least one switchable link iff c is not present in any meta-switching S(G) associated to G.

Proof.

1. If a cycle c in G0has at least one switchable link, then c is not present in any meta-switching S(G).

Let l be a switchable link in c. Let S(G) be a switching associated to G. S(G) must eliminate one of the edges from l, wherefore c will no longer be a cycle in S(G).

2. If c is not present in any meta-switching graph S(G) associated to G, then c has at least one switchable link.

Proof by contrapositive. Suppose there is a cycle c where ∀ei∈ EV(c) → ˆei∈ E/ V(c). Then there is a meta-switching S(G) such that ∀ei∈ EV(c) | ei∈ S(G). Therefore, c is present in S(G).

(44)

3.3. THE ALGORITHM 37

Corollary 3.1 (acyclicity). Let G be a proof-graph and G0 a spanning subgraph of G. Every cycle in G0has at least one switchable link iff every meta-switching graph S(G) associated to G is acyclic.

3.2.1

Connectivity

A tree is an acyclic and connected graph. Another way to define the soundness criterion is to say that every meta-switching graph associated to the proof-graph is a tree. A tree with n vertices has exactly n − 1 edges (HARARY, 1972). We may extend this tree’s property to define another lemma for proof-graphs, now concerning its connectivity:

Lemma 3.2 (connectivity). Let G be a proof-graph such that all meta-switching graph S(G) associated to G is acyclic. Then every meta-switching S(G) is a tree iff the following formula is valid:

|E(G)| − |LE(G)| − |LC(G)| − |EM(G)| = |V (G)| − 1 ,

where E(G) is the set of edges of G, LE(G) and LC(G) are the set of expansion and contraction links ofG, respectively,EM(G)is the set of all meta-edges ofG, andV(G)is the set vertices ofG.

Proof. In every meta-switching associated to G, one edge from every expansion, contraction and

→ −Ilink is removed. So every meta-switching has exactly|E(G)| − |LE(G)| − |LC(G)| − |EM(G)| edges. If a meta-switching S(G) is acyclic, then it is a tree iff the number of edges is equal to the number of vertices minus one, i.e.,|E(G)| − |LE(G)| − |LC(G)| − |EM(G)| = |V (G)| − 1.

3.3

The algorithm

The algorithm proposed here uses the lemmas above and is divided into two procedures. The first procedure is a variation of Depth First Search (DFS for short) combined with Tarjan’s Strongly connected componentalgorithm (TARJAN, 1972). The idea is to find a spanning tree of the proof-graph, and whenever a cycle family is found, its cycles must be validated according to Corollary 3.1. The second procedure is the application of the formula from Lemma 3.2 to the proof-graph.

The DFS is an algorithm for graph traversing and can be applied to identify families of cycles in a cyclic undirected graph. It defines a predecessor subgraph of the input graph, that forms a tree if the input graph is connected. We have three states for the nodes during the search: not visited(white), discovered (gray) and finished (black), and also four edge types: (CORMEN et al., 2002)

1. Tree edge: an edge (u, v) discovered during the traversal from u to v.

2. Back edge: an edge (u, v) connecting a vertex u to an ancestor v in the DFS tree.

3. Forward edge: a non-tree edge (u, v) connecting u to a descendant v in the DFS tree.

Referências

Documentos relacionados

Concluído o estudo exploratório e a partir da análise de dados dos testes e do processo metodológico desenvolvido nesta parte inicial da investigação, o trabalho rumou, então,

Um programa de intervenção baseado no treino orientado para a tarefa resultou em ganhos no equilíbrio estático e dinâ- mico, na velocidade da marcha e na diminuição do medo de

Tendo como base as reflexões obtidas a partir da pesquisa bibliográfica e as conclusões estabelecidas acerca das formas de transmitir música nos contextos investigados, dimensiono

Considera-se que os estudantes da graduação já são portadores de um conhecimento linguístico prévio; sendo assim, reforça-se a necessidade de os professores universitários

Perante estes factos algumas famílias (poucas) lutam por este direito, contemplado na legislação, contra a vontade da direcção do jardim-de-infância, o que

Questionados acerca do papel do auditor no processo de fechamento de contas, a partir dos registros de Enfermagem e da importância do seu detalhamento, os profissionais

O intuito do estudo é proporcionar o conhecimento da hipertensão arterial sistêmica para melhor adesão ao tratamento farmacológico e não farmacológico favorecendo melhor