A Graph Calculus for Predicate Logic
DD. Kesner and P. Viana (Eds.): LSFA 2012EPTCS 113, 2013, pp. 153–168, doi:10.4204/EPTCS.113.15 c (cid:13)
Veloso & VelosoThis work is licensed under theCreative Commons Attribution License.
A Graph Calculus for Predicate Logic ∗ Paulo A. S. Veloso
COPPE-UFRJSystems and Computer Engin. ProgramUFRJ: Federal University of Rio de JaneiroRJ, Brazil [email protected]
Sheila R. M. Veloso
FEN-UERJSystems and Computer Engin. Dept., Fac. of EngineeringUERJ: State University of Rio de JaneiroRJ , Brazil [email protected]
We introduce a refutation graph calculus for classical first-order predicate logic, which is an exten-sion of previous ones for binary relations. One reduces logical consequence to establishing that aconstructed graph has empty extension, i. e. it represents ⊥ . Our calculus establishes that a graphhas empty extension by converting it to a normal form, which is expanded to other graphs until wecan recognize conflicting situations (equivalent to a formula and its negation). We present a refutation graph calculus for classical first-order predicate logic. This approach is based onreducing logical consequence to showing that a constructed graph has empty extension, representing thelogical constant ⊥ . Our sound and complete calculus establishes when a graph has empty extension.For instance, given formulas ψ , θ and ϕ , to establish that ϕ follows from { ψ , θ } , we construct a graph G corresponding to { ψ , θ } ∪ {¬ ϕ } and show that G has empty extension. Now, our calculus establishesthat a graph has empty extension by converting it to a normal form, which is expanded to other graphsuntil we can recognize conflicting situations (equivalent to a formula and its negation).Formulas are often written down on a single line [3]. Graph calculi rely on two-dimensional repre-sentations providing better visualization [2]. In the realm of binary relations, a simple calculus (withlinear derivations) [2, 3] was extended for handling complement: direct calculi [5, 7] and refutation cal-culi [13]. Our new calculus is a further extension, inheriting much of the earlier terminology (such as‘graph’, ‘slice’ and ‘arc’), together with some ideas from Peirce’s diagrams for relations [11, 4]. Thepresent calculus involves two new aspects: extension to arbitrary predicates (which affects the represen-tation) and allowing formulas within the graphs.The structure of this paper is as follows. Section 2 motivates the underlying ideas with some illus-trative examples. Section 3 introduces our graph language: syntax, semantics and some constructions.In Section 4 we introduce our graph calculus: its rules and goal. Section 5 presents some concludingremarks, including comparison with related works.
We begin by motivating our ideas with some illustrative examples. ∗ Research partly sponsored by the Brazilian agencies CNPq and FAPERJ. The structure of ( x + y ) · ( z ÷ w ) is more apparent in the notation x + y · z ÷ w (see also [1]). A Graph Calculus for Predicate Logic
We know that consequence can be reduced to unsatisfiability. We will indicate how one can representformulas graphically and then establish consequence by graphical means.First, we indicate how we can represent (some) formulas graphically (see 3.1 for more details).We represent an atomic formula by arrows to predicate symbols coming from its arguments. So, werepresent the formulas p ( u ) and r ( u , v ) , respectively, as follows:p (cid:79) (cid:79) u ru (cid:68) (cid:68) v (cid:90) (cid:90) The former illustrates a 1-ary arc. The latter is an example of a 2-ary arc, which will be satisfied by thechoices of values a and b for u and v, respectively, with the pair ( a , b ) in the 2-ary relation interpreting r.We obtain a representation for a conjunction by joining those of its formulas. So, we represent theformula p ( u ) ∧ r ( u , v ) as follows: p (cid:91) (cid:91) ru (cid:67) (cid:67) v (cid:91) (cid:91) This set of 2 arcs is an example of a draft, which also represents the set { p ( u ) , r ( u , v ) } . This draft D willbe satisfied exactly by the assignments satisfying both p ( u ) and r ( u , v ) .To represent an existential quantification, we hide the node corresponding to the quantified variable,leaving only the rest visible. For instance, from formula p ( u ) ∧ r ( u , v ) , we obtain ∃ x ( p ( x ) ∧ r ( x , v )) . Wecan use the representation of the former to represent the latter: we place the above draft D within a boxand mark v as visible, which we represent as follows:p (cid:90) (cid:90) ru (cid:69) (cid:69) (cid:126) v (cid:89) (cid:89) This is an example of a 1-ary slice. The interpretation of this slice S is the 1-ary relation consisting ofthe values b such that, for some a , the assignment u (cid:55)→ a , v (cid:55)→ b satisfies the underlying draft D .Now, we can represent formula ¬∃ x ( p ( x ) ∧ r ( x , v )) by complementing this slice S . As stands forcomplement, we represent ¬∃ x ( p ( x ) ∧ r ( x , v )) as follows:p (cid:90) (cid:90) ru (cid:69) (cid:69) (cid:126) v (cid:89) (cid:89) A draft consists of finite sets of names and of arcs (giving constraints on the names). A slice consistsof a draft and a list of distinguished names, which we indicate by special marks, such as ‘ → ’.Next, we illustrate how one can establish consequence by graphical means. The idea is reducingunsatisfiability of a (finite) set of formulas to that of its corresponding draft.We begin with an example that is basically propositional. Then, we examine other examples withequality . = and existential quantifiers (see 3.2 and 4.1 for more details). Example 2.1.
Consider p ( u ) ∧ q ( u ) | = p ( u ) . As mentioned, we reduce it to { p ( u ) ∧ q ( u ) , ¬ p ( u ) } | = ⊥ .We can represent the formulas by (sets of) arcs as follows: eloso & Veloso ( u ) q ( u ) p ( u ) ∧ q ( u ) ¬ p ( u ) p (cid:92) (cid:92) u q (cid:79) (cid:79) u p (cid:92) (cid:92) q (cid:79) (cid:79) u p (cid:66) (cid:66) u We can obtain a representation for the set { p ( u ) ∧ q ( u ) , ¬ p ( u ) } by joining those of its formulas: p (cid:92) (cid:92) q (cid:79) (cid:79) p (cid:66) (cid:66) u Within this draft for { p ( u ) ∧ q ( u ) , ¬ p ( u ) } , we find the conflicting situation (as stands for complement): p (cid:92) (cid:92) p (cid:66) (cid:66) u Thus, the representation of { p ( u ) ∧ q ( u ) , ¬ p ( u ) } is unsatisfiable. Example 2.2.
We know that p ( u ) (cid:54)| = p ( v ) , i. e. { p ( u ) , ¬ p ( v ) } (cid:54)| = ⊥ . The corresponding draft is: p (cid:79) (cid:79) p (cid:79) (cid:79) u v Here, we do not find conflicting arcs. In fact, we can read from the representation a model M = (cid:104) M , p M (cid:105) ,with M : = { u , v } and p M : = { u } , where one can satisfy p ( u ) and ¬ p ( v ) . Example 2.3.
We reduce p ( v ) ∧ v . = u | = p ( u ) to the unsatisfiability of the set { p ( v ) ∧ v . = u , ¬ p ( u ) } . Wehave the graphical representations as sets of arcs as follows: p ( v ) ∧ v . = u ¬ p ( u ) { p ( v ) ∧ v . = u , ¬ p ( u ) } p (cid:90) (cid:90) . = (cid:67) (cid:67) (cid:91) (cid:91) v u p (cid:67) (cid:67) u p (cid:90) (cid:90) . = (cid:67) (cid:67) (cid:91) (cid:91) p (cid:68) (cid:68) v u Now, we can simplify the representation of { p ( v ) ∧ v . = u , ¬ p ( u ) } , by renaming v to u : p (cid:90) (cid:90) . = (cid:67) (cid:67) (cid:91) (cid:91) p (cid:68) (cid:68) v u transforms to p (cid:93) (cid:93) p (cid:65) (cid:65) u This final representation is not satisfiable (cf. Example 2.1).
Example 2.4.
We reduce r ( u , v ) | = ∃ z r ( u , z ) to { r ( u , v ) , ¬∃ z r ( u , z ) } | = ⊥ . As before, we can representformula r ( u , v ) by the single-arc draft: Indeed, we have: p (cid:79) (cid:79) u but not p (cid:79) (cid:79) u and p (cid:79) (cid:79) v but not p (cid:79) (cid:79) v . A Graph Calculus for Predicate Logic ru (cid:67) (cid:67) v (cid:91) (cid:91) Also, we can represent ¬∃ z r ( u , z ) by the following -ary arc: u (cid:126) u r v (cid:26) (cid:26) (cid:4) (cid:4) (cid:28) (cid:28) Thus, we can represent { r ( u , v ) , ¬∃ z r ( u , z ) } by the draft: r v (cid:95) (cid:95) u (cid:126) u r v (cid:26) (cid:26) (cid:4) (cid:4) (cid:26) (cid:26) (cid:63) (cid:63) Now, with (cid:126) u (cid:55)→ u , v (cid:55)→ v , we have a copy of the slice under complement within the draft, namely:slice → draft (cid:126) u r v (cid:68) (cid:68) (cid:89) (cid:89) u r v (cid:61) (cid:61) (cid:95) (cid:95) So, the representation of { r ( u , v ) , ¬∃ z r ( u , z ) } is not satisfiable. Example 2.5.
We reduce ∃ x ∃ y [ r ( u , x ) ∧ s ( x , y )] | = ∃ z r ( u , z ) to {∃ x ∃ y [ r ( u , x ) ∧ s ( x , y )] , ¬∃ z r ( u , z ) } | = ⊥ .Proceeding as before, we can be represent {∃ z ∃ y [ r ( x , z ) ∧ s ( z , y )] , ¬∃ z r ( u , z ) } as: (cid:126) u r v s w (cid:69) (cid:69) (cid:89) (cid:89) (cid:69) (cid:69) (cid:86) (cid:86) (cid:56) (cid:56) u (cid:126) u r v (cid:25) (cid:25) (cid:4) (cid:4) (cid:26) (cid:26) We can transform this representation into the following one, which is, much as before, unsatisfiable. eloso & Veloso (cid:126) u r v (cid:25) (cid:25) (cid:4) (cid:4) (cid:25) (cid:25) (cid:69) (cid:69) (cid:89) (cid:89) (cid:69) (cid:69) (cid:86) (cid:86)
We now introduce our concepts: expressions, slices and graphs will give relations, whereas arcs, sketchesand drafts will correspond to constraints. We will examine syntax and semantics (in 3.1) and then someconcepts and constructions (in 3.2).We first introduce some notations. Given a function f : A → B , we use f ( a ) or a f for its value at anelement a ∈ A ; which we extend to lists and sets. For a list a = (cid:104) a , . . . , a k (cid:105) ∈ A k , we use f ( a ) or a f forthe list of values (cid:104) a f , . . . , a k f (cid:105) ∈ B k ; for a set N , we use f ( N ) or N f for the set of values { a f : a ∈ N } .Given a list a = (cid:104) a , . . . , a k (cid:105) ∈ A k , we employ a for its set of components . The null list is λ : = (cid:104) (cid:105) . Wesometimes write a list (cid:104) a , . . . , a k (cid:105) simply as a . . . a k .We will use names (or parameters) for marking free places and variables for marking bound places,as usual in Proof Theory [12]. To quantify a formula ϕ we replace a name u by a new variable (notappearing in ϕ ) obtaining ∃ x ϕ [ u / x ] and ∀ x ϕ [ u / x ] . Also, given lists u, of n distinct names, and x , of n distinct variables not occurring in ϕ , we have the formulas ∃ n x ϕ [ u / x ] and ∀ n x ϕ [ u / x ] .We will consider first-order predicate languages (without function symbols, except the constant ⊥ ),each one characterized by pairwise disjoint sets as follows: ( Nm ) an infinite linearly ordered set of names Nm ; ( Vr ) a denumerably infinite set of variables Vr ; ( Pr ) (possibly empty, but pairwise disjoint) sets Pr n of n -ary predicate symbols , for n ∈ IN.Given m ∈ IN + , we use u m for the mth name . Given n ∈ IN, we use u n : = (cid:104) u , . . . u n (cid:105) for the list of thefirst n names (with u = λ ). Also, given a set v ⊆ Nm of names, we use (cid:126) v for the list of the names in v inthe ordering of Nm . For a formula ϕ , we use NF [ ϕ ] for the set of names occurring in ϕ . We now introduce the syntax and semantics of our concepts. We first examine the syntax of our concepts.The objects of our graph language are defined by mutual recursion as follows. ( E ) An n -ary expression is an n -ary predicate symbol, a formula with n names, an n -ary slice or graph(see below), or E, where E is an n -ary expression. For instance, ⊥ is a 0-ary expression, . = and . = are 2-ary expressions, whereas p ( u ) and p (for p ∈ Pr ) are 1-ary expressions. ( a ) An m -ary arc a over set N ⊆ Nm of names is a pair E / v (also noted Ev ), where E is an m -ary expressionand v ∈ N m . Examples are ⊥ / λ , . = / u v, p / u, q ( u ) / v (for p , q ∈ Pr ) and s / u w (for s ∈ Pr ). ( Σ ) A sketch Σ = (cid:104) N , A (cid:105) consists of sets N ⊆ Nm of names and A of arcs over N .58 A Graph Calculus for Predicate Logic ( D ) A draft D = (cid:104) N , A (cid:105) is a sketch with finite sets N of names and A of arcs. An example of draft is D (cid:48) = (cid:104){ u , u (cid:48) , v , w , w (cid:48) } , { p / u , q ( u ) / v , . = / w w (cid:48) , s / u w }(cid:105) . ( S ) An n -ary slice S = (cid:104) S : ˆ s (cid:105) consists of its underlying draft S : = (cid:104) N , A (cid:105) and a distinguished list ˆ s , withˆ s ∈ N n . For instance, S = (cid:104){ u , u (cid:48) , v , w , w (cid:48) } , { p / u , q ( u ) / v , . = / w w (cid:48) , s / u w } : u v v (cid:105) is a 3-ary slice withunderlying draft S = D (cid:48) (as above) and distinguished list ˆ s = (cid:104) u , v , v (cid:105) . ( G ) An n -ary graph is a finite set of n -ary slices.In particular, the empty graph { } has no slice. Example 4.5 (in 4.2) will show a 2-slice graph.Note that expressions, arcs, slices and graphs are finite objects, whereas sketches are not necessarilyso. Sketches will be useful for representing models and constructing co-limits. Also, some concepts andresults do not depend on finiteness (see 3.2), which will be important in Section 4. We wish to representthese finite objects graphically by drawings (cf. the examples in Section 2). For this purpose, we employtwo sorts of nodes: name nodes (labeled by names) and expression nodes (labeled by expressions). Somerepresentations aiming at precision and readability are as follows.We represent an m -ary arc E / v, with v = (cid:104) v , . . . , v m (cid:105) , by m arrows connecting each node labeled byv i to the node labeled by E. For instance, we can draw a 3-ary arc t / (cid:104) u , v , w (cid:105) as t (cid:37) ↑ (cid:45) u v w .To clarify (as in tu v u ), we may use distinct kinds of lines or label them by numbers. A more compactversion uses is v r → v for the 2-arc r / v v , representing 1-ary, 3-ary and 4-ary arcs, respectively, as:pv , v t (cid:47) (cid:47) v v (cid:79) (cid:79) and v q (cid:47) (cid:47) v v (cid:47) (cid:47) (cid:79) (cid:79) v .We can indicate the components of a distinguished list by marking their nodes, say with numbers, e.g. (cid:104) u , v , u (cid:105) by u , v . Also, it may be convenient (for easier visualization) to enclose a slice S within a fullbox, S , and a graph G within a dashed box, G . For instance, Example 2.5 (in Section 2) shows a 0-aryslice S = (cid:104){ u , v , w } , A : λ (cid:105) , with A = { r / u v , s / v w , T / u } , where T is the 1-ary slice (cid:104){ u , v } , { r / u v } : u (cid:105) .Given a list w of names, the arcless w slice is the slice (cid:62) w : = (cid:104) w , /0 : w (cid:105) . The arcless m-ary slice isthe slice (cid:62) m : = (cid:62) u m (u m is the list of the first m names) and the m-node arcless draft is (cid:62) m = (cid:104) u m , /0 (cid:105) . The arc of formula ϕ , with set v of names, is a [ ϕ ] : = ϕ /(cid:126) v. (The arc of a sentence τ is 0-ary: a [ τ ] = τ / λ , whichwe represent as the expression node τ .) The sketch of the set of arcs A is the sketch Sk [ A ] : = (cid:104) N , A (cid:105) ,where N consists of the names occurring in the arcs of A : N : = (cid:83) { w ⊆ Nm : E / w ∈ A } . For instance, Sk [ { s / u v , p ( v ) / w } ] = (cid:104){ u , v , w } , { s / u v , p ( v ) / w }(cid:105) .We may wish to add an arc a = E / v to a sketch, a slice or a graph. For a sketch Σ = (cid:104) N , A (cid:105) , weset Σ + a : = (cid:104) N ∪ v , A ∪ { a }(cid:105) ; for a slice S = (cid:104) S : ˆ s (cid:105) , we set S + a : = (cid:104) S + a : ˆ s (cid:105) ; for a graph G , we set G + a : = { S + a : S ∈ G } . The difference slice of a finite set of arcs A with respect to an arc a = E / v isthe 0-ary slice DS [ A ∠ a ] : = (cid:104) Sk [ A ] + E / v : λ (cid:105) . For instance, Example 2.3 (in Section 2) represents theset { p ( v ) ∧ v . = u , ¬ p ( u ) } by the difference slice DS [ { p / v , . = / v u } ∠ p / u ] . We will give some intuition forusing 0-ary slices in 3.2.We now examine the semantics of our concepts and related ideas.A model M has as its universe a set M (cid:54) = /0 and realizes each n -ary predicate symbol p ∈ Pr n as an n -ary relation p M ⊆ M n (with . = M : = {(cid:104) a , a (cid:105) ∈ M : a ∈ M } ). An M-assignment for set N ⊆ Nm of namesis a function g : N → M . A formula ϕ with set v of n names defines the n -ary relation ϕ M ⊆ M n consisting We often employ full, dashed, dotted and wavy lines, respectively, for the 1st, 2nd, 3rd and 4th arguments of expressions. eloso & Veloso ϕ : ϕ M : = { (cid:126) v h ∈ M n : M | = ϕ [[ h ]] } . Forinstance, for 2-ary predicate symbol r, r ( u , u ) M = r M , r ( u , u ) M = {(cid:104) b , a (cid:105) ∈ M : (cid:104) a , b (cid:105) ∈ r M } andr ( u , u ) M = {(cid:104) a (cid:105) ∈ M : (cid:104) a , a (cid:105) ∈ r M } . Also, ⊥ M : = /0 .We now introduce the meanings of the concepts, again by mutual recursion. ( E ) We define the relation of an expression as follows. For a predicate symbol p we have its relation: [ p ] M : = p M ; for formula ϕ we have its defined relation: [ ϕ ] M : = ϕ M ; for a slice S or graph G ,we use the extensions: [ S ] M : = [[ S ]] M and [ G ] M : = [[ G ]] M (see below); for E, where E is an n -aryexpression, we use the complement: [ E ] M : = M n \ [ E ] M . ( a ) An M-assignment g : N → M satisfies an m -ary arc E / v over N in M (noted g (cid:13) M E / v) iff v ∈ N m and v g ∈ [ E ] M . For instance, g (cid:13) M . = / u v iff u g = v g and g (cid:13) M p / w iff w g ∈ [ p ] M = p M . ( Σ ) An assignment g satisfies a sketch Σ = (cid:104) N , A (cid:105) in M (noted g : Σ → M ) iff g satisfies every arc a ∈ A . ( S ) The extension of a slice is the relation consisting of values of its distinguished list for the assignmentssatisfying its underlying draft; for an n -ary slice S = (cid:104) S : ˆ s (cid:105) , [[ S ]] M : = { ˆ s g ∈ M n : g : S → M } . ( G ) The extension of a graph is the union of those of its slices: [[ G ]] M : = (cid:83) S ∈ G [[ S ]] M .Clearly, g (cid:13) M E / v iff g (cid:54) (cid:13) M E / v. Also, the arcless m -ary slice (cid:62) m has extension [[ (cid:62) m ]] M = M m .An expression E is null iff [ E ] M = /0 in every model M . For instance, the empty graph { } is null.Given a sketch Σ = (cid:104) N , A (cid:105) and an arc a = E / v, we say that a is a consequence of Σ (noted Σ | = a )iff, for every model M and M -assignment g : N ∪ v → M , g satisfies a whenever g satisfies Σ . Callexpressions E and F equivalent (noted E ≡ F) iff, for every model M , [ E ] M = [ F ] M . A slice S and thesingleton graph { S } are equivalent (so they may be identified).We can reduce consequence to the difference slice: an arc a is a consequence of a draft D iff thedifference slice DS [ A ∠ a ] is null. So, we can also reduce logical consequence to a difference slice. Proposition 3.1.
Given a finite set Ψ of formulas and a formula θ : Ψ | = θ iff the difference slice DS [ { a [ ψ ] : ψ ∈ Ψ } ∠ a [ θ ]] is null.Proof. By the preceding remark, since g (cid:13) M a [ ϕ ] iff M | = ϕ [[ g ]] .Section 4 will present a calculus for establishing that an expression is null. We now examine some concepts and constructions.We first introduce morphisms for comparing sketches.Consider sketches Σ (cid:48) = (cid:104) N (cid:48) , A (cid:48) (cid:105) and Σ (cid:48)(cid:48) = (cid:104) N (cid:48)(cid:48) , A (cid:48)(cid:48) (cid:105) . A function η : N (cid:48)(cid:48) → N (cid:48) is a morphism from Σ (cid:48)(cid:48) to Σ (cid:48) (noted η : Σ (cid:48)(cid:48) (cid:57)(cid:57)(cid:75) Σ (cid:48) ) iff it preserves arcs: for every arc E / v ∈ A (cid:48)(cid:48) , we have E / v η ∈ A (cid:48) . We use Mor [ Σ (cid:48)(cid:48) , Σ (cid:48) ] for the set of morphisms from Σ (cid:48)(cid:48) to Σ (cid:48) . Example 3.1.
Given p ∈ Pr and q , r , s , t , a , b ∈ Pr , consider the drafts D (cid:48) = (cid:104) N (cid:48) , A (cid:48) (cid:105) and D (cid:48)(cid:48) = (cid:104) N (cid:48)(cid:48) , A (cid:48)(cid:48) (cid:105) ,with sets of nodes N (cid:48) = { u , v , v (cid:48) , w , w (cid:48) } and N (cid:48)(cid:48) = { u , u , u , v , v , v , w , w , w , w (cid:48) } , and sets of arcs A (cid:48) = { q / v w , p / w (cid:48) , r / v w (cid:48) , s / v u , t / u w , a / u v (cid:48) , b / v (cid:48) w } and A (cid:48)(cid:48) = { q / v w , q / v w , p / w (cid:48) , r / v w (cid:48) , r / v w (cid:48) , r / v w (cid:48) , s / v u , t / u w , a / u v (cid:48) , a / u v (cid:48) , b / v (cid:48) w , b / v (cid:48) w , b / v (cid:48) w } . Recall that Ψ | = θ iff, for every model M and assignment h , h satisfies θ whenever h satisfies every ψ ∈ Ψ . A Graph Calculus for Predicate Logic
These drafts D (cid:48) and D (cid:48)(cid:48) can be represented as in Figure 1. The mapping v (cid:48) (cid:55)→ v (cid:48) ; w (cid:48) (cid:55)→ w (cid:48) ; v , v , v (cid:55)→ v ; w , w , w (cid:55)→ w and u , u , u (cid:55)→ u preserves arcs. So, we have a morphism η : D (cid:48)(cid:48) (cid:57)(cid:57)(cid:75) D (cid:48) . We also haveformulas δ ( D (cid:48) ) and δ ( D (cid:48)(cid:48) ) such that g : D (cid:48) → M iff M | = δ ( D (cid:48) ) [[ g ]] and g : D (cid:48)(cid:48) → M iff M | = δ ( D (cid:48)(cid:48) ) [[ g ]] . D (cid:48) D (cid:48)(cid:48) p w (cid:48) vr (cid:111) (cid:111) q (cid:47) (cid:47) s (cid:15) (cid:15) wu t (cid:66) (cid:66) a (cid:47) (cid:47) v (cid:48) b (cid:79) (cid:79) v q (cid:47) (cid:47) r (cid:15) (cid:15) w u t (cid:111) (cid:111) p w (cid:48) v r (cid:111) (cid:111) q (cid:47) (cid:47) s (cid:33) (cid:33) w v (cid:48) b (cid:111) (cid:111) b (cid:97) (cid:97) b (cid:47) (cid:47) wvr (cid:79) (cid:79) u a (cid:62) (cid:62) u a (cid:96) (cid:96) Figure 1: Drafts D (cid:48) and D (cid:48)(cid:48) (Example 3.1)A morphism transfers satisfying assignments by composition. Lemma 3.1.
Given a morphism η : Σ (cid:48)(cid:48) (cid:57)(cid:57)(cid:75) Σ (cid:48) , for every assignment g : N Σ (cid:48) → M satisfying Σ (cid:48) , thecomposite g · η : N Σ (cid:48)(cid:48) → M is an assignment satisfying Σ (cid:48)(cid:48) .Proof. For every arc E / v ∈ A Σ (cid:48)(cid:48) , we have E / v η ∈ A Σ (cid:48) , thus v g · η ∈ [ E ] M , whence g · η (cid:13) M E / v.We now use morphisms to introduce zero sketches, slices and graphs.A sketch Σ = (cid:104) N , A (cid:105) is zero iff there exist a slice T = (cid:104) T : ˆ t (cid:105) and a morphism η : T (cid:57)(cid:57)(cid:75) Σ such that T / ˆ t η is an arc in A . A slice S is zero iff its underlying draft S is a zero sketch. A graph is zero iff allits slices are zero slices. The sets of zero drafts, zero slices and zero graphs are all decidable, since, fordrafts D (cid:48) and D (cid:48)(cid:48) , the set Mor [ D (cid:48)(cid:48) , D (cid:48) ] is finite. Example 3.2.
Consider the following draft D and -ary slice T : D = (cid:104){ u (cid:48) , v (cid:48) , w (cid:48) } , { r / u (cid:48) v (cid:48) , T / u (cid:48) w (cid:48) , s / v (cid:48) w (cid:48) }(cid:105) T = (cid:104){ u , v , w } , { r / u v , s / v w } : u w (cid:105) u (cid:48) r (cid:47) (cid:47) T (cid:31) (cid:31) v (cid:48) s (cid:15) (cid:15) w (cid:48) u r (cid:47) (cid:47) vs (cid:15) (cid:15) w The mapping u (cid:55)→ u (cid:48) , v (cid:55)→ v (cid:48) , w (cid:55)→ w (cid:48) gives a morphism η : T (cid:57)(cid:57)(cid:75) D , with ˆ t η = (cid:104) u η , w η (cid:105) = (cid:104) u (cid:48) , w (cid:48) (cid:105) . Thus,draft D is zero. So, slices (cid:104) D : λ (cid:105) , (cid:104) D : u (cid:48) (cid:105) , (cid:104) D : v (cid:48) w (cid:48) (cid:105) and (cid:104) D : u (cid:48) (cid:105) , (cid:104) D : u (cid:48) v (cid:48) w (cid:48) (cid:105) are zero slices. Lemma 3.2.
No assignment can satisfy a zero sketch.Proof.
By Lemma 3.1, g : Σ → M yields g · η : T → M , thus g (cid:13) M T / ˆ t η whence g (cid:54) (cid:13) M T / ˆ t η . Corollary 3.1.
Zero slices and zero graphs are null.Proof.
By Lemma 3.2: if [[ S ]] M (cid:54) = /0 , then some assignment satisfies S . For instance, for arc p / w of D (cid:48)(cid:48) , we have arc p / w (cid:48) of D (cid:48) ; for arcs q / v w and q / v w of D (cid:48)(cid:48) , we have arc q / vw of D (cid:48) . Take δ ( D (cid:48) ) as q ( v , w ) ∧ p ( w (cid:48) ) ∧ r ( v , w (cid:48) ) ∧ s ( v , u ) ∧ t ( u , w ) ∧ a ( u , v (cid:48) ) ∧ b ( v (cid:48) , w ) and δ ( D (cid:48)(cid:48) ) as the conjunction of q ( v , w ) ,q ( v , w ) , p ( w (cid:48) ) , r ( v , w (cid:48) ) , r ( v , w (cid:48) ) , r ( v , w (cid:48) ) , s ( v , u ) , t ( u , w ) , a ( u , v (cid:48) ) , a ( u , v (cid:48) ) , b ( v (cid:48) , w ) , b ( v (cid:48) , w ) and b ( v (cid:48) , w ) . The extension of slice T can be described by the formula ∃ y ( r ( u , y ) ∧ s ( y , w )) . eloso & Veloso Σ i = (cid:104) N i , A i (cid:105) ,its co-limit can be obtained as expected: obtain the co-limit N of the sets of names N i and then transferarcs, by the functions ν i : N i → N , i. e. A : = (cid:83) i ∈ I A i ν i . In particular, the pushout of drafts gives a draft.We wish to glue a slice T onto a draft or a slice via a designated list of names. This involves addingthe arcs of T with its distinguished list identified to the designated list of names.Gluing can be introduced as an amalgamated sum (of drafts). Consider an m -ary slice T = (cid:104) T : ˆ t (cid:105) .Given a draft D = (cid:104) N , A (cid:105) and a list w ∈ N m of m names, the glued draft D w T is the pushout of the drafts D + w : = (cid:104) N ∪ w , A (cid:105) and T over the m -ary arcless draft (cid:62) m = (cid:104) u m , /0 (cid:105) and the natural morphisms µ (cid:48) and µ (cid:48)(cid:48) ( µ (cid:48) : u i (cid:55)→ w i and µ (cid:48)(cid:48) : u i (cid:55)→ ˆ t i ), as shown in Figure 2. Note that ν (cid:48) ( w ) = ν (cid:48)(cid:48) ( ˆ t ) . D + w ν (cid:48) (cid:38) (cid:38) (cid:104) u m , /0 (cid:105) µ (cid:48) (cid:55) (cid:55) µ (cid:48)(cid:48) (cid:39) (cid:39) D w TT ν (cid:48)(cid:48) (cid:56) (cid:56) Figure 2: Pushout of draftsGiven an n -ary slice S = (cid:104) S : ˆ s (cid:105) , we obtain the glued slice S w T by transferring the distinguished listof S to the glued draft S w T : S w T : = (cid:104) S w T : ν (cid:48) ( ˆ s ) (cid:105) . We glue a graph by gluing its slices, i. e. S w H is thegraph { S w T : T ∈ H } . We glue onto a graph by gluing onto its slices, i. e. G w H : = (cid:83) S ∈ G S w H . Example 3.3.
Consider the three slices: -ary S = (cid:104){ u , u (cid:48) , v (cid:48) , v } , { r / u u (cid:48) , s / u (cid:48) v (cid:48) , t / v (cid:48) v } : u (cid:105) as well as -ary T (cid:48) = (cid:104){ v , w } , { a / w v } : w v (cid:105) and T (cid:48)(cid:48) = (cid:104){ w } , { p / w , q / w } : w w (cid:105) . They are represented as follows:
S T (cid:48) T (cid:48)(cid:48) u r (cid:47) (cid:47) u (cid:48) s (cid:47) (cid:47) v (cid:48) t (cid:47) (cid:47) v w a (cid:47) (cid:47) v w , p q We obtain -ary glued slices as follows: S (cid:104) u (cid:48) , v (cid:48) (cid:105) T (cid:48) = (cid:104){ u , u (cid:48) , v (cid:48) , v } , (cid:26) r / u u (cid:48) , s / u (cid:48) v (cid:48) , t / v (cid:48) v , a / u (cid:48) v (cid:48) (cid:27) : u (cid:105) S (cid:104) u (cid:48) , v (cid:48) (cid:105) T (cid:48)(cid:48) = (cid:104) (cid:26) u , v , w (cid:27) , (cid:26) r / u w , s / w w , t / w v , p / w , q / w (cid:27) : u (cid:105) u u (cid:48) v (cid:48) vr (cid:47) (cid:47) s (cid:35) (cid:35) a (cid:59) (cid:59) t (cid:47) (cid:47) u r (cid:47) (cid:47) ws (cid:4) (cid:4) t (cid:47) (cid:47) vp q A glued draft and slice are unique up to isomorphism. They can be made unique by a suitable choice of names. Asisomorphic objects have the same behavior, we often consider a sketch or a slice up to isomorphism. The extension of slice T (cid:48)(cid:48) can be described by the formula p ( w ) ∧ q ( w ) ∧ w . = w (cid:48) . A Graph Calculus for Predicate Logic
Addition of a slice-arc is equivalent to gluing the slice. For instance, with the slices of Example 3.3: S + T (cid:48) / u (cid:48) v (cid:48) ≡ S (cid:104) u (cid:48) , v (cid:48) (cid:105) T (cid:48) and S + T (cid:48)(cid:48) / u (cid:48) v (cid:48) ≡ S (cid:104) u (cid:48) , v (cid:48) (cid:105) T (cid:48)(cid:48) . Proposition 3.2.
Given a slice S and an arc T / w : S + T / w ≡ S w T .Proof. By Lemma 3.1 and the pushout property .It is not difficult to translate our graph language to the underlying first-order predicate language. Itsuffices to express the semantics of the graph language (in 3.1) by formulas.
We now introduce our graph calculus, with conversion and expansion rules. We employ R (cid:63) for the reflexive-transitive closure of a binary relation R on a set, as usual.Our conversion and expansion rules will transform an expression to an equivalent one. Thus, one canapply such a rule in any context. For instance, we will have a rule converting ⊥ to the empty graph { } ;so, we can apply it to convert ⊥ to { } and S + ⊥ / λ to S + { } / λ , for any slice S . Also, we can identify asingleton graph with its slice (cf. 3.1): if S (cid:66) F then { S } (cid:66) F and if E (cid:66) T then E (cid:66) { T } . We now introduce the basic objects and the conversion rules.The basic objects are defined (by mutual recursion) as follows. The basic expressions are the predi-cate symbols, other than . = , and T , where T is a basic slice (see below). An arc E / v is basic iff E is a basicexpression. A sketch is basic iff all its arcs are basic. A slice is basic iff its underlying draft is a basicsketch. A graph is basic iff its slices are all basic. For instance, the drafts D (cid:48) and D (cid:48)(cid:48) , of Example 3.1,and D , of Example 3.2, (in 3.2) are basic, whereas those in Examples 2.1, 2.2 and 2.3 are not basic.The conversion rules will transform an expression to an equivalent basic graph.The formula rules will come from some equivalences between formulas and expressions We nowillustrate some of these equivalences. For a 1-ary predicate p, formula p ( v ) is equivalent to the 1-aryslice (cid:104){ v } , { p / v } : v (cid:105) , thus ¬ p ( v ) is equivalent to the 1-ary expression p ( v ) . Now, consider formu-las r ( u , v ) and s ( v , w ) . For the conjunction r ( u , v ) ∧ s ( v , w ) , we have a 3-ary slice S equivalent to it,namely the slice S = (cid:104) N , A : u v w (cid:105) , with sets N = { u , v , w } and A = { r ( u , v ) / u v , s ( v , w ) / v w } . For thedisjunction r ( u , v ) ∨ s ( v , w ) we have a 3-ary graph G such that r ( u , v ) ∨ s ( v , w ) ≡ G , namely the graph G with 2 slices: (cid:104){ u , v , w } , { r ( u , v ) / u v } : u v w (cid:105) and (cid:104){ u , v , w } , { s ( v , w ) / v w } : u v w (cid:105) . Also, as the con-ditional formula r ( u , v ) → s ( v , w ) is logically equivalent to ¬ r ( u , v ) ∨ s ( v , w ) , it is equivalent to the3-ary graph {(cid:104){ u , v , w } , { r ( u , v ) / u v } : u v w (cid:105) , (cid:104){ u , v , w } , { s ( v , w ) / v w } : u v w (cid:105)} . The existential formula ∃ y t ( u , y , w ) is equivalent to the 2-ary slice (cid:104){ u , v , w } , { t ( u , v , w ) / u v w } : u w (cid:105) . Also, as the universalformula ∀ y t ( u , y , w ) is logically equivalent to ¬∃ y ¬ t ( u , y , w ) , it is equivalent to the 2-ary expression (cid:104){ u , v , w } , { t ( u , v , w ) / u v w } : u w (cid:105) .The formula rules are the following 8 conversion rules eliminating formulas. ( α ) For an atomic formula p ( w ) : p ( w ) (cid:66) (cid:104) w , { p / w } : w (cid:105) . So, we replace u . = v, r ( u , v ) and t ( u , v , v ) by . = (cid:64) (cid:64) (cid:94) (cid:94) u v r (cid:65) (cid:65) (cid:93) (cid:93) u v and t (cid:62) (cid:62) (cid:81) (cid:81) (cid:113) (cid:113) u v , eloso & Veloso ( ⊥ ) ⊥ (cid:66) { } , i. e. we replace 0-ary formula ⊥ by the empty graph. ( ¬ ) ¬ ϕ (cid:66) ϕ . So, we replace ¬ ( r ( u , v ) → s ( v , w )) by the 3-ary expression r ( u , v ) → s ( v , w ) . • Given formulas ψ and θ , with u : = NF [ ψ ] and v : = NF [ θ ] , set w : = u ∪ v . ( ∧ ) ψ ∧ θ (cid:66) (cid:104) w , { ψ /(cid:126) u , θ /(cid:126) v } : (cid:126) w (cid:105) . Thus, we can replace formula r ( u , v ) ∧ s ( v , v ) by the 2-ary slice (cid:104){ u , v } , { r ( u , v ) / u v , s ( v , v ) / v } : u v (cid:105) , which we can represent as:r ( u , v ) (cid:59) (cid:59) (cid:100) (cid:100) s ( v , v ) (cid:51) (cid:51) (cid:73) (cid:73) u v ( ∨ ) ψ ∨ θ (cid:66) {(cid:104) w , { ψ /(cid:126) u } : (cid:126) w (cid:105) , (cid:104) w , { θ /(cid:126) v } : (cid:126) w (cid:105)} . So, we can replace formula r ( u , v ) ∨ s ( v , v ) by the 2-arygraph (cid:26) (cid:104){ u , v } , { r ( u , v ) / u v } : u v (cid:105) , (cid:104){ u , v } , s ( v , v ) / v } : u v (cid:105) (cid:27) . ( → ) ψ → θ (cid:66) (cid:104) w , { ψ /(cid:126) u , θ /(cid:126) v } : (cid:126) w (cid:105) . So, we can replace formula p ( u ) → r ( v , w ) by the 3-ary graph {(cid:104){ u , v , w } , { p ( u ) / u } : u v w (cid:105) , (cid:104){ u , v , w } , r ( v , w ) / v w } : u v w (cid:105)} . • Given a formula ϕ and a set v of names, set u : = w \ v , where w : = NF [ ϕ ] . ( ∃ ∗ ) For formula ∃ ∗ x ϕ [ v / x ] , ∃ ∗ x ϕ [ v / x ] (cid:66) (cid:104) w , { ϕ /(cid:126) w } : (cid:126) u (cid:105) . Thus, we can replace ∃ y ∃ z t ( u , y , z ) by thesingle-arc 1-ary slice (cid:104){ u , v , w } , { t ( u , v , w ) / u v w } : u (cid:105) , which we can represent as:t ( u , v , w ) (cid:59) (cid:59) (cid:79) (cid:79) (cid:99) (cid:99) u v w ( ∀ ∗ ) For formula ∀ ∗ x ϕ [ v / x ] , ∀ ∗ x ϕ [ v / x ] (cid:66) (cid:104) w , { ϕ /(cid:126) w } : (cid:126) u (cid:105) . So, can we replace ∀ y ∀ z t ( u , y , z ) by the 1-aryexpression (cid:104){ u , v , w } , { t ( u , v , w ) / u v w } : u (cid:105) , which we can represent as:t ( u , v , w ) (cid:59) (cid:59) (cid:79) (cid:79) (cid:99) (cid:99) u v w Example 4.1.
Consider a formula ϕ with list of names (cid:104) u , v , w (cid:105) , noted ϕ ( u , v , w ) .For the formula ∃ y ∀ z ϕ ( u , y , z ) , we have the conversions: ∃ y ∀ z ϕ ( u , y , z ) ( ∃ ∗ ) (cid:66) (cid:104){ u , v } , { ∀ z ϕ ( u , v , z ) u v } : u (cid:105) ( ∀ ∗ ) (cid:66) (cid:104){ u , v } , { (cid:104){ u , v , w } , { ϕ / u v w } : u v (cid:105) u v } : u (cid:105) For the formula ∀ y ∃ z ϕ ( u , y , z ) , we have the conversions: ∀ y ∃ z ϕ ( u , y , z ) ( ∀ ∗ ) (cid:66) (cid:104){ u , v } , { ∃ z ϕ ( u , y , z ) u v } : u (cid:105) ( ∃ ∗ ) (cid:66) (cid:104){ u , v } , { (cid:104){ u , v , w } , { ϕ / u v w } : u v (cid:105) u v } : u (cid:105) This graph can be represented as follows:u r ( u , v ) (cid:47) (cid:47) v s ( v , v ) (cid:49) (cid:49) (cid:75) (cid:75) u v A Graph Calculus for Predicate Logic
By applying the 8 formula rules in any context, one can transform an expression to an equivalentexpression without connectives or quantifiers.The equality rule is the following conversion rule, eliminating expression . = . ( . = ) . = (cid:66) (cid:104){ u } , /0 : (cid:104) u , u (cid:105)(cid:105) , where u ∈ Nm . So, we can replace slice (cid:104){ u , v , w } , { r / u v , . = / v w , s / u w } : v w (cid:105) by the slice (cid:104){ v , w } , { r / u v , (cid:104){ u } , /0 : (cid:104) u , u (cid:105)(cid:105) v w , s / u w } : v w (cid:105) .By using these 9 rules, one can eliminate logical symbols and predicates, but arcs whose expressionsare slices or graphs, perhaps complemented, may appear. For instance, this happens with v . = w and ∃ y ( r ( u , y ) ∧ s ( y , w )) . The following rules will address these cases.The complementation rules are the following 2 conversion rules, moving inside. ( ∪ ) For an n -ary graph H : H (cid:66) (cid:104) w , { T / w : T ∈ H } : w (cid:105) , where w is a list of n distinct names. So, we canreplace the complemented 1-ary graph { S , T } by the slice (cid:104){ v } , { S / v , T / v } : v (cid:105) . ( ) E (cid:66) E, i. e. eliminate double complementation.By applying these 2 complementation rules in any context, one can eliminate arcs whose expressionsare complemented graphs.The structural rules are the following 3 conversion rules. ( ∪ −→ ) S + H / v (cid:66) { S + T / v : T ∈ H } , i. e. replace addition of graph arc by alternative addition of itsslice arcs. So, we replace slice S + { T (cid:48) , T (cid:48)(cid:48) } / u by the graph { S + T (cid:48) / u , S + T (cid:48)(cid:48) / u } . ( T → ) S + T / v (cid:66) S v T , i. e. replace addition of slice arc by glued slice. ( ↑ ) For an n -ary expression E: E (cid:66) (cid:104) w , { E / w } : w (cid:105) , where w is a list of n distinct names. So, for r ∈ Pr ,we can replace 2-ary expression r by the 2-ary slice (cid:104){ u , u } , { r / u u } : u u (cid:105) .By means of rules ( ∪ −→ ) and ( T → ), one can eliminate arcs whose expressions are graphs or slices.Rule ( ↑ ) converts expressions to slices and serves to eliminate p: p ( ↑ ) (cid:66) (cid:104) u n , { p / u n } : u n (cid:105) , for p ∈ Pr n . Example 4.2.
Consider the formula r ( v , w ) . We proceed much as in Example 4.1.Formula ∃ y ∀ z r ( y , z ) converts to the -ary slice S = (cid:104){ v } , { (cid:104){ v , w } , { r ( v , w ) / v w } : v (cid:105) v } : λ (cid:105) .This slice S is not basic, but it can be converted to a basic slice by ( α ) as follows: (cid:104){ v } , { (cid:104){ v , w } , { r ( v , w ) v w } : v (cid:105) v } : λ (cid:105) ( α ) (cid:66) (cid:104){ v } , { (cid:104){ v , w } , { (cid:104){ v , w } , { rv w } : v w (cid:105) v w } : v (cid:105) v } : λ (cid:105) Formula ∀ y ∃ z r ( y , z ) converts to the -ary expression E = (cid:104){ v } , { (cid:104){ v , w } , { r ( v , w ) / v w } : v (cid:105) v } : λ (cid:105) .This expression E is not basic, but it can be converted to a basic expression F by ( α ) as follows: (cid:104){ v } , { (cid:104){ v , w } , { r ( v , w ) / v w } : v (cid:105) v } : λ (cid:105) ( α ) (cid:66) (cid:104){ v } , { (cid:104){ v , w } , {(cid:104){ v , w } , { rv w } : v w (cid:105) / v w } : v (cid:105) v } : λ (cid:105) Expression F can be converted to a basic -ary slice by ( ↑ ). eloso & Veloso T → ) gives some useful derived rules about arc addition, which we can use to shorten con-versions (such shortenings were used in the examples of Section 2). We can replace addition of: agraph arc by gluing the graph (( H −→ ): S + H / v (cid:66) (cid:63) S v H ), a complemented-graph arc by addition of par-allel complemented-slice arcs ( S + H / v (cid:66) (cid:63) S + { T / v : T ∈ H } ) and an equality arc by node renaming( S + . = / u v (cid:66) (cid:63) S [ u / v ] , S + . = / u v (cid:66) (cid:63) S [ v / u ] ).We can also replace n conjunctions and disjunctions by slices and graphs, respectively. Example 4.3.
Consider the formula s ( v (cid:48) , w (cid:48) ) ∧ ∃ x [ r ( v (cid:48) , x ) ∧ ¬∃ y ( r ( x , y ) ∧ s ( y , w (cid:48) ))] . This expression E can be converted to the -ary slice (cid:104) D : v (cid:48) w (cid:48) (cid:105) , where D is the draft of Example 3.2 (in 3.2). We can convert expressions in a modular way.
Lemma 4.1. If S (cid:66) (cid:63) G and E (cid:66) (cid:63) H , then S + E / v (cid:66) (cid:63) G v H .Proof. By ( H −→ ) rule: S + E / v (cid:66) (cid:63) G + H / v = { P + H / v : P ∈ G } ( H −→ ) (cid:66) { P v H : P ∈ G } = G v H .Thus, one can obtain a basic form for S + E / v from basic forms S b and E b , for S and E. Proposition 4.1.
Every n-ary expression E can be effectively converted to a basic n-ary graph E b .Proof. By induction on the structure of expressions.
Example 4.4.
Given the predicate symbols of Example 3.1 (in 3.2), consider the formula ψ : q ( v , w ) ∧ ∃ z [ p ( z ) ∧ r ( v , z ) ∧ ∃ x ∃ y ∃ y (cid:48) ( s ( v , x ) ∧ t ( x , w ) ∧ a ( x , y ) ∧ b ( y , w ))] . Consider also the formula θ : = ∃ x x x ∃ y (cid:48) ∃ y y ∃ z (cid:48) ∃ z , z χ , where χ is as follows: p ( z (cid:48) ) ∧ s ( v , x ) ∧ t ( x , z ) ∧ q ( y , z ) ∧ q ( y , z ) ∧ a ( x , v (cid:48) ) ∧ a ( x , v (cid:48) ) ∧ r ( v , z (cid:48) ) ∧ r ( y , z (cid:48) ) ∧ r ( y , z (cid:48) ) ∧ b ( y (cid:48) , w ) ∧ b ( y (cid:48) , z ) ∧ b ( y (cid:48) , z ) . Now, form the difference slice DS [ { a [ ψ ] } ∠ a [ θ ]] = (cid:104){ v , w } , { ψ / v w , θ / v w : λ }(cid:105) . Expressions ψ and θ canbe respectively converted to the -ary slices S = (cid:104) D (cid:48) : (cid:104) v , w (cid:105)(cid:105) and T = (cid:104) D (cid:48)(cid:48) : (cid:104) v , w (cid:105)(cid:105) , where D (cid:48) and D (cid:48)(cid:48) arethe drafts of Example 3.1. Thus, we have DS [ { a [ ψ ] } ∠ a [ θ ]] (cid:66) (cid:63) (cid:104){ v , w } , { S / v w , T / v w : λ }(cid:105) . Now, we cansee that (cid:104){ v , w } , { S / v w , T / v w : λ }(cid:105) ( T → ) (cid:66) (cid:104) S + T / v w : λ (cid:105) . Hence DS [ { a [ ψ ] } ∠ a [ θ ]] (cid:66) (cid:63) (cid:104) S + T / v w : λ (cid:105) . We now introduce the remaining rule and finish the presentation of our calculus.First, let us review Examples 4.3 and 4.4 (in 4.1). Formula E of Example 4.3 converts to the 2-aryslice (cid:104) D : v (cid:48) w (cid:48) (cid:105) , which was seen to be zero in Example 3.2 (in 3.2). Thus, formula E is unsatisfiable. Now,consider formulas ψ and θ of Example 4.4, where we have seen that DS [ { a [ ψ ] } ∠ a [ θ ]] (cid:66) (cid:63) (cid:104) S + T / v w : λ (cid:105) .Now, Example 3.1 (in 3.2) shows a morphism η : T (cid:57)(cid:57)(cid:75) S , with ˆ t η = (cid:104) v η , w η (cid:105) = (cid:104) v , w (cid:105) = ˆ s . Thus, draft S + T / v w is zero, whence, slice DS [ { a [ ψ ] } ∠ a [ θ ]] is null. Therefore, we can conclude that ψ | = θ . For instance, with 3 formulas, we have r ( u , v ) ∧ s ( v , w ) ∧ p ( w ) (cid:66) (cid:63) (cid:104){ u , v , w } , { r ( u , v ) / uv , s ( v , w ) / vw , p ( w ) / w } : u vw (cid:105) andr ( u , v ) ∨ s ( v , w ) ∨ p ( w ) (cid:66) (cid:63) {(cid:104){ u , v , w } , { r ( u , v ) / uv } : uvw (cid:105) , (cid:104){ u , v , w } , s ( v , w ) / vw } : uvw (cid:105) (cid:104){ u , v , w } , { p ( w ) / w } : uvw (cid:105)} .). Indeed: (cid:104){ v , w } , { S / vw , T / vw : λ }(cid:105) = (cid:104){ v , w } , { T / vw : λ }(cid:105) + S / vw ( T → ) (cid:66) (cid:104){ v , w } , { T / vw : λ }(cid:105) (cid:104) v , w (cid:105) S = (cid:104) S + T / vw : λ (cid:105) . A Graph Calculus for Predicate Logic
Example 4.5.
To introduce expansion and its usefulness, consider the -ary slice S : u T (cid:15) (cid:15) r (cid:47) (cid:47) w T (cid:15) (cid:15) w (cid:48) t (cid:47) (cid:47) u where T : = u r → w s → v , T : = u s → w t → v .Slice S is not zero; but in any model M , the pair ( g ( w ) , g ( w (cid:48) )) is either in [ s ] M or in [ s ] M . So, S isequivalent to the -ary graph G = { S + , S − } , with slices S + and S − , respectively as follows: u u r → w s → v (cid:15) (cid:15) r (cid:47) (cid:47) w T (cid:15) (cid:15) s (cid:126) (cid:126) w (cid:48) t (cid:47) (cid:47) v u T (cid:15) (cid:15) r (cid:47) (cid:47) w u s → w t → v (cid:15) (cid:15) s (cid:127) (cid:127) w (cid:48) t (cid:47) (cid:47) v Slices S + and S − are both zero, so graph G is zero. Thus, S is a null slice. The expansion rule will replace a slice by a graph with 2 alternative slices. ( (cid:67) ) For an m -ary slice T and v ∈ N S m : S (cid:67) { S v T , S + T / v } .Note that both S v T and S + T / v are basic whenever S and T are basic. Lemma 4.2.
For a slice S , an m-ary slice T and v ∈ Nm m : S ≡ { S v T , S + T / v } .Proof. By Proposition 3.2 (in 3.2), S + T / v ≡ S v T , and clearly S ≡ { S + T / v , S + T / v } .A derivation consists of applications of the conversion rules and the expansion rule: (cid:96) : = ( (cid:66) ∪ (cid:67) ) (cid:63) .A derivation is normal iff applications of conversion rules precede applications of the expansion rule:E (cid:66) (cid:63) G (cid:67) (cid:63) H . In practice, as we wish to derive a zero graph, we may erase slices already found to be zero.Let ϕ be the formula r ( u , w ) ∧ t ( w (cid:48) , v ) ∧ ¬∃ x [ r ( u , x ) ∧ s ( x , v )] ∧ ¬∃ y [ ¬ s ( u , y ) ∧ t ( y , v )] . ExpressionE : = ∃ x ϕ [ w (cid:48) / x ] converts to the slice S of Example 4.5, where it expands to the graph G . We thus havethe normal derivation E (cid:66) (cid:63) S (cid:67) G , with G a zero graph. Hence, formula ϕ is unsatisfiable. We now examine soundness and completeness of our calculus.Soundness is clear (as E ≡ F, whenever E (cid:96)
F): if E (cid:96) H and H is zero, then E is null. We will showthat a converse holds for basic graphs (if E b is null then E b expands to a zero graph), and we will havecompleteness of normal derivations: if E is null, then E (cid:66) (cid:63) E b (cid:67) (cid:63) H , for some zero graph H .Henceforth, all sketches, drafts, slices and graphs will be basic. We define the following families ofslices: the family Z of zero slices (cf. 3.2); the family Z ∗ of expansivley zero slices : the slices S suchthat, for some graph G ⊆ Z , S (cid:67) (cid:63) G ; the family Z ∞ of not expansively zero slices : the slices outside Z ∗ .The following simple properties of these families will be useful. Lemma 4.3.
For every graph G : G ⊆ Z ∗ iff, for some graph H ⊆ Z , G (cid:67) (cid:63) H .Proof. ( ⇒ ) If, for each S ∈ G , S (cid:67) (cid:63) H S and H S ⊆ Z , then, with H : = (cid:83) S ∈ G H S , G (cid:67) (cid:63) H and H ⊆ Z .( ⇐ ) if G (cid:67) (cid:63) H , with H ⊆ Z , then for each S ∈ G , S (cid:67) (cid:63) H S , with H S ⊆ H ⊆ Z , whence S ∈ Z ∗ . eloso & Veloso Lemma 4.4.
For every graph G : G ⊆ Z ∗ iff, for some graph H ⊆ Z ∗ , G (cid:67) (cid:63) H .Proof. By Lemma 4.3, since Z ⊆ Z ∗ . ( ⇒ ) If G ⊆ Z ∗ , then G (cid:67) (cid:63) H , with H ⊆ Z ⊆ Z ∗ . ( ⇐ ) If G (cid:67) (cid:63) H ,with H ⊆ Z ∗ , then H (cid:67) (cid:63) H (cid:48) , with H (cid:48) ⊆ Z , whence G (cid:67) (cid:63) H (cid:48) , with H (cid:48) ⊆ Z ∗ . Corollary 4.1.
For S ∈ Z ∞ , m-slice T and v ∈ N S m : one of S v T and S + T / v is not expansively zero.Proof. By Lemma 4.4: if { S v T , S + T / v } ⊆ Z ∗ , then S ∈ Z ∗ .We will show that a slice S ∈ Z ∞ has a model M with [[ S ]] M (cid:54) = /0 Given a slice S ∈ Z ∞ , we can obtain a set of slices S n = (cid:104) N n , A n : ˆ s n (cid:105) with S n ∈ Z ∞ , for n ∈ IN,whose underlying drafts are connected by morphisms µ n from S n to S n + , which we extend naturallyto morphisms µ ij : S i (cid:57)(cid:57)(cid:75) S j , for i ≤ j . Consider the co-limit of this draft diagram: sketch Σ = (cid:104) N , A (cid:105) with morphisms ν n : S n (cid:57)(cid:57)(cid:75) Σ (cf. 3.2). We use this co-limit sketch Σ to define a natural model M with M : = N , and p M : = { v ∈ M n : p / v ∈ A } , for p ∈ Pr n .By construction, the co-limit sketch Σ is saturated in the following sense: given any m -ary slice T = (cid:104) T : ˆ t (cid:105) and w ∈ N m , we have arc T / w ∈ A or there is a morphism η : T (cid:57)(cid:57)(cid:75) Σ with ˆ t η = w.We can establish that satisfying assignments are morphisms. Lemma 4.5.
Given a draft D and g : N D → M, g : D → M iff g : D (cid:57)(cid:57)(cid:75) Σ .Proof. By structural induction (on the total number of complemented slice arcs occurring in D ).Finally, since ν : S (cid:57)(cid:57)(cid:75) Σ , we have ν ( ˆ s ) ∈ [[ S ]] M (cid:54) = /0 .Therefore, if G (cid:54)⊆ Z ∗ , then G is not null. Theorem 4.1.
Consider an n-ary expression E . ( (cid:96) ) If E (cid:96) H and H is zero, then E is null. ( (cid:66) (cid:63) ; (cid:67) (cid:63) ) If E is null, then E (cid:66) (cid:63) E b (cid:67) (cid:63) H , for some zero n-ary graph H . We now present some concluding remarks, including comparison with related works.We have presented a refutation graph calculus for classical first-order predicate logic. This soundand complete calculus reduces logical consequence to establishing that a constructed graph is null, i. e.has empty extension in every model. Our calculus uses formulas directly and can represent them by arcs.We have a simple strategy for establishing that a graph G is null: first convert G to basic form, thenapply repeatedly the expansion rule, erasing slices found to be zero, which is decidable (cf. 3.2), tryingto obtain the empty graph. Conversion to basic form, though tedious, can be automated (cf. 4.1); someingenuity may be required in selecting which slice of a graph to expand and how to do it (cf. 4.2), but theembedded slices can provide a finer control. In fact, a (human-guided) system may be envisaged.The idea of using graphical representations for logic appears in several works.Girard’s proof nets have been applied to classical logic [10], where sequent proofs are translated toproof nets. In our case, however, the (macroscopic) structure of normal derivations is rather simple: firstconversions, then expansion (cf. 4.2).Graph rewriting motivates a graphical representation of first-order predicate logic. For the binaryfragment (with . = ), a representation of formulas by graph predicates has been obtained by Rensink [9]:a correspondence between sets of graph predicates with depth up to n and a hierarchy ∃ ( ¬∃ ) n . There are68 A Graph Calculus for Predicate Logic close similarities between some concepts (our sketches are his graphs), but his graph predicates involvemorphisms (even though they may be reminiscent of our arcs).Our approach does resemble Peirce’s ideas [11] as formulated by Dau [4]. In our representation,we use names only for referring to them in the meta-language: if we erase these names, we obtain arepresentation quite close to the Peirce’s ones (cf. Example 4.2 in 4.1). Besides our refutation approachwith normal derivations, there are some differences: we allow formulas directly in the graphs (and needconversion rules), rather than pre-processing diagrams for them; Peirce considers the fragment ¬ , ∧ and ∃ , whereas we use graphs to cope with ∨ , which seems to lead to less cumbersome representations; wehandle . = , first as a 2-ary predicate and then as a special one, whereas Peirce represents it directly byidentity lines, leading to more compact diagrams. So, there appear to be advantages and disadvantageson both sides.Some further work on our calculus would be: add function symbols (for this purpose, some ideasused for structured nodes [6] seem promising); provide a detailed comparison between it and [9] (sucha comparison between Peirce’s and Rensink’s approaches is reported difficult [9], p. 333); develop a“middle-ground” between our approach and Dau’s [4], with the best features from each one. References [1] T. Barkowsky (2010):
Diagrams in the mind: visual or spatial? . In A. K. Goel, M. Jamnik & N. H.Narayanan, editors:
LNAI , Series
A graphical calculus . In B. Moller, editor:
Mathematics of Program Con-struction LNCS Series
Proofs with graphs . In R. Backhouse, editor:
Science of Computer Program-ming , Elsevier, volume (26), pp. 197–216, doi:10.1016/0167-6423(95)00025-9.[4] F. Dau (2006):
Mathematical logic with diagrams, based on the existential graphs of Peirce
On a graph calculus for algebras ofrelations . In W. Hodges & R. de Queiroz, editors:
LNAI , Series
Positive fork graph calculus . In S. Artemov,editor:
LNCS , Series
A calculus for graphs with complement .In A. K. Goel, M. Jamnik & N. H. Narayanan, editors:
LNAI , Series
Categories for the Working Mathematician , second edition, Springer-Verlag, Berlin.[9] A. Rensink (2004):
Representing first-order logic using graphs , In H. Ehrig et al. editors:
LNCS , Series
Proof nets for classical logic , J. Logic and Computat. volume(13) number(5) , pp.776–797, doi:10.1093/logcom/13.5.777.[11] J. F. Sowa (2011):
Existential graphs , doi:10.1515/semi.2011.060.[12] G. Takeuti (1975):
Proof Theory , North-Holland, Amsterdam.[13] P. A. S. Veloso and S. R. M. Veloso (2012):
On Graph refutation for relational inclusions , In S. R. dellaRocca and E. Pimentel, editors: