• No results found

The above Section 4.5 presented the dependency graph (DG) that the mathemati- cian has annotated during the computerisation of the DRa aspect of the document. In this section we provide different representation of the DG graph. We transform the DG into the so called graph of logical precedences (GoLP). We also define the logical precedence of mathematical relations in this Section. Moreover, we define a function that when applied to the dependency graph (DG) returns the graph of logical precedences (GoLP). We also express the algorithm for extracting the GoLP from the DG graph. All these definitions and presentations are based on the example of the Pythagoras’ theorem (see Figure 4.6).

4.6.1

Logical precedences of mathematical relations

The annotation identifies and makes explicit different parts of the text, stores either the mathematical or structural or both roles of each chunk of text, and annotates the relations between recognised chunks of text (see Section 4.3.1). The use of the DRa system allows us to express relations explicitly in the computerised version of the original document. This explicit representation of relations allows to build a graph of logical precedences between different chunks of text.

4.6.1.1 What is logical precedence?

The logical precedence between two chunks of text indicates the relative po- sitions of the chunks in a sequence of reasoning steps. These (and other) steps, contribute to the analysis of the logical correctness of the original text. Logical

precedence is independent of the sequential textual appearance of the chunks of text in a document. For instance, in Figure 4.8, the “Proof” (node D) is stated after “Corollary” (node C). Moreover, both nodes relate to each other, mainly node D is said to justify node C. However, the logical precedence between D and C is the opposite (see the direction of the arrow established between both nodes in the right hand side of Figure 4.11). In such case, we say that D logically precedes C.

Another explanation of the logical precedence is described in the following para- graph. In the “world” of mathematics if we want to say that a statement s is valid or states the truth, we need to give evidence or prove it beforehand. This means that the reasoning p of the statement s has to be performed and checked before s is stated. This checking of the proof object beforehand stating the statement is expressed as the logical precedence, which implies that s succeeds p.

Similarly, if we want to say that some statement a uses statement b, it could be expressed in terms of logical precedence as a succeeds b.

We introduce two different kinds of logical precedences:

• Strong Logical Precedence ≺: If node A has been proved by the block of reasoning steps introduced in node B, we say that A logically succeeds B and write B ≺ A.

Similarly if a node A uses a declared/defined symbol or a statement intro- duced by a node B, we say that A follows B and write B ≺ A.

Equally, if node A1 is one of the cases of the proof of the statement introduced in node B, we say that all the cases have to be proved before the statement in node B is said to be true or justified. In particular a case stated in node A has to be proved before the whole proof is stated. So we say that B succeeds A and write B ≺ A.

• Common Logical Precedence ⋍: If there is a connection between node A and node B, for example both nodes can use at least one common symbol or a statement, then we write A ⋍ B. This common logical precedence does not impose the direction of the precedence, this means that from the A ⋍ B one can get the precedence A≺ B or the precedence B ≺ A. The common logical precedence is similar to the equality sign “=”, however statements in nodes A and B do not impose equality on any level of information.

In Section 4.2.2 we defined the DRa ontology which allows to specify the rela- tions between recognised StructuredUnits in a document. Each such DRa relation

G′ = (V, E) where E⊆ V× L p× V′

V′ ={n| n= nodeId} – set of vertices

E′ ={e| e= (n

src, α′, n′anch) ∧ n′src, n′anch ∈ V′ ∧ α′ ∈ Lp} – set of edges

where Lp ={⋍, ≺} – the set of logical precedences in GoLP

Figure 4.12: The formal presentation of a graph of logical precedences (GoLP).

between two nodes introduces logical precedence. Table 4.2 shows relations and their logical precedence in reasoning.

Relation Meaning Precedence

(A, justifies, B) A is the proof object of B A≺ B

(A, subpartOf, B) A is a case or a part of B A≺ B

(A, uses, B) A uses a statement or a symbol of B B≺ A (A, inconsistentWith, B) some statement in A contradicts statement in B B≺ A (A, exemplifies, B) Statement in A plays a role of example for B B≺ A (A, relatesTo, B) There is a connection between A and B A ⋍ B

Table 4.2: DRa relations their meanings and logical precedence

4.6.2

The automatically generated Graph of Logical Prece-

dences: GoLP

Using logical precedences of defined relations (see Table 4.2), one can automati- cally generate for a mathematical text, a Graph of Logical Precedences (GoLP). The right hand side of figure 4.11 shows the automatically generated GoLP for ex- ample 4.6. GoLP is a directed graph with labeled edges, achieved by the automatic transformation of the dependency graph using the transformation function Trans presented in Figure 4.13. In a GoLP, the direction of an edge together with the label of that edge expresses the logical precedence corresponding to the relation in a dependency graph from which the edge (in the GoLP) was achieved. Figure 4.12 gives the formal definition of a Graph of Logical Precedences.

The transformation process of the dependency graph DG to the graph of logical precedences GoLP of the annotated document is easy and simple. It consist of two actions performed on each edge of the DG graph: (1) it changes the direction of the arc of the edge, if required, (2) it changes the label for the edge of the graph. As said above, during the transformation we change the arcs of the edges drown in the DG graph to some opposite arrows connecting the same nodes as the previous relation. The arc direction transformation is done according to Table 4.4. In our example of Figure 4.11, the arrows that the direction has changed from the DG are

Graph transformation Trans : GDG→ G′GoLP Trans((n, a, e)) = (n′, e) (where n′= Trans V(n) and e′ = Trans E(e)) Vertex transformation TransV : VDG→ V′GoLP TransV(n) = n Edge transformation TransE: EDG→ E′GoLP

TransE((nsrc, relatesTo, nanch)) = (n

src, ⋍, n′anch)

TransE((nsrc, justifies, nanch)) = (n

src,≺, n′anch)

TransE((nsrc, subpartOf, nanch)) = (n

src,≺, n′anch)

TransE((nsrc, uses, nanch)) = (n

anch,≺, n′src)

TransE((nsrc, inconsistentWith, nanch)) = (n′anch,≺, n′src)

TransE((nsrc, exemplifies, nanch)) = (n

anch,≺, n′src)

(where n′

src = TransV(nsrc) and n′anch = TransV(nanch))

Figure 4.13: The dependency graph transformation function.

display in ’green’ color on the right hand side of Figure 4.11.

At the same time, as we change the arc direction, we assign a new label for the arc according to the same Table 4.4. The labels present the two types of logical precedences, i.e., strong logical precedence ≺ and common logical precedence ⋍.

Finally, let us assume that G is the dependency graph (DG) and G′ is the graph

of logical precedences (GoLP) shown in Figure 4.11 (on the left hand side and the right hand side of the Figure), respectively. Following the algorithm expressed above, the transformation function Trans shown in Figure 4.13 and applied to the graph G results in G′.