• No results found

This section expresses the annotation process that a mathematician has to follow to computerise his document with the MathLang DRa aspect. The annotation can be accomplished independently from the CGa and TSa aspects. It could be

performed either on the already annotated text with the CGa or TSa aspects, or could be performed on the original document.

We present the DRa aspect annotation process on the approach of H. Baren- dregt to the proof of the Pythagoras’ theorem, as seen in Figure 4.6. This version of the proof is said to be more formal and concrete compared to the original version of the proof by G.H. Hardy and E.M. Wright [HW80].

Lemma 1. For m, n∈ N one has: m2 = 2n2 =⇒ m = n = 0

Proof. Define on N the predicate:

P (m) ⇐⇒ ∃n.m2 = 2n2 & m > 0.

Claim. P (m) =⇒ ∃m< m.P (m). Indeed suppose m2= 2n2 and m > 0. It follows

that m2 is even, but then m must be even, as odds square to odds. So m = 2k and we have

2n2 = m2 = 4k2 =⇒ n2= 2k2

Since m > 0, if follows that m2 > 0, n2 > 0 and n > 0. Therefore P (n). Moreover,

m2 = n2+ n2> n2, so m2> n2 and hence m > n. So we can take m′ = n.

By the claim∀m ∈ N.¬P (m), since there are no infinite descending sequences of natural numbers.

Now suppose m2 = 2n2 with m6= 0. Then m > 0 and hence P (m). Contradic- tion. Therefore m = 0. But then also n = 0.

Corollary 1. √2 /∈ Q

Proof. Suppose√2 ∈ Q, i.e. √2 = p/q with p ∈ Z, q ∈ Z − {0}. Then √2 = m/n with m =|p|, n = |q| 6= 0. It follows that m2 = 2n2. But then n = 0 by the lemma.

Contradiction shows that√2 /∈ Q.

Figure 4.6: The proof of Pythagoras’ theorem, of the irrationality of√2 – H. Baren- dregt’s version presented in [Bar06]

The MathLang user who wants to annotate a document with all three MathLang aspects (i.e., CGa, TSa and DRa) uses the TEXmacs editor with the MathLang plugin. The annotation process does not require a lot of knowledge. Moreover, the original document can be annotated independently for all three aspects.

4.3.1

What does the user have to do?

To annotate a mathematical text, the user follows three easy steps:

1. He wraps chunks of text with boxes. Then he uniquely names each box. Unicity allows avoiding problems when stating relations between some boxes. If the user

Lemma 1.

For m, n∈ N one has: m2= 2n2=

⇒ m = n = 0A

Proof.

Define on N the predicate: P (m) ⇐⇒ ∃n.m2= 2n2 & m > 0.

E

Claim. P (m) =⇒ ∃mF′< m.P (m′).

Indeed suppose m2= 2n2and m > 0. It follows that m2 is even, but then m must be

even, as odds square to odds. So m = 2k and we have 2n2 = m2 = 4k2=

⇒n2= 2k2

Since m > 0, if follows that m2> 0, n2 > 0 and n > 0. Therefore P (n). Moreover,

m2= n2+ n2> n2, so m2> n2and hence m > n. So we can take m= n.

G

By the claim∀m ∈ N.¬P (m), since there are no infinite descending sequences of natural numbers.

Now suppose m2= 2n2

with m6= 0. Then m > 0 and hence P (m). Contradiction.H

Therefore m = 0. But then also n = 0.I

B

Corollary 1. √2 /C∈ Q

Proof. Suppose √2 ∈ Q, i.e. √2 = p/q with p ∈ Z, q ∈ Z − {0}. Then √2 = m/n with m = |p|, n = |q| 6= 0. It follows that m2 = 2n2. But then n = 0 by the lemma.

Contradiction shows that√2 /∈ Q.

D

Figure 4.7: The presentation of Figure 4.6’s example with annotated and uniquely named boxes, which contains hidden attributes, i.e., mathematical roles, assigned to each box name.

makes a mistake and annotates two boxes with the same name, the validation of the DRa aspect will provide a warning saying that it is not allowed. This will be discussed in more details in Section 4.4. For our example of Figure 4.6, the names of those boxes are: A, B, C, D, E, F, G, H, I. The view of our example with annotated and named boxes is shown on Figure 4.7.

2. He assigns to each (name of a) box, structural or/and mathematical rhetorical roles which this box may play. He can either use the structural/mathematical roles listed in Table 4.5, or specify his own. He uses the RDF triples approach to assign a role to a specific uniquely named box. For our example of Figure 4.7, we assigned the roles as stated in the left hand column of Table 4.1.

3. He makes explicit the relations between wrapped chunks of texts using the re- lation names of Table 4.5. For our example of Figure 4.6, the relations could be assigned as presented on the second column of Table 4.1. The relations are presented as visible and labelled arrows in Figure 4.8.

Assigned rhetorical roles Relations

(A, hasMathematicalRhetoricalRole, lemma) (B, hasMathematicalRhetoricalRole, proof) (C, hasMathematicalRhetoricalRole, corollary) (D, hasMathematicalRhetoricalRole, proof) (E, hasMathematicalRhetoricalRole, definition) (F, hasMathematicalRhetoricalRole, claim) (G, hasMathematicalRhetoricalRole, proof) (H, hasMathematicalRhetoricalRole, case) (I, hasMathematicalRhetoricalRole, case)

(B, justifies, A) (F, uses, E) (G, uses, E) (G, justifies, F ) (H, uses, E) (H, subpartOf, B) (I, subpartOf, B) (D, uses, A) (D, justifies, C)

Table 4.1: Annotation of the example from Figure 4.6 presented as RDF triples.

We use RDF triples [LS99] to represent the relationships between the boxes annotated by the mathematician. Each triple is expressed by a subject-predicate- object triple, where a predicate (i.e., a property) denotes a relationship. The order in a triple between subject and object is significant, and when transformed into a dependency graph the direction of the arc the triple makes, always points toward the object.

As said earlier, the mathematician uses the TEXmacs editor with the Math- Lang plugin to annotate mathematical document with all three aspects of the framework. The view of the document computerised with the DRa aspect on top of the original document using the TEXmacs editor is different from the one pre- sented above. The above example was used to present and provide an idea of the annotation process required by the mathematician to be performed for annotating the DRa aspect. The original view of the annotated document with the DRa nodes

Lemma 1.

For m, n∈ N one has: m2

= 2n2

=⇒ m = n = 0A

Proof.

Define on N the predicate: P (m) ⇐⇒ ∃n.m2

= 2n2 & m > 0. E Claim. P (m) =⇒ ∃mF′< m.P (m). Indeed suppose m2 = 2n2

and m > 0. It follows that m2

is even, but then m must be even, as odds square to odds. So m = 2k and we have 2n2

= m2

= 4k2

=⇒n2

= 2k2

Since m > 0, if follows that m2

> 0, n2

> 0 and n > 0. Therefore P (n). Moreover, m2 = n2 + n2 > n2 , so m2 > n2

and hence m > n. So we can take m′= n.

G

By the claim∀m ∈ N.¬P (m), since there are no infinite descending sequences of natural numbers.

Now suppose m2= 2n2

with m6= 0. Then m > 0 and hence P (m). Contradiction.H

Therefore m = 0. But then also n = 0.I

B

Corollary 1. √2 /C∈ Q

Proof. Suppose √2 ∈ Q, i.e. √2 = p/q with p ∈ Z, q ∈ Z − {0}. Then √2 = m/n with m = |p|, n = |q| 6= 0. It follows that m2 = 2n2. But then n = 0 by the lemma.

Contradiction shows that√2 /∈ Q.

D justifies justifies uses uses justifies uses uses subpartOf subpartOf

Figure 4.8: The presentation of Figure 4.6’s example with uniquely named boxes, annotated and made visible relations on top of the original CML view of the ex- ample.

and relations is presented on Figure A.6.